diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/asset.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/asset.proto index b079e5c5d7b..eb07c0493b6 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/asset.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/asset.proto @@ -29,30 +29,31 @@ option java_package = "com.google.cloud.securitycenter.v1"; option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; option ruby_package = "Google::Cloud::SecurityCenter::V1"; -// Cloud Security Command Center's (Cloud SCC) representation of a Google Cloud -// Platform (GCP) resource. +// Security Command Center representation of a Google Cloud +// resource. // -// The Asset is a Cloud SCC resource that captures information about a single -// GCP resource. All modifications to an Asset are only within the context of -// Cloud SCC and don't affect the referenced GCP resource. +// The Asset is a Security Command Center resource that captures information +// about a single Google Cloud resource. All modifications to an Asset are only +// within the context of Security Command Center and don't affect the referenced +// Google Cloud resource. message Asset { option (google.api.resource) = { type: "securitycenter.googleapis.com/Asset" pattern: "organizations/{organization}/assets/{asset}" }; - // Cloud SCC managed properties. These properties are managed by Cloud SCC and - // cannot be modified by the user. + // Security Command Center managed properties. These properties are managed by + // Security Command Center and cannot be modified by the user. message SecurityCenterProperties { - // The full resource name of the GCP resource this asset + // The full resource name of the Google Cloud resource this asset // represents. This field is immutable after create time. See: // https://cloud.google.com/apis/design/resource_names#full_resource_name string resource_name = 1; - // The type of the GCP resource. Examples include: APPLICATION, + // The type of the Google Cloud resource. Examples include: APPLICATION, // PROJECT, and ORGANIZATION. This is a case insensitive field defined by - // Cloud SCC and/or the producer of the resource and is immutable - // after create time. + // Security Command Center and/or the producer of the resource and is + // immutable after create time. string resource_type = 2; // The full resource name of the immediate parent of the resource. See: @@ -76,9 +77,10 @@ message Asset { string resource_project_display_name = 8; } - // IAM Policy information associated with the GCP resource described by the - // Cloud SCC asset. This information is managed and defined by the GCP - // resource and cannot be modified by the user. + // Cloud IAM Policy information associated with the Google Cloud resource + // described by the Security Command Center asset. This information is managed + // and defined by the Google Cloud resource and cannot be modified by the + // user. message IamPolicy { // The JSON representation of the Policy associated with the asset. // See https://cloud.google.com/iam/reference/rest/v1/Policy for format @@ -92,27 +94,28 @@ message Asset { // "organizations/{organization_id}/assets/{asset_id}". string name = 1; - // Cloud SCC managed properties. These properties are managed by - // Cloud SCC and cannot be modified by the user. + // Security Command Center managed properties. These properties are managed by + // Security Command Center and cannot be modified by the user. SecurityCenterProperties security_center_properties = 2; // Resource managed properties. These properties are managed and defined by - // the GCP resource and cannot be modified by the user. + // the Google Cloud resource and cannot be modified by the user. map resource_properties = 7; // User specified security marks. These marks are entirely managed by the user // and come from the SecurityMarks resource that belongs to the asset. SecurityMarks security_marks = 8; - // The time at which the asset was created in Cloud SCC. + // The time at which the asset was created in Security Command Center. google.protobuf.Timestamp create_time = 9; - // The time at which the asset was last updated, added, or deleted in Cloud - // SCC. + // The time at which the asset was last updated, added, or deleted in Security + // Command Center. google.protobuf.Timestamp update_time = 10; - // IAM Policy information associated with the GCP resource described by the - // Cloud SCC asset. This information is managed and defined by the GCP - // resource and cannot be modified by the user. + // Cloud IAM Policy information associated with the Google Cloud resource + // described by the Security Command Center asset. This information is managed + // and defined by the Google Cloud resource and cannot be modified by the + // user. IamPolicy iam_policy = 11; } diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/finding.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/finding.proto index 9a3261c4c7a..4ccdc495c36 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/finding.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/finding.proto @@ -30,11 +30,11 @@ option java_package = "com.google.cloud.securitycenter.v1"; option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; option ruby_package = "Google::Cloud::SecurityCenter::V1"; -// Cloud Security Command Center (Cloud SCC) finding. +// Security Command Center finding. // // A finding is a record of assessment data like security, risk, health, or -// privacy, that is ingested into Cloud SCC for presentation, notification, -// analysis, policy testing, and enforcement. For example, a +// privacy, that is ingested into Security Command Center for presentation, +// notification, analysis, policy testing, and enforcement. For example, a // cross-site scripting (XSS) vulnerability in an App Engine application is a // finding. message Finding { @@ -69,12 +69,12 @@ message Finding { // "organizations/{organization_id}/sources/{source_id}" string parent = 2; - // For findings on Google Cloud Platform (GCP) resources, the full resource - // name of the GCP resource this finding is for. See: + // For findings on Google Cloud resources, the full resource + // name of the Google Cloud resource this finding is for. See: // https://cloud.google.com/apis/design/resource_names#full_resource_name - // When the finding is for a non-GCP resource, the resourceName can be a - // customer or partner defined string. - // This field is immutable after creation time. + // When the finding is for a non-Google Cloud resource, the resourceName can + // be a customer or partner defined string. This field is immutable after + // creation time. string resource_name = 3; // The state of the finding. @@ -85,9 +85,9 @@ message Finding { // Example: "XSS_FLASH_INJECTION" string category = 5; - // The URI that, if available, points to a web page outside of Cloud SCC - // where additional information about the finding can be found. This field is - // guaranteed to be either empty or a well formed URL. + // The URI that, if available, points to a web page outside of Security + // Command Center where additional information about the finding can be found. + // This field is guaranteed to be either empty or a well formed URL. string external_uri = 6; // Source specific properties. These properties are managed by the source @@ -106,6 +106,6 @@ message Finding { // the firewall became open. The accuracy is determined by the detector. google.protobuf.Timestamp event_time = 9; - // The time at which the finding was created in Cloud SCC. + // The time at which the finding was created in Security Command Center. google.protobuf.Timestamp create_time = 10; } diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/notification_message.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/notification_message.proto index b9dfb171b13..08b6b7c88eb 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/notification_message.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/notification_message.proto @@ -18,6 +18,7 @@ package google.cloud.securitycenter.v1; import "google/api/annotations.proto"; import "google/cloud/securitycenter/v1/finding.proto"; +import "google/cloud/securitycenter/v1/resource.proto"; option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter"; @@ -38,4 +39,7 @@ message NotificationMessage { // populated. Finding finding = 2; } + + // The Cloud resource tied to this notification's Finding. + Resource resource = 3; } diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/organization_settings.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/organization_settings.proto index d9d9aed7926..66b659bc5f0 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/organization_settings.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/organization_settings.proto @@ -26,8 +26,8 @@ option java_package = "com.google.cloud.securitycenter.v1"; option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; option ruby_package = "Google::Cloud::SecurityCenter::V1"; -// User specified settings that are attached to the Cloud Security Command -// Center (Cloud SCC) organization. +// User specified settings that are attached to the Security Command +// Center organization. message OrganizationSettings { option (google.api.resource) = { type: "securitycenter.googleapis.com/OrganizationSettings" diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/resource.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/resource.proto new file mode 100644 index 00000000000..855e697373f --- /dev/null +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/resource.proto @@ -0,0 +1,46 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.securitycenter.v1; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter"; +option java_multiple_files = true; +option java_outer_classname = "ResourceProto"; +option java_package = "com.google.cloud.securitycenter.v1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1"; + +// Information related to the Google Cloud resource. +message Resource { + // The full resource name of the resource. See: + // https://cloud.google.com/apis/design/resource_names#full_resource_name + string name = 1; + + // The full resource name of project that the resource belongs to. + string project = 2; + + // The human readable name of project that the resource belongs to. + string project_display_name = 3; + + // The full resource name of resource's parent. + string parent = 4; + + // The human readable name of resource's parent. + string parent_display_name = 5; +} diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/security_marks.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/security_marks.proto index 229aff32dd9..47a4a150be5 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/security_marks.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/security_marks.proto @@ -26,9 +26,9 @@ option java_package = "com.google.cloud.securitycenter.v1"; option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; option ruby_package = "Google::Cloud::SecurityCenter::V1"; -// User specified security marks that are attached to the parent Cloud Security -// Command Center (Cloud SCC) resource. Security marks are scoped within a Cloud -// SCC organization -- they can be modified and viewed by all users who have +// User specified security marks that are attached to the parent Security +// Command Center resource. Security marks are scoped within a Security Command +// Center organization -- they can be modified and viewed by all users who have // proper permissions on the organization. message SecurityMarks { option (google.api.resource) = { diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/securitycenter_service.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/securitycenter_service.proto index bb9a82849d1..9a88e1e85bd 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/securitycenter_service.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/securitycenter_service.proto @@ -438,15 +438,15 @@ message GroupAssetsRequest { // // Usage: This should be milliseconds since epoch or an RFC3339 string. // Examples: - // "update_time = \"2019-06-10T16:07:18-07:00\"" - // "update_time = 1560208038000" + // `update_time = "2019-06-10T16:07:18-07:00"` + // `update_time = 1560208038000` // // * create_time: `=`, `>`, `<`, `>=`, `<=` // // Usage: This should be milliseconds since epoch or an RFC3339 string. // Examples: - // "create_time = \"2019-06-10T16:07:18-07:00\"" - // "create_time = 1560208038000" + // `create_time = "2019-06-10T16:07:18-07:00"` + // `create_time = 1560208038000` // // * iam_policy.policy_blob: `=`, `:` // * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` @@ -461,6 +461,12 @@ message GroupAssetsRequest { // * security_center_properties.resource_owners: `=`, `:` // // For example, `resource_properties.size = 100` is a valid filter string. + // + // Use a partial match on the empty string to filter based on a property + // existing:`resource_properties.my_property : ""` + // + // Use a negated partial match on the empty string to filter based on a + // property not existing: `-resource_properties.my_property : ""` string filter = 2; // Required. Expression that defines what assets fields to use for grouping. @@ -595,13 +601,19 @@ message GroupFindingsRequest { // // Usage: This should be milliseconds since epoch or an RFC3339 string. // Examples: - // "event_time = \"2019-06-10T16:07:18-07:00\"" - // "event_time = 1560208038000" + // `event_time = "2019-06-10T16:07:18-07:00"` + // `event_time = 1560208038000` // // * security_marks.marks: `=`, `:` // * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` // // For example, `source_properties.size = 100` is a valid filter string. + // + // Use a partial match on the empty string to filter based on a property + // existing: `source_properties.my_property : ""` + // + // Use a negated partial match on the empty string to filter based on a + // property not existing: `-source_properties.my_property : ""` string filter = 2; // Required. Expression that defines what assets fields to use for grouping @@ -803,15 +815,15 @@ message ListAssetsRequest { // // Usage: This should be milliseconds since epoch or an RFC3339 string. // Examples: - // "update_time = \"2019-06-10T16:07:18-07:00\"" - // "update_time = 1560208038000" + // `update_time = "2019-06-10T16:07:18-07:00"` + // `update_time = 1560208038000` // // * create_time: `=`, `>`, `<`, `>=`, `<=` // // Usage: This should be milliseconds since epoch or an RFC3339 string. // Examples: - // "create_time = \"2019-06-10T16:07:18-07:00\"" - // "create_time = 1560208038000" + // `create_time = "2019-06-10T16:07:18-07:00"` + // `create_time = 1560208038000` // // * iam_policy.policy_blob: `=`, `:` // * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` @@ -826,6 +838,12 @@ message ListAssetsRequest { // * security_center_properties.resource_owners: `=`, `:` // // For example, `resource_properties.size = 100` is a valid filter string. + // + // Use a partial match on the empty string to filter based on a property + // existing: `resource_properties.my_property : ""` + // + // Use a negated partial match on the empty string to filter based on a + // property not existing: `-resource_properties.my_property : ""` string filter = 2; // Expression that defines what fields and order to use for sorting. The @@ -992,13 +1010,19 @@ message ListFindingsRequest { // // Usage: This should be milliseconds since epoch or an RFC3339 string. // Examples: - // "event_time = \"2019-06-10T16:07:18-07:00\"" - // "event_time = 1560208038000" + // `event_time = "2019-06-10T16:07:18-07:00"` + // `event_time = 1560208038000` // // security_marks.marks: `=`, `:` // source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` // // For example, `source_properties.size = 100` is a valid filter string. + // + // Use a partial match on the empty string to filter based on a property + // existing: `source_properties.my_property : ""` + // + // Use a negated partial match on the empty string to filter based on a + // property not existing: `-source_properties.my_property : ""` string filter = 2; // Expression that defines what fields and order to use for sorting. The @@ -1078,7 +1102,7 @@ message ListFindingsRequest { message ListFindingsResponse { // Result containing the Finding and its StateChange. message ListFindingsResult { - // Information related to the Google Cloud Platform (GCP) resource that is + // Information related to the Google Cloud resource that is // associated with this finding. message Resource { // The full resource name of the resource. See: diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/source.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/source.proto index 6fca821b826..e7b1a1835f4 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/source.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/source.proto @@ -26,7 +26,7 @@ option java_package = "com.google.cloud.securitycenter.v1"; option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; option ruby_package = "Google::Cloud::SecurityCenter::V1"; -// Cloud Security Command Center's (Cloud SCC) finding source. A finding source +// Security Command Center finding source. A finding source // is an entity or a mechanism that can produce a finding. A source is like a // container of findings that come from the same scanner, logger, monitor, and // other tools. diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/asset.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/asset.proto index aaa18bcbaa9..bfcae368859 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/asset.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/asset.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -30,30 +29,31 @@ option java_package = "com.google.cloud.securitycenter.v1p1beta1"; option php_namespace = "Google\\Cloud\\SecurityCenter\\V1p1beta1"; option ruby_package = "Google::Cloud::SecurityCenter::V1p1beta1"; -// Cloud Security Command Center's (Cloud SCC) representation of a Google Cloud -// Platform (GCP) resource. +// Security Command Center representation of a Google Cloud +// resource. // -// The Asset is a Cloud SCC resource that captures information about a single -// GCP resource. All modifications to an Asset are only within the context of -// Cloud SCC and don't affect the referenced GCP resource. +// The Asset is a Security Command Center resource that captures information +// about a single Google Cloud resource. All modifications to an Asset are only +// within the context of Security Command Center and don't affect the referenced +// Google Cloud resource. message Asset { option (google.api.resource) = { type: "securitycenter.googleapis.com/Asset" pattern: "organizations/{organization}/assets/{asset}" }; - // Cloud SCC managed properties. These properties are managed by Cloud SCC and - // cannot be modified by the user. + // Security Command Center managed properties. These properties are managed by + // Security Command Center and cannot be modified by the user. message SecurityCenterProperties { - // The full resource name of the GCP resource this asset + // The full resource name of the Google Cloud resource this asset // represents. This field is immutable after create time. See: // https://cloud.google.com/apis/design/resource_names#full_resource_name string resource_name = 1; - // The type of the GCP resource. Examples include: APPLICATION, + // The type of the Google Cloud resource. Examples include: APPLICATION, // PROJECT, and ORGANIZATION. This is a case insensitive field defined by - // Cloud SCC and/or the producer of the resource and is immutable - // after create time. + // Security Command Center and/or the producer of the resource and is + // immutable after create time. string resource_type = 2; // The full resource name of the immediate parent of the resource. See: @@ -77,12 +77,13 @@ message Asset { string resource_project_display_name = 8; } - // IAM Policy information associated with the GCP resource described by the - // Cloud SCC asset. This information is managed and defined by the GCP - // resource and cannot be modified by the user. + // Cloud IAM Policy information associated with the Google Cloud resource + // described by the Security Command Center asset. This information is managed + // and defined by the Google Cloud resource and cannot be modified by the + // user. message IamPolicy { // The JSON representation of the Policy associated with the asset. - // See https://cloud.google.com/iam/reference/rest/v1/Policy for + // See https://cloud.google.com/iam/docs/reference/rest/v1/Policy for // format details. string policy_blob = 1; } @@ -93,27 +94,28 @@ message Asset { // "organizations/{organization_id}/assets/{asset_id}". string name = 1; - // Cloud SCC managed properties. These properties are managed by - // Cloud SCC and cannot be modified by the user. + // Security Command Center managed properties. These properties are managed by + // Security Command Center and cannot be modified by the user. SecurityCenterProperties security_center_properties = 2; // Resource managed properties. These properties are managed and defined by - // the GCP resource and cannot be modified by the user. + // the Google Cloud resource and cannot be modified by the user. map resource_properties = 7; // User specified security marks. These marks are entirely managed by the user // and come from the SecurityMarks resource that belongs to the asset. SecurityMarks security_marks = 8; - // The time at which the asset was created in Cloud SCC. + // The time at which the asset was created in Security Command Center. google.protobuf.Timestamp create_time = 9; // The time at which the asset was last updated, added, or deleted in Cloud // SCC. google.protobuf.Timestamp update_time = 10; - // IAM Policy information associated with the GCP resource described by the - // Cloud SCC asset. This information is managed and defined by the GCP - // resource and cannot be modified by the user. + // Cloud IAM Policy information associated with the Google Cloud resource + // described by the Security Command Center asset. This information is managed + // and defined by the Google Cloud resource and cannot be modified by the + // user. IamPolicy iam_policy = 11; } diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/finding.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/finding.proto index 6428027df6a..21b655362d2 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/finding.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/finding.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -31,12 +30,12 @@ option java_package = "com.google.cloud.securitycenter.v1p1beta1"; option php_namespace = "Google\\Cloud\\SecurityCenter\\V1p1beta1"; option ruby_package = "Google::Cloud::SecurityCenter::V1p1beta1"; -// Cloud Security Command Center (Cloud SCC) finding. +// Security Command Center finding. // // A finding is a record of assessment data (security, risk, health or privacy) -// ingested into Cloud SCC for presentation, notification, analysis, -// policy testing, and enforcement. For example, an XSS vulnerability in an -// App Engine application is a finding. +// ingested into Security Command Center for presentation, notification, +// analysis, policy testing, and enforcement. For example, an XSS vulnerability +// in an App Engine application is a finding. message Finding { option (google.api.resource) = { type: "securitycenter.googleapis.com/Finding" @@ -69,12 +68,12 @@ message Finding { // "organizations/{organization_id}/sources/{source_id}" string parent = 2; - // For findings on Google Cloud Platform (GCP) resources, the full resource - // name of the GCP resource this finding is for. See: + // For findings on Google Cloud resources, the full resource + // name of the Google Cloud resource this finding is for. See: // https://cloud.google.com/apis/design/resource_names#full_resource_name - // When the finding is for a non-GCP resource, the resourceName can be a - // customer or partner defined string. - // This field is immutable after creation time. + // When the finding is for a non-Google Cloud resource, the resourceName can + // be a customer or partner defined string. This field is immutable after + // creation time. string resource_name = 3; // The state of the finding. @@ -85,9 +84,9 @@ message Finding { // Example: "XSS_FLASH_INJECTION" string category = 5; - // The URI that, if available, points to a web page outside of Cloud SCC - // where additional information about the finding can be found. This field is - // guaranteed to be either empty or a well formed URL. + // The URI that, if available, points to a web page outside of Security + // Command Center where additional information about the finding can be found. + // This field is guaranteed to be either empty or a well formed URL. string external_uri = 6; // Source specific properties. These properties are managed by the source @@ -106,6 +105,6 @@ message Finding { // the firewall became open. The accuracy is determined by the detector. google.protobuf.Timestamp event_time = 9; - // The time at which the finding was created in Cloud SCC. + // The time at which the finding was created in Security Command Center. google.protobuf.Timestamp create_time = 10; } diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/notification_config.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/notification_config.proto index 7cbb87b24b1..6f9e596691b 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/notification_config.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/notification_config.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -27,19 +26,16 @@ option java_multiple_files = true; option java_package = "com.google.cloud.securitycenter.v1p1beta1"; option php_namespace = "Google\\Cloud\\SecurityCenter\\V1p1beta1"; option ruby_package = "Google::Cloud::SecurityCenter::V1p1beta1"; - -// The Pub/Sub Topic resource definition is in google/cloud/pubsub/v1/, -// but we do not import that proto directly; therefore, we redefine the -// pattern here. option (google.api.resource_definition) = { type: "pubsub.googleapis.com/Topic" pattern: "projects/{project}/topics/{topic}" }; -// Cloud Security Command Center (Cloud SCC) notification configs. +// Security Command Center notification configs. // -// A notification config is a Cloud SCC resource that contains the configuration -// to send notifications for create/update events of findings, assets and etc. +// A notification config is a Security Command Center resource that contains the +// configuration to send notifications for create/update events of findings, +// assets and etc. message NotificationConfig { option (google.api.resource) = { type: "securitycenter.googleapis.com/NotificationConfig" @@ -94,14 +90,14 @@ message NotificationConfig { // The type of events the config is for, e.g. FINDING. EventType event_type = 3; - // The PubSub topic to send notifications to. Its format is + // The Pub/Sub topic to send notifications to. Its format is // "projects/[project_id]/topics/[topic]". string pubsub_topic = 4 [ (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" } ]; // Output only. The service account that needs "pubsub.topics.publish" - // permission to publish to the PubSub topic. + // permission to publish to the Pub/Sub topic. string service_account = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; // The config for triggering notifications. diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/notification_message.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/notification_message.proto index 3abbcef32af..fd3c23b6344 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/notification_message.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/notification_message.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -20,6 +19,7 @@ package google.cloud.securitycenter.v1p1beta1; import "google/api/annotations.proto"; import "google/cloud/securitycenter/v1p1beta1/asset.proto"; import "google/cloud/securitycenter/v1p1beta1/finding.proto"; +import "google/cloud/securitycenter/v1p1beta1/resource.proto"; option csharp_namespace = "Google.Cloud.SecurityCenter.V1P1Beta1"; option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1p1beta1;securitycenter"; @@ -28,7 +28,7 @@ option java_package = "com.google.cloud.securitycenter.v1p1beta1"; option php_namespace = "Google\\Cloud\\SecurityCenter\\V1p1beta1"; option ruby_package = "Google::Cloud::SecurityCenter::V1p1beta1"; -// Cloud SCC's Notification +// Security Command Center's Notification message NotificationMessage { // Name of the notification config that generated current notification. string notification_config_name = 1; @@ -39,4 +39,7 @@ message NotificationMessage { // populated. Finding finding = 2; } + + // The Cloud resource tied to the notification. + Resource resource = 3; } diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/organization_settings.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/organization_settings.proto index 9c38b87ba0b..1be72dd7b6c 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/organization_settings.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/organization_settings.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -27,8 +26,8 @@ option java_package = "com.google.cloud.securitycenter.v1p1beta1"; option php_namespace = "Google\\Cloud\\SecurityCenter\\V1p1beta1"; option ruby_package = "Google::Cloud::SecurityCenter::V1p1beta1"; -// User specified settings that are attached to the Cloud Security Command -// Center (Cloud SCC) organization. +// User specified settings that are attached to the Security Command +// Center organization. message OrganizationSettings { option (google.api.resource) = { type: "securitycenter.googleapis.com/OrganizationSettings" diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/resource.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/resource.proto new file mode 100644 index 00000000000..6b8570993fc --- /dev/null +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/resource.proto @@ -0,0 +1,46 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// 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.v1p1beta1; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.SecurityCenter.V1P1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1p1beta1;securitycenter"; +option java_multiple_files = true; +option java_outer_classname = "ResourceProto"; +option java_package = "com.google.cloud.securitycenter.v1p1beta1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1p1beta1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1p1beta1"; + +// Information related to the Google Cloud resource. +message Resource { + // The full resource name of the resource. See: + // https://cloud.google.com/apis/design/resource_names#full_resource_name + string name = 1; + + // The full resource name of project that the resource belongs to. + string project = 2; + + // The human readable name of project that the resource belongs to. + string project_display_name = 3; + + // The full resource name of resource's parent. + string parent = 4; + + // The human readable name of resource's parent. + string parent_display_name = 5; +} diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response.proto index b8b9ea489ed..720ffc4fae6 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/security_marks.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/security_marks.proto index ac54bc19a4f..11a1dd85ab2 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/security_marks.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/security_marks.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -27,9 +26,9 @@ option java_package = "com.google.cloud.securitycenter.v1p1beta1"; option php_namespace = "Google\\Cloud\\SecurityCenter\\V1p1beta1"; option ruby_package = "Google::Cloud::SecurityCenter::V1p1beta1"; -// User specified security marks that are attached to the parent Cloud Security -// Command Center (Cloud SCC) resource. Security marks are scoped within a Cloud -// SCC organization -- they can be modified and viewed by all users who have +// User specified security marks that are attached to the parent Security +// Command Center resource. Security marks are scoped within a Security Command +// Center organization -- they can be modified and viewed by all users who have // proper permissions on the organization. message SecurityMarks { option (google.api.resource) = { diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/securitycenter_service.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/securitycenter_service.proto index dcd9af68361..7431515bfb8 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/securitycenter_service.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/securitycenter_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -236,7 +235,6 @@ service SecurityCenter { option (google.api.method_signature) = "resource,permissions"; } - // // Creates or updates a finding. The corresponding source must exist for a // finding creation to succeed. rpc UpdateFinding(UpdateFindingRequest) returns (Finding) { @@ -447,15 +445,15 @@ message GroupAssetsRequest { // // Usage: This should be milliseconds since epoch or an RFC3339 string. // Examples: - // "update_time = \"2019-06-10T16:07:18-07:00\"" - // "update_time = 1560208038000" + // `update_time = "2019-06-10T16:07:18-07:00"` + // `update_time = 1560208038000` // // * create_time: `=`, `>`, `<`, `>=`, `<=` // // Usage: This should be milliseconds since epoch or an RFC3339 string. // Examples: - // "create_time = \"2019-06-10T16:07:18-07:00\"" - // "create_time = 1560208038000" + // `create_time = "2019-06-10T16:07:18-07:00"` + // `create_time = 1560208038000` // // * iam_policy.policy_blob: `=`, `:` // * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` @@ -470,6 +468,12 @@ message GroupAssetsRequest { // * security_center_properties.resource_owners: `=`, `:` // // For example, `resource_properties.size = 100` is a valid filter string. + // + // Use a partial match on the empty string to filter based on a property + // existing: `resource_properties.my_property : ""` + // + // Use a negated partial match on the empty string to filter based on a + // property not existing: `-resource_properties.my_property : ""` string filter = 2; // Required. Expression that defines what assets fields to use for grouping. @@ -527,11 +531,6 @@ message GroupAssetsRequest { // NOW. google.protobuf.Timestamp read_time = 5; - // Filter that specifies what fields to further filter on *after* the query - // filter has been executed. Currently only `state_change` is supported and - // requires compare_duration to be specified. - string having = 6; - // The value returned by the last `GroupAssetsResponse`; indicates // that this is a continuation of a prior `GroupAssets` call, and that the // system should return the next page of data. @@ -609,13 +608,19 @@ message GroupFindingsRequest { // // Usage: This should be milliseconds since epoch or an RFC3339 string. // Examples: - // "event_time = \"2019-06-10T16:07:18-07:00\"" - // "event_time = 1560208038000" + // `event_time = "2019-06-10T16:07:18-07:00"` + // `event_time = 1560208038000` // // * security_marks.marks: `=`, `:` // * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` // // For example, `source_properties.size = 100` is a valid filter string. + // + // Use a partial match on the empty string to filter based on a property + // existing: `source_properties.my_property : ""` + // + // Use a negated partial match on the empty string to filter based on a + // property not existing: `-source_properties.my_property : ""` string filter = 2; // Required. Expression that defines what assets fields to use for grouping @@ -653,12 +658,18 @@ message GroupFindingsRequest { // // Possible "state_change" values when compare_duration is specified: // - // * "CHANGED": indicates that the finding was present at the start of - // compare_duration, but changed its state at read_time. - // * "UNCHANGED": indicates that the finding was present at the start of - // compare_duration and did not change state at read_time. - // * "ADDED": indicates that the finding was not present at the start - // of compare_duration, but was present at read_time. + // * "CHANGED": indicates that the finding was present and matched the given + // filter at the start of compare_duration, but changed its + // state at read_time. + // * "UNCHANGED": indicates that the finding was present and matched the given + // filter at the start of compare_duration and did not change + // state at read_time. + // * "ADDED": indicates that the finding did not match the given filter or + // was not present at the start of compare_duration, but was + // present at read_time. + // * "REMOVED": indicates that the finding was present and matched the + // filter at the start of compare_duration, but did not match + // the filter at read_time. // // If compare_duration is not specified, then the only possible state_change // is "UNUSED", which will be the state_change set for all findings present @@ -668,11 +679,6 @@ message GroupFindingsRequest { // `group_by`. google.protobuf.Duration compare_duration = 5; - // Filter that specifies what fields to further filter on *after* the query - // filter has been executed. Currently only `finding.state` and `state_change` - // are supported and requires compare_duration to be specified. - string having = 6; - // The value returned by the last `GroupFindingsResponse`; indicates // that this is a continuation of a prior `GroupFindings` call, and // that the system should return the next page of data. @@ -816,15 +822,15 @@ message ListAssetsRequest { // // Usage: This should be milliseconds since epoch or an RFC3339 string. // Examples: - // "update_time = \"2019-06-10T16:07:18-07:00\"" - // "update_time = 1560208038000" + // `update_time = "2019-06-10T16:07:18-07:00"` + // `update_time = 1560208038000` // // * create_time: `=`, `>`, `<`, `>=`, `<=` // // Usage: This should be milliseconds since epoch or an RFC3339 string. // Examples: - // "create_time = \"2019-06-10T16:07:18-07:00\"" - // "create_time = 1560208038000" + // `create_time = "2019-06-10T16:07:18-07:00"` + // `create_time = 1560208038000` // // * iam_policy.policy_blob: `=`, `:` // * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` @@ -839,6 +845,12 @@ message ListAssetsRequest { // * security_center_properties.resource_owners: `=`, `:` // // For example, `resource_properties.size = 100` is a valid filter string. + // + // Use a partial match on the empty string to filter based on a property + // existing: `resource_properties.my_property : ""` + // + // Use a negated partial match on the empty string to filter based on a + // property not existing: `-resource_properties.my_property : ""` string filter = 2; // Expression that defines what fields and order to use for sorting. The @@ -896,11 +908,6 @@ message ListAssetsRequest { // read_time. google.protobuf.Duration compare_duration = 5; - // Filter that specifies what fields to further filter on *after* the query - // filter has been executed. Currently only `state_change` is supported and - // requires compare_duration to be specified. - string having = 6; - // Optional. // A field mask to specify the ListAssetsResult fields to be listed in the // response. @@ -1012,13 +1019,19 @@ message ListFindingsRequest { // // Usage: This should be milliseconds since epoch or an RFC3339 string. // Examples: - // "event_time = \"2019-06-10T16:07:18-07:00\"" - // "event_time = 1560208038000" + // `event_time = "2019-06-10T16:07:18-07:00"` + // `event_time = 1560208038000` // // security_marks.marks: `=`, `:` // source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` // // For example, `source_properties.size = 100` is a valid filter string. + // + // Use a partial match on the empty string to filter based on a property + // existing: `source_properties.my_property : ""` + // + // Use a negated partial match on the empty string to filter based on a + // property not existing: `-source_properties.my_property : ""` string filter = 2; // Expression that defines what fields and order to use for sorting. The @@ -1061,23 +1074,24 @@ message ListFindingsRequest { // // Possible "state_change" values when compare_duration is specified: // - // * "CHANGED": indicates that the finding was present at the start of - // compare_duration, but changed its state at read_time. - // * "UNCHANGED": indicates that the finding was present at the start of - // compare_duration and did not change state at read_time. - // * "ADDED": indicates that the finding was not present at the start - // of compare_duration, but was present at read_time. + // * "CHANGED": indicates that the finding was present and matched the given + // filter at the start of compare_duration, but changed its + // state at read_time. + // * "UNCHANGED": indicates that the finding was present and matched the given + // filter at the start of compare_duration and did not change + // state at read_time. + // * "ADDED": indicates that the finding did not match the given filter or + // was not present at the start of compare_duration, but was + // present at read_time. + // * "REMOVED": indicates that the finding was present and matched the + // filter at the start of compare_duration, but did not match + // the filter at read_time. // // If compare_duration is not specified, then the only possible state_change // is "UNUSED", which will be the state_change set for all findings present at // read_time. google.protobuf.Duration compare_duration = 5; - // Filter that specifies what fields to further filter on *after* the query - // filter has been executed. Currently only `finding.state` and `state_change` - // are supported and requires compare_duration to be specified. - string having = 6; - // Optional. // A field mask to specify the Finding fields to be listed in the response. // An empty field mask will list all fields. @@ -1098,7 +1112,7 @@ message ListFindingsRequest { message ListFindingsResponse { // Result containing the Finding and its StateChange. message ListFindingsResult { - // Information related to the Google Cloud Platform (GCP) resource that is + // Information related to the Google Cloud resource that is // associated with this finding. message Resource { // The full resource name of the resource. See: diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/source.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/source.proto index d591a05cce4..0e940df627a 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/source.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/source.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -27,7 +26,7 @@ option java_package = "com.google.cloud.securitycenter.v1p1beta1"; option php_namespace = "Google\\Cloud\\SecurityCenter\\V1p1beta1"; option ruby_package = "Google::Cloud::SecurityCenter::V1p1beta1"; -// Cloud Security Command Center's (Cloud SCC) finding source. A finding source +// Security Command Center finding source. A finding source // is an entity or a mechanism that can produce a finding. A source is like a // container of findings that come from the same scanner, logger, monitor, etc. message Source { @@ -51,7 +50,7 @@ message Source { // The description of the source (max of 1024 characters). // Example: - // "Cloud Security Scanner is a web security scanner for common + // "Web Security Scanner is a web security scanner for common // vulnerabilities in App Engine applications. It can automatically // scan and detect four common vulnerabilities, including cross-site-scripting // (XSS), Flash injection, mixed content (HTTP in HTTPS), and diff --git a/packages/google-cloud-securitycenter/protos/protos.d.ts b/packages/google-cloud-securitycenter/protos/protos.d.ts index 36b859448eb..2216b95dee9 100644 --- a/packages/google-cloud-securitycenter/protos/protos.d.ts +++ b/packages/google-cloud-securitycenter/protos/protos.d.ts @@ -845,6 +845,9 @@ export namespace google { /** NotificationMessage finding */ finding?: (google.cloud.securitycenter.v1.IFinding|null); + + /** NotificationMessage resource */ + resource?: (google.cloud.securitycenter.v1.IResource|null); } /** Represents a NotificationMessage. */ @@ -862,6 +865,9 @@ export namespace google { /** NotificationMessage finding. */ public finding?: (google.cloud.securitycenter.v1.IFinding|null); + /** NotificationMessage resource. */ + public resource?: (google.cloud.securitycenter.v1.IResource|null); + /** NotificationMessage event. */ public event?: "finding"; @@ -936,6 +942,120 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** Properties of a Resource. */ + interface IResource { + + /** Resource name */ + name?: (string|null); + + /** Resource project */ + project?: (string|null); + + /** Resource projectDisplayName */ + projectDisplayName?: (string|null); + + /** Resource parent */ + parent?: (string|null); + + /** Resource parentDisplayName */ + parentDisplayName?: (string|null); + } + + /** Represents a Resource. */ + class Resource implements IResource { + + /** + * Constructs a new Resource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IResource); + + /** Resource name. */ + public name: string; + + /** Resource project. */ + public project: string; + + /** Resource projectDisplayName. */ + public projectDisplayName: string; + + /** Resource parent. */ + public parent: string; + + /** Resource parentDisplayName. */ + public parentDisplayName: string; + + /** + * Creates a new Resource instance using the specified properties. + * @param [properties] Properties to set + * @returns Resource instance + */ + public static create(properties?: google.cloud.securitycenter.v1.IResource): google.cloud.securitycenter.v1.Resource; + + /** + * Encodes the specified Resource message. Does not implicitly {@link google.cloud.securitycenter.v1.Resource.verify|verify} messages. + * @param message Resource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.IResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Resource.verify|verify} messages. + * @param message Resource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.IResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Resource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Resource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.Resource; + + /** + * Decodes a Resource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Resource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.Resource; + + /** + * Verifies a Resource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Resource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Resource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Resource; + + /** + * Creates a plain object from a Resource message. Also converts values to other types if specified. + * @param message Resource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.Resource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Resource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of an OrganizationSettings. */ interface IOrganizationSettings { @@ -9419,6 +9539,9 @@ export namespace google { /** NotificationMessage finding */ finding?: (google.cloud.securitycenter.v1p1beta1.IFinding|null); + + /** NotificationMessage resource */ + resource?: (google.cloud.securitycenter.v1p1beta1.IResource|null); } /** Represents a NotificationMessage. */ @@ -9436,6 +9559,9 @@ export namespace google { /** NotificationMessage finding. */ public finding?: (google.cloud.securitycenter.v1p1beta1.IFinding|null); + /** NotificationMessage resource. */ + public resource?: (google.cloud.securitycenter.v1p1beta1.IResource|null); + /** NotificationMessage event. */ public event?: "finding"; @@ -9510,6 +9636,120 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** Properties of a Resource. */ + interface IResource { + + /** Resource name */ + name?: (string|null); + + /** Resource project */ + project?: (string|null); + + /** Resource projectDisplayName */ + projectDisplayName?: (string|null); + + /** Resource parent */ + parent?: (string|null); + + /** Resource parentDisplayName */ + parentDisplayName?: (string|null); + } + + /** Represents a Resource. */ + class Resource implements IResource { + + /** + * Constructs a new Resource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1p1beta1.IResource); + + /** Resource name. */ + public name: string; + + /** Resource project. */ + public project: string; + + /** Resource projectDisplayName. */ + public projectDisplayName: string; + + /** Resource parent. */ + public parent: string; + + /** Resource parentDisplayName. */ + public parentDisplayName: string; + + /** + * Creates a new Resource instance using the specified properties. + * @param [properties] Properties to set + * @returns Resource instance + */ + public static create(properties?: google.cloud.securitycenter.v1p1beta1.IResource): google.cloud.securitycenter.v1p1beta1.Resource; + + /** + * Encodes the specified Resource message. Does not implicitly {@link google.cloud.securitycenter.v1p1beta1.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.v1p1beta1.IResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1p1beta1.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.v1p1beta1.IResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Resource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Resource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1p1beta1.Resource; + + /** + * Decodes a Resource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Resource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1p1beta1.Resource; + + /** + * Verifies a Resource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Resource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Resource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1p1beta1.Resource; + + /** + * Creates a plain object from a Resource message. Also converts values to other types if specified. + * @param message Resource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1p1beta1.Resource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Resource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of an OrganizationSettings. */ interface IOrganizationSettings { @@ -11013,9 +11253,6 @@ export namespace google { /** GroupAssetsRequest readTime */ readTime?: (google.protobuf.ITimestamp|null); - /** GroupAssetsRequest having */ - having?: (string|null); - /** GroupAssetsRequest pageToken */ pageToken?: (string|null); @@ -11047,9 +11284,6 @@ export namespace google { /** GroupAssetsRequest readTime. */ public readTime?: (google.protobuf.ITimestamp|null); - /** GroupAssetsRequest having. */ - public having: string; - /** GroupAssetsRequest pageToken. */ public pageToken: string; @@ -11253,9 +11487,6 @@ export namespace google { /** GroupFindingsRequest compareDuration */ compareDuration?: (google.protobuf.IDuration|null); - /** GroupFindingsRequest having */ - having?: (string|null); - /** GroupFindingsRequest pageToken */ pageToken?: (string|null); @@ -11287,9 +11518,6 @@ export namespace google { /** GroupFindingsRequest compareDuration. */ public compareDuration?: (google.protobuf.IDuration|null); - /** GroupFindingsRequest having. */ - public having: string; - /** GroupFindingsRequest pageToken. */ public pageToken: string; @@ -11985,9 +12213,6 @@ export namespace google { /** ListAssetsRequest compareDuration */ compareDuration?: (google.protobuf.IDuration|null); - /** ListAssetsRequest having */ - having?: (string|null); - /** ListAssetsRequest fieldMask */ fieldMask?: (google.protobuf.IFieldMask|null); @@ -12022,9 +12247,6 @@ export namespace google { /** ListAssetsRequest compareDuration. */ public compareDuration?: (google.protobuf.IDuration|null); - /** ListAssetsRequest having. */ - public having: string; - /** ListAssetsRequest fieldMask. */ public fieldMask?: (google.protobuf.IFieldMask|null); @@ -12341,9 +12563,6 @@ export namespace google { /** ListFindingsRequest compareDuration */ compareDuration?: (google.protobuf.IDuration|null); - /** ListFindingsRequest having */ - having?: (string|null); - /** ListFindingsRequest fieldMask */ fieldMask?: (google.protobuf.IFieldMask|null); @@ -12378,9 +12597,6 @@ export namespace google { /** ListFindingsRequest compareDuration. */ public compareDuration?: (google.protobuf.IDuration|null); - /** ListFindingsRequest having. */ - public having: string; - /** ListFindingsRequest fieldMask. */ public fieldMask?: (google.protobuf.IFieldMask|null); diff --git a/packages/google-cloud-securitycenter/protos/protos.js b/packages/google-cloud-securitycenter/protos/protos.js index 8f07d7a3f44..b40245a3531 100644 --- a/packages/google-cloud-securitycenter/protos/protos.js +++ b/packages/google-cloud-securitycenter/protos/protos.js @@ -2177,6 +2177,7 @@ * @interface INotificationMessage * @property {string|null} [notificationConfigName] NotificationMessage notificationConfigName * @property {google.cloud.securitycenter.v1.IFinding|null} [finding] NotificationMessage finding + * @property {google.cloud.securitycenter.v1.IResource|null} [resource] NotificationMessage resource */ /** @@ -2210,6 +2211,14 @@ */ NotificationMessage.prototype.finding = null; + /** + * NotificationMessage resource. + * @member {google.cloud.securitycenter.v1.IResource|null|undefined} resource + * @memberof google.cloud.securitycenter.v1.NotificationMessage + * @instance + */ + NotificationMessage.prototype.resource = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -2252,6 +2261,8 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.notificationConfigName); if (message.finding != null && Object.hasOwnProperty.call(message, "finding")) $root.google.cloud.securitycenter.v1.Finding.encode(message.finding, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + $root.google.cloud.securitycenter.v1.Resource.encode(message.resource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -2292,6 +2303,9 @@ case 2: message.finding = $root.google.cloud.securitycenter.v1.Finding.decode(reader, reader.uint32()); break; + case 3: + message.resource = $root.google.cloud.securitycenter.v1.Resource.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -2339,6 +2353,11 @@ return "finding." + error; } } + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.cloud.securitycenter.v1.Resource.verify(message.resource); + if (error) + return "resource." + error; + } return null; }; @@ -2361,6 +2380,11 @@ throw TypeError(".google.cloud.securitycenter.v1.NotificationMessage.finding: object expected"); message.finding = $root.google.cloud.securitycenter.v1.Finding.fromObject(object.finding); } + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.cloud.securitycenter.v1.NotificationMessage.resource: object expected"); + message.resource = $root.google.cloud.securitycenter.v1.Resource.fromObject(object.resource); + } return message; }; @@ -2377,8 +2401,10 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + 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")) { @@ -2386,6 +2412,8 @@ if (options.oneofs) object.event = "finding"; } + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.cloud.securitycenter.v1.Resource.toObject(message.resource, options); return object; }; @@ -2403,6 +2431,282 @@ return NotificationMessage; })(); + v1.Resource = (function() { + + /** + * Properties of a Resource. + * @memberof google.cloud.securitycenter.v1 + * @interface IResource + * @property {string|null} [name] Resource name + * @property {string|null} [project] Resource project + * @property {string|null} [projectDisplayName] Resource projectDisplayName + * @property {string|null} [parent] Resource parent + * @property {string|null} [parentDisplayName] Resource parentDisplayName + */ + + /** + * Constructs a new Resource. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a Resource. + * @implements IResource + * @constructor + * @param {google.cloud.securitycenter.v1.IResource=} [properties] Properties to set + */ + function Resource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Resource name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.Resource + * @instance + */ + Resource.prototype.name = ""; + + /** + * Resource project. + * @member {string} project + * @memberof google.cloud.securitycenter.v1.Resource + * @instance + */ + Resource.prototype.project = ""; + + /** + * Resource projectDisplayName. + * @member {string} projectDisplayName + * @memberof google.cloud.securitycenter.v1.Resource + * @instance + */ + Resource.prototype.projectDisplayName = ""; + + /** + * Resource parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1.Resource + * @instance + */ + Resource.prototype.parent = ""; + + /** + * Resource parentDisplayName. + * @member {string} parentDisplayName + * @memberof google.cloud.securitycenter.v1.Resource + * @instance + */ + Resource.prototype.parentDisplayName = ""; + + /** + * Creates a new Resource instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.Resource + * @static + * @param {google.cloud.securitycenter.v1.IResource=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Resource} Resource instance + */ + Resource.create = function create(properties) { + return new Resource(properties); + }; + + /** + * Encodes the specified Resource message. Does not implicitly {@link google.cloud.securitycenter.v1.Resource.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.Resource + * @static + * @param {google.cloud.securitycenter.v1.IResource} message Resource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Resource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.project != null && Object.hasOwnProperty.call(message, "project")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.project); + if (message.projectDisplayName != null && Object.hasOwnProperty.call(message, "projectDisplayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.projectDisplayName); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.parent); + if (message.parentDisplayName != null && Object.hasOwnProperty.call(message, "parentDisplayName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.parentDisplayName); + return writer; + }; + + /** + * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Resource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.Resource + * @static + * @param {google.cloud.securitycenter.v1.IResource} message Resource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Resource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Resource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.Resource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.Resource} Resource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Resource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.Resource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.project = reader.string(); + break; + case 3: + message.projectDisplayName = reader.string(); + break; + case 4: + message.parent = reader.string(); + break; + case 5: + message.parentDisplayName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Resource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.Resource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.Resource} Resource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Resource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Resource message. + * @function verify + * @memberof google.cloud.securitycenter.v1.Resource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Resource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.project != null && message.hasOwnProperty("project")) + if (!$util.isString(message.project)) + return "project: string expected"; + if (message.projectDisplayName != null && message.hasOwnProperty("projectDisplayName")) + if (!$util.isString(message.projectDisplayName)) + return "projectDisplayName: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.parentDisplayName != null && message.hasOwnProperty("parentDisplayName")) + if (!$util.isString(message.parentDisplayName)) + return "parentDisplayName: string expected"; + return null; + }; + + /** + * Creates a Resource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.Resource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.Resource} Resource + */ + Resource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Resource) + return object; + var message = new $root.google.cloud.securitycenter.v1.Resource(); + if (object.name != null) + message.name = String(object.name); + if (object.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); + return message; + }; + + /** + * Creates a plain object from a Resource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.Resource + * @static + * @param {google.cloud.securitycenter.v1.Resource} message Resource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Resource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.project = ""; + object.projectDisplayName = ""; + object.parent = ""; + object.parentDisplayName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.project != null && message.hasOwnProperty("project")) + object.project = message.project; + if (message.projectDisplayName != null && message.hasOwnProperty("projectDisplayName")) + object.projectDisplayName = message.projectDisplayName; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.parentDisplayName != null && message.hasOwnProperty("parentDisplayName")) + object.parentDisplayName = message.parentDisplayName; + return object; + }; + + /** + * Converts this Resource to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.Resource + * @instance + * @returns {Object.} JSON object + */ + Resource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Resource; + })(); + v1.OrganizationSettings = (function() { /** @@ -22372,6 +22676,7 @@ * @interface INotificationMessage * @property {string|null} [notificationConfigName] NotificationMessage notificationConfigName * @property {google.cloud.securitycenter.v1p1beta1.IFinding|null} [finding] NotificationMessage finding + * @property {google.cloud.securitycenter.v1p1beta1.IResource|null} [resource] NotificationMessage resource */ /** @@ -22405,6 +22710,14 @@ */ NotificationMessage.prototype.finding = null; + /** + * NotificationMessage resource. + * @member {google.cloud.securitycenter.v1p1beta1.IResource|null|undefined} resource + * @memberof google.cloud.securitycenter.v1p1beta1.NotificationMessage + * @instance + */ + NotificationMessage.prototype.resource = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -22447,6 +22760,8 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.notificationConfigName); if (message.finding != null && Object.hasOwnProperty.call(message, "finding")) $root.google.cloud.securitycenter.v1p1beta1.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.v1p1beta1.Resource.encode(message.resource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -22487,6 +22802,9 @@ case 2: message.finding = $root.google.cloud.securitycenter.v1p1beta1.Finding.decode(reader, reader.uint32()); break; + case 3: + message.resource = $root.google.cloud.securitycenter.v1p1beta1.Resource.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -22534,6 +22852,11 @@ return "finding." + error; } } + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.cloud.securitycenter.v1p1beta1.Resource.verify(message.resource); + if (error) + return "resource." + error; + } return null; }; @@ -22556,6 +22879,11 @@ throw TypeError(".google.cloud.securitycenter.v1p1beta1.NotificationMessage.finding: object expected"); message.finding = $root.google.cloud.securitycenter.v1p1beta1.Finding.fromObject(object.finding); } + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.cloud.securitycenter.v1p1beta1.NotificationMessage.resource: object expected"); + message.resource = $root.google.cloud.securitycenter.v1p1beta1.Resource.fromObject(object.resource); + } return message; }; @@ -22572,8 +22900,10 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + 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")) { @@ -22581,6 +22911,8 @@ if (options.oneofs) object.event = "finding"; } + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.cloud.securitycenter.v1p1beta1.Resource.toObject(message.resource, options); return object; }; @@ -22598,6 +22930,282 @@ return NotificationMessage; })(); + v1p1beta1.Resource = (function() { + + /** + * Properties of a Resource. + * @memberof google.cloud.securitycenter.v1p1beta1 + * @interface IResource + * @property {string|null} [name] Resource name + * @property {string|null} [project] Resource project + * @property {string|null} [projectDisplayName] Resource projectDisplayName + * @property {string|null} [parent] Resource parent + * @property {string|null} [parentDisplayName] Resource parentDisplayName + */ + + /** + * Constructs a new Resource. + * @memberof google.cloud.securitycenter.v1p1beta1 + * @classdesc Represents a Resource. + * @implements IResource + * @constructor + * @param {google.cloud.securitycenter.v1p1beta1.IResource=} [properties] Properties to set + */ + 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]]; + } + + /** + * Resource name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1p1beta1.Resource + * @instance + */ + Resource.prototype.name = ""; + + /** + * Resource project. + * @member {string} project + * @memberof google.cloud.securitycenter.v1p1beta1.Resource + * @instance + */ + Resource.prototype.project = ""; + + /** + * Resource projectDisplayName. + * @member {string} projectDisplayName + * @memberof google.cloud.securitycenter.v1p1beta1.Resource + * @instance + */ + Resource.prototype.projectDisplayName = ""; + + /** + * Resource parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1p1beta1.Resource + * @instance + */ + Resource.prototype.parent = ""; + + /** + * Resource parentDisplayName. + * @member {string} parentDisplayName + * @memberof google.cloud.securitycenter.v1p1beta1.Resource + * @instance + */ + Resource.prototype.parentDisplayName = ""; + + /** + * Creates a new Resource instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1p1beta1.Resource + * @static + * @param {google.cloud.securitycenter.v1p1beta1.IResource=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1p1beta1.Resource} Resource instance + */ + Resource.create = function create(properties) { + return new Resource(properties); + }; + + /** + * Encodes the specified Resource message. Does not implicitly {@link google.cloud.securitycenter.v1p1beta1.Resource.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1p1beta1.Resource + * @static + * @param {google.cloud.securitycenter.v1p1beta1.IResource} message Resource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Resource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.project != null && Object.hasOwnProperty.call(message, "project")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.project); + if (message.projectDisplayName != null && Object.hasOwnProperty.call(message, "projectDisplayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.projectDisplayName); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.parent); + if (message.parentDisplayName != null && Object.hasOwnProperty.call(message, "parentDisplayName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.parentDisplayName); + return writer; + }; + + /** + * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1p1beta1.Resource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1p1beta1.Resource + * @static + * @param {google.cloud.securitycenter.v1p1beta1.IResource} message Resource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Resource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Resource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1p1beta1.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.v1p1beta1.Resource} Resource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Resource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1p1beta1.Resource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.project = reader.string(); + break; + case 3: + message.projectDisplayName = reader.string(); + break; + case 4: + message.parent = reader.string(); + break; + case 5: + message.parentDisplayName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Resource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1p1beta1.Resource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1p1beta1.Resource} Resource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Resource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Resource message. + * @function verify + * @memberof google.cloud.securitycenter.v1p1beta1.Resource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Resource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.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"; + return null; + }; + + /** + * Creates a Resource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1p1beta1.Resource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1p1beta1.Resource} Resource + */ + Resource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1p1beta1.Resource) + return object; + var message = new $root.google.cloud.securitycenter.v1p1beta1.Resource(); + if (object.name != null) + message.name = String(object.name); + 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); + return message; + }; + + /** + * Creates a plain object from a Resource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1p1beta1.Resource + * @static + * @param {google.cloud.securitycenter.v1p1beta1.Resource} message Resource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Resource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.project = ""; + object.projectDisplayName = ""; + object.parent = ""; + object.parentDisplayName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.project != null && message.hasOwnProperty("project")) + object.project = message.project; + if (message.projectDisplayName != null && message.hasOwnProperty("projectDisplayName")) + object.projectDisplayName = message.projectDisplayName; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.parentDisplayName != null && message.hasOwnProperty("parentDisplayName")) + object.parentDisplayName = message.parentDisplayName; + return object; + }; + + /** + * Converts this Resource to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1p1beta1.Resource + * @instance + * @returns {Object.} JSON object + */ + Resource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Resource; + })(); + v1p1beta1.OrganizationSettings = (function() { /** @@ -25593,7 +26201,6 @@ * @property {string|null} [groupBy] GroupAssetsRequest groupBy * @property {google.protobuf.IDuration|null} [compareDuration] GroupAssetsRequest compareDuration * @property {google.protobuf.ITimestamp|null} [readTime] GroupAssetsRequest readTime - * @property {string|null} [having] GroupAssetsRequest having * @property {string|null} [pageToken] GroupAssetsRequest pageToken * @property {number|null} [pageSize] GroupAssetsRequest pageSize */ @@ -25653,14 +26260,6 @@ */ GroupAssetsRequest.prototype.readTime = null; - /** - * GroupAssetsRequest having. - * @member {string} having - * @memberof google.cloud.securitycenter.v1p1beta1.GroupAssetsRequest - * @instance - */ - GroupAssetsRequest.prototype.having = ""; - /** * GroupAssetsRequest pageToken. * @member {string} pageToken @@ -25711,8 +26310,6 @@ $root.google.protobuf.Duration.encode(message.compareDuration, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.readTime != null && Object.hasOwnProperty.call(message, "readTime")) $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.having != null && Object.hasOwnProperty.call(message, "having")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.having); if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.pageToken); if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) @@ -25766,9 +26363,6 @@ case 5: message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; - case 6: - message.having = reader.string(); - break; case 7: message.pageToken = reader.string(); break; @@ -25829,9 +26423,6 @@ if (error) return "readTime." + error; } - if (message.having != null && message.hasOwnProperty("having")) - if (!$util.isString(message.having)) - return "having: string expected"; if (message.pageToken != null && message.hasOwnProperty("pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; @@ -25869,8 +26460,6 @@ throw TypeError(".google.cloud.securitycenter.v1p1beta1.GroupAssetsRequest.readTime: object expected"); message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); } - if (object.having != null) - message.having = String(object.having); if (object.pageToken != null) message.pageToken = String(object.pageToken); if (object.pageSize != null) @@ -25897,7 +26486,6 @@ object.groupBy = ""; object.compareDuration = null; object.readTime = null; - object.having = ""; object.pageToken = ""; object.pageSize = 0; } @@ -25911,8 +26499,6 @@ object.compareDuration = $root.google.protobuf.Duration.toObject(message.compareDuration, options); if (message.readTime != null && message.hasOwnProperty("readTime")) object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); - if (message.having != null && message.hasOwnProperty("having")) - object.having = message.having; if (message.pageToken != null && message.hasOwnProperty("pageToken")) object.pageToken = message.pageToken; if (message.pageSize != null && message.hasOwnProperty("pageSize")) @@ -26226,7 +26812,6 @@ * @property {string|null} [groupBy] GroupFindingsRequest groupBy * @property {google.protobuf.ITimestamp|null} [readTime] GroupFindingsRequest readTime * @property {google.protobuf.IDuration|null} [compareDuration] GroupFindingsRequest compareDuration - * @property {string|null} [having] GroupFindingsRequest having * @property {string|null} [pageToken] GroupFindingsRequest pageToken * @property {number|null} [pageSize] GroupFindingsRequest pageSize */ @@ -26286,14 +26871,6 @@ */ GroupFindingsRequest.prototype.compareDuration = null; - /** - * GroupFindingsRequest having. - * @member {string} having - * @memberof google.cloud.securitycenter.v1p1beta1.GroupFindingsRequest - * @instance - */ - GroupFindingsRequest.prototype.having = ""; - /** * GroupFindingsRequest pageToken. * @member {string} pageToken @@ -26344,8 +26921,6 @@ $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.compareDuration != null && Object.hasOwnProperty.call(message, "compareDuration")) $root.google.protobuf.Duration.encode(message.compareDuration, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.having != null && Object.hasOwnProperty.call(message, "having")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.having); if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.pageToken); if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) @@ -26399,9 +26974,6 @@ case 5: message.compareDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; - case 6: - message.having = reader.string(); - break; case 7: message.pageToken = reader.string(); break; @@ -26462,9 +27034,6 @@ if (error) return "compareDuration." + error; } - if (message.having != null && message.hasOwnProperty("having")) - if (!$util.isString(message.having)) - return "having: string expected"; if (message.pageToken != null && message.hasOwnProperty("pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; @@ -26502,8 +27071,6 @@ throw TypeError(".google.cloud.securitycenter.v1p1beta1.GroupFindingsRequest.compareDuration: object expected"); message.compareDuration = $root.google.protobuf.Duration.fromObject(object.compareDuration); } - if (object.having != null) - message.having = String(object.having); if (object.pageToken != null) message.pageToken = String(object.pageToken); if (object.pageSize != null) @@ -26530,7 +27097,6 @@ object.groupBy = ""; object.readTime = null; object.compareDuration = null; - object.having = ""; object.pageToken = ""; object.pageSize = 0; } @@ -26544,8 +27110,6 @@ object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) object.compareDuration = $root.google.protobuf.Duration.toObject(message.compareDuration, options); - if (message.having != null && message.hasOwnProperty("having")) - object.having = message.having; if (message.pageToken != null && message.hasOwnProperty("pageToken")) object.pageToken = message.pageToken; if (message.pageSize != null && message.hasOwnProperty("pageSize")) @@ -28037,7 +28601,6 @@ * @property {string|null} [orderBy] ListAssetsRequest orderBy * @property {google.protobuf.ITimestamp|null} [readTime] ListAssetsRequest readTime * @property {google.protobuf.IDuration|null} [compareDuration] ListAssetsRequest compareDuration - * @property {string|null} [having] ListAssetsRequest having * @property {google.protobuf.IFieldMask|null} [fieldMask] ListAssetsRequest fieldMask * @property {string|null} [pageToken] ListAssetsRequest pageToken * @property {number|null} [pageSize] ListAssetsRequest pageSize @@ -28098,14 +28661,6 @@ */ ListAssetsRequest.prototype.compareDuration = null; - /** - * ListAssetsRequest having. - * @member {string} having - * @memberof google.cloud.securitycenter.v1p1beta1.ListAssetsRequest - * @instance - */ - ListAssetsRequest.prototype.having = ""; - /** * ListAssetsRequest fieldMask. * @member {google.protobuf.IFieldMask|null|undefined} fieldMask @@ -28164,8 +28719,6 @@ $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.compareDuration != null && Object.hasOwnProperty.call(message, "compareDuration")) $root.google.protobuf.Duration.encode(message.compareDuration, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.having != null && Object.hasOwnProperty.call(message, "having")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.having); if (message.fieldMask != null && Object.hasOwnProperty.call(message, "fieldMask")) $root.google.protobuf.FieldMask.encode(message.fieldMask, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) @@ -28221,9 +28774,6 @@ case 5: message.compareDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; - case 6: - message.having = reader.string(); - break; case 7: message.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; @@ -28287,9 +28837,6 @@ if (error) return "compareDuration." + error; } - if (message.having != null && message.hasOwnProperty("having")) - if (!$util.isString(message.having)) - return "having: string expected"; if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) { var error = $root.google.protobuf.FieldMask.verify(message.fieldMask); if (error) @@ -28332,8 +28879,6 @@ throw TypeError(".google.cloud.securitycenter.v1p1beta1.ListAssetsRequest.compareDuration: object expected"); message.compareDuration = $root.google.protobuf.Duration.fromObject(object.compareDuration); } - if (object.having != null) - message.having = String(object.having); if (object.fieldMask != null) { if (typeof object.fieldMask !== "object") throw TypeError(".google.cloud.securitycenter.v1p1beta1.ListAssetsRequest.fieldMask: object expected"); @@ -28365,7 +28910,6 @@ object.orderBy = ""; object.readTime = null; object.compareDuration = null; - object.having = ""; object.fieldMask = null; object.pageToken = ""; object.pageSize = 0; @@ -28380,8 +28924,6 @@ object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) object.compareDuration = $root.google.protobuf.Duration.toObject(message.compareDuration, options); - if (message.having != null && message.hasOwnProperty("having")) - object.having = message.having; if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) object.fieldMask = $root.google.protobuf.FieldMask.toObject(message.fieldMask, options); if (message.pageToken != null && message.hasOwnProperty("pageToken")) @@ -28953,7 +29495,6 @@ * @property {string|null} [orderBy] ListFindingsRequest orderBy * @property {google.protobuf.ITimestamp|null} [readTime] ListFindingsRequest readTime * @property {google.protobuf.IDuration|null} [compareDuration] ListFindingsRequest compareDuration - * @property {string|null} [having] ListFindingsRequest having * @property {google.protobuf.IFieldMask|null} [fieldMask] ListFindingsRequest fieldMask * @property {string|null} [pageToken] ListFindingsRequest pageToken * @property {number|null} [pageSize] ListFindingsRequest pageSize @@ -29014,14 +29555,6 @@ */ ListFindingsRequest.prototype.compareDuration = null; - /** - * ListFindingsRequest having. - * @member {string} having - * @memberof google.cloud.securitycenter.v1p1beta1.ListFindingsRequest - * @instance - */ - ListFindingsRequest.prototype.having = ""; - /** * ListFindingsRequest fieldMask. * @member {google.protobuf.IFieldMask|null|undefined} fieldMask @@ -29080,8 +29613,6 @@ $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.compareDuration != null && Object.hasOwnProperty.call(message, "compareDuration")) $root.google.protobuf.Duration.encode(message.compareDuration, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.having != null && Object.hasOwnProperty.call(message, "having")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.having); if (message.fieldMask != null && Object.hasOwnProperty.call(message, "fieldMask")) $root.google.protobuf.FieldMask.encode(message.fieldMask, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) @@ -29137,9 +29668,6 @@ case 5: message.compareDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; - case 6: - message.having = reader.string(); - break; case 7: message.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; @@ -29203,9 +29731,6 @@ if (error) return "compareDuration." + error; } - if (message.having != null && message.hasOwnProperty("having")) - if (!$util.isString(message.having)) - return "having: string expected"; if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) { var error = $root.google.protobuf.FieldMask.verify(message.fieldMask); if (error) @@ -29248,8 +29773,6 @@ throw TypeError(".google.cloud.securitycenter.v1p1beta1.ListFindingsRequest.compareDuration: object expected"); message.compareDuration = $root.google.protobuf.Duration.fromObject(object.compareDuration); } - if (object.having != null) - message.having = String(object.having); if (object.fieldMask != null) { if (typeof object.fieldMask !== "object") throw TypeError(".google.cloud.securitycenter.v1p1beta1.ListFindingsRequest.fieldMask: object expected"); @@ -29281,7 +29804,6 @@ object.orderBy = ""; object.readTime = null; object.compareDuration = null; - object.having = ""; object.fieldMask = null; object.pageToken = ""; object.pageSize = 0; @@ -29296,8 +29818,6 @@ object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) object.compareDuration = $root.google.protobuf.Duration.toObject(message.compareDuration, options); - if (message.having != null && message.hasOwnProperty("having")) - object.having = message.having; if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) object.fieldMask = $root.google.protobuf.FieldMask.toObject(message.fieldMask, options); if (message.pageToken != null && message.hasOwnProperty("pageToken")) diff --git a/packages/google-cloud-securitycenter/protos/protos.json b/packages/google-cloud-securitycenter/protos/protos.json index 5c8e73dddc5..7bb9f745b47 100644 --- a/packages/google-cloud-securitycenter/protos/protos.json +++ b/packages/google-cloud-securitycenter/protos/protos.json @@ -14,7 +14,7 @@ "java_package": "com.google.cloud.securitycenter.v1", "php_namespace": "Google\\Cloud\\SecurityCenter\\V1", "ruby_package": "Google::Cloud::SecurityCenter::V1", - "java_outer_classname": "NotificationMessageProto", + "java_outer_classname": "ResourceProto", "(google.api.resource_definition).type": "pubsub.googleapis.com/Topic", "(google.api.resource_definition).pattern": "projects/{project}/topics/{topic}" }, @@ -248,6 +248,34 @@ "finding": { "type": "Finding", "id": 2 + }, + "resource": { + "type": "Resource", + "id": 3 + } + } + }, + "Resource": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "project": { + "type": "string", + "id": 2 + }, + "projectDisplayName": { + "type": "string", + "id": 3 + }, + "parent": { + "type": "string", + "id": 4 + }, + "parentDisplayName": { + "type": "string", + "id": 5 } } }, @@ -2071,7 +2099,8 @@ "php_namespace": "Google\\Cloud\\SecurityCenter\\V1p1beta1", "ruby_package": "Google::Cloud::SecurityCenter::V1p1beta1", "(google.api.resource_definition).type": "pubsub.googleapis.com/Topic", - "(google.api.resource_definition).pattern": "projects/{project}/topics/{topic}" + "(google.api.resource_definition).pattern": "projects/{project}/topics/{topic}", + "java_outer_classname": "ResourceProto" }, "nested": { "Asset": { @@ -2313,6 +2342,34 @@ "finding": { "type": "Finding", "id": 2 + }, + "resource": { + "type": "Resource", + "id": 3 + } + } + }, + "Resource": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "project": { + "type": "string", + "id": 2 + }, + "projectDisplayName": { + "type": "string", + "id": 3 + }, + "parent": { + "type": "string", + "id": 4 + }, + "parentDisplayName": { + "type": "string", + "id": 5 } } }, @@ -2740,10 +2797,6 @@ "type": "google.protobuf.Timestamp", "id": 5 }, - "having": { - "type": "string", - "id": 6 - }, "pageToken": { "type": "string", "id": 7 @@ -2804,10 +2857,6 @@ "type": "google.protobuf.Duration", "id": 5 }, - "having": { - "type": "string", - "id": 6 - }, "pageToken": { "type": "string", "id": 7 @@ -2944,10 +2993,6 @@ "type": "google.protobuf.Duration", "id": 5 }, - "having": { - "type": "string", - "id": 6 - }, "fieldMask": { "type": "google.protobuf.FieldMask", "id": 7, @@ -3036,10 +3081,6 @@ "type": "google.protobuf.Duration", "id": 5 }, - "having": { - "type": "string", - "id": 6 - }, "fieldMask": { "type": "google.protobuf.FieldMask", "id": 7, diff --git a/packages/google-cloud-securitycenter/src/v1/security_center_client.ts b/packages/google-cloud-securitycenter/src/v1/security_center_client.ts index 49a9f54c15a..72b5f783636 100644 --- a/packages/google-cloud-securitycenter/src/v1/security_center_client.ts +++ b/packages/google-cloud-securitycenter/src/v1/security_center_client.ts @@ -2151,15 +2151,15 @@ export class SecurityCenterClient { * * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: - * "update_time = \"2019-06-10T16:07:18-07:00\"" - * "update_time = 1560208038000" + * `update_time = "2019-06-10T16:07:18-07:00"` + * `update_time = 1560208038000` * * * create_time: `=`, `>`, `<`, `>=`, `<=` * * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: - * "create_time = \"2019-06-10T16:07:18-07:00\"" - * "create_time = 1560208038000" + * `create_time = "2019-06-10T16:07:18-07:00"` + * `create_time = 1560208038000` * * * iam_policy.policy_blob: `=`, `:` * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` @@ -2174,6 +2174,12 @@ export class SecurityCenterClient { * * security_center_properties.resource_owners: `=`, `:` * * For example, `resource_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing:`resource_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-resource_properties.my_property : ""` * @param {string} request.groupBy * Required. Expression that defines what assets fields to use for grouping. * The string value should follow SQL syntax: comma separated list of fields. @@ -2348,15 +2354,15 @@ export class SecurityCenterClient { * * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: - * "update_time = \"2019-06-10T16:07:18-07:00\"" - * "update_time = 1560208038000" + * `update_time = "2019-06-10T16:07:18-07:00"` + * `update_time = 1560208038000` * * * create_time: `=`, `>`, `<`, `>=`, `<=` * * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: - * "create_time = \"2019-06-10T16:07:18-07:00\"" - * "create_time = 1560208038000" + * `create_time = "2019-06-10T16:07:18-07:00"` + * `create_time = 1560208038000` * * * iam_policy.policy_blob: `=`, `:` * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` @@ -2371,6 +2377,12 @@ export class SecurityCenterClient { * * security_center_properties.resource_owners: `=`, `:` * * For example, `resource_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing:`resource_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-resource_properties.my_property : ""` * @param {string} request.groupBy * Required. Expression that defines what assets fields to use for grouping. * The string value should follow SQL syntax: comma separated list of fields. @@ -2501,15 +2513,15 @@ export class SecurityCenterClient { * * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: - * "update_time = \"2019-06-10T16:07:18-07:00\"" - * "update_time = 1560208038000" + * `update_time = "2019-06-10T16:07:18-07:00"` + * `update_time = 1560208038000` * * * create_time: `=`, `>`, `<`, `>=`, `<=` * * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: - * "create_time = \"2019-06-10T16:07:18-07:00\"" - * "create_time = 1560208038000" + * `create_time = "2019-06-10T16:07:18-07:00"` + * `create_time = 1560208038000` * * * iam_policy.policy_blob: `=`, `:` * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` @@ -2524,6 +2536,12 @@ export class SecurityCenterClient { * * security_center_properties.resource_owners: `=`, `:` * * For example, `resource_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing:`resource_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-resource_properties.my_property : ""` * @param {string} request.groupBy * Required. Expression that defines what assets fields to use for grouping. * The string value should follow SQL syntax: comma separated list of fields. @@ -2692,13 +2710,19 @@ export class SecurityCenterClient { * * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: - * "event_time = \"2019-06-10T16:07:18-07:00\"" - * "event_time = 1560208038000" + * `event_time = "2019-06-10T16:07:18-07:00"` + * `event_time = 1560208038000` * * * security_marks.marks: `=`, `:` * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` * * For example, `source_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing: `source_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-source_properties.my_property : ""` * @param {string} request.groupBy * Required. Expression that defines what assets fields to use for grouping * (including `state_change`). The string value should follow SQL syntax: @@ -2879,13 +2903,19 @@ export class SecurityCenterClient { * * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: - * "event_time = \"2019-06-10T16:07:18-07:00\"" - * "event_time = 1560208038000" + * `event_time = "2019-06-10T16:07:18-07:00"` + * `event_time = 1560208038000` * * * security_marks.marks: `=`, `:` * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` * * For example, `source_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing: `source_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-source_properties.my_property : ""` * @param {string} request.groupBy * Required. Expression that defines what assets fields to use for grouping * (including `state_change`). The string value should follow SQL syntax: @@ -3022,13 +3052,19 @@ export class SecurityCenterClient { * * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: - * "event_time = \"2019-06-10T16:07:18-07:00\"" - * "event_time = 1560208038000" + * `event_time = "2019-06-10T16:07:18-07:00"` + * `event_time = 1560208038000` * * * security_marks.marks: `=`, `:` * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` * * For example, `source_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing: `source_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-source_properties.my_property : ""` * @param {string} request.groupBy * Required. Expression that defines what assets fields to use for grouping * (including `state_change`). The string value should follow SQL syntax: @@ -3189,15 +3225,15 @@ export class SecurityCenterClient { * * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: - * "update_time = \"2019-06-10T16:07:18-07:00\"" - * "update_time = 1560208038000" + * `update_time = "2019-06-10T16:07:18-07:00"` + * `update_time = 1560208038000` * * * create_time: `=`, `>`, `<`, `>=`, `<=` * * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: - * "create_time = \"2019-06-10T16:07:18-07:00\"" - * "create_time = 1560208038000" + * `create_time = "2019-06-10T16:07:18-07:00"` + * `create_time = 1560208038000` * * * iam_policy.policy_blob: `=`, `:` * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` @@ -3212,6 +3248,12 @@ export class SecurityCenterClient { * * security_center_properties.resource_owners: `=`, `:` * * For example, `resource_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing: `resource_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-resource_properties.my_property : ""` * @param {string} request.orderBy * Expression that defines what fields and order to use for sorting. The * string value should follow SQL syntax: comma separated list of fields. For @@ -3389,15 +3431,15 @@ export class SecurityCenterClient { * * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: - * "update_time = \"2019-06-10T16:07:18-07:00\"" - * "update_time = 1560208038000" + * `update_time = "2019-06-10T16:07:18-07:00"` + * `update_time = 1560208038000` * * * create_time: `=`, `>`, `<`, `>=`, `<=` * * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: - * "create_time = \"2019-06-10T16:07:18-07:00\"" - * "create_time = 1560208038000" + * `create_time = "2019-06-10T16:07:18-07:00"` + * `create_time = 1560208038000` * * * iam_policy.policy_blob: `=`, `:` * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` @@ -3412,6 +3454,12 @@ export class SecurityCenterClient { * * security_center_properties.resource_owners: `=`, `:` * * For example, `resource_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing: `resource_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-resource_properties.my_property : ""` * @param {string} request.orderBy * Expression that defines what fields and order to use for sorting. The * string value should follow SQL syntax: comma separated list of fields. For @@ -3545,15 +3593,15 @@ export class SecurityCenterClient { * * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: - * "update_time = \"2019-06-10T16:07:18-07:00\"" - * "update_time = 1560208038000" + * `update_time = "2019-06-10T16:07:18-07:00"` + * `update_time = 1560208038000` * * * create_time: `=`, `>`, `<`, `>=`, `<=` * * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: - * "create_time = \"2019-06-10T16:07:18-07:00\"" - * "create_time = 1560208038000" + * `create_time = "2019-06-10T16:07:18-07:00"` + * `create_time = 1560208038000` * * * iam_policy.policy_blob: `=`, `:` * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` @@ -3568,6 +3616,12 @@ export class SecurityCenterClient { * * security_center_properties.resource_owners: `=`, `:` * * For example, `resource_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing: `resource_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-resource_properties.my_property : ""` * @param {string} request.orderBy * Expression that defines what fields and order to use for sorting. The * string value should follow SQL syntax: comma separated list of fields. For @@ -3742,13 +3796,19 @@ export class SecurityCenterClient { * * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: - * "event_time = \"2019-06-10T16:07:18-07:00\"" - * "event_time = 1560208038000" + * `event_time = "2019-06-10T16:07:18-07:00"` + * `event_time = 1560208038000` * * security_marks.marks: `=`, `:` * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` * * For example, `source_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing: `source_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-source_properties.my_property : ""` * @param {string} request.orderBy * Expression that defines what fields and order to use for sorting. The * string value should follow SQL syntax: comma separated list of fields. For @@ -3934,13 +3994,19 @@ export class SecurityCenterClient { * * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: - * "event_time = \"2019-06-10T16:07:18-07:00\"" - * "event_time = 1560208038000" + * `event_time = "2019-06-10T16:07:18-07:00"` + * `event_time = 1560208038000` * * security_marks.marks: `=`, `:` * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` * * For example, `source_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing: `source_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-source_properties.my_property : ""` * @param {string} request.orderBy * Expression that defines what fields and order to use for sorting. The * string value should follow SQL syntax: comma separated list of fields. For @@ -4082,13 +4148,19 @@ export class SecurityCenterClient { * * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: - * "event_time = \"2019-06-10T16:07:18-07:00\"" - * "event_time = 1560208038000" + * `event_time = "2019-06-10T16:07:18-07:00"` + * `event_time = 1560208038000` * * security_marks.marks: `=`, `:` * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` * * For example, `source_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing: `source_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-source_properties.my_property : ""` * @param {string} request.orderBy * Expression that defines what fields and order to use for sorting. The * string value should follow SQL syntax: comma separated list of fields. For diff --git a/packages/google-cloud-securitycenter/src/v1/security_center_proto_list.json b/packages/google-cloud-securitycenter/src/v1/security_center_proto_list.json index 68e68f8751a..7c75af0ed9d 100644 --- a/packages/google-cloud-securitycenter/src/v1/security_center_proto_list.json +++ b/packages/google-cloud-securitycenter/src/v1/security_center_proto_list.json @@ -4,6 +4,7 @@ "../../protos/google/cloud/securitycenter/v1/notification_config.proto", "../../protos/google/cloud/securitycenter/v1/notification_message.proto", "../../protos/google/cloud/securitycenter/v1/organization_settings.proto", + "../../protos/google/cloud/securitycenter/v1/resource.proto", "../../protos/google/cloud/securitycenter/v1/run_asset_discovery_response.proto", "../../protos/google/cloud/securitycenter/v1/security_marks.proto", "../../protos/google/cloud/securitycenter/v1/securitycenter_service.proto", diff --git a/packages/google-cloud-securitycenter/src/v1p1beta1/security_center_client.ts b/packages/google-cloud-securitycenter/src/v1p1beta1/security_center_client.ts index 6998c02b1bf..6f60e7f0fe2 100644 --- a/packages/google-cloud-securitycenter/src/v1p1beta1/security_center_client.ts +++ b/packages/google-cloud-securitycenter/src/v1p1beta1/security_center_client.ts @@ -1495,7 +1495,6 @@ export class SecurityCenterClient { > ): void; /** - * * Creates or updates a finding. The corresponding source must exist for a * finding creation to succeed. * @@ -2190,15 +2189,15 @@ export class SecurityCenterClient { * * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: - * "update_time = \"2019-06-10T16:07:18-07:00\"" - * "update_time = 1560208038000" + * `update_time = "2019-06-10T16:07:18-07:00"` + * `update_time = 1560208038000` * * * create_time: `=`, `>`, `<`, `>=`, `<=` * * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: - * "create_time = \"2019-06-10T16:07:18-07:00\"" - * "create_time = 1560208038000" + * `create_time = "2019-06-10T16:07:18-07:00"` + * `create_time = 1560208038000` * * * iam_policy.policy_blob: `=`, `:` * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` @@ -2213,6 +2212,12 @@ export class SecurityCenterClient { * * security_center_properties.resource_owners: `=`, `:` * * For example, `resource_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing: `resource_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-resource_properties.my_property : ""` * @param {string} request.groupBy * Required. Expression that defines what assets fields to use for grouping. * The string value should follow SQL syntax: comma separated list of fields. @@ -2265,10 +2270,6 @@ export class SecurityCenterClient { * to assets existing at the supplied time and their values are those at that * specific time. Absence of this field will default to the API's version of * NOW. - * @param {string} request.having - * Filter that specifies what fields to further filter on *after* the query - * filter has been executed. Currently only `state_change` is supported and - * requires compare_duration to be specified. * @param {string} request.pageToken * The value returned by the last `GroupAssetsResponse`; indicates * that this is a continuation of a prior `GroupAssets` call, and that the @@ -2391,15 +2392,15 @@ export class SecurityCenterClient { * * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: - * "update_time = \"2019-06-10T16:07:18-07:00\"" - * "update_time = 1560208038000" + * `update_time = "2019-06-10T16:07:18-07:00"` + * `update_time = 1560208038000` * * * create_time: `=`, `>`, `<`, `>=`, `<=` * * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: - * "create_time = \"2019-06-10T16:07:18-07:00\"" - * "create_time = 1560208038000" + * `create_time = "2019-06-10T16:07:18-07:00"` + * `create_time = 1560208038000` * * * iam_policy.policy_blob: `=`, `:` * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` @@ -2414,6 +2415,12 @@ export class SecurityCenterClient { * * security_center_properties.resource_owners: `=`, `:` * * For example, `resource_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing: `resource_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-resource_properties.my_property : ""` * @param {string} request.groupBy * Required. Expression that defines what assets fields to use for grouping. * The string value should follow SQL syntax: comma separated list of fields. @@ -2466,10 +2473,6 @@ export class SecurityCenterClient { * to assets existing at the supplied time and their values are those at that * specific time. Absence of this field will default to the API's version of * NOW. - * @param {string} request.having - * Filter that specifies what fields to further filter on *after* the query - * filter has been executed. Currently only `state_change` is supported and - * requires compare_duration to be specified. * @param {string} request.pageToken * The value returned by the last `GroupAssetsResponse`; indicates * that this is a continuation of a prior `GroupAssets` call, and that the @@ -2548,15 +2551,15 @@ export class SecurityCenterClient { * * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: - * "update_time = \"2019-06-10T16:07:18-07:00\"" - * "update_time = 1560208038000" + * `update_time = "2019-06-10T16:07:18-07:00"` + * `update_time = 1560208038000` * * * create_time: `=`, `>`, `<`, `>=`, `<=` * * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: - * "create_time = \"2019-06-10T16:07:18-07:00\"" - * "create_time = 1560208038000" + * `create_time = "2019-06-10T16:07:18-07:00"` + * `create_time = 1560208038000` * * * iam_policy.policy_blob: `=`, `:` * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` @@ -2571,6 +2574,12 @@ export class SecurityCenterClient { * * security_center_properties.resource_owners: `=`, `:` * * For example, `resource_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing: `resource_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-resource_properties.my_property : ""` * @param {string} request.groupBy * Required. Expression that defines what assets fields to use for grouping. * The string value should follow SQL syntax: comma separated list of fields. @@ -2623,10 +2632,6 @@ export class SecurityCenterClient { * to assets existing at the supplied time and their values are those at that * specific time. Absence of this field will default to the API's version of * NOW. - * @param {string} request.having - * Filter that specifies what fields to further filter on *after* the query - * filter has been executed. Currently only `state_change` is supported and - * requires compare_duration to be specified. * @param {string} request.pageToken * The value returned by the last `GroupAssetsResponse`; indicates * that this is a continuation of a prior `GroupAssets` call, and that the @@ -2745,13 +2750,19 @@ export class SecurityCenterClient { * * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: - * "event_time = \"2019-06-10T16:07:18-07:00\"" - * "event_time = 1560208038000" + * `event_time = "2019-06-10T16:07:18-07:00"` + * `event_time = 1560208038000` * * * security_marks.marks: `=`, `:` * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` * * For example, `source_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing: `source_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-source_properties.my_property : ""` * @param {string} request.groupBy * Required. Expression that defines what assets fields to use for grouping * (including `state_change`). The string value should follow SQL syntax: @@ -2786,12 +2797,18 @@ export class SecurityCenterClient { * * Possible "state_change" values when compare_duration is specified: * - * * "CHANGED": indicates that the finding was present at the start of - * compare_duration, but changed its state at read_time. - * * "UNCHANGED": indicates that the finding was present at the start of - * compare_duration and did not change state at read_time. - * * "ADDED": indicates that the finding was not present at the start - * of compare_duration, but was present at read_time. + * * "CHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration, but changed its + * state at read_time. + * * "UNCHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration and did not change + * state at read_time. + * * "ADDED": indicates that the finding did not match the given filter or + * was not present at the start of compare_duration, but was + * present at read_time. + * * "REMOVED": indicates that the finding was present and matched the + * filter at the start of compare_duration, but did not match + * the filter at read_time. * * If compare_duration is not specified, then the only possible state_change * is "UNUSED", which will be the state_change set for all findings present @@ -2799,10 +2816,6 @@ export class SecurityCenterClient { * * If this field is set then `state_change` must be a specified field in * `group_by`. - * @param {string} request.having - * Filter that specifies what fields to further filter on *after* the query - * filter has been executed. Currently only `finding.state` and `state_change` - * are supported and requires compare_duration to be specified. * @param {string} request.pageToken * The value returned by the last `GroupFindingsResponse`; indicates * that this is a continuation of a prior `GroupFindings` call, and @@ -2930,13 +2943,19 @@ export class SecurityCenterClient { * * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: - * "event_time = \"2019-06-10T16:07:18-07:00\"" - * "event_time = 1560208038000" + * `event_time = "2019-06-10T16:07:18-07:00"` + * `event_time = 1560208038000` * * * security_marks.marks: `=`, `:` * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` * * For example, `source_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing: `source_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-source_properties.my_property : ""` * @param {string} request.groupBy * Required. Expression that defines what assets fields to use for grouping * (including `state_change`). The string value should follow SQL syntax: @@ -2971,12 +2990,18 @@ export class SecurityCenterClient { * * Possible "state_change" values when compare_duration is specified: * - * * "CHANGED": indicates that the finding was present at the start of - * compare_duration, but changed its state at read_time. - * * "UNCHANGED": indicates that the finding was present at the start of - * compare_duration and did not change state at read_time. - * * "ADDED": indicates that the finding was not present at the start - * of compare_duration, but was present at read_time. + * * "CHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration, but changed its + * state at read_time. + * * "UNCHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration and did not change + * state at read_time. + * * "ADDED": indicates that the finding did not match the given filter or + * was not present at the start of compare_duration, but was + * present at read_time. + * * "REMOVED": indicates that the finding was present and matched the + * filter at the start of compare_duration, but did not match + * the filter at read_time. * * If compare_duration is not specified, then the only possible state_change * is "UNUSED", which will be the state_change set for all findings present @@ -2984,10 +3009,6 @@ export class SecurityCenterClient { * * If this field is set then `state_change` must be a specified field in * `group_by`. - * @param {string} request.having - * Filter that specifies what fields to further filter on *after* the query - * filter has been executed. Currently only `finding.state` and `state_change` - * are supported and requires compare_duration to be specified. * @param {string} request.pageToken * The value returned by the last `GroupFindingsResponse`; indicates * that this is a continuation of a prior `GroupFindings` call, and @@ -3071,13 +3092,19 @@ export class SecurityCenterClient { * * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: - * "event_time = \"2019-06-10T16:07:18-07:00\"" - * "event_time = 1560208038000" + * `event_time = "2019-06-10T16:07:18-07:00"` + * `event_time = 1560208038000` * * * security_marks.marks: `=`, `:` * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` * * For example, `source_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing: `source_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-source_properties.my_property : ""` * @param {string} request.groupBy * Required. Expression that defines what assets fields to use for grouping * (including `state_change`). The string value should follow SQL syntax: @@ -3112,12 +3139,18 @@ export class SecurityCenterClient { * * Possible "state_change" values when compare_duration is specified: * - * * "CHANGED": indicates that the finding was present at the start of - * compare_duration, but changed its state at read_time. - * * "UNCHANGED": indicates that the finding was present at the start of - * compare_duration and did not change state at read_time. - * * "ADDED": indicates that the finding was not present at the start - * of compare_duration, but was present at read_time. + * * "CHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration, but changed its + * state at read_time. + * * "UNCHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration and did not change + * state at read_time. + * * "ADDED": indicates that the finding did not match the given filter or + * was not present at the start of compare_duration, but was + * present at read_time. + * * "REMOVED": indicates that the finding was present and matched the + * filter at the start of compare_duration, but did not match + * the filter at read_time. * * If compare_duration is not specified, then the only possible state_change * is "UNUSED", which will be the state_change set for all findings present @@ -3125,10 +3158,6 @@ export class SecurityCenterClient { * * If this field is set then `state_change` must be a specified field in * `group_by`. - * @param {string} request.having - * Filter that specifies what fields to further filter on *after* the query - * filter has been executed. Currently only `finding.state` and `state_change` - * are supported and requires compare_duration to be specified. * @param {string} request.pageToken * The value returned by the last `GroupFindingsResponse`; indicates * that this is a continuation of a prior `GroupFindings` call, and @@ -3238,15 +3267,15 @@ export class SecurityCenterClient { * * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: - * "update_time = \"2019-06-10T16:07:18-07:00\"" - * "update_time = 1560208038000" + * `update_time = "2019-06-10T16:07:18-07:00"` + * `update_time = 1560208038000` * * * create_time: `=`, `>`, `<`, `>=`, `<=` * * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: - * "create_time = \"2019-06-10T16:07:18-07:00\"" - * "create_time = 1560208038000" + * `create_time = "2019-06-10T16:07:18-07:00"` + * `create_time = 1560208038000` * * * iam_policy.policy_blob: `=`, `:` * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` @@ -3261,6 +3290,12 @@ export class SecurityCenterClient { * * security_center_properties.resource_owners: `=`, `:` * * For example, `resource_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing: `resource_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-resource_properties.my_property : ""` * @param {string} request.orderBy * Expression that defines what fields and order to use for sorting. The * string value should follow SQL syntax: comma separated list of fields. For @@ -3313,10 +3348,6 @@ export class SecurityCenterClient { * If compare_duration is not specified, then the only possible state_change * is "UNUSED", which will be the state_change set for all assets present at * read_time. - * @param {string} request.having - * Filter that specifies what fields to further filter on *after* the query - * filter has been executed. Currently only `state_change` is supported and - * requires compare_duration to be specified. * @param {google.protobuf.FieldMask} [request.fieldMask] * Optional. * A field mask to specify the ListAssetsResult fields to be listed in the @@ -3444,15 +3475,15 @@ export class SecurityCenterClient { * * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: - * "update_time = \"2019-06-10T16:07:18-07:00\"" - * "update_time = 1560208038000" + * `update_time = "2019-06-10T16:07:18-07:00"` + * `update_time = 1560208038000` * * * create_time: `=`, `>`, `<`, `>=`, `<=` * * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: - * "create_time = \"2019-06-10T16:07:18-07:00\"" - * "create_time = 1560208038000" + * `create_time = "2019-06-10T16:07:18-07:00"` + * `create_time = 1560208038000` * * * iam_policy.policy_blob: `=`, `:` * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` @@ -3467,6 +3498,12 @@ export class SecurityCenterClient { * * security_center_properties.resource_owners: `=`, `:` * * For example, `resource_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing: `resource_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-resource_properties.my_property : ""` * @param {string} request.orderBy * Expression that defines what fields and order to use for sorting. The * string value should follow SQL syntax: comma separated list of fields. For @@ -3519,10 +3556,6 @@ export class SecurityCenterClient { * If compare_duration is not specified, then the only possible state_change * is "UNUSED", which will be the state_change set for all assets present at * read_time. - * @param {string} request.having - * Filter that specifies what fields to further filter on *after* the query - * filter has been executed. Currently only `state_change` is supported and - * requires compare_duration to be specified. * @param {google.protobuf.FieldMask} [request.fieldMask] * Optional. * A field mask to specify the ListAssetsResult fields to be listed in the @@ -3606,15 +3639,15 @@ export class SecurityCenterClient { * * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: - * "update_time = \"2019-06-10T16:07:18-07:00\"" - * "update_time = 1560208038000" + * `update_time = "2019-06-10T16:07:18-07:00"` + * `update_time = 1560208038000` * * * create_time: `=`, `>`, `<`, `>=`, `<=` * * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: - * "create_time = \"2019-06-10T16:07:18-07:00\"" - * "create_time = 1560208038000" + * `create_time = "2019-06-10T16:07:18-07:00"` + * `create_time = 1560208038000` * * * iam_policy.policy_blob: `=`, `:` * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` @@ -3629,6 +3662,12 @@ export class SecurityCenterClient { * * security_center_properties.resource_owners: `=`, `:` * * For example, `resource_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing: `resource_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-resource_properties.my_property : ""` * @param {string} request.orderBy * Expression that defines what fields and order to use for sorting. The * string value should follow SQL syntax: comma separated list of fields. For @@ -3681,10 +3720,6 @@ export class SecurityCenterClient { * If compare_duration is not specified, then the only possible state_change * is "UNUSED", which will be the state_change set for all assets present at * read_time. - * @param {string} request.having - * Filter that specifies what fields to further filter on *after* the query - * filter has been executed. Currently only `state_change` is supported and - * requires compare_duration to be specified. * @param {google.protobuf.FieldMask} [request.fieldMask] * Optional. * A field mask to specify the ListAssetsResult fields to be listed in the @@ -3809,13 +3844,19 @@ export class SecurityCenterClient { * * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: - * "event_time = \"2019-06-10T16:07:18-07:00\"" - * "event_time = 1560208038000" + * `event_time = "2019-06-10T16:07:18-07:00"` + * `event_time = 1560208038000` * * security_marks.marks: `=`, `:` * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` * * For example, `source_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing: `source_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-source_properties.my_property : ""` * @param {string} request.orderBy * Expression that defines what fields and order to use for sorting. The * string value should follow SQL syntax: comma separated list of fields. For @@ -3855,20 +3896,22 @@ export class SecurityCenterClient { * * Possible "state_change" values when compare_duration is specified: * - * * "CHANGED": indicates that the finding was present at the start of - * compare_duration, but changed its state at read_time. - * * "UNCHANGED": indicates that the finding was present at the start of - * compare_duration and did not change state at read_time. - * * "ADDED": indicates that the finding was not present at the start - * of compare_duration, but was present at read_time. + * * "CHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration, but changed its + * state at read_time. + * * "UNCHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration and did not change + * state at read_time. + * * "ADDED": indicates that the finding did not match the given filter or + * was not present at the start of compare_duration, but was + * present at read_time. + * * "REMOVED": indicates that the finding was present and matched the + * filter at the start of compare_duration, but did not match + * the filter at read_time. * * If compare_duration is not specified, then the only possible state_change * is "UNUSED", which will be the state_change set for all findings present at * read_time. - * @param {string} request.having - * Filter that specifies what fields to further filter on *after* the query - * filter has been executed. Currently only `finding.state` and `state_change` - * are supported and requires compare_duration to be specified. * @param {google.protobuf.FieldMask} [request.fieldMask] * Optional. * A field mask to specify the Finding fields to be listed in the response. @@ -4000,13 +4043,19 @@ export class SecurityCenterClient { * * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: - * "event_time = \"2019-06-10T16:07:18-07:00\"" - * "event_time = 1560208038000" + * `event_time = "2019-06-10T16:07:18-07:00"` + * `event_time = 1560208038000` * * security_marks.marks: `=`, `:` * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` * * For example, `source_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing: `source_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-source_properties.my_property : ""` * @param {string} request.orderBy * Expression that defines what fields and order to use for sorting. The * string value should follow SQL syntax: comma separated list of fields. For @@ -4046,20 +4095,22 @@ export class SecurityCenterClient { * * Possible "state_change" values when compare_duration is specified: * - * * "CHANGED": indicates that the finding was present at the start of - * compare_duration, but changed its state at read_time. - * * "UNCHANGED": indicates that the finding was present at the start of - * compare_duration and did not change state at read_time. - * * "ADDED": indicates that the finding was not present at the start - * of compare_duration, but was present at read_time. + * * "CHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration, but changed its + * state at read_time. + * * "UNCHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration and did not change + * state at read_time. + * * "ADDED": indicates that the finding did not match the given filter or + * was not present at the start of compare_duration, but was + * present at read_time. + * * "REMOVED": indicates that the finding was present and matched the + * filter at the start of compare_duration, but did not match + * the filter at read_time. * * If compare_duration is not specified, then the only possible state_change * is "UNUSED", which will be the state_change set for all findings present at * read_time. - * @param {string} request.having - * Filter that specifies what fields to further filter on *after* the query - * filter has been executed. Currently only `finding.state` and `state_change` - * are supported and requires compare_duration to be specified. * @param {google.protobuf.FieldMask} [request.fieldMask] * Optional. * A field mask to specify the Finding fields to be listed in the response. @@ -4147,13 +4198,19 @@ export class SecurityCenterClient { * * Usage: This should be milliseconds since epoch or an RFC3339 string. * Examples: - * "event_time = \"2019-06-10T16:07:18-07:00\"" - * "event_time = 1560208038000" + * `event_time = "2019-06-10T16:07:18-07:00"` + * `event_time = 1560208038000` * * security_marks.marks: `=`, `:` * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` * * For example, `source_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing: `source_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-source_properties.my_property : ""` * @param {string} request.orderBy * Expression that defines what fields and order to use for sorting. The * string value should follow SQL syntax: comma separated list of fields. For @@ -4193,20 +4250,22 @@ export class SecurityCenterClient { * * Possible "state_change" values when compare_duration is specified: * - * * "CHANGED": indicates that the finding was present at the start of - * compare_duration, but changed its state at read_time. - * * "UNCHANGED": indicates that the finding was present at the start of - * compare_duration and did not change state at read_time. - * * "ADDED": indicates that the finding was not present at the start - * of compare_duration, but was present at read_time. + * * "CHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration, but changed its + * state at read_time. + * * "UNCHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration and did not change + * state at read_time. + * * "ADDED": indicates that the finding did not match the given filter or + * was not present at the start of compare_duration, but was + * present at read_time. + * * "REMOVED": indicates that the finding was present and matched the + * filter at the start of compare_duration, but did not match + * the filter at read_time. * * If compare_duration is not specified, then the only possible state_change * is "UNUSED", which will be the state_change set for all findings present at * read_time. - * @param {string} request.having - * Filter that specifies what fields to further filter on *after* the query - * filter has been executed. Currently only `finding.state` and `state_change` - * are supported and requires compare_duration to be specified. * @param {google.protobuf.FieldMask} [request.fieldMask] * Optional. * A field mask to specify the Finding fields to be listed in the response. diff --git a/packages/google-cloud-securitycenter/src/v1p1beta1/security_center_client_config.json b/packages/google-cloud-securitycenter/src/v1p1beta1/security_center_client_config.json index e7f4077497a..3d47939eb43 100644 --- a/packages/google-cloud-securitycenter/src/v1p1beta1/security_center_client_config.json +++ b/packages/google-cloud-securitycenter/src/v1p1beta1/security_center_client_config.json @@ -21,117 +21,117 @@ }, "methods": { "CreateSource": { - "timeout_millis": 60000, + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "CreateFinding": { - "timeout_millis": 60000, + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "CreateNotificationConfig": { - "timeout_millis": 60000, + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "DeleteNotificationConfig": { - "timeout_millis": 60000, + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "GetIamPolicy": { - "timeout_millis": 60000, + "timeout_millis": 600000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "GetNotificationConfig": { - "timeout_millis": 60000, + "timeout_millis": 600000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "GetOrganizationSettings": { - "timeout_millis": 60000, + "timeout_millis": 600000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "GetSource": { - "timeout_millis": 60000, + "timeout_millis": 600000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "GroupAssets": { - "timeout_millis": 60000, + "timeout_millis": 600000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "GroupFindings": { - "timeout_millis": 60000, + "timeout_millis": 600000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "ListAssets": { - "timeout_millis": 60000, + "timeout_millis": 600000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "ListFindings": { - "timeout_millis": 60000, + "timeout_millis": 600000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "ListNotificationConfigs": { - "timeout_millis": 60000, + "timeout_millis": 600000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "ListSources": { - "timeout_millis": 60000, + "timeout_millis": 600000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "RunAssetDiscovery": { - "timeout_millis": 60000, + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "SetFindingState": { - "timeout_millis": 60000, + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "SetIamPolicy": { - "timeout_millis": 60000, + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "TestIamPermissions": { - "timeout_millis": 60000, + "timeout_millis": 600000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "UpdateFinding": { - "timeout_millis": 60000, + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "UpdateNotificationConfig": { - "timeout_millis": 60000, + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "UpdateOrganizationSettings": { - "timeout_millis": 60000, + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "UpdateSource": { - "timeout_millis": 60000, + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "UpdateSecurityMarks": { - "timeout_millis": 60000, + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" } diff --git a/packages/google-cloud-securitycenter/src/v1p1beta1/security_center_proto_list.json b/packages/google-cloud-securitycenter/src/v1p1beta1/security_center_proto_list.json index 37f5aab1515..cfa18ff75d7 100644 --- a/packages/google-cloud-securitycenter/src/v1p1beta1/security_center_proto_list.json +++ b/packages/google-cloud-securitycenter/src/v1p1beta1/security_center_proto_list.json @@ -4,6 +4,7 @@ "../../protos/google/cloud/securitycenter/v1p1beta1/notification_config.proto", "../../protos/google/cloud/securitycenter/v1p1beta1/notification_message.proto", "../../protos/google/cloud/securitycenter/v1p1beta1/organization_settings.proto", + "../../protos/google/cloud/securitycenter/v1p1beta1/resource.proto", "../../protos/google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response.proto", "../../protos/google/cloud/securitycenter/v1p1beta1/security_marks.proto", "../../protos/google/cloud/securitycenter/v1p1beta1/securitycenter_service.proto", diff --git a/packages/google-cloud-securitycenter/synth.metadata b/packages/google-cloud-securitycenter/synth.metadata index 9e472db0113..04888b5bbeb 100644 --- a/packages/google-cloud-securitycenter/synth.metadata +++ b/packages/google-cloud-securitycenter/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-security-center.git", - "sha": "41bd2a92dbed2041ef5d5def1b3ce0c22b670b12" + "sha": "f71426053da4eb2416ebd593862e89c0d5557827" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "839fae42335ee1bb1e70767f3e6c51738683892b", - "internalRef": "310213770" + "sha": "b789f790565ad7cc473571b0cf35dfbe6707f6a8", + "internalRef": "315933871" } }, {