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 af78ec66cf3..b41641b0e10 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 00000000000..19c6b66c175 --- /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 f14c6d69f67..ee5ca55c7a1 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 00000000000..d965797b062 --- /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 3963d6f0937..7c2b56c0400 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 00000000000..b2fd80474e0 --- /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 3738837292f..0bf07600b13 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 ee224524d1a..683fb13455f 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 cfb1745331e..f14bfaa8e1e 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 8656e373e3e..d682d7cbf97 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 a2efdde5293..994918b58dd 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 ed40aba8c60..0ff2c4bff27 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 e8378b0cd6d..b5d968e78f1 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 689ed2406b2..eca340dab11 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 f7f021d890d..e431c880f1d 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 8a5f5f9b11b..7924ad61c99 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 30139ebf100..0d6efa57131 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 a4b96c68018..3115b0f666e 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 9271fe5c766..1b897ec426c 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 0c99cb618c1..2d566cdd701 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) - ); - }); - }); }); });