From 9f19713d4e7df9f25064a961a2fa01a9f915393d Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 3 Jan 2020 21:38:45 -0800 Subject: [PATCH] fix: proto files updated with proto annotations (#182) * [CHANGE ME] Re-generated to pick up changes in the API or client library generator. * fix: add missing protos Co-authored-by: Benjamin E. Coe Co-authored-by: Alexander Fenster --- .../cloud/securitycenter/v1/asset.proto | 11 +- .../cloud/securitycenter/v1/finding.proto | 2 +- .../v1/organization_settings.proto | 2 +- .../v1/run_asset_discovery_response.proto | 2 +- .../securitycenter/v1/security_marks.proto | 2 +- .../v1/securitycenter_service.proto | 37 +- .../cloud/securitycenter/v1/source.proto | 2 +- .../cloud/securitycenter/v1beta1/asset.proto | 11 +- .../securitycenter/v1beta1/finding.proto | 31 +- .../v1beta1/organization_settings.proto | 10 +- .../run_asset_discovery_response.proto | 50 + .../v1beta1/security_marks.proto | 21 +- .../v1beta1/securitycenter_service.proto | 210 +- .../cloud/securitycenter/v1beta1/source.proto | 16 +- .../protos/protos.d.ts | 9023 +++--- .../protos/protos.js | 24091 ++++++++-------- .../protos/protos.json | 1043 +- .../src/extra_proto_list.json | 14 + .../cloud/securitycenter/v1/doc_asset.js | 9 + .../v1/doc_securitycenter_service.js | 46 + .../src/v1/security_center_client.js | 26 + .../src/v1/security_center_client_config.json | 4 +- .../cloud/securitycenter/v1beta1/doc_asset.js | 4 +- .../securitycenter/v1beta1/doc_finding.js | 16 +- .../v1beta1/doc_organization_settings.js | 2 +- .../v1beta1/doc_security_marks.js | 12 +- .../v1beta1/doc_securitycenter_service.js | 58 +- .../securitycenter/v1beta1/doc_source.js | 8 +- .../src/v1beta1/security_center_client.js | 88 +- .../synth.metadata | 2487 +- 30 files changed, 20577 insertions(+), 16761 deletions(-) create mode 100644 packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1beta1/run_asset_discovery_response.proto create mode 100644 packages/google-cloud-securitycenter/src/extra_proto_list.json 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 3b99d35d11d..bd4751a142a 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 @@ -17,11 +17,11 @@ syntax = "proto3"; package google.cloud.securitycenter.v1; -import "google/api/annotations.proto"; import "google/api/resource.proto"; import "google/cloud/securitycenter/v1/security_marks.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter"; @@ -66,6 +66,15 @@ message Asset { // Owners of the Google Cloud resource. repeated string resource_owners = 5; + + // The user defined display name for this resource. + string resource_display_name = 6; + + // The user defined display name for the parent of this resource. + string resource_parent_display_name = 7; + + // The user defined display name for the project of this resource. + string resource_project_display_name = 8; } // IAM Policy information associated with the GCP resource described by the diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/finding.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/finding.proto index 0c64d4d79fe..5d8e5a78918 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 @@ -17,12 +17,12 @@ syntax = "proto3"; package google.cloud.securitycenter.v1; -import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/securitycenter/v1/security_marks.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter"; 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 db2097048c5..aa4e80bd1a0 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 @@ -17,8 +17,8 @@ syntax = "proto3"; package google.cloud.securitycenter.v1; -import "google/api/annotations.proto"; import "google/api/resource.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter"; diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/run_asset_discovery_response.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/run_asset_discovery_response.proto index 93fb58b1172..e7581078dac 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/run_asset_discovery_response.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/run_asset_discovery_response.proto @@ -17,8 +17,8 @@ syntax = "proto3"; package google.cloud.securitycenter.v1; -import "google/api/annotations.proto"; import "google/protobuf/duration.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter"; 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 b3ad429811a..d2b53487437 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 @@ -17,8 +17,8 @@ syntax = "proto3"; package google.cloud.securitycenter.v1; -import "google/api/annotations.proto"; import "google/api/resource.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter"; 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 811fca5d653..1cd1aff20d7 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 @@ -24,7 +24,6 @@ import "google/api/resource.proto"; import "google/cloud/securitycenter/v1/asset.proto"; import "google/cloud/securitycenter/v1/finding.proto"; import "google/cloud/securitycenter/v1/organization_settings.proto"; -import "google/cloud/securitycenter/v1/run_asset_discovery_response.proto"; import "google/cloud/securitycenter/v1/security_marks.proto"; import "google/cloud/securitycenter/v1/source.proto"; import "google/iam/v1/iam_policy.proto"; @@ -345,9 +344,12 @@ message GroupAssetsRequest { // * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` // * security_marks.marks: `=`, `:` // * security_center_properties.resource_name: `=`, `:` + // * security_center_properties.resource_display_name: `=`, `:` // * security_center_properties.resource_type: `=`, `:` // * security_center_properties.resource_parent: `=`, `:` + // * security_center_properties.resource_parent_display_name: `=`, `:` // * security_center_properties.resource_project: `=`, `:` + // * security_center_properties.resource_project_display_name: `=`, `:` // * security_center_properties.resource_owners: `=`, `:` // // For example, `resource_properties.size = 100` is a valid filter string. @@ -361,12 +363,16 @@ message GroupAssetsRequest { // The following fields are supported when compare_duration is not set: // // * security_center_properties.resource_project + // * security_center_properties.resource_project_display_name // * security_center_properties.resource_type // * security_center_properties.resource_parent + // * security_center_properties.resource_parent_display_name // // The following fields are supported when compare_duration is set: // // * security_center_properties.resource_type + // * security_center_properties.resource_project_display_name + // * security_center_properties.resource_parent_display_name string group_by = 3 [(google.api.field_behavior) = REQUIRED]; // When compare_duration is set, the GroupResult's "state_change" property is @@ -666,9 +672,12 @@ message ListAssetsRequest { // * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` // * security_marks.marks: `=`, `:` // * security_center_properties.resource_name: `=`, `:` + // * security_center_properties.resource_display_name: `=`, `:` // * security_center_properties.resource_type: `=`, `:` // * security_center_properties.resource_parent: `=`, `:` + // * security_center_properties.resource_parent_display_name: `=`, `:` // * security_center_properties.resource_project: `=`, `:` + // * security_center_properties.resource_project_display_name: `=`, `:` // * security_center_properties.resource_owners: `=`, `:` // // For example, `resource_properties.size = 100` is a valid filter string. @@ -689,8 +698,11 @@ message ListAssetsRequest { // resource_properties // security_marks.marks // security_center_properties.resource_name + // security_center_properties.resource_display_name // security_center_properties.resource_parent + // security_center_properties.resource_parent_display_name // security_center_properties.resource_project + // security_center_properties.resource_project_display_name // security_center_properties.resource_type string order_by = 3; @@ -914,6 +926,26 @@ message ListFindingsRequest { message ListFindingsResponse { // Result containing the Finding and its StateChange. message ListFindingsResult { + // Information related to the Google Cloud Platform (GCP) resource that is + // associated with this finding. + 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_name = 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_name = 4; + + // The human readable name of resource's parent. + string parent_display_name = 5; + } + // The change in state of the finding. // // When querying across two points in time this describes @@ -947,6 +979,9 @@ message ListFindingsResponse { // State change of the finding between the points in time. StateChange state_change = 2; + + // Output only. Resource that is associated with this finding. + Resource resource = 3; } // Findings matching the list request. 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 4ceff737fc6..d26e042f121 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 @@ -17,8 +17,8 @@ syntax = "proto3"; package google.cloud.securitycenter.v1; -import "google/api/annotations.proto"; import "google/api/resource.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter"; diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1beta1/asset.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1beta1/asset.proto index 3dd5b358141..85d0e0900db 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1beta1/asset.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1beta1/asset.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,10 +17,11 @@ syntax = "proto3"; package google.cloud.securitycenter.v1beta1; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; import "google/cloud/securitycenter/v1beta1/security_marks.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1beta1;securitycenter"; option java_multiple_files = true; @@ -36,10 +37,10 @@ message Asset { // Cloud SCC managed properties. These properties are managed by Cloud SCC and // cannot be modified by the user. message SecurityCenterProperties { - // The full resource name of the GCP resource this asset + // Immutable. The full resource name of the GCP 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; + string resource_name = 1 [(google.api.field_behavior) = IMMUTABLE]; // The type of the GCP resource. Examples include: APPLICATION, // PROJECT, and ORGANIZATION. This is a case insensitive field defined by @@ -62,7 +63,7 @@ message Asset { // The relative resource name of this asset. See: // https://cloud.google.com/apis/design/resource_names#relative_resource_name // Example: - // "organizations/123/assets/456". + // "organizations/{organization_id}/assets/{asset_id}". string name = 1; // Cloud SCC managed properties. These properties are managed by diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1beta1/finding.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1beta1/finding.proto index 21dfdd5616e..e582e6de3f5 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1beta1/finding.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1beta1/finding.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,10 +17,12 @@ syntax = "proto3"; package google.cloud.securitycenter.v1beta1; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/securitycenter/v1beta1/security_marks.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1beta1;securitycenter"; option java_multiple_files = true; @@ -33,6 +35,11 @@ option java_package = "com.google.cloud.securitycenter.v1beta1"; // 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" + pattern: "organizations/{organization}/sources/{source}/findings/{finding}" + }; + // The state of the finding. enum State { // Unspecified state. @@ -49,19 +56,21 @@ message Finding { // The relative resource name of this finding. See: // https://cloud.google.com/apis/design/resource_names#relative_resource_name // Example: - // "organizations/123/sources/456/findings/789" + // "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}" string name = 1; - // The relative resource name of the source the finding belongs to. See: + // Immutable. The relative resource name of the source the finding belongs to. See: // https://cloud.google.com/apis/design/resource_names#relative_resource_name // This field is immutable after creation time. // For example: - // "organizations/123/sources/456" - string parent = 2; + // "organizations/{organization_id}/sources/{source_id}" + string parent = 2 [(google.api.field_behavior) = IMMUTABLE]; - // The full resource name of the Google Cloud Platform (GCP) resource this - // finding is for. See: + // For findings on Google Cloud Platform (GCP) resources, the full resource + // name of the GCP 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. string resource_name = 3; @@ -87,11 +96,11 @@ message Finding { // Output only. User specified security marks. These marks are entirely // managed by the user and come from the SecurityMarks resource that belongs // to the finding. - SecurityMarks security_marks = 8; + SecurityMarks security_marks = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; // The time at which the event took place. For example, if the finding - // represents an open firewall it would capture the time the open firewall was - // detected. + // represents an open firewall it would capture the time the detector believes + // 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. diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1beta1/organization_settings.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1beta1/organization_settings.proto index ca9be114547..9f7f2b0edb0 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1beta1/organization_settings.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1beta1/organization_settings.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ syntax = "proto3"; package google.cloud.securitycenter.v1beta1; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1beta1;securitycenter"; @@ -26,6 +27,11 @@ option java_package = "com.google.cloud.securitycenter.v1beta1"; // User specified settings that are attached to the Cloud Security Command // Center (Cloud SCC) organization. message OrganizationSettings { + option (google.api.resource) = { + type: "securitycenter.googleapis.com/OrganizationSettings" + pattern: "organizations/{organization}/organizationSettings" + }; + // The configuration used for Asset Discovery runs. message AssetDiscoveryConfig { // The mode of inclusion when running Asset Discovery. @@ -60,7 +66,7 @@ message OrganizationSettings { // The relative resource name of the settings. See: // https://cloud.google.com/apis/design/resource_names#relative_resource_name // Example: - // "organizations/123/organizationSettings". + // "organizations/{organization_id}/organizationSettings". string name = 1; // A flag that indicates if Asset Discovery should be enabled. If the flag is diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1beta1/run_asset_discovery_response.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1beta1/run_asset_discovery_response.proto new file mode 100644 index 00000000000..53ba02ef0cc --- /dev/null +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1beta1/run_asset_discovery_response.proto @@ -0,0 +1,50 @@ +// Copyright 2019 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.v1beta1; + +import "google/protobuf/duration.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1beta1;securitycenter"; +option java_multiple_files = true; +option java_package = "com.google.cloud.securitycenter.v1beta1"; + +// Response of asset discovery run +message RunAssetDiscoveryResponse { + // The state of an asset discovery run. + enum State { + // Asset discovery run state was unspecified. + STATE_UNSPECIFIED = 0; + + // Asset discovery run completed successfully. + COMPLETED = 1; + + // Asset discovery run was cancelled with tasks still pending, as another + // run for the same organization was started with a higher priority. + SUPERSEDED = 2; + + // Asset discovery run was killed and terminated. + TERMINATED = 3; + } + + // The state of an asset discovery run. + State state = 1; + + // The duration between asset discovery run start and end + google.protobuf.Duration duration = 2; +} diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1beta1/security_marks.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1beta1/security_marks.proto index cfcb5f7dcb9..97baf247980 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1beta1/security_marks.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1beta1/security_marks.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ syntax = "proto3"; package google.cloud.securitycenter.v1beta1; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1beta1;securitycenter"; @@ -28,18 +29,26 @@ option java_package = "com.google.cloud.securitycenter.v1beta1"; // SCC organization -- they can be modified and viewed by all users who have // proper permissions on the organization. message SecurityMarks { + option (google.api.resource) = { + type: "securitycenter.googleapis.com/SecurityMarks" + pattern: "organizations/{organization}/assets/{asset}/securityMarks" + pattern: "organizations/{organization}/sources/{source}/findings/{finding}/securityMarks" + }; + // The relative resource name of the SecurityMarks. See: // https://cloud.google.com/apis/design/resource_names#relative_resource_name // Examples: - // "organizations/123/assets/456/securityMarks" - // "organizations/123/sources/456/findings/789/securityMarks". + // "organizations/{organization_id}/assets/{asset_id}/securityMarks" + // "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks". string name = 1; // Mutable user specified security marks belonging to the parent resource. // Constraints are as follows: - // - Keys and values are treated as case insensitive - // - Keys must be alphanumeric and between 1 - 256 characters (inclusive) - // - Values have leading and trailing whitespace trimmed, remaining + // + // * Keys and values are treated as case insensitive + // * Keys must be between 1 - 256 characters (inclusive) + // * Keys must be letters, numbers, underscores, or dashes + // * Values have leading and trailing whitespace trimmed, remaining // characters must be between 1 - 4096 characters (inclusive) map marks = 2; } diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1beta1/securitycenter_service.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1beta1/securitycenter_service.proto index dafce562dc7..ba2edf4eed8 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1beta1/securitycenter_service.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1beta1/securitycenter_service.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,6 +18,9 @@ syntax = "proto3"; package google.cloud.securitycenter.v1beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/securitycenter/v1beta1/asset.proto"; import "google/cloud/securitycenter/v1beta1/finding.proto"; import "google/cloud/securitycenter/v1beta1/organization_settings.proto"; @@ -38,12 +41,16 @@ option java_package = "com.google.cloud.securitycenter.v1beta1"; // V1 Beta APIs for Security Center service. service SecurityCenter { + option (google.api.default_host) = "securitycenter.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Creates a source. rpc CreateSource(CreateSourceRequest) returns (Source) { option (google.api.http) = { post: "/v1beta1/{parent=organizations/*}/sources" body: "source" }; + option (google.api.method_signature) = "parent,source"; } // Creates a finding. The corresponding source must exist for finding creation @@ -53,23 +60,24 @@ service SecurityCenter { post: "/v1beta1/{parent=organizations/*/sources/*}/findings" body: "finding" }; + option (google.api.method_signature) = "parent,finding_id,finding"; } // Gets the access control policy on the specified Source. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) - returns (google.iam.v1.Policy) { + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v1beta1/{resource=organizations/*/sources/*}:getIamPolicy" body: "*" }; + option (google.api.method_signature) = "resource"; } // Gets the settings for an organization. - rpc GetOrganizationSettings(GetOrganizationSettingsRequest) - returns (OrganizationSettings) { + rpc GetOrganizationSettings(GetOrganizationSettingsRequest) returns (OrganizationSettings) { option (google.api.http) = { get: "/v1beta1/{name=organizations/*/organizationSettings}" }; + option (google.api.method_signature) = "name"; } // Gets a source. @@ -77,6 +85,7 @@ service SecurityCenter { option (google.api.http) = { get: "/v1beta1/{name=organizations/*/sources/*}" }; + option (google.api.method_signature) = "name"; } // Filters an organization's assets and groups them by their specified @@ -92,12 +101,13 @@ service SecurityCenter { // specified properties. // // To group across all sources provide a `-` as the source id. - // Example: /v1beta1/organizations/123/sources/-/findings + // Example: /v1beta1/organizations/{organization_id}/sources/-/findings rpc GroupFindings(GroupFindingsRequest) returns (GroupFindingsResponse) { option (google.api.http) = { post: "/v1beta1/{parent=organizations/*/sources/*}/findings:group" body: "*" }; + option (google.api.method_signature) = "parent,group_by"; } // Lists an organization's assets. @@ -110,7 +120,7 @@ service SecurityCenter { // Lists an organization or source's findings. // // To list across all sources provide a `-` as the source id. - // Example: /v1beta1/organizations/123/sources/-/findings + // Example: /v1beta1/organizations/{organization_id}/sources/-/findings rpc ListFindings(ListFindingsRequest) returns (ListFindingsResponse) { option (google.api.http) = { get: "/v1beta1/{parent=organizations/*/sources/*}/findings" @@ -122,6 +132,7 @@ service SecurityCenter { option (google.api.http) = { get: "/v1beta1/{parent=organizations/*}/sources" }; + option (google.api.method_signature) = "parent"; } // Runs asset discovery. The discovery is tracked with a long-running @@ -130,12 +141,16 @@ service SecurityCenter { // This API can only be called with limited frequency for an organization. If // it is called too frequently the caller will receive a TOO_MANY_REQUESTS // error. - rpc RunAssetDiscovery(RunAssetDiscoveryRequest) - returns (google.longrunning.Operation) { + rpc RunAssetDiscovery(RunAssetDiscoveryRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1beta1/{parent=organizations/*}/assets:runDiscovery" body: "*" }; + option (google.api.method_signature) = "parent"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Empty" + }; } // Updates the state of a finding. @@ -144,24 +159,25 @@ service SecurityCenter { post: "/v1beta1/{name=organizations/*/sources/*/findings/*}:setState" body: "*" }; + option (google.api.method_signature) = "name,state,start_time"; } // Sets the access control policy on the specified Source. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) - returns (google.iam.v1.Policy) { + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v1beta1/{resource=organizations/*/sources/*}:setIamPolicy" body: "*" }; + option (google.api.method_signature) = "resource,policy"; } // Returns the permissions that a caller has on the specified source. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) - returns (google.iam.v1.TestIamPermissionsResponse) { + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { option (google.api.http) = { post: "/v1beta1/{resource=organizations/*/sources/*}:testIamPermissions" body: "*" }; + option (google.api.method_signature) = "resource,permissions"; } // Creates or updates a finding. The corresponding source must exist for a @@ -171,15 +187,16 @@ service SecurityCenter { patch: "/v1beta1/{finding.name=organizations/*/sources/*/findings/*}" body: "finding" }; + option (google.api.method_signature) = "finding"; } // Updates an organization's settings. - rpc UpdateOrganizationSettings(UpdateOrganizationSettingsRequest) - returns (OrganizationSettings) { + rpc UpdateOrganizationSettings(UpdateOrganizationSettingsRequest) returns (OrganizationSettings) { option (google.api.http) = { patch: "/v1beta1/{organization_settings.name=organizations/*/organizationSettings}" body: "organization_settings" }; + option (google.api.method_signature) = "organization_settings"; } // Updates a source. @@ -188,6 +205,7 @@ service SecurityCenter { patch: "/v1beta1/{source.name=organizations/*/sources/*}" body: "source" }; + option (google.api.method_signature) = "source"; } // Updates security marks. @@ -200,55 +218,81 @@ service SecurityCenter { body: "security_marks" } }; + option (google.api.method_signature) = "security_marks"; } } // Request message for creating a finding. message CreateFindingRequest { - // Resource name of the new finding's parent. Its format should be + // Required. Resource name of the new finding's parent. Its format should be // "organizations/[organization_id]/sources/[source_id]". - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/Source" + } + ]; - // Unique identifier provided by the client within the parent scope. + // Required. Unique identifier provided by the client within the parent scope. // It must be alphanumeric and less than or equal to 32 characters and // greater than 0 characters in length. - string finding_id = 2; + string finding_id = 2 [(google.api.field_behavior) = REQUIRED]; - // The Finding being created. The name and security_marks will be ignored as + // Required. The Finding being created. The name and security_marks will be ignored as // they are both output only fields on this resource. - Finding finding = 3; + Finding finding = 3 [(google.api.field_behavior) = REQUIRED]; } // Request message for creating a source. message CreateSourceRequest { - // Resource name of the new source's parent. Its format should be + // Required. Resource name of the new source's parent. Its format should be // "organizations/[organization_id]". - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Organization" + } + ]; - // The Source being created, only the display_name and description will be + // Required. The Source being created, only the display_name and description will be // used. All other fields will be ignored. - Source source = 2; + Source source = 2 [(google.api.field_behavior) = REQUIRED]; } // Request message for getting organization settings. message GetOrganizationSettingsRequest { - // Name of the organization to get organization settings for. Its format is + // Required. Name of the organization to get organization settings for. Its format is // "organizations/[organization_id]/organizationSettings". - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/OrganizationSettings" + } + ]; } // Request message for getting a source. message GetSourceRequest { - // Relative resource name of the source. Its format is + // Required. Relative resource name of the source. Its format is // "organizations/[organization_id]/source/[source_id]". - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/Source" + } + ]; } // Request message for grouping by assets. message GroupAssetsRequest { - // Name of the organization to groupBy. Its format is + // Required. Name of the organization to groupBy. Its format is // "organizations/[organization_id]". - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Organization" + } + ]; // Expression that defines the filter to apply across assets. // The expression is a list of zero or more restrictions combined via logical @@ -279,7 +323,7 @@ message GroupAssetsRequest { // For example, `resource_properties.size = 100` is a valid filter string. string filter = 2; - // Expression that defines what assets fields to use for grouping. The string + // Required. Expression that defines what assets fields to use for grouping. The string // value should follow SQL syntax: comma separated list of fields. For // example: // "security_center_properties.resource_project,security_center_properties.project". @@ -293,7 +337,7 @@ message GroupAssetsRequest { // The following fields are supported when compare_duration is set: // // * security_center_properties.resource_type - string group_by = 3; + string group_by = 3 [(google.api.field_behavior) = REQUIRED]; // When compare_duration is set, the Asset's "state" property is updated to // indicate whether the asset was added, removed, or remained present during @@ -351,11 +395,16 @@ message GroupAssetsResponse { // Request message for grouping by findings. message GroupFindingsRequest { - // Name of the source to groupBy. Its format is + // Required. Name of the source to groupBy. Its format is // "organizations/[organization_id]/sources/[source_id]". To groupBy across // all sources provide a source_id of `-`. For example: - // organizations/123/sources/- - string parent = 1; + // organizations/{organization_id}/sources/- + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/Source" + } + ]; // Expression that defines the filter to apply across findings. // The expression is a list of one or more restrictions combined via logical @@ -384,7 +433,7 @@ message GroupFindingsRequest { // For example, `source_properties.size = 100` is a valid filter string. string filter = 2; - // Expression that defines what assets fields to use for grouping (including + // Required. Expression that defines what assets fields to use for grouping (including // `state`). The string value should follow SQL syntax: comma separated list // of fields. For example: // "parent,resource_name". @@ -395,7 +444,7 @@ message GroupFindingsRequest { // * category // * state // * parent - string group_by = 3; + string group_by = 3 [(google.api.field_behavior) = REQUIRED]; // Time used as a reference point when filtering findings. The filter is // limited to findings existing at the supplied time and their values are @@ -439,9 +488,14 @@ message GroupResult { // Request message for listing sources. message ListSourcesRequest { - // Resource name of the parent of sources to list. Its format should be + // Required. Resource name of the parent of sources to list. Its format should be // "organizations/[organization_id]". - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Organization" + } + ]; // The value returned by the last `ListSourcesResponse`; indicates // that this is a continuation of a prior `ListSources` call, and @@ -465,9 +519,14 @@ message ListSourcesResponse { // Request message for listing assets. message ListAssetsRequest { - // Name of the organization assets should belong to. Its format is + // Required. Name of the organization assets should belong to. Its format is // "organizations/[organization_id]". - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Organization" + } + ]; // Expression that defines the filter to apply across assets. // The expression is a list of zero or more restrictions combined via logical @@ -539,12 +598,10 @@ message ListAssetsRequest { // "UNUSED", which indicates that the asset is present at read_time. google.protobuf.Duration compare_duration = 5; - // Optional. - // - // A field mask to specify the ListAssetsResult fields to be listed in the + // Optional. A field mask to specify the ListAssetsResult fields to be listed in the // response. // An empty field mask will list all fields. - google.protobuf.FieldMask field_mask = 7; + google.protobuf.FieldMask field_mask = 7 [(google.api.field_behavior) = OPTIONAL]; // The value returned by the last `ListAssetsResponse`; indicates // that this is a continuation of a prior `ListAssets` call, and @@ -606,11 +663,16 @@ message ListAssetsResponse { // Request message for listing findings. message ListFindingsRequest { - // Name of the source the findings belong to. Its format is + // Required. Name of the source the findings belong to. Its format is // "organizations/[organization_id]/sources/[source_id]". To list across all // sources provide a source_id of `-`. For example: - // organizations/123/sources/- - string parent = 1; + // organizations/{organization_id}/sources/- + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/Source" + } + ]; // Expression that defines the filter to apply across findings. // The expression is a list of one or more restrictions combined via logical @@ -655,11 +717,9 @@ message ListFindingsRequest { // API's version of NOW. google.protobuf.Timestamp read_time = 4; - // Optional. - // - // A field mask to specify the Finding fields to be listed in the response. + // Optional. A field mask to specify the Finding fields to be listed in the response. // An empty field mask will list all fields. - google.protobuf.FieldMask field_mask = 5; + google.protobuf.FieldMask field_mask = 5 [(google.api.field_behavior) = OPTIONAL]; // The value returned by the last `ListFindingsResponse`; indicates // that this is a continuation of a prior `ListFindings` call, and @@ -689,35 +749,45 @@ message ListFindingsResponse { // Request message for updating a finding's state. message SetFindingStateRequest { - // The relative resource name of the finding. See: + // Required. The relative resource name of the finding. See: // https://cloud.google.com/apis/design/resource_names#relative_resource_name // Example: - // "organizations/123/sources/456/finding/789". - string name = 1; + // "organizations/{organization_id}/sources/{source_id}/finding/{finding_id}". + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/Finding" + } + ]; - // The desired State of the finding. - Finding.State state = 2; + // Required. The desired State of the finding. + Finding.State state = 2 [(google.api.field_behavior) = REQUIRED]; - // The time at which the updated state takes effect. - google.protobuf.Timestamp start_time = 3; + // Required. The time at which the updated state takes effect. + google.protobuf.Timestamp start_time = 3 [(google.api.field_behavior) = REQUIRED]; } // Request message for running asset discovery for an organization. message RunAssetDiscoveryRequest { - // Name of the organization to run asset discovery for. Its format is + // Required. Name of the organization to run asset discovery for. Its format is // "organizations/[organization_id]". - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Organization" + } + ]; } // Request message for updating or creating a finding. message UpdateFindingRequest { - // The finding resource to update or create if it does not already exist. + // Required. The finding resource to update or create if it does not already exist. // parent, security_marks, and update_time will be ignored. // // In the case of creation, the finding id portion of the name must // alphanumeric and less than or equal to 32 characters and greater than 0 // characters in length. - Finding finding = 1; + Finding finding = 1 [(google.api.field_behavior) = REQUIRED]; // The FieldMask to use when updating the finding resource. This field should // not be specified when creating a finding. @@ -726,8 +796,8 @@ message UpdateFindingRequest { // Request message for updating an organization's settings. message UpdateOrganizationSettingsRequest { - // The organization settings resource to update. - OrganizationSettings organization_settings = 1; + // Required. The organization settings resource to update. + OrganizationSettings organization_settings = 1 [(google.api.field_behavior) = REQUIRED]; // The FieldMask to use when updating the settings resource. google.protobuf.FieldMask update_mask = 2; @@ -735,8 +805,8 @@ message UpdateOrganizationSettingsRequest { // Request message for updating a source. message UpdateSourceRequest { - // The source resource to update. - Source source = 1; + // Required. The source resource to update. + Source source = 1 [(google.api.field_behavior) = REQUIRED]; // The FieldMask to use when updating the source resource. google.protobuf.FieldMask update_mask = 2; @@ -744,8 +814,8 @@ message UpdateSourceRequest { // Request message for updating a SecurityMarks resource. message UpdateSecurityMarksRequest { - // The security marks resource to update. - SecurityMarks security_marks = 1; + // Required. The security marks resource to update. + SecurityMarks security_marks = 1 [(google.api.field_behavior) = REQUIRED]; // The FieldMask to use when updating the security marks resource. google.protobuf.FieldMask update_mask = 2; diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1beta1/source.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1beta1/source.proto index cc1fae6eaa6..98025bca28d 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1beta1/source.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1beta1/source.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ syntax = "proto3"; package google.cloud.securitycenter.v1beta1; +import "google/api/resource.proto"; import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1beta1;securitycenter"; @@ -27,19 +28,22 @@ option java_package = "com.google.cloud.securitycenter.v1beta1"; // 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 { + option (google.api.resource) = { + type: "securitycenter.googleapis.com/Source" + pattern: "organizations/{organization}/sources/{source}" + }; + // The relative resource name of this source. See: // https://cloud.google.com/apis/design/resource_names#relative_resource_name // Example: - // "organizations/123/sources/456" + // "organizations/{organization_id}/sources/{source_id}" string name = 1; // The source's display name. // A source's display name must be unique amongst its siblings, for example, // two sources with the same parent can't share the same display name. - // The display name must start and end with a letter or digit, may contain - // letters, digits, spaces, hyphens, and underscores, and can be no longer - // than 32 characters. This is captured by the regular expression: - // [\p{L}\p{N}]({\p{L}\p{N}_- ]{0,30}[\p{L}\p{N}])?. + // The display name must have a length between 1 and 64 characters + // (inclusive). string display_name = 2; // The description of the source (max of 1024 characters). diff --git a/packages/google-cloud-securitycenter/protos/protos.d.ts b/packages/google-cloud-securitycenter/protos/protos.d.ts index 186c0a77015..7043090e680 100644 --- a/packages/google-cloud-securitycenter/protos/protos.d.ts +++ b/packages/google-cloud-securitycenter/protos/protos.d.ts @@ -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. @@ -26,7334 +26,7815 @@ export namespace google { /** Namespace v1. */ namespace v1 { - /** Represents a SecurityCenter */ - class SecurityCenter extends $protobuf.rpc.Service { + /** Properties of a Finding. */ + interface IFinding { - /** - * Constructs a new SecurityCenter service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + /** Finding name */ + name?: (string|null); + + /** Finding parent */ + parent?: (string|null); + + /** Finding resourceName */ + resourceName?: (string|null); + + /** Finding state */ + state?: (google.cloud.securitycenter.v1.Finding.State|null); + + /** Finding category */ + category?: (string|null); + + /** Finding externalUri */ + externalUri?: (string|null); + + /** Finding sourceProperties */ + sourceProperties?: ({ [k: string]: google.protobuf.IValue }|null); + + /** Finding securityMarks */ + securityMarks?: (google.cloud.securitycenter.v1.ISecurityMarks|null); + + /** Finding eventTime */ + eventTime?: (google.protobuf.ITimestamp|null); + + /** Finding createTime */ + createTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a Finding. */ + class Finding implements IFinding { /** - * Creates new SecurityCenter service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. + * Constructs a new Finding. + * @param [properties] Properties to set */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): SecurityCenter; + constructor(properties?: google.cloud.securitycenter.v1.IFinding); + + /** Finding name. */ + public name: string; + + /** Finding parent. */ + public parent: string; + + /** Finding resourceName. */ + public resourceName: string; + + /** Finding state. */ + public state: google.cloud.securitycenter.v1.Finding.State; + + /** Finding category. */ + public category: string; + + /** Finding externalUri. */ + public externalUri: string; + + /** Finding sourceProperties. */ + public sourceProperties: { [k: string]: google.protobuf.IValue }; + + /** Finding securityMarks. */ + public securityMarks?: (google.cloud.securitycenter.v1.ISecurityMarks|null); + + /** Finding eventTime. */ + public eventTime?: (google.protobuf.ITimestamp|null); + + /** Finding createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); /** - * Calls CreateSource. - * @param request CreateSourceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Source + * Creates a new Finding instance using the specified properties. + * @param [properties] Properties to set + * @returns Finding instance */ - public createSource(request: google.cloud.securitycenter.v1.ICreateSourceRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.CreateSourceCallback): void; + public static create(properties?: google.cloud.securitycenter.v1.IFinding): google.cloud.securitycenter.v1.Finding; /** - * Calls CreateSource. - * @param request CreateSourceRequest message or plain object - * @returns Promise + * Encodes the specified Finding message. Does not implicitly {@link google.cloud.securitycenter.v1.Finding.verify|verify} messages. + * @param message Finding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public createSource(request: google.cloud.securitycenter.v1.ICreateSourceRequest): Promise; + public static encode(message: google.cloud.securitycenter.v1.IFinding, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreateFinding. - * @param request CreateFindingRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Finding + * Encodes the specified Finding message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Finding.verify|verify} messages. + * @param message Finding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public createFinding(request: google.cloud.securitycenter.v1.ICreateFindingRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.CreateFindingCallback): void; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IFinding, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreateFinding. - * @param request CreateFindingRequest message or plain object - * @returns Promise + * Decodes a Finding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Finding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createFinding(request: google.cloud.securitycenter.v1.ICreateFindingRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.Finding; /** - * Calls GetIamPolicy. - * @param request GetIamPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Policy + * Decodes a Finding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Finding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.GetIamPolicyCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.Finding; /** - * Calls GetIamPolicy. - * @param request GetIamPolicyRequest message or plain object - * @returns Promise + * Verifies a Finding message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls GetOrganizationSettings. - * @param request GetOrganizationSettingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and OrganizationSettings + * Creates a Finding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Finding */ - public getOrganizationSettings(request: google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.GetOrganizationSettingsCallback): void; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Finding; /** - * Calls GetOrganizationSettings. - * @param request GetOrganizationSettingsRequest message or plain object - * @returns Promise + * Creates a plain object from a Finding message. Also converts values to other types if specified. + * @param message Finding + * @param [options] Conversion options + * @returns Plain object */ - public getOrganizationSettings(request: google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest): Promise; + public static toObject(message: google.cloud.securitycenter.v1.Finding, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls GetSource. - * @param request GetSourceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Source + * Converts this Finding to JSON. + * @returns JSON object */ - public getSource(request: google.cloud.securitycenter.v1.IGetSourceRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.GetSourceCallback): void; + public toJSON(): { [k: string]: any }; + } + + namespace Finding { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + ACTIVE = 1, + INACTIVE = 2 + } + } + + /** Properties of a SecurityMarks. */ + interface ISecurityMarks { + + /** SecurityMarks name */ + name?: (string|null); + + /** SecurityMarks marks */ + marks?: ({ [k: string]: string }|null); + } + + /** Represents a SecurityMarks. */ + class SecurityMarks implements ISecurityMarks { /** - * Calls GetSource. - * @param request GetSourceRequest message or plain object - * @returns Promise + * Constructs a new SecurityMarks. + * @param [properties] Properties to set */ - public getSource(request: google.cloud.securitycenter.v1.IGetSourceRequest): Promise; + constructor(properties?: google.cloud.securitycenter.v1.ISecurityMarks); + + /** SecurityMarks name. */ + public name: string; + + /** SecurityMarks marks. */ + public marks: { [k: string]: string }; /** - * Calls GroupAssets. - * @param request GroupAssetsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GroupAssetsResponse + * Creates a new SecurityMarks instance using the specified properties. + * @param [properties] Properties to set + * @returns SecurityMarks instance */ - public groupAssets(request: google.cloud.securitycenter.v1.IGroupAssetsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.GroupAssetsCallback): void; + public static create(properties?: google.cloud.securitycenter.v1.ISecurityMarks): google.cloud.securitycenter.v1.SecurityMarks; /** - * Calls GroupAssets. - * @param request GroupAssetsRequest message or plain object - * @returns Promise + * Encodes the specified SecurityMarks message. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityMarks.verify|verify} messages. + * @param message SecurityMarks message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public groupAssets(request: google.cloud.securitycenter.v1.IGroupAssetsRequest): Promise; + public static encode(message: google.cloud.securitycenter.v1.ISecurityMarks, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GroupFindings. - * @param request GroupFindingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GroupFindingsResponse + * Encodes the specified SecurityMarks message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityMarks.verify|verify} messages. + * @param message SecurityMarks message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public groupFindings(request: google.cloud.securitycenter.v1.IGroupFindingsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.GroupFindingsCallback): void; + public static encodeDelimited(message: google.cloud.securitycenter.v1.ISecurityMarks, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GroupFindings. - * @param request GroupFindingsRequest message or plain object - * @returns Promise + * Decodes a SecurityMarks message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SecurityMarks + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public groupFindings(request: google.cloud.securitycenter.v1.IGroupFindingsRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.SecurityMarks; /** - * Calls ListAssets. - * @param request ListAssetsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListAssetsResponse + * Decodes a SecurityMarks message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SecurityMarks + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listAssets(request: google.cloud.securitycenter.v1.IListAssetsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.ListAssetsCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.SecurityMarks; /** - * Calls ListAssets. - * @param request ListAssetsRequest message or plain object - * @returns Promise + * Verifies a SecurityMarks message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public listAssets(request: google.cloud.securitycenter.v1.IListAssetsRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls ListFindings. - * @param request ListFindingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListFindingsResponse - */ - public listFindings(request: google.cloud.securitycenter.v1.IListFindingsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.ListFindingsCallback): void; - - /** - * Calls ListFindings. - * @param request ListFindingsRequest message or plain object - * @returns Promise - */ - public listFindings(request: google.cloud.securitycenter.v1.IListFindingsRequest): Promise; - - /** - * Calls ListSources. - * @param request ListSourcesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListSourcesResponse + * Creates a SecurityMarks message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SecurityMarks */ - public listSources(request: google.cloud.securitycenter.v1.IListSourcesRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.ListSourcesCallback): void; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.SecurityMarks; /** - * Calls ListSources. - * @param request ListSourcesRequest message or plain object - * @returns Promise + * Creates a plain object from a SecurityMarks message. Also converts values to other types if specified. + * @param message SecurityMarks + * @param [options] Conversion options + * @returns Plain object */ - public listSources(request: google.cloud.securitycenter.v1.IListSourcesRequest): Promise; + public static toObject(message: google.cloud.securitycenter.v1.SecurityMarks, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls RunAssetDiscovery. - * @param request RunAssetDiscoveryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Converts this SecurityMarks to JSON. + * @returns JSON object */ - public runAssetDiscovery(request: google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.RunAssetDiscoveryCallback): void; + public toJSON(): { [k: string]: any }; + } - /** - * Calls RunAssetDiscovery. - * @param request RunAssetDiscoveryRequest message or plain object - * @returns Promise - */ - public runAssetDiscovery(request: google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest): Promise; + /** Properties of an Asset. */ + interface IAsset { - /** - * Calls SetFindingState. - * @param request SetFindingStateRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Finding - */ - public setFindingState(request: google.cloud.securitycenter.v1.ISetFindingStateRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.SetFindingStateCallback): void; + /** Asset name */ + name?: (string|null); - /** - * Calls SetFindingState. - * @param request SetFindingStateRequest message or plain object - * @returns Promise - */ - public setFindingState(request: google.cloud.securitycenter.v1.ISetFindingStateRequest): Promise; + /** Asset securityCenterProperties */ + securityCenterProperties?: (google.cloud.securitycenter.v1.Asset.ISecurityCenterProperties|null); - /** - * Calls SetIamPolicy. - * @param request SetIamPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Policy - */ - public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.SetIamPolicyCallback): void; + /** Asset resourceProperties */ + resourceProperties?: ({ [k: string]: google.protobuf.IValue }|null); - /** - * Calls SetIamPolicy. - * @param request SetIamPolicyRequest message or plain object - * @returns Promise - */ - public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; + /** Asset securityMarks */ + securityMarks?: (google.cloud.securitycenter.v1.ISecurityMarks|null); - /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse - */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.TestIamPermissionsCallback): void; + /** Asset createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @returns Promise - */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; + /** Asset updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); - /** - * Calls UpdateFinding. - * @param request UpdateFindingRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Finding - */ - public updateFinding(request: google.cloud.securitycenter.v1.IUpdateFindingRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.UpdateFindingCallback): void; + /** Asset iamPolicy */ + iamPolicy?: (google.cloud.securitycenter.v1.Asset.IIamPolicy|null); + } - /** - * Calls UpdateFinding. - * @param request UpdateFindingRequest message or plain object - * @returns Promise - */ - public updateFinding(request: google.cloud.securitycenter.v1.IUpdateFindingRequest): Promise; + /** Represents an Asset. */ + class Asset implements IAsset { /** - * Calls UpdateOrganizationSettings. - * @param request UpdateOrganizationSettingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and OrganizationSettings + * Constructs a new Asset. + * @param [properties] Properties to set */ - public updateOrganizationSettings(request: google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.UpdateOrganizationSettingsCallback): void; + constructor(properties?: google.cloud.securitycenter.v1.IAsset); - /** - * Calls UpdateOrganizationSettings. - * @param request UpdateOrganizationSettingsRequest message or plain object - * @returns Promise - */ - public updateOrganizationSettings(request: google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest): Promise; + /** Asset name. */ + public name: string; - /** - * Calls UpdateSource. - * @param request UpdateSourceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Source - */ - public updateSource(request: google.cloud.securitycenter.v1.IUpdateSourceRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.UpdateSourceCallback): void; + /** Asset securityCenterProperties. */ + public securityCenterProperties?: (google.cloud.securitycenter.v1.Asset.ISecurityCenterProperties|null); - /** - * Calls UpdateSource. - * @param request UpdateSourceRequest message or plain object - * @returns Promise - */ - public updateSource(request: google.cloud.securitycenter.v1.IUpdateSourceRequest): Promise; + /** Asset resourceProperties. */ + public resourceProperties: { [k: string]: google.protobuf.IValue }; - /** - * Calls UpdateSecurityMarks. - * @param request UpdateSecurityMarksRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SecurityMarks - */ - public updateSecurityMarks(request: google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.UpdateSecurityMarksCallback): void; + /** Asset securityMarks. */ + public securityMarks?: (google.cloud.securitycenter.v1.ISecurityMarks|null); - /** - * Calls UpdateSecurityMarks. - * @param request UpdateSecurityMarksRequest message or plain object - * @returns Promise - */ - public updateSecurityMarks(request: google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest): Promise; - } + /** Asset createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - namespace SecurityCenter { + /** Asset updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#createSource}. - * @param error Error, if any - * @param [response] Source - */ - type CreateSourceCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.Source) => void; + /** Asset iamPolicy. */ + public iamPolicy?: (google.cloud.securitycenter.v1.Asset.IIamPolicy|null); /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#createFinding}. - * @param error Error, if any - * @param [response] Finding + * Creates a new Asset instance using the specified properties. + * @param [properties] Properties to set + * @returns Asset instance */ - type CreateFindingCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.Finding) => void; + public static create(properties?: google.cloud.securitycenter.v1.IAsset): google.cloud.securitycenter.v1.Asset; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#getIamPolicy}. - * @param error Error, if any - * @param [response] Policy + * Encodes the specified Asset message. Does not implicitly {@link google.cloud.securitycenter.v1.Asset.verify|verify} messages. + * @param message Asset message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + public static encode(message: google.cloud.securitycenter.v1.IAsset, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#getOrganizationSettings}. - * @param error Error, if any - * @param [response] OrganizationSettings + * Encodes the specified Asset message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Asset.verify|verify} messages. + * @param message Asset message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type GetOrganizationSettingsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.OrganizationSettings) => void; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IAsset, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#getSource}. - * @param error Error, if any - * @param [response] Source + * Decodes an Asset message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Asset + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type GetSourceCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.Source) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.Asset; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#groupAssets}. - * @param error Error, if any - * @param [response] GroupAssetsResponse + * Decodes an Asset message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Asset + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type GroupAssetsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.GroupAssetsResponse) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.Asset; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#groupFindings}. - * @param error Error, if any - * @param [response] GroupFindingsResponse + * Verifies an Asset message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type GroupFindingsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.GroupFindingsResponse) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#listAssets}. - * @param error Error, if any - * @param [response] ListAssetsResponse + * Creates an Asset message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Asset */ - type ListAssetsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.ListAssetsResponse) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Asset; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#listFindings}. - * @param error Error, if any - * @param [response] ListFindingsResponse + * Creates a plain object from an Asset message. Also converts values to other types if specified. + * @param message Asset + * @param [options] Conversion options + * @returns Plain object */ - type ListFindingsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.ListFindingsResponse) => void; + public static toObject(message: google.cloud.securitycenter.v1.Asset, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#listSources}. - * @param error Error, if any - * @param [response] ListSourcesResponse + * Converts this Asset to JSON. + * @returns JSON object */ - type ListSourcesCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.ListSourcesResponse) => void; + public toJSON(): { [k: string]: any }; + } - /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#runAssetDiscovery}. - * @param error Error, if any - * @param [response] Operation - */ - type RunAssetDiscoveryCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + namespace Asset { - /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#setFindingState}. - * @param error Error, if any - * @param [response] Finding - */ - type SetFindingStateCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.Finding) => void; - - /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#setIamPolicy}. - * @param error Error, if any - * @param [response] Policy - */ - type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + /** Properties of a SecurityCenterProperties. */ + interface ISecurityCenterProperties { - /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#testIamPermissions}. - * @param error Error, if any - * @param [response] TestIamPermissionsResponse - */ - type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; + /** SecurityCenterProperties resourceName */ + resourceName?: (string|null); - /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#updateFinding}. - * @param error Error, if any - * @param [response] Finding - */ - type UpdateFindingCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.Finding) => void; + /** SecurityCenterProperties resourceType */ + resourceType?: (string|null); - /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#updateOrganizationSettings}. - * @param error Error, if any - * @param [response] OrganizationSettings - */ - type UpdateOrganizationSettingsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.OrganizationSettings) => void; + /** SecurityCenterProperties resourceParent */ + resourceParent?: (string|null); - /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#updateSource}. - * @param error Error, if any - * @param [response] Source - */ - type UpdateSourceCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.Source) => void; + /** SecurityCenterProperties resourceProject */ + resourceProject?: (string|null); - /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#updateSecurityMarks}. - * @param error Error, if any - * @param [response] SecurityMarks - */ - type UpdateSecurityMarksCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.SecurityMarks) => void; - } + /** SecurityCenterProperties resourceOwners */ + resourceOwners?: (string[]|null); - /** Properties of a CreateFindingRequest. */ - interface ICreateFindingRequest { + /** SecurityCenterProperties resourceDisplayName */ + resourceDisplayName?: (string|null); - /** CreateFindingRequest parent */ - parent?: (string|null); + /** SecurityCenterProperties resourceParentDisplayName */ + resourceParentDisplayName?: (string|null); - /** CreateFindingRequest findingId */ - findingId?: (string|null); + /** SecurityCenterProperties resourceProjectDisplayName */ + resourceProjectDisplayName?: (string|null); + } - /** CreateFindingRequest finding */ - finding?: (google.cloud.securitycenter.v1.IFinding|null); - } + /** Represents a SecurityCenterProperties. */ + class SecurityCenterProperties implements ISecurityCenterProperties { - /** Represents a CreateFindingRequest. */ - class CreateFindingRequest implements ICreateFindingRequest { + /** + * Constructs a new SecurityCenterProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.Asset.ISecurityCenterProperties); - /** - * Constructs a new CreateFindingRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.ICreateFindingRequest); + /** SecurityCenterProperties resourceName. */ + public resourceName: string; - /** CreateFindingRequest parent. */ - public parent: string; + /** SecurityCenterProperties resourceType. */ + public resourceType: string; - /** CreateFindingRequest findingId. */ - public findingId: string; + /** SecurityCenterProperties resourceParent. */ + public resourceParent: string; - /** CreateFindingRequest finding. */ - public finding?: (google.cloud.securitycenter.v1.IFinding|null); + /** SecurityCenterProperties resourceProject. */ + public resourceProject: string; - /** - * Creates a new CreateFindingRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateFindingRequest instance - */ - public static create(properties?: google.cloud.securitycenter.v1.ICreateFindingRequest): google.cloud.securitycenter.v1.CreateFindingRequest; + /** SecurityCenterProperties resourceOwners. */ + public resourceOwners: string[]; - /** - * Encodes the specified CreateFindingRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.CreateFindingRequest.verify|verify} messages. - * @param message CreateFindingRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.ICreateFindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** SecurityCenterProperties resourceDisplayName. */ + public resourceDisplayName: string; - /** - * Encodes the specified CreateFindingRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CreateFindingRequest.verify|verify} messages. - * @param message CreateFindingRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.ICreateFindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** SecurityCenterProperties resourceParentDisplayName. */ + public resourceParentDisplayName: string; - /** - * Decodes a CreateFindingRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateFindingRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.CreateFindingRequest; + /** SecurityCenterProperties resourceProjectDisplayName. */ + public resourceProjectDisplayName: string; - /** - * Decodes a CreateFindingRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateFindingRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.CreateFindingRequest; + /** + * Creates a new SecurityCenterProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns SecurityCenterProperties instance + */ + public static create(properties?: google.cloud.securitycenter.v1.Asset.ISecurityCenterProperties): google.cloud.securitycenter.v1.Asset.SecurityCenterProperties; - /** - * Verifies a CreateFindingRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified SecurityCenterProperties message. Does not implicitly {@link google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.verify|verify} messages. + * @param message SecurityCenterProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.Asset.ISecurityCenterProperties, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a CreateFindingRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateFindingRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CreateFindingRequest; + /** + * Encodes the specified SecurityCenterProperties message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.verify|verify} messages. + * @param message SecurityCenterProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.Asset.ISecurityCenterProperties, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from a CreateFindingRequest message. Also converts values to other types if specified. - * @param message CreateFindingRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.CreateFindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a SecurityCenterProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SecurityCenterProperties + * @throws {Error} If the payload is not a reader 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.Asset.SecurityCenterProperties; - /** - * Converts this CreateFindingRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes a SecurityCenterProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SecurityCenterProperties + * @throws {Error} If the payload is not 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.Asset.SecurityCenterProperties; - /** Properties of a CreateSourceRequest. */ - interface ICreateSourceRequest { + /** + * Verifies a SecurityCenterProperties message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** CreateSourceRequest parent */ - parent?: (string|null); + /** + * Creates a SecurityCenterProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SecurityCenterProperties + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Asset.SecurityCenterProperties; - /** CreateSourceRequest source */ - source?: (google.cloud.securitycenter.v1.ISource|null); - } + /** + * Creates a plain object from a SecurityCenterProperties message. Also converts values to other types if specified. + * @param message SecurityCenterProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.Asset.SecurityCenterProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Represents a CreateSourceRequest. */ - class CreateSourceRequest implements ICreateSourceRequest { + /** + * Converts this SecurityCenterProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Constructs a new CreateSourceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.ICreateSourceRequest); + /** Properties of an IamPolicy. */ + interface IIamPolicy { - /** CreateSourceRequest parent. */ - public parent: string; + /** IamPolicy policyBlob */ + policyBlob?: (string|null); + } - /** CreateSourceRequest source. */ - public source?: (google.cloud.securitycenter.v1.ISource|null); + /** Represents an IamPolicy. */ + class IamPolicy implements IIamPolicy { - /** - * Creates a new CreateSourceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateSourceRequest instance - */ - public static create(properties?: google.cloud.securitycenter.v1.ICreateSourceRequest): google.cloud.securitycenter.v1.CreateSourceRequest; + /** + * Constructs a new IamPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.Asset.IIamPolicy); - /** - * Encodes the specified CreateSourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.CreateSourceRequest.verify|verify} messages. - * @param message CreateSourceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.ICreateSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** IamPolicy policyBlob. */ + public policyBlob: string; - /** - * Encodes the specified CreateSourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CreateSourceRequest.verify|verify} messages. - * @param message CreateSourceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.ICreateSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new IamPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns IamPolicy instance + */ + public static create(properties?: google.cloud.securitycenter.v1.Asset.IIamPolicy): google.cloud.securitycenter.v1.Asset.IamPolicy; - /** - * Decodes a CreateSourceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateSourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.CreateSourceRequest; + /** + * Encodes the specified IamPolicy message. Does not implicitly {@link google.cloud.securitycenter.v1.Asset.IamPolicy.verify|verify} messages. + * @param message IamPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.Asset.IIamPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a CreateSourceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateSourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.CreateSourceRequest; + /** + * Encodes the specified IamPolicy message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Asset.IamPolicy.verify|verify} messages. + * @param message IamPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.Asset.IIamPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a CreateSourceRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes an IamPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IamPolicy + * @throws {Error} If the payload is not a reader 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.Asset.IamPolicy; - /** - * Creates a CreateSourceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateSourceRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CreateSourceRequest; + /** + * Decodes an IamPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IamPolicy + * @throws {Error} If the payload is not 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.Asset.IamPolicy; - /** - * Creates a plain object from a CreateSourceRequest message. Also converts values to other types if specified. - * @param message CreateSourceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.CreateSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies an IamPolicy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this CreateSourceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates an IamPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IamPolicy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Asset.IamPolicy; + + /** + * Creates a plain object from an IamPolicy message. Also converts values to other types if specified. + * @param message IamPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.Asset.IamPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IamPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } - /** Properties of a GetOrganizationSettingsRequest. */ - interface IGetOrganizationSettingsRequest { + /** Properties of a Source. */ + interface ISource { - /** GetOrganizationSettingsRequest name */ + /** Source name */ name?: (string|null); + + /** Source displayName */ + displayName?: (string|null); + + /** Source description */ + description?: (string|null); } - /** Represents a GetOrganizationSettingsRequest. */ - class GetOrganizationSettingsRequest implements IGetOrganizationSettingsRequest { + /** Represents a Source. */ + class Source implements ISource { /** - * Constructs a new GetOrganizationSettingsRequest. + * Constructs a new Source. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest); + constructor(properties?: google.cloud.securitycenter.v1.ISource); - /** GetOrganizationSettingsRequest name. */ + /** Source name. */ public name: string; + /** Source displayName. */ + public displayName: string; + + /** Source description. */ + public description: string; + /** - * Creates a new GetOrganizationSettingsRequest instance using the specified properties. + * Creates a new Source instance using the specified properties. * @param [properties] Properties to set - * @returns GetOrganizationSettingsRequest instance + * @returns Source instance */ - public static create(properties?: google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest): google.cloud.securitycenter.v1.GetOrganizationSettingsRequest; + public static create(properties?: google.cloud.securitycenter.v1.ISource): google.cloud.securitycenter.v1.Source; /** - * Encodes the specified GetOrganizationSettingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetOrganizationSettingsRequest.verify|verify} messages. - * @param message GetOrganizationSettingsRequest message or plain object to encode + * Encodes the specified Source message. Does not implicitly {@link google.cloud.securitycenter.v1.Source.verify|verify} messages. + * @param message Source message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.ISource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetOrganizationSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetOrganizationSettingsRequest.verify|verify} messages. - * @param message GetOrganizationSettingsRequest message or plain object to encode + * Encodes the specified Source message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Source.verify|verify} messages. + * @param message Source message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.ISource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetOrganizationSettingsRequest message from the specified reader or buffer. + * Decodes a Source message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetOrganizationSettingsRequest + * @returns Source * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.GetOrganizationSettingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.Source; /** - * Decodes a GetOrganizationSettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a Source message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetOrganizationSettingsRequest + * @returns Source * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.GetOrganizationSettingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.Source; /** - * Verifies a GetOrganizationSettingsRequest message. + * Verifies a Source message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetOrganizationSettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Source message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetOrganizationSettingsRequest + * @returns Source */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GetOrganizationSettingsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Source; /** - * Creates a plain object from a GetOrganizationSettingsRequest message. Also converts values to other types if specified. - * @param message GetOrganizationSettingsRequest + * Creates a plain object from a Source message. Also converts values to other types if specified. + * @param message Source * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.GetOrganizationSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.Source, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetOrganizationSettingsRequest to JSON. + * Converts this Source to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetSourceRequest. */ - interface IGetSourceRequest { + /** Properties of a RunAssetDiscoveryResponse. */ + interface IRunAssetDiscoveryResponse { - /** GetSourceRequest name */ - name?: (string|null); + /** RunAssetDiscoveryResponse state */ + state?: (google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State|null); + + /** RunAssetDiscoveryResponse duration */ + duration?: (google.protobuf.IDuration|null); } - /** Represents a GetSourceRequest. */ - class GetSourceRequest implements IGetSourceRequest { + /** Represents a RunAssetDiscoveryResponse. */ + class RunAssetDiscoveryResponse implements IRunAssetDiscoveryResponse { /** - * Constructs a new GetSourceRequest. + * Constructs a new RunAssetDiscoveryResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IGetSourceRequest); + constructor(properties?: google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse); - /** GetSourceRequest name. */ - public name: string; + /** RunAssetDiscoveryResponse state. */ + public state: google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State; + + /** RunAssetDiscoveryResponse duration. */ + public duration?: (google.protobuf.IDuration|null); /** - * Creates a new GetSourceRequest instance using the specified properties. + * Creates a new RunAssetDiscoveryResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetSourceRequest instance + * @returns RunAssetDiscoveryResponse instance */ - public static create(properties?: google.cloud.securitycenter.v1.IGetSourceRequest): google.cloud.securitycenter.v1.GetSourceRequest; + public static create(properties?: google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse): google.cloud.securitycenter.v1.RunAssetDiscoveryResponse; /** - * Encodes the specified GetSourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetSourceRequest.verify|verify} messages. - * @param message GetSourceRequest message or plain object to encode + * Encodes the specified RunAssetDiscoveryResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.verify|verify} messages. + * @param message RunAssetDiscoveryResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IGetSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetSourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetSourceRequest.verify|verify} messages. - * @param message GetSourceRequest message or plain object to encode + * Encodes the specified RunAssetDiscoveryResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.verify|verify} messages. + * @param message RunAssetDiscoveryResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IGetSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetSourceRequest message from the specified reader or buffer. + * Decodes a RunAssetDiscoveryResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetSourceRequest + * @returns RunAssetDiscoveryResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.GetSourceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.RunAssetDiscoveryResponse; /** - * Decodes a GetSourceRequest message from the specified reader or buffer, length delimited. + * Decodes a RunAssetDiscoveryResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetSourceRequest + * @returns RunAssetDiscoveryResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.GetSourceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.RunAssetDiscoveryResponse; /** - * Verifies a GetSourceRequest message. + * Verifies a RunAssetDiscoveryResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetSourceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RunAssetDiscoveryResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetSourceRequest + * @returns RunAssetDiscoveryResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GetSourceRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.RunAssetDiscoveryResponse; /** - * Creates a plain object from a GetSourceRequest message. Also converts values to other types if specified. - * @param message GetSourceRequest + * Creates a plain object from a RunAssetDiscoveryResponse message. Also converts values to other types if specified. + * @param message RunAssetDiscoveryResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.GetSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.RunAssetDiscoveryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetSourceRequest to JSON. + * Converts this RunAssetDiscoveryResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GroupAssetsRequest. */ - interface IGroupAssetsRequest { - - /** GroupAssetsRequest parent */ - parent?: (string|null); - - /** GroupAssetsRequest filter */ - filter?: (string|null); + namespace RunAssetDiscoveryResponse { - /** GroupAssetsRequest groupBy */ - groupBy?: (string|null); + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + COMPLETED = 1, + SUPERSEDED = 2, + TERMINATED = 3 + } + } - /** GroupAssetsRequest compareDuration */ - compareDuration?: (google.protobuf.IDuration|null); + /** Properties of an OrganizationSettings. */ + interface IOrganizationSettings { - /** GroupAssetsRequest readTime */ - readTime?: (google.protobuf.ITimestamp|null); + /** OrganizationSettings name */ + name?: (string|null); - /** GroupAssetsRequest pageToken */ - pageToken?: (string|null); + /** OrganizationSettings enableAssetDiscovery */ + enableAssetDiscovery?: (boolean|null); - /** GroupAssetsRequest pageSize */ - pageSize?: (number|null); + /** OrganizationSettings assetDiscoveryConfig */ + assetDiscoveryConfig?: (google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig|null); } - /** Represents a GroupAssetsRequest. */ - class GroupAssetsRequest implements IGroupAssetsRequest { + /** Represents an OrganizationSettings. */ + class OrganizationSettings implements IOrganizationSettings { /** - * Constructs a new GroupAssetsRequest. + * Constructs a new OrganizationSettings. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IGroupAssetsRequest); - - /** GroupAssetsRequest parent. */ - public parent: string; - - /** GroupAssetsRequest filter. */ - public filter: string; - - /** GroupAssetsRequest groupBy. */ - public groupBy: string; - - /** GroupAssetsRequest compareDuration. */ - public compareDuration?: (google.protobuf.IDuration|null); + constructor(properties?: google.cloud.securitycenter.v1.IOrganizationSettings); - /** GroupAssetsRequest readTime. */ - public readTime?: (google.protobuf.ITimestamp|null); + /** OrganizationSettings name. */ + public name: string; - /** GroupAssetsRequest pageToken. */ - public pageToken: string; + /** OrganizationSettings enableAssetDiscovery. */ + public enableAssetDiscovery: boolean; - /** GroupAssetsRequest pageSize. */ - public pageSize: number; + /** OrganizationSettings assetDiscoveryConfig. */ + public assetDiscoveryConfig?: (google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig|null); /** - * Creates a new GroupAssetsRequest instance using the specified properties. + * Creates a new OrganizationSettings instance using the specified properties. * @param [properties] Properties to set - * @returns GroupAssetsRequest instance + * @returns OrganizationSettings instance */ - public static create(properties?: google.cloud.securitycenter.v1.IGroupAssetsRequest): google.cloud.securitycenter.v1.GroupAssetsRequest; + public static create(properties?: google.cloud.securitycenter.v1.IOrganizationSettings): google.cloud.securitycenter.v1.OrganizationSettings; /** - * Encodes the specified GroupAssetsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupAssetsRequest.verify|verify} messages. - * @param message GroupAssetsRequest message or plain object to encode + * Encodes the specified OrganizationSettings message. Does not implicitly {@link google.cloud.securitycenter.v1.OrganizationSettings.verify|verify} messages. + * @param message OrganizationSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IGroupAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IOrganizationSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GroupAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupAssetsRequest.verify|verify} messages. - * @param message GroupAssetsRequest message or plain object to encode + * Encodes the specified OrganizationSettings message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.OrganizationSettings.verify|verify} messages. + * @param message OrganizationSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IGroupAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IOrganizationSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GroupAssetsRequest message from the specified reader or buffer. + * Decodes an OrganizationSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GroupAssetsRequest + * @returns OrganizationSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.GroupAssetsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.OrganizationSettings; /** - * Decodes a GroupAssetsRequest message from the specified reader or buffer, length delimited. + * Decodes an OrganizationSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GroupAssetsRequest + * @returns OrganizationSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.GroupAssetsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.OrganizationSettings; /** - * Verifies a GroupAssetsRequest message. + * Verifies an OrganizationSettings message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GroupAssetsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an OrganizationSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GroupAssetsRequest + * @returns OrganizationSettings */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GroupAssetsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.OrganizationSettings; /** - * Creates a plain object from a GroupAssetsRequest message. Also converts values to other types if specified. - * @param message GroupAssetsRequest + * Creates a plain object from an OrganizationSettings message. Also converts values to other types if specified. + * @param message OrganizationSettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.GroupAssetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.OrganizationSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GroupAssetsRequest to JSON. + * Converts this OrganizationSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GroupAssetsResponse. */ - interface IGroupAssetsResponse { - - /** GroupAssetsResponse groupByResults */ - groupByResults?: (google.cloud.securitycenter.v1.IGroupResult[]|null); + namespace OrganizationSettings { - /** GroupAssetsResponse readTime */ - readTime?: (google.protobuf.ITimestamp|null); + /** Properties of an AssetDiscoveryConfig. */ + interface IAssetDiscoveryConfig { - /** GroupAssetsResponse nextPageToken */ - nextPageToken?: (string|null); + /** AssetDiscoveryConfig projectIds */ + projectIds?: (string[]|null); - /** GroupAssetsResponse totalSize */ - totalSize?: (number|null); - } + /** AssetDiscoveryConfig inclusionMode */ + inclusionMode?: (google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode|null); + } - /** Represents a GroupAssetsResponse. */ - class GroupAssetsResponse implements IGroupAssetsResponse { + /** Represents an AssetDiscoveryConfig. */ + class AssetDiscoveryConfig implements IAssetDiscoveryConfig { - /** - * Constructs a new GroupAssetsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.IGroupAssetsResponse); + /** + * Constructs a new AssetDiscoveryConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig); - /** GroupAssetsResponse groupByResults. */ - public groupByResults: google.cloud.securitycenter.v1.IGroupResult[]; + /** AssetDiscoveryConfig projectIds. */ + public projectIds: string[]; - /** GroupAssetsResponse readTime. */ - public readTime?: (google.protobuf.ITimestamp|null); + /** AssetDiscoveryConfig inclusionMode. */ + public inclusionMode: google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode; - /** GroupAssetsResponse nextPageToken. */ - public nextPageToken: string; + /** + * Creates a new AssetDiscoveryConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AssetDiscoveryConfig instance + */ + public static create(properties?: google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig): google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig; - /** GroupAssetsResponse totalSize. */ - public totalSize: number; + /** + * Encodes the specified AssetDiscoveryConfig message. Does not implicitly {@link google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.verify|verify} messages. + * @param message AssetDiscoveryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new GroupAssetsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GroupAssetsResponse instance - */ - public static create(properties?: google.cloud.securitycenter.v1.IGroupAssetsResponse): google.cloud.securitycenter.v1.GroupAssetsResponse; + /** + * Encodes the specified AssetDiscoveryConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.verify|verify} messages. + * @param message AssetDiscoveryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified GroupAssetsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupAssetsResponse.verify|verify} messages. - * @param message GroupAssetsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.IGroupAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes an AssetDiscoveryConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AssetDiscoveryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig; - /** - * Encodes the specified GroupAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupAssetsResponse.verify|verify} messages. - * @param message GroupAssetsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IGroupAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes an AssetDiscoveryConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AssetDiscoveryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig; - /** - * Decodes a GroupAssetsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GroupAssetsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.GroupAssetsResponse; + /** + * Verifies an AssetDiscoveryConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes a GroupAssetsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GroupAssetsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.GroupAssetsResponse; + /** + * Creates an AssetDiscoveryConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AssetDiscoveryConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig; + + /** + * Creates a plain object from an AssetDiscoveryConfig message. Also converts values to other types if specified. + * @param message AssetDiscoveryConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AssetDiscoveryConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace AssetDiscoveryConfig { + + /** InclusionMode enum. */ + enum InclusionMode { + INCLUSION_MODE_UNSPECIFIED = 0, + INCLUDE_ONLY = 1, + EXCLUDE = 2 + } + } + } + + /** Represents a SecurityCenter */ + class SecurityCenter extends $protobuf.rpc.Service { /** - * Verifies a GroupAssetsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Constructs a new SecurityCenter service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - public static verify(message: { [k: string]: any }): (string|null); + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates a GroupAssetsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GroupAssetsResponse + * Creates new SecurityCenter service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GroupAssetsResponse; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): SecurityCenter; /** - * Creates a plain object from a GroupAssetsResponse message. Also converts values to other types if specified. - * @param message GroupAssetsResponse - * @param [options] Conversion options - * @returns Plain object + * Calls CreateSource. + * @param request CreateSourceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Source */ - public static toObject(message: google.cloud.securitycenter.v1.GroupAssetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public createSource(request: google.cloud.securitycenter.v1.ICreateSourceRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.CreateSourceCallback): void; /** - * Converts this GroupAssetsResponse to JSON. - * @returns JSON object + * Calls CreateSource. + * @param request CreateSourceRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GroupFindingsRequest. */ - interface IGroupFindingsRequest { - - /** GroupFindingsRequest parent */ - parent?: (string|null); - - /** GroupFindingsRequest filter */ - filter?: (string|null); - - /** GroupFindingsRequest groupBy */ - groupBy?: (string|null); - - /** GroupFindingsRequest readTime */ - readTime?: (google.protobuf.ITimestamp|null); + public createSource(request: google.cloud.securitycenter.v1.ICreateSourceRequest): Promise; - /** GroupFindingsRequest compareDuration */ - compareDuration?: (google.protobuf.IDuration|null); + /** + * Calls CreateFinding. + * @param request CreateFindingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Finding + */ + public createFinding(request: google.cloud.securitycenter.v1.ICreateFindingRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.CreateFindingCallback): void; - /** GroupFindingsRequest pageToken */ - pageToken?: (string|null); + /** + * Calls CreateFinding. + * @param request CreateFindingRequest message or plain object + * @returns Promise + */ + public createFinding(request: google.cloud.securitycenter.v1.ICreateFindingRequest): Promise; - /** GroupFindingsRequest pageSize */ - pageSize?: (number|null); - } + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.GetIamPolicyCallback): void; - /** Represents a GroupFindingsRequest. */ - class GroupFindingsRequest implements IGroupFindingsRequest { + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @returns Promise + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; /** - * Constructs a new GroupFindingsRequest. - * @param [properties] Properties to set + * Calls GetOrganizationSettings. + * @param request GetOrganizationSettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and OrganizationSettings */ - constructor(properties?: google.cloud.securitycenter.v1.IGroupFindingsRequest); + public getOrganizationSettings(request: google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.GetOrganizationSettingsCallback): void; - /** GroupFindingsRequest parent. */ - public parent: string; + /** + * Calls GetOrganizationSettings. + * @param request GetOrganizationSettingsRequest message or plain object + * @returns Promise + */ + public getOrganizationSettings(request: google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest): Promise; - /** GroupFindingsRequest filter. */ - public filter: string; + /** + * Calls GetSource. + * @param request GetSourceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Source + */ + public getSource(request: google.cloud.securitycenter.v1.IGetSourceRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.GetSourceCallback): void; - /** GroupFindingsRequest groupBy. */ - public groupBy: string; + /** + * Calls GetSource. + * @param request GetSourceRequest message or plain object + * @returns Promise + */ + public getSource(request: google.cloud.securitycenter.v1.IGetSourceRequest): Promise; - /** GroupFindingsRequest readTime. */ - public readTime?: (google.protobuf.ITimestamp|null); + /** + * Calls GroupAssets. + * @param request GroupAssetsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GroupAssetsResponse + */ + public groupAssets(request: google.cloud.securitycenter.v1.IGroupAssetsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.GroupAssetsCallback): void; - /** GroupFindingsRequest compareDuration. */ - public compareDuration?: (google.protobuf.IDuration|null); + /** + * Calls GroupAssets. + * @param request GroupAssetsRequest message or plain object + * @returns Promise + */ + public groupAssets(request: google.cloud.securitycenter.v1.IGroupAssetsRequest): Promise; - /** GroupFindingsRequest pageToken. */ - public pageToken: string; + /** + * Calls GroupFindings. + * @param request GroupFindingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GroupFindingsResponse + */ + public groupFindings(request: google.cloud.securitycenter.v1.IGroupFindingsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.GroupFindingsCallback): void; - /** GroupFindingsRequest pageSize. */ - public pageSize: number; + /** + * Calls GroupFindings. + * @param request GroupFindingsRequest message or plain object + * @returns Promise + */ + public groupFindings(request: google.cloud.securitycenter.v1.IGroupFindingsRequest): Promise; /** - * Creates a new GroupFindingsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GroupFindingsRequest instance + * Calls ListAssets. + * @param request ListAssetsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAssetsResponse */ - public static create(properties?: google.cloud.securitycenter.v1.IGroupFindingsRequest): google.cloud.securitycenter.v1.GroupFindingsRequest; + public listAssets(request: google.cloud.securitycenter.v1.IListAssetsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.ListAssetsCallback): void; /** - * Encodes the specified GroupFindingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupFindingsRequest.verify|verify} messages. - * @param message GroupFindingsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListAssets. + * @param request ListAssetsRequest message or plain object + * @returns Promise */ - public static encode(message: google.cloud.securitycenter.v1.IGroupFindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public listAssets(request: google.cloud.securitycenter.v1.IListAssetsRequest): Promise; /** - * Encodes the specified GroupFindingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupFindingsRequest.verify|verify} messages. - * @param message GroupFindingsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListFindings. + * @param request ListFindingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListFindingsResponse */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IGroupFindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public listFindings(request: google.cloud.securitycenter.v1.IListFindingsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.ListFindingsCallback): void; /** - * Decodes a GroupFindingsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GroupFindingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListFindings. + * @param request ListFindingsRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.GroupFindingsRequest; + public listFindings(request: google.cloud.securitycenter.v1.IListFindingsRequest): Promise; /** - * Decodes a GroupFindingsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GroupFindingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListSources. + * @param request ListSourcesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListSourcesResponse */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.GroupFindingsRequest; + public listSources(request: google.cloud.securitycenter.v1.IListSourcesRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.ListSourcesCallback): void; /** - * Verifies a GroupFindingsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls ListSources. + * @param request ListSourcesRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public listSources(request: google.cloud.securitycenter.v1.IListSourcesRequest): Promise; /** - * Creates a GroupFindingsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GroupFindingsRequest + * Calls RunAssetDiscovery. + * @param request RunAssetDiscoveryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GroupFindingsRequest; + public runAssetDiscovery(request: google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.RunAssetDiscoveryCallback): void; /** - * Creates a plain object from a GroupFindingsRequest message. Also converts values to other types if specified. - * @param message GroupFindingsRequest - * @param [options] Conversion options - * @returns Plain object + * Calls RunAssetDiscovery. + * @param request RunAssetDiscoveryRequest message or plain object + * @returns Promise */ - public static toObject(message: google.cloud.securitycenter.v1.GroupFindingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public runAssetDiscovery(request: google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest): Promise; /** - * Converts this GroupFindingsRequest to JSON. - * @returns JSON object + * Calls SetFindingState. + * @param request SetFindingStateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Finding */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GroupFindingsResponse. */ - interface IGroupFindingsResponse { - - /** GroupFindingsResponse groupByResults */ - groupByResults?: (google.cloud.securitycenter.v1.IGroupResult[]|null); - - /** GroupFindingsResponse readTime */ - readTime?: (google.protobuf.ITimestamp|null); - - /** GroupFindingsResponse nextPageToken */ - nextPageToken?: (string|null); - - /** GroupFindingsResponse totalSize */ - totalSize?: (number|null); - } - - /** Represents a GroupFindingsResponse. */ - class GroupFindingsResponse implements IGroupFindingsResponse { + public setFindingState(request: google.cloud.securitycenter.v1.ISetFindingStateRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.SetFindingStateCallback): void; /** - * Constructs a new GroupFindingsResponse. - * @param [properties] Properties to set + * Calls SetFindingState. + * @param request SetFindingStateRequest message or plain object + * @returns Promise */ - constructor(properties?: google.cloud.securitycenter.v1.IGroupFindingsResponse); - - /** GroupFindingsResponse groupByResults. */ - public groupByResults: google.cloud.securitycenter.v1.IGroupResult[]; - - /** GroupFindingsResponse readTime. */ - public readTime?: (google.protobuf.ITimestamp|null); - - /** GroupFindingsResponse nextPageToken. */ - public nextPageToken: string; - - /** GroupFindingsResponse totalSize. */ - public totalSize: number; + public setFindingState(request: google.cloud.securitycenter.v1.ISetFindingStateRequest): Promise; /** - * Creates a new GroupFindingsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GroupFindingsResponse instance + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy */ - public static create(properties?: google.cloud.securitycenter.v1.IGroupFindingsResponse): google.cloud.securitycenter.v1.GroupFindingsResponse; + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.SetIamPolicyCallback): void; /** - * Encodes the specified GroupFindingsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupFindingsResponse.verify|verify} messages. - * @param message GroupFindingsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @returns Promise */ - public static encode(message: google.cloud.securitycenter.v1.IGroupFindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; /** - * Encodes the specified GroupFindingsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupFindingsResponse.verify|verify} messages. - * @param message GroupFindingsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IGroupFindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.TestIamPermissionsCallback): void; /** - * Decodes a GroupFindingsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GroupFindingsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.GroupFindingsResponse; + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; /** - * Decodes a GroupFindingsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GroupFindingsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdateFinding. + * @param request UpdateFindingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Finding */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.GroupFindingsResponse; + public updateFinding(request: google.cloud.securitycenter.v1.IUpdateFindingRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.UpdateFindingCallback): void; /** - * Verifies a GroupFindingsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls UpdateFinding. + * @param request UpdateFindingRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public updateFinding(request: google.cloud.securitycenter.v1.IUpdateFindingRequest): Promise; /** - * Creates a GroupFindingsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GroupFindingsResponse + * Calls UpdateOrganizationSettings. + * @param request UpdateOrganizationSettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and OrganizationSettings */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GroupFindingsResponse; + public updateOrganizationSettings(request: google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.UpdateOrganizationSettingsCallback): void; /** - * Creates a plain object from a GroupFindingsResponse message. Also converts values to other types if specified. - * @param message GroupFindingsResponse - * @param [options] Conversion options - * @returns Plain object + * Calls UpdateOrganizationSettings. + * @param request UpdateOrganizationSettingsRequest message or plain object + * @returns Promise */ - public static toObject(message: google.cloud.securitycenter.v1.GroupFindingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public updateOrganizationSettings(request: google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest): Promise; /** - * Converts this GroupFindingsResponse to JSON. - * @returns JSON object + * Calls UpdateSource. + * @param request UpdateSourceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Source */ - public toJSON(): { [k: string]: any }; - } + public updateSource(request: google.cloud.securitycenter.v1.IUpdateSourceRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.UpdateSourceCallback): void; - /** Properties of a GroupResult. */ - interface IGroupResult { + /** + * Calls UpdateSource. + * @param request UpdateSourceRequest message or plain object + * @returns Promise + */ + public updateSource(request: google.cloud.securitycenter.v1.IUpdateSourceRequest): Promise; - /** GroupResult properties */ - properties?: ({ [k: string]: google.protobuf.IValue }|null); + /** + * Calls UpdateSecurityMarks. + * @param request UpdateSecurityMarksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SecurityMarks + */ + public updateSecurityMarks(request: google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.UpdateSecurityMarksCallback): void; - /** GroupResult count */ - count?: (number|Long|null); + /** + * Calls UpdateSecurityMarks. + * @param request UpdateSecurityMarksRequest message or plain object + * @returns Promise + */ + public updateSecurityMarks(request: google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest): Promise; } - /** Represents a GroupResult. */ - class GroupResult implements IGroupResult { + namespace SecurityCenter { /** - * Constructs a new GroupResult. - * @param [properties] Properties to set + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#createSource}. + * @param error Error, if any + * @param [response] Source */ - constructor(properties?: google.cloud.securitycenter.v1.IGroupResult); + type CreateSourceCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.Source) => void; - /** GroupResult properties. */ - public properties: { [k: string]: google.protobuf.IValue }; + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#createFinding}. + * @param error Error, if any + * @param [response] Finding + */ + type CreateFindingCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.Finding) => void; - /** GroupResult count. */ - public count: (number|Long); + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#getIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; /** - * Creates a new GroupResult instance using the specified properties. - * @param [properties] Properties to set - * @returns GroupResult instance + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#getOrganizationSettings}. + * @param error Error, if any + * @param [response] OrganizationSettings */ - public static create(properties?: google.cloud.securitycenter.v1.IGroupResult): google.cloud.securitycenter.v1.GroupResult; + type GetOrganizationSettingsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.OrganizationSettings) => void; /** - * Encodes the specified GroupResult message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupResult.verify|verify} messages. - * @param message GroupResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#getSource}. + * @param error Error, if any + * @param [response] Source */ - public static encode(message: google.cloud.securitycenter.v1.IGroupResult, writer?: $protobuf.Writer): $protobuf.Writer; + type GetSourceCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.Source) => void; /** - * Encodes the specified GroupResult message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupResult.verify|verify} messages. - * @param message GroupResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#groupAssets}. + * @param error Error, if any + * @param [response] GroupAssetsResponse */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IGroupResult, writer?: $protobuf.Writer): $protobuf.Writer; + type GroupAssetsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.GroupAssetsResponse) => void; /** - * Decodes a GroupResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GroupResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#groupFindings}. + * @param error Error, if any + * @param [response] GroupFindingsResponse */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.GroupResult; + type GroupFindingsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.GroupFindingsResponse) => void; /** - * Decodes a GroupResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GroupResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#listAssets}. + * @param error Error, if any + * @param [response] ListAssetsResponse */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.GroupResult; + type ListAssetsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.ListAssetsResponse) => void; /** - * Verifies a GroupResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#listFindings}. + * @param error Error, if any + * @param [response] ListFindingsResponse */ - public static verify(message: { [k: string]: any }): (string|null); + type ListFindingsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.ListFindingsResponse) => void; /** - * Creates a GroupResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GroupResult + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#listSources}. + * @param error Error, if any + * @param [response] ListSourcesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GroupResult; + type ListSourcesCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.ListSourcesResponse) => void; /** - * Creates a plain object from a GroupResult message. Also converts values to other types if specified. - * @param message GroupResult - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#runAssetDiscovery}. + * @param error Error, if any + * @param [response] Operation */ - public static toObject(message: google.cloud.securitycenter.v1.GroupResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type RunAssetDiscoveryCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Converts this GroupResult to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#setFindingState}. + * @param error Error, if any + * @param [response] Finding */ - public toJSON(): { [k: string]: any }; - } + type SetFindingStateCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.Finding) => void; - /** Properties of a ListSourcesRequest. */ - interface IListSourcesRequest { + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#setIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; - /** ListSourcesRequest parent */ + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#testIamPermissions}. + * @param error Error, if any + * @param [response] TestIamPermissionsResponse + */ + type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#updateFinding}. + * @param error Error, if any + * @param [response] Finding + */ + type UpdateFindingCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.Finding) => void; + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#updateOrganizationSettings}. + * @param error Error, if any + * @param [response] OrganizationSettings + */ + type UpdateOrganizationSettingsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.OrganizationSettings) => void; + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#updateSource}. + * @param error Error, if any + * @param [response] Source + */ + type UpdateSourceCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.Source) => void; + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#updateSecurityMarks}. + * @param error Error, if any + * @param [response] SecurityMarks + */ + type UpdateSecurityMarksCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.SecurityMarks) => void; + } + + /** Properties of a CreateFindingRequest. */ + interface ICreateFindingRequest { + + /** CreateFindingRequest parent */ parent?: (string|null); - /** ListSourcesRequest pageToken */ - pageToken?: (string|null); + /** CreateFindingRequest findingId */ + findingId?: (string|null); - /** ListSourcesRequest pageSize */ - pageSize?: (number|null); + /** CreateFindingRequest finding */ + finding?: (google.cloud.securitycenter.v1.IFinding|null); } - /** Represents a ListSourcesRequest. */ - class ListSourcesRequest implements IListSourcesRequest { + /** Represents a CreateFindingRequest. */ + class CreateFindingRequest implements ICreateFindingRequest { /** - * Constructs a new ListSourcesRequest. + * Constructs a new CreateFindingRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IListSourcesRequest); + constructor(properties?: google.cloud.securitycenter.v1.ICreateFindingRequest); - /** ListSourcesRequest parent. */ + /** CreateFindingRequest parent. */ public parent: string; - /** ListSourcesRequest pageToken. */ - public pageToken: string; + /** CreateFindingRequest findingId. */ + public findingId: string; - /** ListSourcesRequest pageSize. */ - public pageSize: number; + /** CreateFindingRequest finding. */ + public finding?: (google.cloud.securitycenter.v1.IFinding|null); /** - * Creates a new ListSourcesRequest instance using the specified properties. + * Creates a new CreateFindingRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListSourcesRequest instance + * @returns CreateFindingRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IListSourcesRequest): google.cloud.securitycenter.v1.ListSourcesRequest; + public static create(properties?: google.cloud.securitycenter.v1.ICreateFindingRequest): google.cloud.securitycenter.v1.CreateFindingRequest; /** - * Encodes the specified ListSourcesRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListSourcesRequest.verify|verify} messages. - * @param message ListSourcesRequest message or plain object to encode + * Encodes the specified CreateFindingRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.CreateFindingRequest.verify|verify} messages. + * @param message CreateFindingRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IListSourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.ICreateFindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListSourcesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListSourcesRequest.verify|verify} messages. - * @param message ListSourcesRequest message or plain object to encode + * Encodes the specified CreateFindingRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CreateFindingRequest.verify|verify} messages. + * @param message CreateFindingRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IListSourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.ICreateFindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListSourcesRequest message from the specified reader or buffer. + * Decodes a CreateFindingRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListSourcesRequest + * @returns CreateFindingRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListSourcesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.CreateFindingRequest; /** - * Decodes a ListSourcesRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateFindingRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListSourcesRequest + * @returns CreateFindingRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListSourcesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.CreateFindingRequest; /** - * Verifies a ListSourcesRequest message. + * Verifies a CreateFindingRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListSourcesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateFindingRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListSourcesRequest + * @returns CreateFindingRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListSourcesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CreateFindingRequest; /** - * Creates a plain object from a ListSourcesRequest message. Also converts values to other types if specified. - * @param message ListSourcesRequest + * Creates a plain object from a CreateFindingRequest message. Also converts values to other types if specified. + * @param message CreateFindingRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.ListSourcesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.CreateFindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListSourcesRequest to JSON. + * Converts this CreateFindingRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListSourcesResponse. */ - interface IListSourcesResponse { + /** Properties of a CreateSourceRequest. */ + interface ICreateSourceRequest { - /** ListSourcesResponse sources */ - sources?: (google.cloud.securitycenter.v1.ISource[]|null); + /** CreateSourceRequest parent */ + parent?: (string|null); - /** ListSourcesResponse nextPageToken */ - nextPageToken?: (string|null); + /** CreateSourceRequest source */ + source?: (google.cloud.securitycenter.v1.ISource|null); } - /** Represents a ListSourcesResponse. */ - class ListSourcesResponse implements IListSourcesResponse { + /** Represents a CreateSourceRequest. */ + class CreateSourceRequest implements ICreateSourceRequest { /** - * Constructs a new ListSourcesResponse. + * Constructs a new CreateSourceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IListSourcesResponse); + constructor(properties?: google.cloud.securitycenter.v1.ICreateSourceRequest); - /** ListSourcesResponse sources. */ - public sources: google.cloud.securitycenter.v1.ISource[]; + /** CreateSourceRequest parent. */ + public parent: string; - /** ListSourcesResponse nextPageToken. */ - public nextPageToken: string; + /** CreateSourceRequest source. */ + public source?: (google.cloud.securitycenter.v1.ISource|null); /** - * Creates a new ListSourcesResponse instance using the specified properties. + * Creates a new CreateSourceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListSourcesResponse instance + * @returns CreateSourceRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IListSourcesResponse): google.cloud.securitycenter.v1.ListSourcesResponse; + public static create(properties?: google.cloud.securitycenter.v1.ICreateSourceRequest): google.cloud.securitycenter.v1.CreateSourceRequest; /** - * Encodes the specified ListSourcesResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListSourcesResponse.verify|verify} messages. - * @param message ListSourcesResponse message or plain object to encode + * Encodes the specified CreateSourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.CreateSourceRequest.verify|verify} messages. + * @param message CreateSourceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IListSourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.ICreateSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListSourcesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListSourcesResponse.verify|verify} messages. - * @param message ListSourcesResponse message or plain object to encode + * Encodes the specified CreateSourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CreateSourceRequest.verify|verify} messages. + * @param message CreateSourceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IListSourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.ICreateSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListSourcesResponse message from the specified reader or buffer. + * Decodes a CreateSourceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListSourcesResponse + * @returns CreateSourceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListSourcesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.CreateSourceRequest; /** - * Decodes a ListSourcesResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateSourceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListSourcesResponse + * @returns CreateSourceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListSourcesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.CreateSourceRequest; /** - * Verifies a ListSourcesResponse message. + * Verifies a CreateSourceRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListSourcesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateSourceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListSourcesResponse + * @returns CreateSourceRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListSourcesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CreateSourceRequest; /** - * Creates a plain object from a ListSourcesResponse message. Also converts values to other types if specified. - * @param message ListSourcesResponse + * Creates a plain object from a CreateSourceRequest message. Also converts values to other types if specified. + * @param message CreateSourceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.ListSourcesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.CreateSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListSourcesResponse to JSON. + * Converts this CreateSourceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListAssetsRequest. */ - interface IListAssetsRequest { - - /** ListAssetsRequest parent */ - parent?: (string|null); - - /** ListAssetsRequest filter */ - filter?: (string|null); - - /** ListAssetsRequest orderBy */ - orderBy?: (string|null); - - /** ListAssetsRequest readTime */ - readTime?: (google.protobuf.ITimestamp|null); - - /** ListAssetsRequest compareDuration */ - compareDuration?: (google.protobuf.IDuration|null); - - /** ListAssetsRequest fieldMask */ - fieldMask?: (google.protobuf.IFieldMask|null); - - /** ListAssetsRequest pageToken */ - pageToken?: (string|null); + /** Properties of a GetOrganizationSettingsRequest. */ + interface IGetOrganizationSettingsRequest { - /** ListAssetsRequest pageSize */ - pageSize?: (number|null); + /** GetOrganizationSettingsRequest name */ + name?: (string|null); } - /** Represents a ListAssetsRequest. */ - class ListAssetsRequest implements IListAssetsRequest { + /** Represents a GetOrganizationSettingsRequest. */ + class GetOrganizationSettingsRequest implements IGetOrganizationSettingsRequest { /** - * Constructs a new ListAssetsRequest. + * Constructs a new GetOrganizationSettingsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IListAssetsRequest); - - /** ListAssetsRequest parent. */ - public parent: string; - - /** ListAssetsRequest filter. */ - public filter: string; - - /** ListAssetsRequest orderBy. */ - public orderBy: string; - - /** ListAssetsRequest readTime. */ - public readTime?: (google.protobuf.ITimestamp|null); - - /** ListAssetsRequest compareDuration. */ - public compareDuration?: (google.protobuf.IDuration|null); - - /** ListAssetsRequest fieldMask. */ - public fieldMask?: (google.protobuf.IFieldMask|null); - - /** ListAssetsRequest pageToken. */ - public pageToken: string; + constructor(properties?: google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest); - /** ListAssetsRequest pageSize. */ - public pageSize: number; + /** GetOrganizationSettingsRequest name. */ + public name: string; /** - * Creates a new ListAssetsRequest instance using the specified properties. + * Creates a new GetOrganizationSettingsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListAssetsRequest instance + * @returns GetOrganizationSettingsRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IListAssetsRequest): google.cloud.securitycenter.v1.ListAssetsRequest; + public static create(properties?: google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest): google.cloud.securitycenter.v1.GetOrganizationSettingsRequest; /** - * Encodes the specified ListAssetsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsRequest.verify|verify} messages. - * @param message ListAssetsRequest message or plain object to encode + * Encodes the specified GetOrganizationSettingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetOrganizationSettingsRequest.verify|verify} messages. + * @param message GetOrganizationSettingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IListAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsRequest.verify|verify} messages. - * @param message ListAssetsRequest message or plain object to encode + * Encodes the specified GetOrganizationSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetOrganizationSettingsRequest.verify|verify} messages. + * @param message GetOrganizationSettingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IListAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListAssetsRequest message from the specified reader or buffer. + * Decodes a GetOrganizationSettingsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListAssetsRequest + * @returns GetOrganizationSettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListAssetsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.GetOrganizationSettingsRequest; /** - * Decodes a ListAssetsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetOrganizationSettingsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListAssetsRequest + * @returns GetOrganizationSettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListAssetsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.GetOrganizationSettingsRequest; /** - * Verifies a ListAssetsRequest message. + * Verifies a GetOrganizationSettingsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListAssetsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetOrganizationSettingsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListAssetsRequest + * @returns GetOrganizationSettingsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListAssetsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GetOrganizationSettingsRequest; /** - * Creates a plain object from a ListAssetsRequest message. Also converts values to other types if specified. - * @param message ListAssetsRequest + * Creates a plain object from a GetOrganizationSettingsRequest message. Also converts values to other types if specified. + * @param message GetOrganizationSettingsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.ListAssetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.GetOrganizationSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListAssetsRequest to JSON. + * Converts this GetOrganizationSettingsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListAssetsResponse. */ - interface IListAssetsResponse { - - /** ListAssetsResponse listAssetsResults */ - listAssetsResults?: (google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult[]|null); - - /** ListAssetsResponse readTime */ - readTime?: (google.protobuf.ITimestamp|null); - - /** ListAssetsResponse nextPageToken */ - nextPageToken?: (string|null); + /** Properties of a GetSourceRequest. */ + interface IGetSourceRequest { - /** ListAssetsResponse totalSize */ - totalSize?: (number|null); + /** GetSourceRequest name */ + name?: (string|null); } - /** Represents a ListAssetsResponse. */ - class ListAssetsResponse implements IListAssetsResponse { + /** Represents a GetSourceRequest. */ + class GetSourceRequest implements IGetSourceRequest { /** - * Constructs a new ListAssetsResponse. + * Constructs a new GetSourceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IListAssetsResponse); - - /** ListAssetsResponse listAssetsResults. */ - public listAssetsResults: google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult[]; - - /** ListAssetsResponse readTime. */ - public readTime?: (google.protobuf.ITimestamp|null); - - /** ListAssetsResponse nextPageToken. */ - public nextPageToken: string; + constructor(properties?: google.cloud.securitycenter.v1.IGetSourceRequest); - /** ListAssetsResponse totalSize. */ - public totalSize: number; + /** GetSourceRequest name. */ + public name: string; /** - * Creates a new ListAssetsResponse instance using the specified properties. + * Creates a new GetSourceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListAssetsResponse instance + * @returns GetSourceRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IListAssetsResponse): google.cloud.securitycenter.v1.ListAssetsResponse; + public static create(properties?: google.cloud.securitycenter.v1.IGetSourceRequest): google.cloud.securitycenter.v1.GetSourceRequest; /** - * Encodes the specified ListAssetsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsResponse.verify|verify} messages. - * @param message ListAssetsResponse message or plain object to encode + * Encodes the specified GetSourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetSourceRequest.verify|verify} messages. + * @param message GetSourceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IListAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IGetSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsResponse.verify|verify} messages. - * @param message ListAssetsResponse message or plain object to encode + * Encodes the specified GetSourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetSourceRequest.verify|verify} messages. + * @param message GetSourceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IListAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IGetSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListAssetsResponse message from the specified reader or buffer. + * Decodes a GetSourceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListAssetsResponse + * @returns GetSourceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListAssetsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.GetSourceRequest; /** - * Decodes a ListAssetsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetSourceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListAssetsResponse + * @returns GetSourceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListAssetsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.GetSourceRequest; /** - * Verifies a ListAssetsResponse message. + * Verifies a GetSourceRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListAssetsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetSourceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListAssetsResponse + * @returns GetSourceRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListAssetsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GetSourceRequest; /** - * Creates a plain object from a ListAssetsResponse message. Also converts values to other types if specified. - * @param message ListAssetsResponse + * Creates a plain object from a GetSourceRequest message. Also converts values to other types if specified. + * @param message GetSourceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.ListAssetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.GetSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListAssetsResponse to JSON. + * Converts this GetSourceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace ListAssetsResponse { + /** Properties of a GroupAssetsRequest. */ + interface IGroupAssetsRequest { - /** Properties of a ListAssetsResult. */ - interface IListAssetsResult { + /** GroupAssetsRequest parent */ + parent?: (string|null); - /** ListAssetsResult asset */ - asset?: (google.cloud.securitycenter.v1.IAsset|null); + /** GroupAssetsRequest filter */ + filter?: (string|null); - /** ListAssetsResult stateChange */ - stateChange?: (google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange|null); - } + /** GroupAssetsRequest groupBy */ + groupBy?: (string|null); - /** Represents a ListAssetsResult. */ - class ListAssetsResult implements IListAssetsResult { + /** GroupAssetsRequest compareDuration */ + compareDuration?: (google.protobuf.IDuration|null); - /** - * Constructs a new ListAssetsResult. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult); + /** GroupAssetsRequest readTime */ + readTime?: (google.protobuf.ITimestamp|null); - /** ListAssetsResult asset. */ - public asset?: (google.cloud.securitycenter.v1.IAsset|null); + /** GroupAssetsRequest pageToken */ + pageToken?: (string|null); - /** ListAssetsResult stateChange. */ - public stateChange: google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange; + /** GroupAssetsRequest pageSize */ + pageSize?: (number|null); + } - /** - * Creates a new ListAssetsResult instance using the specified properties. - * @param [properties] Properties to set - * @returns ListAssetsResult instance - */ - public static create(properties?: google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult): google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult; + /** Represents a GroupAssetsRequest. */ + class GroupAssetsRequest implements IGroupAssetsRequest { - /** - * Encodes the specified ListAssetsResult message. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.verify|verify} messages. - * @param message ListAssetsResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new GroupAssetsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IGroupAssetsRequest); - /** - * Encodes the specified ListAssetsResult message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.verify|verify} messages. - * @param message ListAssetsResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult, writer?: $protobuf.Writer): $protobuf.Writer; + /** GroupAssetsRequest parent. */ + public parent: string; - /** - * Decodes a ListAssetsResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListAssetsResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult; + /** GroupAssetsRequest filter. */ + public filter: string; - /** - * Decodes a ListAssetsResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListAssetsResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult; + /** GroupAssetsRequest groupBy. */ + public groupBy: string; - /** - * Verifies a ListAssetsResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** GroupAssetsRequest compareDuration. */ + public compareDuration?: (google.protobuf.IDuration|null); - /** - * Creates a ListAssetsResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListAssetsResult - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult; + /** GroupAssetsRequest readTime. */ + public readTime?: (google.protobuf.ITimestamp|null); - /** - * Creates a plain object from a ListAssetsResult message. Also converts values to other types if specified. - * @param message ListAssetsResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** GroupAssetsRequest pageToken. */ + public pageToken: string; - /** - * Converts this ListAssetsResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** GroupAssetsRequest pageSize. */ + public pageSize: number; - namespace ListAssetsResult { - - /** StateChange enum. */ - enum StateChange { - UNUSED = 0, - ADDED = 1, - REMOVED = 2, - ACTIVE = 3 - } - } - } - - /** Properties of a ListFindingsRequest. */ - interface IListFindingsRequest { - - /** ListFindingsRequest parent */ - parent?: (string|null); - - /** ListFindingsRequest filter */ - filter?: (string|null); - - /** ListFindingsRequest orderBy */ - orderBy?: (string|null); - - /** ListFindingsRequest readTime */ - readTime?: (google.protobuf.ITimestamp|null); - - /** ListFindingsRequest compareDuration */ - compareDuration?: (google.protobuf.IDuration|null); - - /** ListFindingsRequest fieldMask */ - fieldMask?: (google.protobuf.IFieldMask|null); - - /** ListFindingsRequest pageToken */ - pageToken?: (string|null); - - /** ListFindingsRequest pageSize */ - pageSize?: (number|null); - } - - /** Represents a ListFindingsRequest. */ - class ListFindingsRequest implements IListFindingsRequest { - - /** - * Constructs a new ListFindingsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.IListFindingsRequest); - - /** ListFindingsRequest parent. */ - public parent: string; - - /** ListFindingsRequest filter. */ - public filter: string; - - /** ListFindingsRequest orderBy. */ - public orderBy: string; - - /** ListFindingsRequest readTime. */ - public readTime?: (google.protobuf.ITimestamp|null); - - /** ListFindingsRequest compareDuration. */ - public compareDuration?: (google.protobuf.IDuration|null); - - /** ListFindingsRequest fieldMask. */ - public fieldMask?: (google.protobuf.IFieldMask|null); - - /** ListFindingsRequest pageToken. */ - public pageToken: string; - - /** ListFindingsRequest pageSize. */ - public pageSize: number; + /** + * Creates a new GroupAssetsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GroupAssetsRequest instance + */ + public static create(properties?: google.cloud.securitycenter.v1.IGroupAssetsRequest): google.cloud.securitycenter.v1.GroupAssetsRequest; /** - * Creates a new ListFindingsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListFindingsRequest instance - */ - public static create(properties?: google.cloud.securitycenter.v1.IListFindingsRequest): google.cloud.securitycenter.v1.ListFindingsRequest; - - /** - * Encodes the specified ListFindingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsRequest.verify|verify} messages. - * @param message ListFindingsRequest message or plain object to encode + * Encodes the specified GroupAssetsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupAssetsRequest.verify|verify} messages. + * @param message GroupAssetsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IListFindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IGroupAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListFindingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsRequest.verify|verify} messages. - * @param message ListFindingsRequest message or plain object to encode + * Encodes the specified GroupAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupAssetsRequest.verify|verify} messages. + * @param message GroupAssetsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IListFindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IGroupAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListFindingsRequest message from the specified reader or buffer. + * Decodes a GroupAssetsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListFindingsRequest + * @returns GroupAssetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListFindingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.GroupAssetsRequest; /** - * Decodes a ListFindingsRequest message from the specified reader or buffer, length delimited. + * Decodes a GroupAssetsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListFindingsRequest + * @returns GroupAssetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListFindingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.GroupAssetsRequest; /** - * Verifies a ListFindingsRequest message. + * Verifies a GroupAssetsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListFindingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GroupAssetsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListFindingsRequest + * @returns GroupAssetsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListFindingsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GroupAssetsRequest; /** - * Creates a plain object from a ListFindingsRequest message. Also converts values to other types if specified. - * @param message ListFindingsRequest + * Creates a plain object from a GroupAssetsRequest message. Also converts values to other types if specified. + * @param message GroupAssetsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.ListFindingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.GroupAssetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListFindingsRequest to JSON. + * Converts this GroupAssetsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListFindingsResponse. */ - interface IListFindingsResponse { + /** Properties of a GroupAssetsResponse. */ + interface IGroupAssetsResponse { - /** ListFindingsResponse listFindingsResults */ - listFindingsResults?: (google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult[]|null); + /** GroupAssetsResponse groupByResults */ + groupByResults?: (google.cloud.securitycenter.v1.IGroupResult[]|null); - /** ListFindingsResponse readTime */ + /** GroupAssetsResponse readTime */ readTime?: (google.protobuf.ITimestamp|null); - /** ListFindingsResponse nextPageToken */ + /** GroupAssetsResponse nextPageToken */ nextPageToken?: (string|null); - /** ListFindingsResponse totalSize */ + /** GroupAssetsResponse totalSize */ totalSize?: (number|null); } - /** Represents a ListFindingsResponse. */ - class ListFindingsResponse implements IListFindingsResponse { + /** Represents a GroupAssetsResponse. */ + class GroupAssetsResponse implements IGroupAssetsResponse { /** - * Constructs a new ListFindingsResponse. + * Constructs a new GroupAssetsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IListFindingsResponse); + constructor(properties?: google.cloud.securitycenter.v1.IGroupAssetsResponse); - /** ListFindingsResponse listFindingsResults. */ - public listFindingsResults: google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult[]; + /** GroupAssetsResponse groupByResults. */ + public groupByResults: google.cloud.securitycenter.v1.IGroupResult[]; - /** ListFindingsResponse readTime. */ + /** GroupAssetsResponse readTime. */ public readTime?: (google.protobuf.ITimestamp|null); - /** ListFindingsResponse nextPageToken. */ + /** GroupAssetsResponse nextPageToken. */ public nextPageToken: string; - /** ListFindingsResponse totalSize. */ + /** GroupAssetsResponse totalSize. */ public totalSize: number; /** - * Creates a new ListFindingsResponse instance using the specified properties. + * Creates a new GroupAssetsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListFindingsResponse instance + * @returns GroupAssetsResponse instance */ - public static create(properties?: google.cloud.securitycenter.v1.IListFindingsResponse): google.cloud.securitycenter.v1.ListFindingsResponse; + public static create(properties?: google.cloud.securitycenter.v1.IGroupAssetsResponse): google.cloud.securitycenter.v1.GroupAssetsResponse; /** - * Encodes the specified ListFindingsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.verify|verify} messages. - * @param message ListFindingsResponse message or plain object to encode + * Encodes the specified GroupAssetsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupAssetsResponse.verify|verify} messages. + * @param message GroupAssetsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IListFindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IGroupAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListFindingsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.verify|verify} messages. - * @param message ListFindingsResponse message or plain object to encode + * Encodes the specified GroupAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupAssetsResponse.verify|verify} messages. + * @param message GroupAssetsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IListFindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IGroupAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListFindingsResponse message from the specified reader or buffer. + * Decodes a GroupAssetsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListFindingsResponse + * @returns GroupAssetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListFindingsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.GroupAssetsResponse; /** - * Decodes a ListFindingsResponse message from the specified reader or buffer, length delimited. + * Decodes a GroupAssetsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListFindingsResponse + * @returns GroupAssetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListFindingsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.GroupAssetsResponse; /** - * Verifies a ListFindingsResponse message. + * Verifies a GroupAssetsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListFindingsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GroupAssetsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListFindingsResponse + * @returns GroupAssetsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListFindingsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GroupAssetsResponse; /** - * Creates a plain object from a ListFindingsResponse message. Also converts values to other types if specified. - * @param message ListFindingsResponse + * Creates a plain object from a GroupAssetsResponse message. Also converts values to other types if specified. + * @param message GroupAssetsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.ListFindingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.GroupAssetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListFindingsResponse to JSON. + * Converts this GroupAssetsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace ListFindingsResponse { + /** Properties of a GroupFindingsRequest. */ + interface IGroupFindingsRequest { - /** Properties of a ListFindingsResult. */ - interface IListFindingsResult { + /** GroupFindingsRequest parent */ + parent?: (string|null); - /** ListFindingsResult finding */ - finding?: (google.cloud.securitycenter.v1.IFinding|null); + /** GroupFindingsRequest filter */ + filter?: (string|null); - /** ListFindingsResult stateChange */ - stateChange?: (google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange|null); - } + /** GroupFindingsRequest groupBy */ + groupBy?: (string|null); - /** Represents a ListFindingsResult. */ - class ListFindingsResult implements IListFindingsResult { + /** GroupFindingsRequest readTime */ + readTime?: (google.protobuf.ITimestamp|null); - /** - * Constructs a new ListFindingsResult. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult); + /** GroupFindingsRequest compareDuration */ + compareDuration?: (google.protobuf.IDuration|null); - /** ListFindingsResult finding. */ - public finding?: (google.cloud.securitycenter.v1.IFinding|null); + /** GroupFindingsRequest pageToken */ + pageToken?: (string|null); - /** ListFindingsResult stateChange. */ - public stateChange: google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange; + /** GroupFindingsRequest pageSize */ + pageSize?: (number|null); + } - /** - * Creates a new ListFindingsResult instance using the specified properties. - * @param [properties] Properties to set - * @returns ListFindingsResult instance - */ - public static create(properties?: google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult): google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult; + /** Represents a GroupFindingsRequest. */ + class GroupFindingsRequest implements IGroupFindingsRequest { - /** - * Encodes the specified ListFindingsResult message. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.verify|verify} messages. - * @param message ListFindingsResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new GroupFindingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IGroupFindingsRequest); - /** - * Encodes the specified ListFindingsResult message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.verify|verify} messages. - * @param message ListFindingsResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult, writer?: $protobuf.Writer): $protobuf.Writer; + /** GroupFindingsRequest parent. */ + public parent: string; - /** - * Decodes a ListFindingsResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListFindingsResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult; - - /** - * Decodes a ListFindingsResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListFindingsResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult; - - /** - * Verifies a ListFindingsResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListFindingsResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListFindingsResult - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult; - - /** - * Creates a plain object from a ListFindingsResult message. Also converts values to other types if specified. - * @param message ListFindingsResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListFindingsResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace ListFindingsResult { - - /** StateChange enum. */ - enum StateChange { - UNUSED = 0, - CHANGED = 1, - UNCHANGED = 2, - ADDED = 3, - REMOVED = 4 - } - } - } - - /** Properties of a SetFindingStateRequest. */ - interface ISetFindingStateRequest { - - /** SetFindingStateRequest name */ - name?: (string|null); - - /** SetFindingStateRequest state */ - state?: (google.cloud.securitycenter.v1.Finding.State|null); - - /** SetFindingStateRequest startTime */ - startTime?: (google.protobuf.ITimestamp|null); - } + /** GroupFindingsRequest filter. */ + public filter: string; - /** Represents a SetFindingStateRequest. */ - class SetFindingStateRequest implements ISetFindingStateRequest { + /** GroupFindingsRequest groupBy. */ + public groupBy: string; - /** - * Constructs a new SetFindingStateRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.ISetFindingStateRequest); + /** GroupFindingsRequest readTime. */ + public readTime?: (google.protobuf.ITimestamp|null); - /** SetFindingStateRequest name. */ - public name: string; + /** GroupFindingsRequest compareDuration. */ + public compareDuration?: (google.protobuf.IDuration|null); - /** SetFindingStateRequest state. */ - public state: google.cloud.securitycenter.v1.Finding.State; + /** GroupFindingsRequest pageToken. */ + public pageToken: string; - /** SetFindingStateRequest startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); + /** GroupFindingsRequest pageSize. */ + public pageSize: number; /** - * Creates a new SetFindingStateRequest instance using the specified properties. + * Creates a new GroupFindingsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SetFindingStateRequest instance + * @returns GroupFindingsRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.ISetFindingStateRequest): google.cloud.securitycenter.v1.SetFindingStateRequest; + public static create(properties?: google.cloud.securitycenter.v1.IGroupFindingsRequest): google.cloud.securitycenter.v1.GroupFindingsRequest; /** - * Encodes the specified SetFindingStateRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.SetFindingStateRequest.verify|verify} messages. - * @param message SetFindingStateRequest message or plain object to encode + * Encodes the specified GroupFindingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupFindingsRequest.verify|verify} messages. + * @param message GroupFindingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.ISetFindingStateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IGroupFindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SetFindingStateRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SetFindingStateRequest.verify|verify} messages. - * @param message SetFindingStateRequest message or plain object to encode + * Encodes the specified GroupFindingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupFindingsRequest.verify|verify} messages. + * @param message GroupFindingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.ISetFindingStateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IGroupFindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SetFindingStateRequest message from the specified reader or buffer. + * Decodes a GroupFindingsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SetFindingStateRequest + * @returns GroupFindingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.SetFindingStateRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.GroupFindingsRequest; /** - * Decodes a SetFindingStateRequest message from the specified reader or buffer, length delimited. + * Decodes a GroupFindingsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SetFindingStateRequest + * @returns GroupFindingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.SetFindingStateRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.GroupFindingsRequest; /** - * Verifies a SetFindingStateRequest message. + * Verifies a GroupFindingsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SetFindingStateRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GroupFindingsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SetFindingStateRequest + * @returns GroupFindingsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.SetFindingStateRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GroupFindingsRequest; /** - * Creates a plain object from a SetFindingStateRequest message. Also converts values to other types if specified. - * @param message SetFindingStateRequest + * Creates a plain object from a GroupFindingsRequest message. Also converts values to other types if specified. + * @param message GroupFindingsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.SetFindingStateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.GroupFindingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SetFindingStateRequest to JSON. + * Converts this GroupFindingsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a RunAssetDiscoveryRequest. */ - interface IRunAssetDiscoveryRequest { + /** Properties of a GroupFindingsResponse. */ + interface IGroupFindingsResponse { - /** RunAssetDiscoveryRequest parent */ - parent?: (string|null); + /** GroupFindingsResponse groupByResults */ + groupByResults?: (google.cloud.securitycenter.v1.IGroupResult[]|null); + + /** GroupFindingsResponse readTime */ + readTime?: (google.protobuf.ITimestamp|null); + + /** GroupFindingsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** GroupFindingsResponse totalSize */ + totalSize?: (number|null); } - /** Represents a RunAssetDiscoveryRequest. */ - class RunAssetDiscoveryRequest implements IRunAssetDiscoveryRequest { + /** Represents a GroupFindingsResponse. */ + class GroupFindingsResponse implements IGroupFindingsResponse { /** - * Constructs a new RunAssetDiscoveryRequest. + * Constructs a new GroupFindingsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest); + constructor(properties?: google.cloud.securitycenter.v1.IGroupFindingsResponse); - /** RunAssetDiscoveryRequest parent. */ - public parent: string; + /** GroupFindingsResponse groupByResults. */ + public groupByResults: google.cloud.securitycenter.v1.IGroupResult[]; + + /** GroupFindingsResponse readTime. */ + public readTime?: (google.protobuf.ITimestamp|null); + + /** GroupFindingsResponse nextPageToken. */ + public nextPageToken: string; + + /** GroupFindingsResponse totalSize. */ + public totalSize: number; /** - * Creates a new RunAssetDiscoveryRequest instance using the specified properties. + * Creates a new GroupFindingsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns RunAssetDiscoveryRequest instance + * @returns GroupFindingsResponse instance */ - public static create(properties?: google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest): google.cloud.securitycenter.v1.RunAssetDiscoveryRequest; + public static create(properties?: google.cloud.securitycenter.v1.IGroupFindingsResponse): google.cloud.securitycenter.v1.GroupFindingsResponse; /** - * Encodes the specified RunAssetDiscoveryRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.RunAssetDiscoveryRequest.verify|verify} messages. - * @param message RunAssetDiscoveryRequest message or plain object to encode + * Encodes the specified GroupFindingsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupFindingsResponse.verify|verify} messages. + * @param message GroupFindingsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IGroupFindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RunAssetDiscoveryRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.RunAssetDiscoveryRequest.verify|verify} messages. - * @param message RunAssetDiscoveryRequest message or plain object to encode + * Encodes the specified GroupFindingsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupFindingsResponse.verify|verify} messages. + * @param message GroupFindingsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IGroupFindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RunAssetDiscoveryRequest message from the specified reader or buffer. + * Decodes a GroupFindingsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RunAssetDiscoveryRequest + * @returns GroupFindingsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.RunAssetDiscoveryRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.GroupFindingsResponse; /** - * Decodes a RunAssetDiscoveryRequest message from the specified reader or buffer, length delimited. + * Decodes a GroupFindingsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RunAssetDiscoveryRequest + * @returns GroupFindingsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.RunAssetDiscoveryRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.GroupFindingsResponse; /** - * Verifies a RunAssetDiscoveryRequest message. + * Verifies a GroupFindingsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RunAssetDiscoveryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GroupFindingsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RunAssetDiscoveryRequest + * @returns GroupFindingsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.RunAssetDiscoveryRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GroupFindingsResponse; /** - * Creates a plain object from a RunAssetDiscoveryRequest message. Also converts values to other types if specified. - * @param message RunAssetDiscoveryRequest + * Creates a plain object from a GroupFindingsResponse message. Also converts values to other types if specified. + * @param message GroupFindingsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.RunAssetDiscoveryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.GroupFindingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RunAssetDiscoveryRequest to JSON. + * Converts this GroupFindingsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateFindingRequest. */ - interface IUpdateFindingRequest { + /** Properties of a GroupResult. */ + interface IGroupResult { - /** UpdateFindingRequest finding */ - finding?: (google.cloud.securitycenter.v1.IFinding|null); + /** GroupResult properties */ + properties?: ({ [k: string]: google.protobuf.IValue }|null); - /** UpdateFindingRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** GroupResult count */ + count?: (number|Long|null); } - /** Represents an UpdateFindingRequest. */ - class UpdateFindingRequest implements IUpdateFindingRequest { + /** Represents a GroupResult. */ + class GroupResult implements IGroupResult { /** - * Constructs a new UpdateFindingRequest. + * Constructs a new GroupResult. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IUpdateFindingRequest); + constructor(properties?: google.cloud.securitycenter.v1.IGroupResult); - /** UpdateFindingRequest finding. */ - public finding?: (google.cloud.securitycenter.v1.IFinding|null); + /** GroupResult properties. */ + public properties: { [k: string]: google.protobuf.IValue }; - /** UpdateFindingRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** GroupResult count. */ + public count: (number|Long); /** - * Creates a new UpdateFindingRequest instance using the specified properties. + * Creates a new GroupResult instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateFindingRequest instance + * @returns GroupResult instance */ - public static create(properties?: google.cloud.securitycenter.v1.IUpdateFindingRequest): google.cloud.securitycenter.v1.UpdateFindingRequest; + public static create(properties?: google.cloud.securitycenter.v1.IGroupResult): google.cloud.securitycenter.v1.GroupResult; /** - * Encodes the specified UpdateFindingRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateFindingRequest.verify|verify} messages. - * @param message UpdateFindingRequest message or plain object to encode + * Encodes the specified GroupResult message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupResult.verify|verify} messages. + * @param message GroupResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IUpdateFindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IGroupResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateFindingRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateFindingRequest.verify|verify} messages. - * @param message UpdateFindingRequest message or plain object to encode + * Encodes the specified GroupResult message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupResult.verify|verify} messages. + * @param message GroupResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IUpdateFindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IGroupResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateFindingRequest message from the specified reader or buffer. + * Decodes a GroupResult message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateFindingRequest + * @returns GroupResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.UpdateFindingRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.GroupResult; /** - * Decodes an UpdateFindingRequest message from the specified reader or buffer, length delimited. + * Decodes a GroupResult message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateFindingRequest + * @returns GroupResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.UpdateFindingRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.GroupResult; /** - * Verifies an UpdateFindingRequest message. + * Verifies a GroupResult message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateFindingRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GroupResult message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateFindingRequest + * @returns GroupResult */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.UpdateFindingRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GroupResult; /** - * Creates a plain object from an UpdateFindingRequest message. Also converts values to other types if specified. - * @param message UpdateFindingRequest + * Creates a plain object from a GroupResult message. Also converts values to other types if specified. + * @param message GroupResult * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.UpdateFindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.GroupResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateFindingRequest to JSON. + * Converts this GroupResult to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateOrganizationSettingsRequest. */ - interface IUpdateOrganizationSettingsRequest { + /** Properties of a ListSourcesRequest. */ + interface IListSourcesRequest { - /** UpdateOrganizationSettingsRequest organizationSettings */ - organizationSettings?: (google.cloud.securitycenter.v1.IOrganizationSettings|null); + /** ListSourcesRequest parent */ + parent?: (string|null); - /** UpdateOrganizationSettingsRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** ListSourcesRequest pageToken */ + pageToken?: (string|null); + + /** ListSourcesRequest pageSize */ + pageSize?: (number|null); } - /** Represents an UpdateOrganizationSettingsRequest. */ - class UpdateOrganizationSettingsRequest implements IUpdateOrganizationSettingsRequest { + /** Represents a ListSourcesRequest. */ + class ListSourcesRequest implements IListSourcesRequest { /** - * Constructs a new UpdateOrganizationSettingsRequest. + * Constructs a new ListSourcesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest); + constructor(properties?: google.cloud.securitycenter.v1.IListSourcesRequest); - /** UpdateOrganizationSettingsRequest organizationSettings. */ - public organizationSettings?: (google.cloud.securitycenter.v1.IOrganizationSettings|null); + /** ListSourcesRequest parent. */ + public parent: string; - /** UpdateOrganizationSettingsRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** ListSourcesRequest pageToken. */ + public pageToken: string; + + /** ListSourcesRequest pageSize. */ + public pageSize: number; /** - * Creates a new UpdateOrganizationSettingsRequest instance using the specified properties. + * Creates a new ListSourcesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateOrganizationSettingsRequest instance + * @returns ListSourcesRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest): google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest; + public static create(properties?: google.cloud.securitycenter.v1.IListSourcesRequest): google.cloud.securitycenter.v1.ListSourcesRequest; /** - * Encodes the specified UpdateOrganizationSettingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest.verify|verify} messages. - * @param message UpdateOrganizationSettingsRequest message or plain object to encode + * Encodes the specified ListSourcesRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListSourcesRequest.verify|verify} messages. + * @param message ListSourcesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IListSourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateOrganizationSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest.verify|verify} messages. - * @param message UpdateOrganizationSettingsRequest message or plain object to encode + * Encodes the specified ListSourcesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListSourcesRequest.verify|verify} messages. + * @param message ListSourcesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IListSourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateOrganizationSettingsRequest message from the specified reader or buffer. + * Decodes a ListSourcesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateOrganizationSettingsRequest + * @returns ListSourcesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListSourcesRequest; /** - * Decodes an UpdateOrganizationSettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListSourcesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateOrganizationSettingsRequest + * @returns ListSourcesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListSourcesRequest; /** - * Verifies an UpdateOrganizationSettingsRequest message. + * Verifies a ListSourcesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateOrganizationSettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListSourcesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateOrganizationSettingsRequest + * @returns ListSourcesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListSourcesRequest; /** - * Creates a plain object from an UpdateOrganizationSettingsRequest message. Also converts values to other types if specified. - * @param message UpdateOrganizationSettingsRequest + * Creates a plain object from a ListSourcesRequest message. Also converts values to other types if specified. + * @param message ListSourcesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ListSourcesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateOrganizationSettingsRequest to JSON. + * Converts this ListSourcesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateSourceRequest. */ - interface IUpdateSourceRequest { + /** Properties of a ListSourcesResponse. */ + interface IListSourcesResponse { - /** UpdateSourceRequest source */ - source?: (google.cloud.securitycenter.v1.ISource|null); + /** ListSourcesResponse sources */ + sources?: (google.cloud.securitycenter.v1.ISource[]|null); - /** UpdateSourceRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** ListSourcesResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents an UpdateSourceRequest. */ - class UpdateSourceRequest implements IUpdateSourceRequest { + /** Represents a ListSourcesResponse. */ + class ListSourcesResponse implements IListSourcesResponse { /** - * Constructs a new UpdateSourceRequest. + * Constructs a new ListSourcesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IUpdateSourceRequest); + constructor(properties?: google.cloud.securitycenter.v1.IListSourcesResponse); - /** UpdateSourceRequest source. */ - public source?: (google.cloud.securitycenter.v1.ISource|null); + /** ListSourcesResponse sources. */ + public sources: google.cloud.securitycenter.v1.ISource[]; - /** UpdateSourceRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** ListSourcesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new UpdateSourceRequest instance using the specified properties. + * Creates a new ListSourcesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateSourceRequest instance + * @returns ListSourcesResponse instance */ - public static create(properties?: google.cloud.securitycenter.v1.IUpdateSourceRequest): google.cloud.securitycenter.v1.UpdateSourceRequest; + public static create(properties?: google.cloud.securitycenter.v1.IListSourcesResponse): google.cloud.securitycenter.v1.ListSourcesResponse; /** - * Encodes the specified UpdateSourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSourceRequest.verify|verify} messages. - * @param message UpdateSourceRequest message or plain object to encode + * Encodes the specified ListSourcesResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListSourcesResponse.verify|verify} messages. + * @param message ListSourcesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IUpdateSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IListSourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateSourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSourceRequest.verify|verify} messages. - * @param message UpdateSourceRequest message or plain object to encode + * Encodes the specified ListSourcesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListSourcesResponse.verify|verify} messages. + * @param message ListSourcesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IUpdateSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IListSourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateSourceRequest message from the specified reader or buffer. + * Decodes a ListSourcesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateSourceRequest + * @returns ListSourcesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.UpdateSourceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListSourcesResponse; /** - * Decodes an UpdateSourceRequest message from the specified reader or buffer, length delimited. + * Decodes a ListSourcesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateSourceRequest + * @returns ListSourcesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.UpdateSourceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListSourcesResponse; /** - * Verifies an UpdateSourceRequest message. + * Verifies a ListSourcesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateSourceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListSourcesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateSourceRequest + * @returns ListSourcesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.UpdateSourceRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListSourcesResponse; /** - * Creates a plain object from an UpdateSourceRequest message. Also converts values to other types if specified. - * @param message UpdateSourceRequest + * Creates a plain object from a ListSourcesResponse message. Also converts values to other types if specified. + * @param message ListSourcesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.UpdateSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ListSourcesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateSourceRequest to JSON. + * Converts this ListSourcesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateSecurityMarksRequest. */ - interface IUpdateSecurityMarksRequest { + /** Properties of a ListAssetsRequest. */ + interface IListAssetsRequest { - /** UpdateSecurityMarksRequest securityMarks */ - securityMarks?: (google.cloud.securitycenter.v1.ISecurityMarks|null); + /** ListAssetsRequest parent */ + parent?: (string|null); - /** UpdateSecurityMarksRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** ListAssetsRequest filter */ + filter?: (string|null); - /** UpdateSecurityMarksRequest startTime */ - startTime?: (google.protobuf.ITimestamp|null); - } + /** ListAssetsRequest orderBy */ + orderBy?: (string|null); - /** Represents an UpdateSecurityMarksRequest. */ - class UpdateSecurityMarksRequest implements IUpdateSecurityMarksRequest { + /** ListAssetsRequest readTime */ + readTime?: (google.protobuf.ITimestamp|null); - /** - * Constructs a new UpdateSecurityMarksRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest); + /** ListAssetsRequest compareDuration */ + compareDuration?: (google.protobuf.IDuration|null); - /** UpdateSecurityMarksRequest securityMarks. */ - public securityMarks?: (google.cloud.securitycenter.v1.ISecurityMarks|null); + /** ListAssetsRequest fieldMask */ + fieldMask?: (google.protobuf.IFieldMask|null); - /** UpdateSecurityMarksRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** ListAssetsRequest pageToken */ + pageToken?: (string|null); - /** UpdateSecurityMarksRequest startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); + /** ListAssetsRequest pageSize */ + pageSize?: (number|null); + } + + /** Represents a ListAssetsRequest. */ + class ListAssetsRequest implements IListAssetsRequest { /** - * Creates a new UpdateSecurityMarksRequest instance using the specified properties. + * Constructs a new ListAssetsRequest. * @param [properties] Properties to set - * @returns UpdateSecurityMarksRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest): google.cloud.securitycenter.v1.UpdateSecurityMarksRequest; + constructor(properties?: google.cloud.securitycenter.v1.IListAssetsRequest); - /** - * Encodes the specified UpdateSecurityMarksRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSecurityMarksRequest.verify|verify} messages. - * @param message UpdateSecurityMarksRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListAssetsRequest parent. */ + public parent: string; + + /** ListAssetsRequest filter. */ + public filter: string; + + /** ListAssetsRequest orderBy. */ + public orderBy: string; + + /** ListAssetsRequest readTime. */ + public readTime?: (google.protobuf.ITimestamp|null); + + /** ListAssetsRequest compareDuration. */ + public compareDuration?: (google.protobuf.IDuration|null); + + /** ListAssetsRequest fieldMask. */ + public fieldMask?: (google.protobuf.IFieldMask|null); + + /** ListAssetsRequest pageToken. */ + public pageToken: string; + + /** ListAssetsRequest pageSize. */ + public pageSize: number; /** - * Encodes the specified UpdateSecurityMarksRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSecurityMarksRequest.verify|verify} messages. - * @param message UpdateSecurityMarksRequest message or plain object to encode + * Creates a new ListAssetsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAssetsRequest instance + */ + public static create(properties?: google.cloud.securitycenter.v1.IListAssetsRequest): google.cloud.securitycenter.v1.ListAssetsRequest; + + /** + * Encodes the specified ListAssetsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsRequest.verify|verify} messages. + * @param message ListAssetsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IListAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateSecurityMarksRequest message from the specified reader or buffer. + * Encodes the specified ListAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsRequest.verify|verify} messages. + * @param message ListAssetsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.IListAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAssetsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateSecurityMarksRequest + * @returns ListAssetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.UpdateSecurityMarksRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListAssetsRequest; /** - * Decodes an UpdateSecurityMarksRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAssetsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateSecurityMarksRequest + * @returns ListAssetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.UpdateSecurityMarksRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListAssetsRequest; /** - * Verifies an UpdateSecurityMarksRequest message. + * Verifies a ListAssetsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateSecurityMarksRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAssetsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateSecurityMarksRequest + * @returns ListAssetsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.UpdateSecurityMarksRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListAssetsRequest; /** - * Creates a plain object from an UpdateSecurityMarksRequest message. Also converts values to other types if specified. - * @param message UpdateSecurityMarksRequest + * Creates a plain object from a ListAssetsRequest message. Also converts values to other types if specified. + * @param message ListAssetsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.UpdateSecurityMarksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ListAssetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateSecurityMarksRequest to JSON. + * Converts this ListAssetsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an Asset. */ - interface IAsset { - - /** Asset name */ - name?: (string|null); - - /** Asset securityCenterProperties */ - securityCenterProperties?: (google.cloud.securitycenter.v1.Asset.ISecurityCenterProperties|null); - - /** Asset resourceProperties */ - resourceProperties?: ({ [k: string]: google.protobuf.IValue }|null); + /** Properties of a ListAssetsResponse. */ + interface IListAssetsResponse { - /** Asset securityMarks */ - securityMarks?: (google.cloud.securitycenter.v1.ISecurityMarks|null); + /** ListAssetsResponse listAssetsResults */ + listAssetsResults?: (google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult[]|null); - /** Asset createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** ListAssetsResponse readTime */ + readTime?: (google.protobuf.ITimestamp|null); - /** Asset updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** ListAssetsResponse nextPageToken */ + nextPageToken?: (string|null); - /** Asset iamPolicy */ - iamPolicy?: (google.cloud.securitycenter.v1.Asset.IIamPolicy|null); + /** ListAssetsResponse totalSize */ + totalSize?: (number|null); } - /** Represents an Asset. */ - class Asset implements IAsset { + /** Represents a ListAssetsResponse. */ + class ListAssetsResponse implements IListAssetsResponse { /** - * Constructs a new Asset. + * Constructs a new ListAssetsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IAsset); - - /** Asset name. */ - public name: string; - - /** Asset securityCenterProperties. */ - public securityCenterProperties?: (google.cloud.securitycenter.v1.Asset.ISecurityCenterProperties|null); - - /** Asset resourceProperties. */ - public resourceProperties: { [k: string]: google.protobuf.IValue }; + constructor(properties?: google.cloud.securitycenter.v1.IListAssetsResponse); - /** Asset securityMarks. */ - public securityMarks?: (google.cloud.securitycenter.v1.ISecurityMarks|null); + /** ListAssetsResponse listAssetsResults. */ + public listAssetsResults: google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult[]; - /** Asset createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** ListAssetsResponse readTime. */ + public readTime?: (google.protobuf.ITimestamp|null); - /** Asset updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** ListAssetsResponse nextPageToken. */ + public nextPageToken: string; - /** Asset iamPolicy. */ - public iamPolicy?: (google.cloud.securitycenter.v1.Asset.IIamPolicy|null); + /** ListAssetsResponse totalSize. */ + public totalSize: number; /** - * Creates a new Asset instance using the specified properties. + * Creates a new ListAssetsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns Asset instance + * @returns ListAssetsResponse instance */ - public static create(properties?: google.cloud.securitycenter.v1.IAsset): google.cloud.securitycenter.v1.Asset; + public static create(properties?: google.cloud.securitycenter.v1.IListAssetsResponse): google.cloud.securitycenter.v1.ListAssetsResponse; /** - * Encodes the specified Asset message. Does not implicitly {@link google.cloud.securitycenter.v1.Asset.verify|verify} messages. - * @param message Asset message or plain object to encode + * Encodes the specified ListAssetsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsResponse.verify|verify} messages. + * @param message ListAssetsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IAsset, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IListAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Asset message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Asset.verify|verify} messages. - * @param message Asset message or plain object to encode + * Encodes the specified ListAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsResponse.verify|verify} messages. + * @param message ListAssetsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IAsset, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IListAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Asset message from the specified reader or buffer. + * Decodes a ListAssetsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Asset + * @returns ListAssetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.Asset; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListAssetsResponse; /** - * Decodes an Asset message from the specified reader or buffer, length delimited. + * Decodes a ListAssetsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Asset + * @returns ListAssetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.Asset; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListAssetsResponse; /** - * Verifies an Asset message. + * Verifies a ListAssetsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an Asset message from a plain object. Also converts values to their respective internal types. + * Creates a ListAssetsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Asset + * @returns ListAssetsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Asset; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListAssetsResponse; /** - * Creates a plain object from an Asset message. Also converts values to other types if specified. - * @param message Asset + * Creates a plain object from a ListAssetsResponse message. Also converts values to other types if specified. + * @param message ListAssetsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.Asset, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ListAssetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Asset to JSON. + * Converts this ListAssetsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Asset { - - /** Properties of a SecurityCenterProperties. */ - interface ISecurityCenterProperties { - - /** SecurityCenterProperties resourceName */ - resourceName?: (string|null); - - /** SecurityCenterProperties resourceType */ - resourceType?: (string|null); + namespace ListAssetsResponse { - /** SecurityCenterProperties resourceParent */ - resourceParent?: (string|null); + /** Properties of a ListAssetsResult. */ + interface IListAssetsResult { - /** SecurityCenterProperties resourceProject */ - resourceProject?: (string|null); + /** ListAssetsResult asset */ + asset?: (google.cloud.securitycenter.v1.IAsset|null); - /** SecurityCenterProperties resourceOwners */ - resourceOwners?: (string[]|null); + /** ListAssetsResult stateChange */ + stateChange?: (google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange|null); } - /** Represents a SecurityCenterProperties. */ - class SecurityCenterProperties implements ISecurityCenterProperties { + /** Represents a ListAssetsResult. */ + class ListAssetsResult implements IListAssetsResult { /** - * Constructs a new SecurityCenterProperties. + * Constructs a new ListAssetsResult. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.Asset.ISecurityCenterProperties); - - /** SecurityCenterProperties resourceName. */ - public resourceName: string; - - /** SecurityCenterProperties resourceType. */ - public resourceType: string; - - /** SecurityCenterProperties resourceParent. */ - public resourceParent: string; + constructor(properties?: google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult); - /** SecurityCenterProperties resourceProject. */ - public resourceProject: string; + /** ListAssetsResult asset. */ + public asset?: (google.cloud.securitycenter.v1.IAsset|null); - /** SecurityCenterProperties resourceOwners. */ - public resourceOwners: string[]; + /** ListAssetsResult stateChange. */ + public stateChange: google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange; /** - * Creates a new SecurityCenterProperties instance using the specified properties. + * Creates a new ListAssetsResult instance using the specified properties. * @param [properties] Properties to set - * @returns SecurityCenterProperties instance + * @returns ListAssetsResult instance */ - public static create(properties?: google.cloud.securitycenter.v1.Asset.ISecurityCenterProperties): google.cloud.securitycenter.v1.Asset.SecurityCenterProperties; + public static create(properties?: google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult): google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult; /** - * Encodes the specified SecurityCenterProperties message. Does not implicitly {@link google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.verify|verify} messages. - * @param message SecurityCenterProperties message or plain object to encode + * Encodes the specified ListAssetsResult message. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.verify|verify} messages. + * @param message ListAssetsResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.Asset.ISecurityCenterProperties, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SecurityCenterProperties message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.verify|verify} messages. - * @param message SecurityCenterProperties message or plain object to encode + * Encodes the specified ListAssetsResult message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.verify|verify} messages. + * @param message ListAssetsResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.Asset.ISecurityCenterProperties, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SecurityCenterProperties message from the specified reader or buffer. + * Decodes a ListAssetsResult message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SecurityCenterProperties + * @returns ListAssetsResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.Asset.SecurityCenterProperties; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult; /** - * Decodes a SecurityCenterProperties message from the specified reader or buffer, length delimited. + * Decodes a ListAssetsResult message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SecurityCenterProperties + * @returns ListAssetsResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.Asset.SecurityCenterProperties; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult; /** - * Verifies a SecurityCenterProperties message. + * Verifies a ListAssetsResult message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SecurityCenterProperties message from a plain object. Also converts values to their respective internal types. + * Creates a ListAssetsResult message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SecurityCenterProperties + * @returns ListAssetsResult */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Asset.SecurityCenterProperties; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult; /** - * Creates a plain object from a SecurityCenterProperties message. Also converts values to other types if specified. - * @param message SecurityCenterProperties + * Creates a plain object from a ListAssetsResult message. Also converts values to other types if specified. + * @param message ListAssetsResult * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.Asset.SecurityCenterProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SecurityCenterProperties to JSON. + * Converts this ListAssetsResult to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an IamPolicy. */ - interface IIamPolicy { + namespace ListAssetsResult { - /** IamPolicy policyBlob */ - policyBlob?: (string|null); + /** StateChange enum. */ + enum StateChange { + UNUSED = 0, + ADDED = 1, + REMOVED = 2, + ACTIVE = 3 + } } + } - /** Represents an IamPolicy. */ - class IamPolicy implements IIamPolicy { + /** Properties of a ListFindingsRequest. */ + interface IListFindingsRequest { - /** - * Constructs a new IamPolicy. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.Asset.IIamPolicy); + /** ListFindingsRequest parent */ + parent?: (string|null); - /** IamPolicy policyBlob. */ - public policyBlob: string; + /** ListFindingsRequest filter */ + filter?: (string|null); - /** - * Creates a new IamPolicy instance using the specified properties. - * @param [properties] Properties to set - * @returns IamPolicy instance - */ - public static create(properties?: google.cloud.securitycenter.v1.Asset.IIamPolicy): google.cloud.securitycenter.v1.Asset.IamPolicy; + /** ListFindingsRequest orderBy */ + orderBy?: (string|null); - /** - * Encodes the specified IamPolicy message. Does not implicitly {@link google.cloud.securitycenter.v1.Asset.IamPolicy.verify|verify} messages. - * @param message IamPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.Asset.IIamPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListFindingsRequest readTime */ + readTime?: (google.protobuf.ITimestamp|null); - /** - * Encodes the specified IamPolicy message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Asset.IamPolicy.verify|verify} messages. - * @param message IamPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.Asset.IIamPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListFindingsRequest compareDuration */ + compareDuration?: (google.protobuf.IDuration|null); - /** - * Decodes an IamPolicy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IamPolicy - * @throws {Error} If the payload is not a reader 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.Asset.IamPolicy; + /** ListFindingsRequest fieldMask */ + fieldMask?: (google.protobuf.IFieldMask|null); - /** - * Decodes an IamPolicy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IamPolicy - * @throws {Error} If the payload is not 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.Asset.IamPolicy; + /** ListFindingsRequest pageToken */ + pageToken?: (string|null); - /** - * Verifies an IamPolicy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** ListFindingsRequest pageSize */ + pageSize?: (number|null); + } - /** - * Creates an IamPolicy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IamPolicy - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Asset.IamPolicy; + /** Represents a ListFindingsRequest. */ + class ListFindingsRequest implements IListFindingsRequest { - /** - * Creates a plain object from an IamPolicy message. Also converts values to other types if specified. - * @param message IamPolicy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.Asset.IamPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Constructs a new ListFindingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IListFindingsRequest); - /** - * Converts this IamPolicy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** ListFindingsRequest parent. */ + public parent: string; - /** Properties of a SecurityMarks. */ - interface ISecurityMarks { + /** ListFindingsRequest filter. */ + public filter: string; - /** SecurityMarks name */ - name?: (string|null); + /** ListFindingsRequest orderBy. */ + public orderBy: string; - /** SecurityMarks marks */ - marks?: ({ [k: string]: string }|null); - } + /** ListFindingsRequest readTime. */ + public readTime?: (google.protobuf.ITimestamp|null); - /** Represents a SecurityMarks. */ - class SecurityMarks implements ISecurityMarks { + /** ListFindingsRequest compareDuration. */ + public compareDuration?: (google.protobuf.IDuration|null); - /** - * Constructs a new SecurityMarks. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.ISecurityMarks); + /** ListFindingsRequest fieldMask. */ + public fieldMask?: (google.protobuf.IFieldMask|null); - /** SecurityMarks name. */ - public name: string; + /** ListFindingsRequest pageToken. */ + public pageToken: string; - /** SecurityMarks marks. */ - public marks: { [k: string]: string }; + /** ListFindingsRequest pageSize. */ + public pageSize: number; /** - * Creates a new SecurityMarks instance using the specified properties. + * Creates a new ListFindingsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SecurityMarks instance + * @returns ListFindingsRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.ISecurityMarks): google.cloud.securitycenter.v1.SecurityMarks; + public static create(properties?: google.cloud.securitycenter.v1.IListFindingsRequest): google.cloud.securitycenter.v1.ListFindingsRequest; /** - * Encodes the specified SecurityMarks message. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityMarks.verify|verify} messages. - * @param message SecurityMarks message or plain object to encode + * Encodes the specified ListFindingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsRequest.verify|verify} messages. + * @param message ListFindingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.ISecurityMarks, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IListFindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SecurityMarks message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityMarks.verify|verify} messages. - * @param message SecurityMarks message or plain object to encode + * Encodes the specified ListFindingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsRequest.verify|verify} messages. + * @param message ListFindingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.ISecurityMarks, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IListFindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SecurityMarks message from the specified reader or buffer. + * Decodes a ListFindingsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SecurityMarks + * @returns ListFindingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.SecurityMarks; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListFindingsRequest; /** - * Decodes a SecurityMarks message from the specified reader or buffer, length delimited. + * Decodes a ListFindingsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SecurityMarks + * @returns ListFindingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.SecurityMarks; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListFindingsRequest; /** - * Verifies a SecurityMarks message. + * Verifies a ListFindingsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SecurityMarks message from a plain object. Also converts values to their respective internal types. + * Creates a ListFindingsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SecurityMarks + * @returns ListFindingsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.SecurityMarks; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListFindingsRequest; /** - * Creates a plain object from a SecurityMarks message. Also converts values to other types if specified. - * @param message SecurityMarks + * Creates a plain object from a ListFindingsRequest message. Also converts values to other types if specified. + * @param message ListFindingsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.SecurityMarks, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ListFindingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SecurityMarks to JSON. + * Converts this ListFindingsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Finding. */ - interface IFinding { - - /** Finding name */ - name?: (string|null); - - /** Finding parent */ - parent?: (string|null); - - /** Finding resourceName */ - resourceName?: (string|null); - - /** Finding state */ - state?: (google.cloud.securitycenter.v1.Finding.State|null); - - /** Finding category */ - category?: (string|null); - - /** Finding externalUri */ - externalUri?: (string|null); + /** Properties of a ListFindingsResponse. */ + interface IListFindingsResponse { - /** Finding sourceProperties */ - sourceProperties?: ({ [k: string]: google.protobuf.IValue }|null); + /** ListFindingsResponse listFindingsResults */ + listFindingsResults?: (google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult[]|null); - /** Finding securityMarks */ - securityMarks?: (google.cloud.securitycenter.v1.ISecurityMarks|null); + /** ListFindingsResponse readTime */ + readTime?: (google.protobuf.ITimestamp|null); - /** Finding eventTime */ - eventTime?: (google.protobuf.ITimestamp|null); + /** ListFindingsResponse nextPageToken */ + nextPageToken?: (string|null); - /** Finding createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** ListFindingsResponse totalSize */ + totalSize?: (number|null); } - /** Represents a Finding. */ - class Finding implements IFinding { + /** Represents a ListFindingsResponse. */ + class ListFindingsResponse implements IListFindingsResponse { /** - * Constructs a new Finding. + * Constructs a new ListFindingsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IFinding); - - /** Finding name. */ - public name: string; + constructor(properties?: google.cloud.securitycenter.v1.IListFindingsResponse); - /** Finding parent. */ - public parent: string; - - /** Finding resourceName. */ - public resourceName: string; - - /** Finding state. */ - public state: google.cloud.securitycenter.v1.Finding.State; - - /** Finding category. */ - public category: string; - - /** Finding externalUri. */ - public externalUri: string; - - /** Finding sourceProperties. */ - public sourceProperties: { [k: string]: google.protobuf.IValue }; + /** ListFindingsResponse listFindingsResults. */ + public listFindingsResults: google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult[]; - /** Finding securityMarks. */ - public securityMarks?: (google.cloud.securitycenter.v1.ISecurityMarks|null); + /** ListFindingsResponse readTime. */ + public readTime?: (google.protobuf.ITimestamp|null); - /** Finding eventTime. */ - public eventTime?: (google.protobuf.ITimestamp|null); + /** ListFindingsResponse nextPageToken. */ + public nextPageToken: string; - /** Finding createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** ListFindingsResponse totalSize. */ + public totalSize: number; /** - * Creates a new Finding instance using the specified properties. + * Creates a new ListFindingsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns Finding instance + * @returns ListFindingsResponse instance */ - public static create(properties?: google.cloud.securitycenter.v1.IFinding): google.cloud.securitycenter.v1.Finding; + public static create(properties?: google.cloud.securitycenter.v1.IListFindingsResponse): google.cloud.securitycenter.v1.ListFindingsResponse; /** - * Encodes the specified Finding message. Does not implicitly {@link google.cloud.securitycenter.v1.Finding.verify|verify} messages. - * @param message Finding message or plain object to encode + * Encodes the specified ListFindingsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.verify|verify} messages. + * @param message ListFindingsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IFinding, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IListFindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Finding message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Finding.verify|verify} messages. - * @param message Finding message or plain object to encode + * Encodes the specified ListFindingsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.verify|verify} messages. + * @param message ListFindingsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IFinding, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IListFindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Finding message from the specified reader or buffer. + * Decodes a ListFindingsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Finding + * @returns ListFindingsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.Finding; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListFindingsResponse; /** - * Decodes a Finding message from the specified reader or buffer, length delimited. + * Decodes a ListFindingsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Finding + * @returns ListFindingsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.Finding; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListFindingsResponse; /** - * Verifies a Finding message. + * Verifies a ListFindingsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Finding message from a plain object. Also converts values to their respective internal types. + * Creates a ListFindingsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Finding + * @returns ListFindingsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Finding; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListFindingsResponse; /** - * Creates a plain object from a Finding message. Also converts values to other types if specified. - * @param message Finding + * Creates a plain object from a ListFindingsResponse message. Also converts values to other types if specified. + * @param message ListFindingsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.Finding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ListFindingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Finding to JSON. + * Converts this ListFindingsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Finding { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - ACTIVE = 1, - INACTIVE = 2 - } - } - - /** Properties of an OrganizationSettings. */ - interface IOrganizationSettings { - - /** OrganizationSettings name */ - name?: (string|null); - - /** OrganizationSettings enableAssetDiscovery */ - enableAssetDiscovery?: (boolean|null); - - /** OrganizationSettings assetDiscoveryConfig */ - assetDiscoveryConfig?: (google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig|null); - } - - /** Represents an OrganizationSettings. */ - class OrganizationSettings implements IOrganizationSettings { - - /** - * Constructs a new OrganizationSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.IOrganizationSettings); - - /** OrganizationSettings name. */ - public name: string; - - /** OrganizationSettings enableAssetDiscovery. */ - public enableAssetDiscovery: boolean; - - /** OrganizationSettings assetDiscoveryConfig. */ - public assetDiscoveryConfig?: (google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig|null); - - /** - * Creates a new OrganizationSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns OrganizationSettings instance - */ - public static create(properties?: google.cloud.securitycenter.v1.IOrganizationSettings): google.cloud.securitycenter.v1.OrganizationSettings; - - /** - * Encodes the specified OrganizationSettings message. Does not implicitly {@link google.cloud.securitycenter.v1.OrganizationSettings.verify|verify} messages. - * @param message OrganizationSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.IOrganizationSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OrganizationSettings message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.OrganizationSettings.verify|verify} messages. - * @param message OrganizationSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IOrganizationSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OrganizationSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OrganizationSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.OrganizationSettings; - - /** - * Decodes an OrganizationSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OrganizationSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.OrganizationSettings; - - /** - * Verifies an OrganizationSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OrganizationSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OrganizationSettings - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.OrganizationSettings; - - /** - * Creates a plain object from an OrganizationSettings message. Also converts values to other types if specified. - * @param message OrganizationSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.OrganizationSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OrganizationSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + namespace ListFindingsResponse { - namespace OrganizationSettings { + /** Properties of a ListFindingsResult. */ + interface IListFindingsResult { - /** Properties of an AssetDiscoveryConfig. */ - interface IAssetDiscoveryConfig { + /** ListFindingsResult finding */ + finding?: (google.cloud.securitycenter.v1.IFinding|null); - /** AssetDiscoveryConfig projectIds */ - projectIds?: (string[]|null); + /** ListFindingsResult stateChange */ + stateChange?: (google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange|null); - /** AssetDiscoveryConfig inclusionMode */ - inclusionMode?: (google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode|null); + /** ListFindingsResult resource */ + resource?: (google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.IResource|null); } - /** Represents an AssetDiscoveryConfig. */ - class AssetDiscoveryConfig implements IAssetDiscoveryConfig { + /** Represents a ListFindingsResult. */ + class ListFindingsResult implements IListFindingsResult { /** - * Constructs a new AssetDiscoveryConfig. + * Constructs a new ListFindingsResult. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig); + constructor(properties?: google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult); - /** AssetDiscoveryConfig projectIds. */ - public projectIds: string[]; + /** ListFindingsResult finding. */ + public finding?: (google.cloud.securitycenter.v1.IFinding|null); - /** AssetDiscoveryConfig inclusionMode. */ - public inclusionMode: google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode; + /** ListFindingsResult stateChange. */ + public stateChange: google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange; + + /** ListFindingsResult resource. */ + public resource?: (google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.IResource|null); /** - * Creates a new AssetDiscoveryConfig instance using the specified properties. + * Creates a new ListFindingsResult instance using the specified properties. * @param [properties] Properties to set - * @returns AssetDiscoveryConfig instance + * @returns ListFindingsResult instance */ - public static create(properties?: google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig): google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig; + public static create(properties?: google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult): google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult; /** - * Encodes the specified AssetDiscoveryConfig message. Does not implicitly {@link google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.verify|verify} messages. - * @param message AssetDiscoveryConfig message or plain object to encode + * Encodes the specified ListFindingsResult message. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.verify|verify} messages. + * @param message ListFindingsResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AssetDiscoveryConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.verify|verify} messages. - * @param message AssetDiscoveryConfig message or plain object to encode + * Encodes the specified ListFindingsResult message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.verify|verify} messages. + * @param message ListFindingsResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AssetDiscoveryConfig message from the specified reader or buffer. + * Decodes a ListFindingsResult message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AssetDiscoveryConfig + * @returns ListFindingsResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult; /** - * Decodes an AssetDiscoveryConfig message from the specified reader or buffer, length delimited. + * Decodes a ListFindingsResult message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AssetDiscoveryConfig + * @returns ListFindingsResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult; /** - * Verifies an AssetDiscoveryConfig message. + * Verifies a ListFindingsResult message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an AssetDiscoveryConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ListFindingsResult message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AssetDiscoveryConfig + * @returns ListFindingsResult */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult; /** - * Creates a plain object from an AssetDiscoveryConfig message. Also converts values to other types if specified. - * @param message AssetDiscoveryConfig + * Creates a plain object from a ListFindingsResult message. Also converts values to other types if specified. + * @param message ListFindingsResult * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AssetDiscoveryConfig to JSON. + * Converts this ListFindingsResult to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace AssetDiscoveryConfig { + namespace ListFindingsResult { - /** InclusionMode enum. */ - enum InclusionMode { - INCLUSION_MODE_UNSPECIFIED = 0, - INCLUDE_ONLY = 1, - EXCLUDE = 2 + /** Properties of a Resource. */ + interface IResource { + + /** Resource name */ + name?: (string|null); + + /** Resource projectName */ + projectName?: (string|null); + + /** Resource projectDisplayName */ + projectDisplayName?: (string|null); + + /** Resource parentName */ + parentName?: (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.ListFindingsResponse.ListFindingsResult.IResource); + + /** Resource name. */ + public name: string; + + /** Resource projectName. */ + public projectName: string; + + /** Resource projectDisplayName. */ + public projectDisplayName: string; + + /** Resource parentName. */ + public parentName: 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.ListFindingsResponse.ListFindingsResult.IResource): google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource; + + /** + * Encodes the specified Resource message. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource.verify|verify} messages. + * @param message Resource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.IResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource.verify|verify} messages. + * @param message Resource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.IResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Resource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Resource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource; + + /** + * Decodes a Resource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Resource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource; + + /** + * Verifies a 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.ListFindingsResponse.ListFindingsResult.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.ListFindingsResponse.ListFindingsResult.Resource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Resource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** StateChange enum. */ + enum StateChange { + UNUSED = 0, + CHANGED = 1, + UNCHANGED = 2, + ADDED = 3, + REMOVED = 4 } } } - /** Properties of a RunAssetDiscoveryResponse. */ - interface IRunAssetDiscoveryResponse { + /** Properties of a SetFindingStateRequest. */ + interface ISetFindingStateRequest { - /** RunAssetDiscoveryResponse state */ - state?: (google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State|null); + /** SetFindingStateRequest name */ + name?: (string|null); - /** RunAssetDiscoveryResponse duration */ - duration?: (google.protobuf.IDuration|null); + /** SetFindingStateRequest state */ + state?: (google.cloud.securitycenter.v1.Finding.State|null); + + /** SetFindingStateRequest startTime */ + startTime?: (google.protobuf.ITimestamp|null); } - /** Represents a RunAssetDiscoveryResponse. */ - class RunAssetDiscoveryResponse implements IRunAssetDiscoveryResponse { + /** Represents a SetFindingStateRequest. */ + class SetFindingStateRequest implements ISetFindingStateRequest { /** - * Constructs a new RunAssetDiscoveryResponse. + * Constructs a new SetFindingStateRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse); + constructor(properties?: google.cloud.securitycenter.v1.ISetFindingStateRequest); - /** RunAssetDiscoveryResponse state. */ - public state: google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State; + /** SetFindingStateRequest name. */ + public name: string; - /** RunAssetDiscoveryResponse duration. */ - public duration?: (google.protobuf.IDuration|null); + /** SetFindingStateRequest state. */ + public state: google.cloud.securitycenter.v1.Finding.State; + + /** SetFindingStateRequest startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new RunAssetDiscoveryResponse instance using the specified properties. + * Creates a new SetFindingStateRequest instance using the specified properties. * @param [properties] Properties to set - * @returns RunAssetDiscoveryResponse instance + * @returns SetFindingStateRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse): google.cloud.securitycenter.v1.RunAssetDiscoveryResponse; + public static create(properties?: google.cloud.securitycenter.v1.ISetFindingStateRequest): google.cloud.securitycenter.v1.SetFindingStateRequest; /** - * Encodes the specified RunAssetDiscoveryResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.verify|verify} messages. - * @param message RunAssetDiscoveryResponse message or plain object to encode + * Encodes the specified SetFindingStateRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.SetFindingStateRequest.verify|verify} messages. + * @param message SetFindingStateRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.ISetFindingStateRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RunAssetDiscoveryResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.verify|verify} messages. - * @param message RunAssetDiscoveryResponse message or plain object to encode + * Encodes the specified SetFindingStateRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SetFindingStateRequest.verify|verify} messages. + * @param message SetFindingStateRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.ISetFindingStateRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RunAssetDiscoveryResponse message from the specified reader or buffer. + * Decodes a SetFindingStateRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RunAssetDiscoveryResponse + * @returns SetFindingStateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.RunAssetDiscoveryResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.SetFindingStateRequest; /** - * Decodes a RunAssetDiscoveryResponse message from the specified reader or buffer, length delimited. + * Decodes a SetFindingStateRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RunAssetDiscoveryResponse + * @returns SetFindingStateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.RunAssetDiscoveryResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.SetFindingStateRequest; /** - * Verifies a RunAssetDiscoveryResponse message. + * Verifies a SetFindingStateRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RunAssetDiscoveryResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SetFindingStateRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RunAssetDiscoveryResponse + * @returns SetFindingStateRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.RunAssetDiscoveryResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.SetFindingStateRequest; /** - * Creates a plain object from a RunAssetDiscoveryResponse message. Also converts values to other types if specified. - * @param message RunAssetDiscoveryResponse + * Creates a plain object from a SetFindingStateRequest message. Also converts values to other types if specified. + * @param message SetFindingStateRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.RunAssetDiscoveryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.SetFindingStateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RunAssetDiscoveryResponse to JSON. + * Converts this SetFindingStateRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace RunAssetDiscoveryResponse { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - COMPLETED = 1, - SUPERSEDED = 2, - TERMINATED = 3 - } - } - - /** Properties of a Source. */ - interface ISource { - - /** Source name */ - name?: (string|null); - - /** Source displayName */ - displayName?: (string|null); + /** Properties of a RunAssetDiscoveryRequest. */ + interface IRunAssetDiscoveryRequest { - /** Source description */ - description?: (string|null); + /** RunAssetDiscoveryRequest parent */ + parent?: (string|null); } - /** Represents a Source. */ - class Source implements ISource { + /** Represents a RunAssetDiscoveryRequest. */ + class RunAssetDiscoveryRequest implements IRunAssetDiscoveryRequest { /** - * Constructs a new Source. + * Constructs a new RunAssetDiscoveryRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.ISource); - - /** Source name. */ - public name: string; - - /** Source displayName. */ - public displayName: string; + constructor(properties?: google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest); - /** Source description. */ - public description: string; + /** RunAssetDiscoveryRequest parent. */ + public parent: string; /** - * Creates a new Source instance using the specified properties. + * Creates a new RunAssetDiscoveryRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Source instance + * @returns RunAssetDiscoveryRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.ISource): google.cloud.securitycenter.v1.Source; + public static create(properties?: google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest): google.cloud.securitycenter.v1.RunAssetDiscoveryRequest; /** - * Encodes the specified Source message. Does not implicitly {@link google.cloud.securitycenter.v1.Source.verify|verify} messages. - * @param message Source message or plain object to encode + * Encodes the specified RunAssetDiscoveryRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.RunAssetDiscoveryRequest.verify|verify} messages. + * @param message RunAssetDiscoveryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.ISource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Source message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Source.verify|verify} messages. - * @param message Source message or plain object to encode + * Encodes the specified RunAssetDiscoveryRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.RunAssetDiscoveryRequest.verify|verify} messages. + * @param message RunAssetDiscoveryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.ISource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Source message from the specified reader or buffer. + * Decodes a RunAssetDiscoveryRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Source + * @returns RunAssetDiscoveryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.Source; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.RunAssetDiscoveryRequest; /** - * Decodes a Source message from the specified reader or buffer, length delimited. + * Decodes a RunAssetDiscoveryRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Source + * @returns RunAssetDiscoveryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.Source; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.RunAssetDiscoveryRequest; /** - * Verifies a Source message. + * Verifies a RunAssetDiscoveryRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Source message from a plain object. Also converts values to their respective internal types. + * Creates a RunAssetDiscoveryRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Source + * @returns RunAssetDiscoveryRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Source; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.RunAssetDiscoveryRequest; /** - * Creates a plain object from a Source message. Also converts values to other types if specified. - * @param message Source + * Creates a plain object from a RunAssetDiscoveryRequest message. Also converts values to other types if specified. + * @param message RunAssetDiscoveryRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.Source, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.RunAssetDiscoveryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Source to JSON. + * Converts this RunAssetDiscoveryRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - } - /** Namespace v1beta1. */ - namespace v1beta1 { + /** Properties of an UpdateFindingRequest. */ + interface IUpdateFindingRequest { - /** Represents a SecurityCenter */ - class SecurityCenter extends $protobuf.rpc.Service { + /** UpdateFindingRequest finding */ + finding?: (google.cloud.securitycenter.v1.IFinding|null); - /** - * Constructs a new SecurityCenter service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + /** UpdateFindingRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateFindingRequest. */ + class UpdateFindingRequest implements IUpdateFindingRequest { /** - * Creates new SecurityCenter service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. + * Constructs a new UpdateFindingRequest. + * @param [properties] Properties to set */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): SecurityCenter; + constructor(properties?: google.cloud.securitycenter.v1.IUpdateFindingRequest); + + /** UpdateFindingRequest finding. */ + public finding?: (google.cloud.securitycenter.v1.IFinding|null); + + /** UpdateFindingRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Calls CreateSource. - * @param request CreateSourceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Source + * Creates a new UpdateFindingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateFindingRequest instance */ - public createSource(request: google.cloud.securitycenter.v1beta1.ICreateSourceRequest, callback: google.cloud.securitycenter.v1beta1.SecurityCenter.CreateSourceCallback): void; + public static create(properties?: google.cloud.securitycenter.v1.IUpdateFindingRequest): google.cloud.securitycenter.v1.UpdateFindingRequest; /** - * Calls CreateSource. - * @param request CreateSourceRequest message or plain object - * @returns Promise + * Encodes the specified UpdateFindingRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateFindingRequest.verify|verify} messages. + * @param message UpdateFindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public createSource(request: google.cloud.securitycenter.v1beta1.ICreateSourceRequest): Promise; + public static encode(message: google.cloud.securitycenter.v1.IUpdateFindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreateFinding. - * @param request CreateFindingRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Finding + * Encodes the specified UpdateFindingRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateFindingRequest.verify|verify} messages. + * @param message UpdateFindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public createFinding(request: google.cloud.securitycenter.v1beta1.ICreateFindingRequest, callback: google.cloud.securitycenter.v1beta1.SecurityCenter.CreateFindingCallback): void; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IUpdateFindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreateFinding. - * @param request CreateFindingRequest message or plain object - * @returns Promise + * Decodes an UpdateFindingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateFindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createFinding(request: google.cloud.securitycenter.v1beta1.ICreateFindingRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.UpdateFindingRequest; /** - * Calls GetIamPolicy. - * @param request GetIamPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Policy + * Decodes an UpdateFindingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateFindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.cloud.securitycenter.v1beta1.SecurityCenter.GetIamPolicyCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.UpdateFindingRequest; /** - * Calls GetIamPolicy. - * @param request GetIamPolicyRequest message or plain object - * @returns Promise + * Verifies an UpdateFindingRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls GetOrganizationSettings. - * @param request GetOrganizationSettingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and OrganizationSettings + * Creates an UpdateFindingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateFindingRequest */ - public getOrganizationSettings(request: google.cloud.securitycenter.v1beta1.IGetOrganizationSettingsRequest, callback: google.cloud.securitycenter.v1beta1.SecurityCenter.GetOrganizationSettingsCallback): void; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.UpdateFindingRequest; /** - * Calls GetOrganizationSettings. - * @param request GetOrganizationSettingsRequest message or plain object - * @returns Promise + * Creates a plain object from an UpdateFindingRequest message. Also converts values to other types if specified. + * @param message UpdateFindingRequest + * @param [options] Conversion options + * @returns Plain object */ - public getOrganizationSettings(request: google.cloud.securitycenter.v1beta1.IGetOrganizationSettingsRequest): Promise; + public static toObject(message: google.cloud.securitycenter.v1.UpdateFindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls GetSource. - * @param request GetSourceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Source + * Converts this UpdateFindingRequest to JSON. + * @returns JSON object */ - public getSource(request: google.cloud.securitycenter.v1beta1.IGetSourceRequest, callback: google.cloud.securitycenter.v1beta1.SecurityCenter.GetSourceCallback): void; + public toJSON(): { [k: string]: any }; + } - /** - * Calls GetSource. - * @param request GetSourceRequest message or plain object - * @returns Promise - */ - public getSource(request: google.cloud.securitycenter.v1beta1.IGetSourceRequest): Promise; + /** Properties of an UpdateOrganizationSettingsRequest. */ + interface IUpdateOrganizationSettingsRequest { + + /** UpdateOrganizationSettingsRequest organizationSettings */ + organizationSettings?: (google.cloud.securitycenter.v1.IOrganizationSettings|null); + + /** UpdateOrganizationSettingsRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateOrganizationSettingsRequest. */ + class UpdateOrganizationSettingsRequest implements IUpdateOrganizationSettingsRequest { /** - * Calls GroupAssets. - * @param request GroupAssetsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GroupAssetsResponse + * Constructs a new UpdateOrganizationSettingsRequest. + * @param [properties] Properties to set */ - public groupAssets(request: google.cloud.securitycenter.v1beta1.IGroupAssetsRequest, callback: google.cloud.securitycenter.v1beta1.SecurityCenter.GroupAssetsCallback): void; + constructor(properties?: google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest); + + /** UpdateOrganizationSettingsRequest organizationSettings. */ + public organizationSettings?: (google.cloud.securitycenter.v1.IOrganizationSettings|null); + + /** UpdateOrganizationSettingsRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Calls GroupAssets. - * @param request GroupAssetsRequest message or plain object - * @returns Promise + * Creates a new UpdateOrganizationSettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateOrganizationSettingsRequest instance */ - public groupAssets(request: google.cloud.securitycenter.v1beta1.IGroupAssetsRequest): Promise; + public static create(properties?: google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest): google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest; /** - * Calls GroupFindings. - * @param request GroupFindingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GroupFindingsResponse + * Encodes the specified UpdateOrganizationSettingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest.verify|verify} messages. + * @param message UpdateOrganizationSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public groupFindings(request: google.cloud.securitycenter.v1beta1.IGroupFindingsRequest, callback: google.cloud.securitycenter.v1beta1.SecurityCenter.GroupFindingsCallback): void; + public static encode(message: google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GroupFindings. - * @param request GroupFindingsRequest message or plain object - * @returns Promise + * Encodes the specified UpdateOrganizationSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest.verify|verify} messages. + * @param message UpdateOrganizationSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public groupFindings(request: google.cloud.securitycenter.v1beta1.IGroupFindingsRequest): Promise; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListAssets. - * @param request ListAssetsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListAssetsResponse + * Decodes an UpdateOrganizationSettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateOrganizationSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listAssets(request: google.cloud.securitycenter.v1beta1.IListAssetsRequest, callback: google.cloud.securitycenter.v1beta1.SecurityCenter.ListAssetsCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest; /** - * Calls ListAssets. - * @param request ListAssetsRequest message or plain object - * @returns Promise + * Decodes an UpdateOrganizationSettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateOrganizationSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listAssets(request: google.cloud.securitycenter.v1beta1.IListAssetsRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest; /** - * Calls ListFindings. - * @param request ListFindingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListFindingsResponse + * Verifies an UpdateOrganizationSettingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public listFindings(request: google.cloud.securitycenter.v1beta1.IListFindingsRequest, callback: google.cloud.securitycenter.v1beta1.SecurityCenter.ListFindingsCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls ListFindings. - * @param request ListFindingsRequest message or plain object - * @returns Promise + * Creates an UpdateOrganizationSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateOrganizationSettingsRequest */ - public listFindings(request: google.cloud.securitycenter.v1beta1.IListFindingsRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest; /** - * Calls ListSources. - * @param request ListSourcesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListSourcesResponse + * Creates a plain object from an UpdateOrganizationSettingsRequest message. Also converts values to other types if specified. + * @param message UpdateOrganizationSettingsRequest + * @param [options] Conversion options + * @returns Plain object */ - public listSources(request: google.cloud.securitycenter.v1beta1.IListSourcesRequest, callback: google.cloud.securitycenter.v1beta1.SecurityCenter.ListSourcesCallback): void; + public static toObject(message: google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls ListSources. - * @param request ListSourcesRequest message or plain object - * @returns Promise + * Converts this UpdateOrganizationSettingsRequest to JSON. + * @returns JSON object */ - public listSources(request: google.cloud.securitycenter.v1beta1.IListSourcesRequest): Promise; + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateSourceRequest. */ + interface IUpdateSourceRequest { + + /** UpdateSourceRequest source */ + source?: (google.cloud.securitycenter.v1.ISource|null); + + /** UpdateSourceRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateSourceRequest. */ + class UpdateSourceRequest implements IUpdateSourceRequest { /** - * Calls RunAssetDiscovery. - * @param request RunAssetDiscoveryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Constructs a new UpdateSourceRequest. + * @param [properties] Properties to set */ - public runAssetDiscovery(request: google.cloud.securitycenter.v1beta1.IRunAssetDiscoveryRequest, callback: google.cloud.securitycenter.v1beta1.SecurityCenter.RunAssetDiscoveryCallback): void; + constructor(properties?: google.cloud.securitycenter.v1.IUpdateSourceRequest); + + /** UpdateSourceRequest source. */ + public source?: (google.cloud.securitycenter.v1.ISource|null); + + /** UpdateSourceRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Calls RunAssetDiscovery. - * @param request RunAssetDiscoveryRequest message or plain object - * @returns Promise + * Creates a new UpdateSourceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateSourceRequest instance */ - public runAssetDiscovery(request: google.cloud.securitycenter.v1beta1.IRunAssetDiscoveryRequest): Promise; + public static create(properties?: google.cloud.securitycenter.v1.IUpdateSourceRequest): google.cloud.securitycenter.v1.UpdateSourceRequest; /** - * Calls SetFindingState. - * @param request SetFindingStateRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Finding + * Encodes the specified UpdateSourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSourceRequest.verify|verify} messages. + * @param message UpdateSourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public setFindingState(request: google.cloud.securitycenter.v1beta1.ISetFindingStateRequest, callback: google.cloud.securitycenter.v1beta1.SecurityCenter.SetFindingStateCallback): void; + public static encode(message: google.cloud.securitycenter.v1.IUpdateSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls SetFindingState. - * @param request SetFindingStateRequest message or plain object - * @returns Promise + * Encodes the specified UpdateSourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSourceRequest.verify|verify} messages. + * @param message UpdateSourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public setFindingState(request: google.cloud.securitycenter.v1beta1.ISetFindingStateRequest): Promise; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IUpdateSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls SetIamPolicy. - * @param request SetIamPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Policy + * Decodes an UpdateSourceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.cloud.securitycenter.v1beta1.SecurityCenter.SetIamPolicyCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.UpdateSourceRequest; /** - * Calls SetIamPolicy. - * @param request SetIamPolicyRequest message or plain object - * @returns Promise + * Decodes an UpdateSourceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.UpdateSourceRequest; /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + * Verifies an UpdateSourceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.cloud.securitycenter.v1beta1.SecurityCenter.TestIamPermissionsCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @returns Promise + * Creates an UpdateSourceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateSourceRequest */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.UpdateSourceRequest; /** - * Calls UpdateFinding. - * @param request UpdateFindingRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Finding + * Creates a plain object from an UpdateSourceRequest message. Also converts values to other types if specified. + * @param message UpdateSourceRequest + * @param [options] Conversion options + * @returns Plain object */ - public updateFinding(request: google.cloud.securitycenter.v1beta1.IUpdateFindingRequest, callback: google.cloud.securitycenter.v1beta1.SecurityCenter.UpdateFindingCallback): void; + public static toObject(message: google.cloud.securitycenter.v1.UpdateSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls UpdateFinding. - * @param request UpdateFindingRequest message or plain object - * @returns Promise + * Converts this UpdateSourceRequest to JSON. + * @returns JSON object */ - public updateFinding(request: google.cloud.securitycenter.v1beta1.IUpdateFindingRequest): Promise; + public toJSON(): { [k: string]: any }; + } - /** - * Calls UpdateOrganizationSettings. - * @param request UpdateOrganizationSettingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and OrganizationSettings - */ - public updateOrganizationSettings(request: google.cloud.securitycenter.v1beta1.IUpdateOrganizationSettingsRequest, callback: google.cloud.securitycenter.v1beta1.SecurityCenter.UpdateOrganizationSettingsCallback): void; + /** Properties of an UpdateSecurityMarksRequest. */ + interface IUpdateSecurityMarksRequest { - /** - * Calls UpdateOrganizationSettings. - * @param request UpdateOrganizationSettingsRequest message or plain object - * @returns Promise - */ - public updateOrganizationSettings(request: google.cloud.securitycenter.v1beta1.IUpdateOrganizationSettingsRequest): Promise; + /** UpdateSecurityMarksRequest securityMarks */ + securityMarks?: (google.cloud.securitycenter.v1.ISecurityMarks|null); - /** - * Calls UpdateSource. - * @param request UpdateSourceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Source - */ - public updateSource(request: google.cloud.securitycenter.v1beta1.IUpdateSourceRequest, callback: google.cloud.securitycenter.v1beta1.SecurityCenter.UpdateSourceCallback): void; + /** UpdateSecurityMarksRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); - /** - * Calls UpdateSource. - * @param request UpdateSourceRequest message or plain object - * @returns Promise - */ - public updateSource(request: google.cloud.securitycenter.v1beta1.IUpdateSourceRequest): Promise; + /** UpdateSecurityMarksRequest startTime */ + startTime?: (google.protobuf.ITimestamp|null); + } - /** - * Calls UpdateSecurityMarks. - * @param request UpdateSecurityMarksRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SecurityMarks - */ - public updateSecurityMarks(request: google.cloud.securitycenter.v1beta1.IUpdateSecurityMarksRequest, callback: google.cloud.securitycenter.v1beta1.SecurityCenter.UpdateSecurityMarksCallback): void; + /** Represents an UpdateSecurityMarksRequest. */ + class UpdateSecurityMarksRequest implements IUpdateSecurityMarksRequest { /** - * Calls UpdateSecurityMarks. - * @param request UpdateSecurityMarksRequest message or plain object - * @returns Promise + * Constructs a new UpdateSecurityMarksRequest. + * @param [properties] Properties to set */ - public updateSecurityMarks(request: google.cloud.securitycenter.v1beta1.IUpdateSecurityMarksRequest): Promise; - } + constructor(properties?: google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest); - namespace SecurityCenter { + /** UpdateSecurityMarksRequest securityMarks. */ + public securityMarks?: (google.cloud.securitycenter.v1.ISecurityMarks|null); - /** - * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#createSource}. - * @param error Error, if any - * @param [response] Source - */ - type CreateSourceCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1beta1.Source) => void; + /** UpdateSecurityMarksRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** - * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#createFinding}. - * @param error Error, if any - * @param [response] Finding - */ - type CreateFindingCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1beta1.Finding) => void; + /** UpdateSecurityMarksRequest startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); /** - * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#getIamPolicy}. - * @param error Error, if any - * @param [response] Policy + * Creates a new UpdateSecurityMarksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateSecurityMarksRequest instance */ - type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + public static create(properties?: google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest): google.cloud.securitycenter.v1.UpdateSecurityMarksRequest; /** - * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#getOrganizationSettings}. - * @param error Error, if any - * @param [response] OrganizationSettings + * Encodes the specified UpdateSecurityMarksRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSecurityMarksRequest.verify|verify} messages. + * @param message UpdateSecurityMarksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type GetOrganizationSettingsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1beta1.OrganizationSettings) => void; + public static encode(message: google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#getSource}. - * @param error Error, if any - * @param [response] Source + * Encodes the specified UpdateSecurityMarksRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSecurityMarksRequest.verify|verify} messages. + * @param message UpdateSecurityMarksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type GetSourceCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1beta1.Source) => void; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#groupAssets}. - * @param error Error, if any - * @param [response] GroupAssetsResponse + * Decodes an UpdateSecurityMarksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateSecurityMarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type GroupAssetsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1beta1.GroupAssetsResponse) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.UpdateSecurityMarksRequest; /** - * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#groupFindings}. - * @param error Error, if any - * @param [response] GroupFindingsResponse + * Decodes an UpdateSecurityMarksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateSecurityMarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type GroupFindingsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1beta1.GroupFindingsResponse) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.UpdateSecurityMarksRequest; /** - * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#listAssets}. - * @param error Error, if any - * @param [response] ListAssetsResponse + * Verifies an UpdateSecurityMarksRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type ListAssetsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1beta1.ListAssetsResponse) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#listFindings}. - * @param error Error, if any - * @param [response] ListFindingsResponse + * Creates an UpdateSecurityMarksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateSecurityMarksRequest */ - type ListFindingsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1beta1.ListFindingsResponse) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.UpdateSecurityMarksRequest; /** - * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#listSources}. - * @param error Error, if any - * @param [response] ListSourcesResponse + * Creates a plain object from an UpdateSecurityMarksRequest message. Also converts values to other types if specified. + * @param message UpdateSecurityMarksRequest + * @param [options] Conversion options + * @returns Plain object */ - type ListSourcesCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1beta1.ListSourcesResponse) => void; + public static toObject(message: google.cloud.securitycenter.v1.UpdateSecurityMarksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#runAssetDiscovery}. - * @param error Error, if any - * @param [response] Operation + * Converts this UpdateSecurityMarksRequest to JSON. + * @returns JSON object */ - type RunAssetDiscoveryCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public toJSON(): { [k: string]: any }; + } + } - /** - * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#setFindingState}. - * @param error Error, if any - * @param [response] Finding - */ - type SetFindingStateCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1beta1.Finding) => void; + /** Namespace v1beta1. */ + namespace v1beta1 { - /** - * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#setIamPolicy}. - * @param error Error, if any - * @param [response] Policy - */ - type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + /** Properties of a Finding. */ + interface IFinding { - /** - * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#testIamPermissions}. - * @param error Error, if any - * @param [response] TestIamPermissionsResponse - */ - type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; + /** Finding name */ + name?: (string|null); - /** - * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#updateFinding}. - * @param error Error, if any - * @param [response] Finding - */ - type UpdateFindingCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1beta1.Finding) => void; + /** Finding parent */ + parent?: (string|null); - /** - * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#updateOrganizationSettings}. - * @param error Error, if any - * @param [response] OrganizationSettings - */ - type UpdateOrganizationSettingsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1beta1.OrganizationSettings) => void; + /** Finding resourceName */ + resourceName?: (string|null); - /** - * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#updateSource}. - * @param error Error, if any - * @param [response] Source - */ - type UpdateSourceCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1beta1.Source) => void; + /** Finding state */ + state?: (google.cloud.securitycenter.v1beta1.Finding.State|null); - /** - * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#updateSecurityMarks}. - * @param error Error, if any - * @param [response] SecurityMarks - */ - type UpdateSecurityMarksCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1beta1.SecurityMarks) => void; - } + /** Finding category */ + category?: (string|null); - /** Properties of a CreateFindingRequest. */ - interface ICreateFindingRequest { + /** Finding externalUri */ + externalUri?: (string|null); - /** CreateFindingRequest parent */ - parent?: (string|null); + /** Finding sourceProperties */ + sourceProperties?: ({ [k: string]: google.protobuf.IValue }|null); - /** CreateFindingRequest findingId */ - findingId?: (string|null); + /** Finding securityMarks */ + securityMarks?: (google.cloud.securitycenter.v1beta1.ISecurityMarks|null); - /** CreateFindingRequest finding */ - finding?: (google.cloud.securitycenter.v1beta1.IFinding|null); + /** Finding eventTime */ + eventTime?: (google.protobuf.ITimestamp|null); + + /** Finding createTime */ + createTime?: (google.protobuf.ITimestamp|null); } - /** Represents a CreateFindingRequest. */ - class CreateFindingRequest implements ICreateFindingRequest { + /** Represents a Finding. */ + class Finding implements IFinding { /** - * Constructs a new CreateFindingRequest. + * Constructs a new Finding. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1beta1.ICreateFindingRequest); + constructor(properties?: google.cloud.securitycenter.v1beta1.IFinding); - /** CreateFindingRequest parent. */ + /** Finding name. */ + public name: string; + + /** Finding parent. */ public parent: string; - /** CreateFindingRequest findingId. */ - public findingId: string; + /** Finding resourceName. */ + public resourceName: string; - /** CreateFindingRequest finding. */ - public finding?: (google.cloud.securitycenter.v1beta1.IFinding|null); + /** Finding state. */ + public state: google.cloud.securitycenter.v1beta1.Finding.State; + + /** Finding category. */ + public category: string; + + /** Finding externalUri. */ + public externalUri: string; + + /** Finding sourceProperties. */ + public sourceProperties: { [k: string]: google.protobuf.IValue }; + + /** Finding securityMarks. */ + public securityMarks?: (google.cloud.securitycenter.v1beta1.ISecurityMarks|null); + + /** Finding eventTime. */ + public eventTime?: (google.protobuf.ITimestamp|null); + + /** Finding createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new CreateFindingRequest instance using the specified properties. + * Creates a new Finding instance using the specified properties. * @param [properties] Properties to set - * @returns CreateFindingRequest instance + * @returns Finding instance */ - public static create(properties?: google.cloud.securitycenter.v1beta1.ICreateFindingRequest): google.cloud.securitycenter.v1beta1.CreateFindingRequest; + public static create(properties?: google.cloud.securitycenter.v1beta1.IFinding): google.cloud.securitycenter.v1beta1.Finding; /** - * Encodes the specified CreateFindingRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.CreateFindingRequest.verify|verify} messages. - * @param message CreateFindingRequest message or plain object to encode + * Encodes the specified Finding message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.Finding.verify|verify} messages. + * @param message Finding message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1beta1.ICreateFindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1beta1.IFinding, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateFindingRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.CreateFindingRequest.verify|verify} messages. - * @param message CreateFindingRequest message or plain object to encode + * Encodes the specified Finding message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.Finding.verify|verify} messages. + * @param message Finding message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.ICreateFindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IFinding, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateFindingRequest message from the specified reader or buffer. + * Decodes a Finding message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateFindingRequest + * @returns Finding * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.CreateFindingRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.Finding; /** - * Decodes a CreateFindingRequest message from the specified reader or buffer, length delimited. + * Decodes a Finding message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateFindingRequest + * @returns Finding * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.CreateFindingRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.Finding; /** - * Verifies a CreateFindingRequest message. + * Verifies a Finding message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateFindingRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Finding message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateFindingRequest + * @returns Finding */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.CreateFindingRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.Finding; /** - * Creates a plain object from a CreateFindingRequest message. Also converts values to other types if specified. - * @param message CreateFindingRequest + * Creates a plain object from a Finding message. Also converts values to other types if specified. + * @param message Finding * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1beta1.CreateFindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1beta1.Finding, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateFindingRequest to JSON. + * Converts this Finding to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateSourceRequest. */ - interface ICreateSourceRequest { + namespace Finding { - /** CreateSourceRequest parent */ - parent?: (string|null); + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + ACTIVE = 1, + INACTIVE = 2 + } + } - /** CreateSourceRequest source */ - source?: (google.cloud.securitycenter.v1beta1.ISource|null); + /** Properties of a SecurityMarks. */ + interface ISecurityMarks { + + /** SecurityMarks name */ + name?: (string|null); + + /** SecurityMarks marks */ + marks?: ({ [k: string]: string }|null); } - /** Represents a CreateSourceRequest. */ - class CreateSourceRequest implements ICreateSourceRequest { + /** Represents a SecurityMarks. */ + class SecurityMarks implements ISecurityMarks { /** - * Constructs a new CreateSourceRequest. + * Constructs a new SecurityMarks. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1beta1.ICreateSourceRequest); + constructor(properties?: google.cloud.securitycenter.v1beta1.ISecurityMarks); - /** CreateSourceRequest parent. */ - public parent: string; + /** SecurityMarks name. */ + public name: string; - /** CreateSourceRequest source. */ - public source?: (google.cloud.securitycenter.v1beta1.ISource|null); + /** SecurityMarks marks. */ + public marks: { [k: string]: string }; /** - * Creates a new CreateSourceRequest instance using the specified properties. + * Creates a new SecurityMarks instance using the specified properties. * @param [properties] Properties to set - * @returns CreateSourceRequest instance + * @returns SecurityMarks instance */ - public static create(properties?: google.cloud.securitycenter.v1beta1.ICreateSourceRequest): google.cloud.securitycenter.v1beta1.CreateSourceRequest; + public static create(properties?: google.cloud.securitycenter.v1beta1.ISecurityMarks): google.cloud.securitycenter.v1beta1.SecurityMarks; /** - * Encodes the specified CreateSourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.CreateSourceRequest.verify|verify} messages. - * @param message CreateSourceRequest message or plain object to encode + * Encodes the specified SecurityMarks message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.SecurityMarks.verify|verify} messages. + * @param message SecurityMarks message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1beta1.ICreateSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1beta1.ISecurityMarks, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateSourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.CreateSourceRequest.verify|verify} messages. - * @param message CreateSourceRequest message or plain object to encode + * Encodes the specified SecurityMarks message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.SecurityMarks.verify|verify} messages. + * @param message SecurityMarks message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.ICreateSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.ISecurityMarks, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateSourceRequest message from the specified reader or buffer. + * Decodes a SecurityMarks message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateSourceRequest + * @returns SecurityMarks * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.CreateSourceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.SecurityMarks; /** - * Decodes a CreateSourceRequest message from the specified reader or buffer, length delimited. + * Decodes a SecurityMarks message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateSourceRequest + * @returns SecurityMarks * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.CreateSourceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.SecurityMarks; /** - * Verifies a CreateSourceRequest message. + * Verifies a SecurityMarks message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateSourceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SecurityMarks message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateSourceRequest + * @returns SecurityMarks */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.CreateSourceRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.SecurityMarks; /** - * Creates a plain object from a CreateSourceRequest message. Also converts values to other types if specified. - * @param message CreateSourceRequest + * Creates a plain object from a SecurityMarks message. Also converts values to other types if specified. + * @param message SecurityMarks * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1beta1.CreateSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1beta1.SecurityMarks, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateSourceRequest to JSON. + * Converts this SecurityMarks to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetOrganizationSettingsRequest. */ - interface IGetOrganizationSettingsRequest { + /** Properties of an Asset. */ + interface IAsset { - /** GetOrganizationSettingsRequest name */ + /** Asset name */ name?: (string|null); + + /** Asset securityCenterProperties */ + securityCenterProperties?: (google.cloud.securitycenter.v1beta1.Asset.ISecurityCenterProperties|null); + + /** Asset resourceProperties */ + resourceProperties?: ({ [k: string]: google.protobuf.IValue }|null); + + /** Asset securityMarks */ + securityMarks?: (google.cloud.securitycenter.v1beta1.ISecurityMarks|null); + + /** Asset createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Asset updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); } - /** Represents a GetOrganizationSettingsRequest. */ - class GetOrganizationSettingsRequest implements IGetOrganizationSettingsRequest { + /** Represents an Asset. */ + class Asset implements IAsset { /** - * Constructs a new GetOrganizationSettingsRequest. + * Constructs a new Asset. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1beta1.IGetOrganizationSettingsRequest); + constructor(properties?: google.cloud.securitycenter.v1beta1.IAsset); - /** GetOrganizationSettingsRequest name. */ + /** Asset name. */ public name: string; + /** Asset securityCenterProperties. */ + public securityCenterProperties?: (google.cloud.securitycenter.v1beta1.Asset.ISecurityCenterProperties|null); + + /** Asset resourceProperties. */ + public resourceProperties: { [k: string]: google.protobuf.IValue }; + + /** Asset securityMarks. */ + public securityMarks?: (google.cloud.securitycenter.v1beta1.ISecurityMarks|null); + + /** Asset createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Asset updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + /** - * Creates a new GetOrganizationSettingsRequest instance using the specified properties. + * Creates a new Asset instance using the specified properties. * @param [properties] Properties to set - * @returns GetOrganizationSettingsRequest instance + * @returns Asset instance */ - public static create(properties?: google.cloud.securitycenter.v1beta1.IGetOrganizationSettingsRequest): google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest; + public static create(properties?: google.cloud.securitycenter.v1beta1.IAsset): google.cloud.securitycenter.v1beta1.Asset; /** - * Encodes the specified GetOrganizationSettingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest.verify|verify} messages. - * @param message GetOrganizationSettingsRequest message or plain object to encode + * Encodes the specified Asset message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.Asset.verify|verify} messages. + * @param message Asset message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1beta1.IGetOrganizationSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1beta1.IAsset, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetOrganizationSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest.verify|verify} messages. - * @param message GetOrganizationSettingsRequest message or plain object to encode + * Encodes the specified Asset message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.Asset.verify|verify} messages. + * @param message Asset message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IGetOrganizationSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IAsset, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetOrganizationSettingsRequest message from the specified reader or buffer. + * Decodes an Asset message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetOrganizationSettingsRequest + * @returns Asset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.Asset; /** - * Decodes a GetOrganizationSettingsRequest message from the specified reader or buffer, length delimited. + * Decodes an Asset message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetOrganizationSettingsRequest + * @returns Asset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.Asset; /** - * Verifies a GetOrganizationSettingsRequest message. + * Verifies an Asset message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetOrganizationSettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an Asset message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetOrganizationSettingsRequest + * @returns Asset */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.Asset; /** - * Creates a plain object from a GetOrganizationSettingsRequest message. Also converts values to other types if specified. - * @param message GetOrganizationSettingsRequest + * Creates a plain object from an Asset message. Also converts values to other types if specified. + * @param message Asset * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1beta1.Asset, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetOrganizationSettingsRequest to JSON. + * Converts this Asset to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetSourceRequest. */ - interface IGetSourceRequest { + namespace Asset { - /** GetSourceRequest name */ + /** Properties of a SecurityCenterProperties. */ + interface ISecurityCenterProperties { + + /** SecurityCenterProperties resourceName */ + resourceName?: (string|null); + + /** SecurityCenterProperties resourceType */ + resourceType?: (string|null); + + /** SecurityCenterProperties resourceParent */ + resourceParent?: (string|null); + + /** SecurityCenterProperties resourceProject */ + resourceProject?: (string|null); + + /** SecurityCenterProperties resourceOwners */ + resourceOwners?: (string[]|null); + } + + /** Represents a SecurityCenterProperties. */ + class SecurityCenterProperties implements ISecurityCenterProperties { + + /** + * Constructs a new SecurityCenterProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1beta1.Asset.ISecurityCenterProperties); + + /** SecurityCenterProperties resourceName. */ + public resourceName: string; + + /** SecurityCenterProperties resourceType. */ + public resourceType: string; + + /** SecurityCenterProperties resourceParent. */ + public resourceParent: string; + + /** SecurityCenterProperties resourceProject. */ + public resourceProject: string; + + /** SecurityCenterProperties resourceOwners. */ + public resourceOwners: string[]; + + /** + * Creates a new SecurityCenterProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns SecurityCenterProperties instance + */ + public static create(properties?: google.cloud.securitycenter.v1beta1.Asset.ISecurityCenterProperties): google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties; + + /** + * Encodes the specified SecurityCenterProperties message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties.verify|verify} messages. + * @param message SecurityCenterProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1beta1.Asset.ISecurityCenterProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SecurityCenterProperties message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties.verify|verify} messages. + * @param message SecurityCenterProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.Asset.ISecurityCenterProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SecurityCenterProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SecurityCenterProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties; + + /** + * Decodes a SecurityCenterProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SecurityCenterProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties; + + /** + * Verifies a SecurityCenterProperties message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SecurityCenterProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SecurityCenterProperties + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties; + + /** + * Creates a plain object from a SecurityCenterProperties message. Also converts values to other types if specified. + * @param message SecurityCenterProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SecurityCenterProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a Source. */ + interface ISource { + + /** Source name */ name?: (string|null); + + /** Source displayName */ + displayName?: (string|null); + + /** Source description */ + description?: (string|null); } - /** Represents a GetSourceRequest. */ - class GetSourceRequest implements IGetSourceRequest { + /** Represents a Source. */ + class Source implements ISource { /** - * Constructs a new GetSourceRequest. + * Constructs a new Source. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1beta1.IGetSourceRequest); + constructor(properties?: google.cloud.securitycenter.v1beta1.ISource); - /** GetSourceRequest name. */ + /** Source name. */ public name: string; + /** Source displayName. */ + public displayName: string; + + /** Source description. */ + public description: string; + /** - * Creates a new GetSourceRequest instance using the specified properties. + * Creates a new Source instance using the specified properties. * @param [properties] Properties to set - * @returns GetSourceRequest instance + * @returns Source instance */ - public static create(properties?: google.cloud.securitycenter.v1beta1.IGetSourceRequest): google.cloud.securitycenter.v1beta1.GetSourceRequest; + public static create(properties?: google.cloud.securitycenter.v1beta1.ISource): google.cloud.securitycenter.v1beta1.Source; /** - * Encodes the specified GetSourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GetSourceRequest.verify|verify} messages. - * @param message GetSourceRequest message or plain object to encode + * Encodes the specified Source message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.Source.verify|verify} messages. + * @param message Source message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1beta1.IGetSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1beta1.ISource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetSourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GetSourceRequest.verify|verify} messages. - * @param message GetSourceRequest message or plain object to encode + * Encodes the specified Source message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.Source.verify|verify} messages. + * @param message Source message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IGetSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.ISource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetSourceRequest message from the specified reader or buffer. + * Decodes a Source message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetSourceRequest + * @returns Source * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.GetSourceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.Source; /** - * Decodes a GetSourceRequest message from the specified reader or buffer, length delimited. + * Decodes a Source message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetSourceRequest + * @returns Source * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.GetSourceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.Source; /** - * Verifies a GetSourceRequest message. + * Verifies a Source message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetSourceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Source message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetSourceRequest + * @returns Source */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.GetSourceRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.Source; /** - * Creates a plain object from a GetSourceRequest message. Also converts values to other types if specified. - * @param message GetSourceRequest + * Creates a plain object from a Source message. Also converts values to other types if specified. + * @param message Source * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1beta1.GetSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1beta1.Source, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetSourceRequest to JSON. + * Converts this Source to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GroupAssetsRequest. */ - interface IGroupAssetsRequest { - - /** GroupAssetsRequest parent */ - parent?: (string|null); - - /** GroupAssetsRequest filter */ - filter?: (string|null); - - /** GroupAssetsRequest groupBy */ - groupBy?: (string|null); - - /** GroupAssetsRequest compareDuration */ - compareDuration?: (google.protobuf.IDuration|null); - - /** GroupAssetsRequest readTime */ - readTime?: (google.protobuf.ITimestamp|null); + /** Properties of a RunAssetDiscoveryResponse. */ + interface IRunAssetDiscoveryResponse { - /** GroupAssetsRequest pageToken */ - pageToken?: (string|null); + /** RunAssetDiscoveryResponse state */ + state?: (google.cloud.securitycenter.v1beta1.RunAssetDiscoveryResponse.State|null); - /** GroupAssetsRequest pageSize */ - pageSize?: (number|null); + /** RunAssetDiscoveryResponse duration */ + duration?: (google.protobuf.IDuration|null); } - /** Represents a GroupAssetsRequest. */ - class GroupAssetsRequest implements IGroupAssetsRequest { + /** Represents a RunAssetDiscoveryResponse. */ + class RunAssetDiscoveryResponse implements IRunAssetDiscoveryResponse { /** - * Constructs a new GroupAssetsRequest. + * Constructs a new RunAssetDiscoveryResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1beta1.IGroupAssetsRequest); - - /** GroupAssetsRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.securitycenter.v1beta1.IRunAssetDiscoveryResponse); - /** GroupAssetsRequest filter. */ - public filter: string; - - /** GroupAssetsRequest groupBy. */ - public groupBy: string; - - /** GroupAssetsRequest compareDuration. */ - public compareDuration?: (google.protobuf.IDuration|null); - - /** GroupAssetsRequest readTime. */ - public readTime?: (google.protobuf.ITimestamp|null); - - /** GroupAssetsRequest pageToken. */ - public pageToken: string; + /** RunAssetDiscoveryResponse state. */ + public state: google.cloud.securitycenter.v1beta1.RunAssetDiscoveryResponse.State; - /** GroupAssetsRequest pageSize. */ - public pageSize: number; + /** RunAssetDiscoveryResponse duration. */ + public duration?: (google.protobuf.IDuration|null); /** - * Creates a new GroupAssetsRequest instance using the specified properties. + * Creates a new RunAssetDiscoveryResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GroupAssetsRequest instance + * @returns RunAssetDiscoveryResponse instance */ - public static create(properties?: google.cloud.securitycenter.v1beta1.IGroupAssetsRequest): google.cloud.securitycenter.v1beta1.GroupAssetsRequest; + public static create(properties?: google.cloud.securitycenter.v1beta1.IRunAssetDiscoveryResponse): google.cloud.securitycenter.v1beta1.RunAssetDiscoveryResponse; /** - * Encodes the specified GroupAssetsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupAssetsRequest.verify|verify} messages. - * @param message GroupAssetsRequest message or plain object to encode + * Encodes the specified RunAssetDiscoveryResponse message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.RunAssetDiscoveryResponse.verify|verify} messages. + * @param message RunAssetDiscoveryResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1beta1.IGroupAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1beta1.IRunAssetDiscoveryResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GroupAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupAssetsRequest.verify|verify} messages. - * @param message GroupAssetsRequest message or plain object to encode + * Encodes the specified RunAssetDiscoveryResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.RunAssetDiscoveryResponse.verify|verify} messages. + * @param message RunAssetDiscoveryResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IGroupAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IRunAssetDiscoveryResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GroupAssetsRequest message from the specified reader or buffer. + * Decodes a RunAssetDiscoveryResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GroupAssetsRequest + * @returns RunAssetDiscoveryResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.GroupAssetsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.RunAssetDiscoveryResponse; /** - * Decodes a GroupAssetsRequest message from the specified reader or buffer, length delimited. + * Decodes a RunAssetDiscoveryResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GroupAssetsRequest + * @returns RunAssetDiscoveryResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.GroupAssetsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.RunAssetDiscoveryResponse; /** - * Verifies a GroupAssetsRequest message. + * Verifies a RunAssetDiscoveryResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GroupAssetsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RunAssetDiscoveryResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GroupAssetsRequest + * @returns RunAssetDiscoveryResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.GroupAssetsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.RunAssetDiscoveryResponse; /** - * Creates a plain object from a GroupAssetsRequest message. Also converts values to other types if specified. - * @param message GroupAssetsRequest + * Creates a plain object from a RunAssetDiscoveryResponse message. Also converts values to other types if specified. + * @param message RunAssetDiscoveryResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1beta1.GroupAssetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1beta1.RunAssetDiscoveryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GroupAssetsRequest to JSON. + * Converts this RunAssetDiscoveryResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GroupAssetsResponse. */ - interface IGroupAssetsResponse { + namespace RunAssetDiscoveryResponse { - /** GroupAssetsResponse groupByResults */ - groupByResults?: (google.cloud.securitycenter.v1beta1.IGroupResult[]|null); + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + COMPLETED = 1, + SUPERSEDED = 2, + TERMINATED = 3 + } + } - /** GroupAssetsResponse readTime */ - readTime?: (google.protobuf.ITimestamp|null); + /** Properties of an OrganizationSettings. */ + interface IOrganizationSettings { - /** GroupAssetsResponse nextPageToken */ - nextPageToken?: (string|null); + /** OrganizationSettings name */ + name?: (string|null); + + /** OrganizationSettings enableAssetDiscovery */ + enableAssetDiscovery?: (boolean|null); + + /** OrganizationSettings assetDiscoveryConfig */ + assetDiscoveryConfig?: (google.cloud.securitycenter.v1beta1.OrganizationSettings.IAssetDiscoveryConfig|null); } - /** Represents a GroupAssetsResponse. */ - class GroupAssetsResponse implements IGroupAssetsResponse { + /** Represents an OrganizationSettings. */ + class OrganizationSettings implements IOrganizationSettings { /** - * Constructs a new GroupAssetsResponse. + * Constructs a new OrganizationSettings. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1beta1.IGroupAssetsResponse); + constructor(properties?: google.cloud.securitycenter.v1beta1.IOrganizationSettings); - /** GroupAssetsResponse groupByResults. */ - public groupByResults: google.cloud.securitycenter.v1beta1.IGroupResult[]; + /** OrganizationSettings name. */ + public name: string; - /** GroupAssetsResponse readTime. */ - public readTime?: (google.protobuf.ITimestamp|null); + /** OrganizationSettings enableAssetDiscovery. */ + public enableAssetDiscovery: boolean; - /** GroupAssetsResponse nextPageToken. */ - public nextPageToken: string; + /** OrganizationSettings assetDiscoveryConfig. */ + public assetDiscoveryConfig?: (google.cloud.securitycenter.v1beta1.OrganizationSettings.IAssetDiscoveryConfig|null); /** - * Creates a new GroupAssetsResponse instance using the specified properties. + * Creates a new OrganizationSettings instance using the specified properties. * @param [properties] Properties to set - * @returns GroupAssetsResponse instance + * @returns OrganizationSettings instance */ - public static create(properties?: google.cloud.securitycenter.v1beta1.IGroupAssetsResponse): google.cloud.securitycenter.v1beta1.GroupAssetsResponse; + public static create(properties?: google.cloud.securitycenter.v1beta1.IOrganizationSettings): google.cloud.securitycenter.v1beta1.OrganizationSettings; /** - * Encodes the specified GroupAssetsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupAssetsResponse.verify|verify} messages. - * @param message GroupAssetsResponse message or plain object to encode + * Encodes the specified OrganizationSettings message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.OrganizationSettings.verify|verify} messages. + * @param message OrganizationSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1beta1.IGroupAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1beta1.IOrganizationSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GroupAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupAssetsResponse.verify|verify} messages. - * @param message GroupAssetsResponse message or plain object to encode + * Encodes the specified OrganizationSettings message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.OrganizationSettings.verify|verify} messages. + * @param message OrganizationSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IGroupAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IOrganizationSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GroupAssetsResponse message from the specified reader or buffer. + * Decodes an OrganizationSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GroupAssetsResponse + * @returns OrganizationSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.GroupAssetsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.OrganizationSettings; /** - * Decodes a GroupAssetsResponse message from the specified reader or buffer, length delimited. + * Decodes an OrganizationSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GroupAssetsResponse + * @returns OrganizationSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.GroupAssetsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.OrganizationSettings; /** - * Verifies a GroupAssetsResponse message. + * Verifies an OrganizationSettings message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GroupAssetsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an OrganizationSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GroupAssetsResponse + * @returns OrganizationSettings */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.GroupAssetsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.OrganizationSettings; /** - * Creates a plain object from a GroupAssetsResponse message. Also converts values to other types if specified. - * @param message GroupAssetsResponse + * Creates a plain object from an OrganizationSettings message. Also converts values to other types if specified. + * @param message OrganizationSettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1beta1.GroupAssetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1beta1.OrganizationSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GroupAssetsResponse to JSON. + * Converts this OrganizationSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GroupFindingsRequest. */ - interface IGroupFindingsRequest { + namespace OrganizationSettings { - /** GroupFindingsRequest parent */ - parent?: (string|null); + /** Properties of an AssetDiscoveryConfig. */ + interface IAssetDiscoveryConfig { - /** GroupFindingsRequest filter */ - filter?: (string|null); + /** AssetDiscoveryConfig projectIds */ + projectIds?: (string[]|null); - /** GroupFindingsRequest groupBy */ - groupBy?: (string|null); + /** AssetDiscoveryConfig inclusionMode */ + inclusionMode?: (google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode|null); + } - /** GroupFindingsRequest readTime */ - readTime?: (google.protobuf.ITimestamp|null); + /** Represents an AssetDiscoveryConfig. */ + class AssetDiscoveryConfig implements IAssetDiscoveryConfig { - /** GroupFindingsRequest pageToken */ - pageToken?: (string|null); + /** + * Constructs a new AssetDiscoveryConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1beta1.OrganizationSettings.IAssetDiscoveryConfig); - /** GroupFindingsRequest pageSize */ - pageSize?: (number|null); - } + /** AssetDiscoveryConfig projectIds. */ + public projectIds: string[]; - /** Represents a GroupFindingsRequest. */ - class GroupFindingsRequest implements IGroupFindingsRequest { + /** AssetDiscoveryConfig inclusionMode. */ + public inclusionMode: google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode; - /** - * Constructs a new GroupFindingsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1beta1.IGroupFindingsRequest); + /** + * Creates a new AssetDiscoveryConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AssetDiscoveryConfig instance + */ + public static create(properties?: google.cloud.securitycenter.v1beta1.OrganizationSettings.IAssetDiscoveryConfig): google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig; - /** GroupFindingsRequest parent. */ - public parent: string; + /** + * Encodes the specified AssetDiscoveryConfig message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig.verify|verify} messages. + * @param message AssetDiscoveryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1beta1.OrganizationSettings.IAssetDiscoveryConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** GroupFindingsRequest filter. */ - public filter: string; + /** + * Encodes the specified AssetDiscoveryConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig.verify|verify} messages. + * @param message AssetDiscoveryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.OrganizationSettings.IAssetDiscoveryConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** GroupFindingsRequest groupBy. */ - public groupBy: string; + /** + * Decodes an AssetDiscoveryConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AssetDiscoveryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig; - /** GroupFindingsRequest readTime. */ - public readTime?: (google.protobuf.ITimestamp|null); + /** + * Decodes an AssetDiscoveryConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AssetDiscoveryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig; - /** GroupFindingsRequest pageToken. */ - public pageToken: string; + /** + * Verifies an AssetDiscoveryConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** GroupFindingsRequest pageSize. */ - public pageSize: number; + /** + * Creates an AssetDiscoveryConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AssetDiscoveryConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig; - /** - * Creates a new GroupFindingsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GroupFindingsRequest instance - */ - public static create(properties?: google.cloud.securitycenter.v1beta1.IGroupFindingsRequest): google.cloud.securitycenter.v1beta1.GroupFindingsRequest; + /** + * Creates a plain object from an AssetDiscoveryConfig message. Also converts values to other types if specified. + * @param message AssetDiscoveryConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified GroupFindingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupFindingsRequest.verify|verify} messages. - * @param message GroupFindingsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1beta1.IGroupFindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this AssetDiscoveryConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Encodes the specified GroupFindingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupFindingsRequest.verify|verify} messages. - * @param message GroupFindingsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IGroupFindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + namespace AssetDiscoveryConfig { - /** - * Decodes a GroupFindingsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GroupFindingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.GroupFindingsRequest; + /** InclusionMode enum. */ + enum InclusionMode { + INCLUSION_MODE_UNSPECIFIED = 0, + INCLUDE_ONLY = 1, + EXCLUDE = 2 + } + } + } + + /** Represents a SecurityCenter */ + class SecurityCenter extends $protobuf.rpc.Service { /** - * Decodes a GroupFindingsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GroupFindingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Constructs a new SecurityCenter service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.GroupFindingsRequest; + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Verifies a GroupFindingsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Creates new SecurityCenter service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. */ - public static verify(message: { [k: string]: any }): (string|null); + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): SecurityCenter; /** - * Creates a GroupFindingsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GroupFindingsRequest + * Calls CreateSource. + * @param request CreateSourceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Source */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.GroupFindingsRequest; + public createSource(request: google.cloud.securitycenter.v1beta1.ICreateSourceRequest, callback: google.cloud.securitycenter.v1beta1.SecurityCenter.CreateSourceCallback): void; /** - * Creates a plain object from a GroupFindingsRequest message. Also converts values to other types if specified. - * @param message GroupFindingsRequest - * @param [options] Conversion options - * @returns Plain object + * Calls CreateSource. + * @param request CreateSourceRequest message or plain object + * @returns Promise */ - public static toObject(message: google.cloud.securitycenter.v1beta1.GroupFindingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public createSource(request: google.cloud.securitycenter.v1beta1.ICreateSourceRequest): Promise; /** - * Converts this GroupFindingsRequest to JSON. - * @returns JSON object + * Calls CreateFinding. + * @param request CreateFindingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Finding */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GroupFindingsResponse. */ - interface IGroupFindingsResponse { - - /** GroupFindingsResponse groupByResults */ - groupByResults?: (google.cloud.securitycenter.v1beta1.IGroupResult[]|null); - - /** GroupFindingsResponse readTime */ - readTime?: (google.protobuf.ITimestamp|null); - - /** GroupFindingsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a GroupFindingsResponse. */ - class GroupFindingsResponse implements IGroupFindingsResponse { + public createFinding(request: google.cloud.securitycenter.v1beta1.ICreateFindingRequest, callback: google.cloud.securitycenter.v1beta1.SecurityCenter.CreateFindingCallback): void; /** - * Constructs a new GroupFindingsResponse. - * @param [properties] Properties to set + * Calls CreateFinding. + * @param request CreateFindingRequest message or plain object + * @returns Promise */ - constructor(properties?: google.cloud.securitycenter.v1beta1.IGroupFindingsResponse); - - /** GroupFindingsResponse groupByResults. */ - public groupByResults: google.cloud.securitycenter.v1beta1.IGroupResult[]; - - /** GroupFindingsResponse readTime. */ - public readTime?: (google.protobuf.ITimestamp|null); - - /** GroupFindingsResponse nextPageToken. */ - public nextPageToken: string; + public createFinding(request: google.cloud.securitycenter.v1beta1.ICreateFindingRequest): Promise; /** - * Creates a new GroupFindingsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GroupFindingsResponse instance + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy */ - public static create(properties?: google.cloud.securitycenter.v1beta1.IGroupFindingsResponse): google.cloud.securitycenter.v1beta1.GroupFindingsResponse; + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.cloud.securitycenter.v1beta1.SecurityCenter.GetIamPolicyCallback): void; /** - * Encodes the specified GroupFindingsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupFindingsResponse.verify|verify} messages. - * @param message GroupFindingsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @returns Promise */ - public static encode(message: google.cloud.securitycenter.v1beta1.IGroupFindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; /** - * Encodes the specified GroupFindingsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupFindingsResponse.verify|verify} messages. - * @param message GroupFindingsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetOrganizationSettings. + * @param request GetOrganizationSettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and OrganizationSettings */ - public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IGroupFindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public getOrganizationSettings(request: google.cloud.securitycenter.v1beta1.IGetOrganizationSettingsRequest, callback: google.cloud.securitycenter.v1beta1.SecurityCenter.GetOrganizationSettingsCallback): void; /** - * Decodes a GroupFindingsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GroupFindingsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetOrganizationSettings. + * @param request GetOrganizationSettingsRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.GroupFindingsResponse; + public getOrganizationSettings(request: google.cloud.securitycenter.v1beta1.IGetOrganizationSettingsRequest): Promise; /** - * Decodes a GroupFindingsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GroupFindingsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetSource. + * @param request GetSourceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Source */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.GroupFindingsResponse; + public getSource(request: google.cloud.securitycenter.v1beta1.IGetSourceRequest, callback: google.cloud.securitycenter.v1beta1.SecurityCenter.GetSourceCallback): void; /** - * Verifies a GroupFindingsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls GetSource. + * @param request GetSourceRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public getSource(request: google.cloud.securitycenter.v1beta1.IGetSourceRequest): Promise; /** - * Creates a GroupFindingsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GroupFindingsResponse + * Calls GroupAssets. + * @param request GroupAssetsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GroupAssetsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.GroupFindingsResponse; + public groupAssets(request: google.cloud.securitycenter.v1beta1.IGroupAssetsRequest, callback: google.cloud.securitycenter.v1beta1.SecurityCenter.GroupAssetsCallback): void; /** - * Creates a plain object from a GroupFindingsResponse message. Also converts values to other types if specified. - * @param message GroupFindingsResponse - * @param [options] Conversion options - * @returns Plain object + * Calls GroupAssets. + * @param request GroupAssetsRequest message or plain object + * @returns Promise */ - public static toObject(message: google.cloud.securitycenter.v1beta1.GroupFindingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public groupAssets(request: google.cloud.securitycenter.v1beta1.IGroupAssetsRequest): Promise; /** - * Converts this GroupFindingsResponse to JSON. - * @returns JSON object + * Calls GroupFindings. + * @param request GroupFindingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GroupFindingsResponse */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GroupResult. */ - interface IGroupResult { - - /** GroupResult properties */ - properties?: ({ [k: string]: google.protobuf.IValue }|null); - - /** GroupResult count */ - count?: (number|Long|null); - } - - /** Represents a GroupResult. */ - class GroupResult implements IGroupResult { + public groupFindings(request: google.cloud.securitycenter.v1beta1.IGroupFindingsRequest, callback: google.cloud.securitycenter.v1beta1.SecurityCenter.GroupFindingsCallback): void; /** - * Constructs a new GroupResult. - * @param [properties] Properties to set + * Calls GroupFindings. + * @param request GroupFindingsRequest message or plain object + * @returns Promise */ - constructor(properties?: google.cloud.securitycenter.v1beta1.IGroupResult); - - /** GroupResult properties. */ - public properties: { [k: string]: google.protobuf.IValue }; - - /** GroupResult count. */ - public count: (number|Long); + public groupFindings(request: google.cloud.securitycenter.v1beta1.IGroupFindingsRequest): Promise; /** - * Creates a new GroupResult instance using the specified properties. - * @param [properties] Properties to set - * @returns GroupResult instance + * Calls ListAssets. + * @param request ListAssetsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAssetsResponse */ - public static create(properties?: google.cloud.securitycenter.v1beta1.IGroupResult): google.cloud.securitycenter.v1beta1.GroupResult; + public listAssets(request: google.cloud.securitycenter.v1beta1.IListAssetsRequest, callback: google.cloud.securitycenter.v1beta1.SecurityCenter.ListAssetsCallback): void; /** - * Encodes the specified GroupResult message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupResult.verify|verify} messages. - * @param message GroupResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListAssets. + * @param request ListAssetsRequest message or plain object + * @returns Promise */ - public static encode(message: google.cloud.securitycenter.v1beta1.IGroupResult, writer?: $protobuf.Writer): $protobuf.Writer; + public listAssets(request: google.cloud.securitycenter.v1beta1.IListAssetsRequest): Promise; /** - * Encodes the specified GroupResult message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupResult.verify|verify} messages. - * @param message GroupResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListFindings. + * @param request ListFindingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListFindingsResponse */ - public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IGroupResult, writer?: $protobuf.Writer): $protobuf.Writer; + public listFindings(request: google.cloud.securitycenter.v1beta1.IListFindingsRequest, callback: google.cloud.securitycenter.v1beta1.SecurityCenter.ListFindingsCallback): void; /** - * Decodes a GroupResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GroupResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListFindings. + * @param request ListFindingsRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.GroupResult; + public listFindings(request: google.cloud.securitycenter.v1beta1.IListFindingsRequest): Promise; /** - * Decodes a GroupResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GroupResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListSources. + * @param request ListSourcesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListSourcesResponse */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.GroupResult; + public listSources(request: google.cloud.securitycenter.v1beta1.IListSourcesRequest, callback: google.cloud.securitycenter.v1beta1.SecurityCenter.ListSourcesCallback): void; /** - * Verifies a GroupResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls ListSources. + * @param request ListSourcesRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public listSources(request: google.cloud.securitycenter.v1beta1.IListSourcesRequest): Promise; /** - * Creates a GroupResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GroupResult + * Calls RunAssetDiscovery. + * @param request RunAssetDiscoveryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.GroupResult; + public runAssetDiscovery(request: google.cloud.securitycenter.v1beta1.IRunAssetDiscoveryRequest, callback: google.cloud.securitycenter.v1beta1.SecurityCenter.RunAssetDiscoveryCallback): void; /** - * Creates a plain object from a GroupResult message. Also converts values to other types if specified. - * @param message GroupResult - * @param [options] Conversion options - * @returns Plain object + * Calls RunAssetDiscovery. + * @param request RunAssetDiscoveryRequest message or plain object + * @returns Promise */ - public static toObject(message: google.cloud.securitycenter.v1beta1.GroupResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public runAssetDiscovery(request: google.cloud.securitycenter.v1beta1.IRunAssetDiscoveryRequest): Promise; /** - * Converts this GroupResult to JSON. - * @returns JSON object + * Calls SetFindingState. + * @param request SetFindingStateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Finding */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ListSourcesRequest. */ - interface IListSourcesRequest { - - /** ListSourcesRequest parent */ - parent?: (string|null); - - /** ListSourcesRequest pageToken */ - pageToken?: (string|null); - - /** ListSourcesRequest pageSize */ - pageSize?: (number|null); - } - - /** Represents a ListSourcesRequest. */ - class ListSourcesRequest implements IListSourcesRequest { + public setFindingState(request: google.cloud.securitycenter.v1beta1.ISetFindingStateRequest, callback: google.cloud.securitycenter.v1beta1.SecurityCenter.SetFindingStateCallback): void; /** - * Constructs a new ListSourcesRequest. - * @param [properties] Properties to set + * Calls SetFindingState. + * @param request SetFindingStateRequest message or plain object + * @returns Promise */ - constructor(properties?: google.cloud.securitycenter.v1beta1.IListSourcesRequest); - - /** ListSourcesRequest parent. */ - public parent: string; - - /** ListSourcesRequest pageToken. */ - public pageToken: string; - - /** ListSourcesRequest pageSize. */ - public pageSize: number; + public setFindingState(request: google.cloud.securitycenter.v1beta1.ISetFindingStateRequest): Promise; /** - * Creates a new ListSourcesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListSourcesRequest instance + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy */ - public static create(properties?: google.cloud.securitycenter.v1beta1.IListSourcesRequest): google.cloud.securitycenter.v1beta1.ListSourcesRequest; + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.cloud.securitycenter.v1beta1.SecurityCenter.SetIamPolicyCallback): void; /** - * Encodes the specified ListSourcesRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListSourcesRequest.verify|verify} messages. - * @param message ListSourcesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @returns Promise */ - public static encode(message: google.cloud.securitycenter.v1beta1.IListSourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; /** - * Encodes the specified ListSourcesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListSourcesRequest.verify|verify} messages. - * @param message ListSourcesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse */ - public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IListSourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.cloud.securitycenter.v1beta1.SecurityCenter.TestIamPermissionsCallback): void; /** - * Decodes a ListSourcesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListSourcesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.ListSourcesRequest; + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; /** - * Decodes a ListSourcesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListSourcesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdateFinding. + * @param request UpdateFindingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Finding */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.ListSourcesRequest; + public updateFinding(request: google.cloud.securitycenter.v1beta1.IUpdateFindingRequest, callback: google.cloud.securitycenter.v1beta1.SecurityCenter.UpdateFindingCallback): void; /** - * Verifies a ListSourcesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls UpdateFinding. + * @param request UpdateFindingRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public updateFinding(request: google.cloud.securitycenter.v1beta1.IUpdateFindingRequest): Promise; /** - * Creates a ListSourcesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListSourcesRequest + * Calls UpdateOrganizationSettings. + * @param request UpdateOrganizationSettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and OrganizationSettings */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.ListSourcesRequest; + public updateOrganizationSettings(request: google.cloud.securitycenter.v1beta1.IUpdateOrganizationSettingsRequest, callback: google.cloud.securitycenter.v1beta1.SecurityCenter.UpdateOrganizationSettingsCallback): void; /** - * Creates a plain object from a ListSourcesRequest message. Also converts values to other types if specified. - * @param message ListSourcesRequest - * @param [options] Conversion options - * @returns Plain object + * Calls UpdateOrganizationSettings. + * @param request UpdateOrganizationSettingsRequest message or plain object + * @returns Promise */ - public static toObject(message: google.cloud.securitycenter.v1beta1.ListSourcesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public updateOrganizationSettings(request: google.cloud.securitycenter.v1beta1.IUpdateOrganizationSettingsRequest): Promise; /** - * Converts this ListSourcesRequest to JSON. - * @returns JSON object + * Calls UpdateSource. + * @param request UpdateSourceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Source */ - public toJSON(): { [k: string]: any }; - } + public updateSource(request: google.cloud.securitycenter.v1beta1.IUpdateSourceRequest, callback: google.cloud.securitycenter.v1beta1.SecurityCenter.UpdateSourceCallback): void; - /** Properties of a ListSourcesResponse. */ - interface IListSourcesResponse { + /** + * Calls UpdateSource. + * @param request UpdateSourceRequest message or plain object + * @returns Promise + */ + public updateSource(request: google.cloud.securitycenter.v1beta1.IUpdateSourceRequest): Promise; - /** ListSourcesResponse sources */ - sources?: (google.cloud.securitycenter.v1beta1.ISource[]|null); + /** + * Calls UpdateSecurityMarks. + * @param request UpdateSecurityMarksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SecurityMarks + */ + public updateSecurityMarks(request: google.cloud.securitycenter.v1beta1.IUpdateSecurityMarksRequest, callback: google.cloud.securitycenter.v1beta1.SecurityCenter.UpdateSecurityMarksCallback): void; - /** ListSourcesResponse nextPageToken */ - nextPageToken?: (string|null); + /** + * Calls UpdateSecurityMarks. + * @param request UpdateSecurityMarksRequest message or plain object + * @returns Promise + */ + public updateSecurityMarks(request: google.cloud.securitycenter.v1beta1.IUpdateSecurityMarksRequest): Promise; } - /** Represents a ListSourcesResponse. */ - class ListSourcesResponse implements IListSourcesResponse { + namespace SecurityCenter { /** - * Constructs a new ListSourcesResponse. - * @param [properties] Properties to set + * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#createSource}. + * @param error Error, if any + * @param [response] Source */ - constructor(properties?: google.cloud.securitycenter.v1beta1.IListSourcesResponse); - - /** ListSourcesResponse sources. */ - public sources: google.cloud.securitycenter.v1beta1.ISource[]; - - /** ListSourcesResponse nextPageToken. */ - public nextPageToken: string; + type CreateSourceCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1beta1.Source) => void; /** - * Creates a new ListSourcesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListSourcesResponse instance + * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#createFinding}. + * @param error Error, if any + * @param [response] Finding */ - public static create(properties?: google.cloud.securitycenter.v1beta1.IListSourcesResponse): google.cloud.securitycenter.v1beta1.ListSourcesResponse; + type CreateFindingCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1beta1.Finding) => void; /** - * Encodes the specified ListSourcesResponse message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListSourcesResponse.verify|verify} messages. - * @param message ListSourcesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#getIamPolicy}. + * @param error Error, if any + * @param [response] Policy */ - public static encode(message: google.cloud.securitycenter.v1beta1.IListSourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; /** - * Encodes the specified ListSourcesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListSourcesResponse.verify|verify} messages. - * @param message ListSourcesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#getOrganizationSettings}. + * @param error Error, if any + * @param [response] OrganizationSettings */ - public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IListSourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + type GetOrganizationSettingsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1beta1.OrganizationSettings) => void; /** - * Decodes a ListSourcesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListSourcesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#getSource}. + * @param error Error, if any + * @param [response] Source */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.ListSourcesResponse; + type GetSourceCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1beta1.Source) => void; /** - * Decodes a ListSourcesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListSourcesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#groupAssets}. + * @param error Error, if any + * @param [response] GroupAssetsResponse */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.ListSourcesResponse; + type GroupAssetsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1beta1.GroupAssetsResponse) => void; /** - * Verifies a ListSourcesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#groupFindings}. + * @param error Error, if any + * @param [response] GroupFindingsResponse */ - public static verify(message: { [k: string]: any }): (string|null); + type GroupFindingsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1beta1.GroupFindingsResponse) => void; /** - * Creates a ListSourcesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListSourcesResponse + * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#listAssets}. + * @param error Error, if any + * @param [response] ListAssetsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.ListSourcesResponse; + type ListAssetsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1beta1.ListAssetsResponse) => void; /** - * Creates a plain object from a ListSourcesResponse message. Also converts values to other types if specified. - * @param message ListSourcesResponse - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#listFindings}. + * @param error Error, if any + * @param [response] ListFindingsResponse */ - public static toObject(message: google.cloud.securitycenter.v1beta1.ListSourcesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type ListFindingsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1beta1.ListFindingsResponse) => void; /** - * Converts this ListSourcesResponse to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#listSources}. + * @param error Error, if any + * @param [response] ListSourcesResponse */ - public toJSON(): { [k: string]: any }; - } + type ListSourcesCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1beta1.ListSourcesResponse) => void; - /** Properties of a ListAssetsRequest. */ - interface IListAssetsRequest { + /** + * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#runAssetDiscovery}. + * @param error Error, if any + * @param [response] Operation + */ + type RunAssetDiscoveryCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** ListAssetsRequest parent */ - parent?: (string|null); + /** + * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#setFindingState}. + * @param error Error, if any + * @param [response] Finding + */ + type SetFindingStateCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1beta1.Finding) => void; - /** ListAssetsRequest filter */ - filter?: (string|null); + /** + * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#setIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; - /** ListAssetsRequest orderBy */ - orderBy?: (string|null); + /** + * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#testIamPermissions}. + * @param error Error, if any + * @param [response] TestIamPermissionsResponse + */ + type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; - /** ListAssetsRequest readTime */ - readTime?: (google.protobuf.ITimestamp|null); + /** + * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#updateFinding}. + * @param error Error, if any + * @param [response] Finding + */ + type UpdateFindingCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1beta1.Finding) => void; - /** ListAssetsRequest compareDuration */ - compareDuration?: (google.protobuf.IDuration|null); + /** + * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#updateOrganizationSettings}. + * @param error Error, if any + * @param [response] OrganizationSettings + */ + type UpdateOrganizationSettingsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1beta1.OrganizationSettings) => void; - /** ListAssetsRequest fieldMask */ - fieldMask?: (google.protobuf.IFieldMask|null); + /** + * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#updateSource}. + * @param error Error, if any + * @param [response] Source + */ + type UpdateSourceCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1beta1.Source) => void; - /** ListAssetsRequest pageToken */ - pageToken?: (string|null); + /** + * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#updateSecurityMarks}. + * @param error Error, if any + * @param [response] SecurityMarks + */ + type UpdateSecurityMarksCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1beta1.SecurityMarks) => void; + } - /** ListAssetsRequest pageSize */ - pageSize?: (number|null); + /** Properties of a CreateFindingRequest. */ + interface ICreateFindingRequest { + + /** CreateFindingRequest parent */ + parent?: (string|null); + + /** CreateFindingRequest findingId */ + findingId?: (string|null); + + /** CreateFindingRequest finding */ + finding?: (google.cloud.securitycenter.v1beta1.IFinding|null); } - /** Represents a ListAssetsRequest. */ - class ListAssetsRequest implements IListAssetsRequest { + /** Represents a CreateFindingRequest. */ + class CreateFindingRequest implements ICreateFindingRequest { /** - * Constructs a new ListAssetsRequest. + * Constructs a new CreateFindingRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1beta1.IListAssetsRequest); + constructor(properties?: google.cloud.securitycenter.v1beta1.ICreateFindingRequest); - /** ListAssetsRequest parent. */ + /** CreateFindingRequest parent. */ public parent: string; - /** ListAssetsRequest filter. */ - public filter: string; - - /** ListAssetsRequest orderBy. */ - public orderBy: string; - - /** ListAssetsRequest readTime. */ - public readTime?: (google.protobuf.ITimestamp|null); - - /** ListAssetsRequest compareDuration. */ - public compareDuration?: (google.protobuf.IDuration|null); - - /** ListAssetsRequest fieldMask. */ - public fieldMask?: (google.protobuf.IFieldMask|null); - - /** ListAssetsRequest pageToken. */ - public pageToken: string; + /** CreateFindingRequest findingId. */ + public findingId: string; - /** ListAssetsRequest pageSize. */ - public pageSize: number; + /** CreateFindingRequest finding. */ + public finding?: (google.cloud.securitycenter.v1beta1.IFinding|null); /** - * Creates a new ListAssetsRequest instance using the specified properties. + * Creates a new CreateFindingRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListAssetsRequest instance + * @returns CreateFindingRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1beta1.IListAssetsRequest): google.cloud.securitycenter.v1beta1.ListAssetsRequest; + public static create(properties?: google.cloud.securitycenter.v1beta1.ICreateFindingRequest): google.cloud.securitycenter.v1beta1.CreateFindingRequest; /** - * Encodes the specified ListAssetsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListAssetsRequest.verify|verify} messages. - * @param message ListAssetsRequest message or plain object to encode + * Encodes the specified CreateFindingRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.CreateFindingRequest.verify|verify} messages. + * @param message CreateFindingRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1beta1.IListAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1beta1.ICreateFindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListAssetsRequest.verify|verify} messages. - * @param message ListAssetsRequest message or plain object to encode + * Encodes the specified CreateFindingRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.CreateFindingRequest.verify|verify} messages. + * @param message CreateFindingRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IListAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.ICreateFindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListAssetsRequest message from the specified reader or buffer. + * Decodes a CreateFindingRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListAssetsRequest + * @returns CreateFindingRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.ListAssetsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.CreateFindingRequest; /** - * Decodes a ListAssetsRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateFindingRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListAssetsRequest + * @returns CreateFindingRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.ListAssetsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.CreateFindingRequest; /** - * Verifies a ListAssetsRequest message. + * Verifies a CreateFindingRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListAssetsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateFindingRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListAssetsRequest + * @returns CreateFindingRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.ListAssetsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.CreateFindingRequest; /** - * Creates a plain object from a ListAssetsRequest message. Also converts values to other types if specified. - * @param message ListAssetsRequest + * Creates a plain object from a CreateFindingRequest message. Also converts values to other types if specified. + * @param message CreateFindingRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1beta1.ListAssetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1beta1.CreateFindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListAssetsRequest to JSON. + * Converts this CreateFindingRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListAssetsResponse. */ - interface IListAssetsResponse { - - /** ListAssetsResponse listAssetsResults */ - listAssetsResults?: (google.cloud.securitycenter.v1beta1.ListAssetsResponse.IListAssetsResult[]|null); - - /** ListAssetsResponse readTime */ - readTime?: (google.protobuf.ITimestamp|null); + /** Properties of a CreateSourceRequest. */ + interface ICreateSourceRequest { - /** ListAssetsResponse nextPageToken */ - nextPageToken?: (string|null); + /** CreateSourceRequest parent */ + parent?: (string|null); - /** ListAssetsResponse totalSize */ - totalSize?: (number|null); + /** CreateSourceRequest source */ + source?: (google.cloud.securitycenter.v1beta1.ISource|null); } - /** Represents a ListAssetsResponse. */ - class ListAssetsResponse implements IListAssetsResponse { + /** Represents a CreateSourceRequest. */ + class CreateSourceRequest implements ICreateSourceRequest { /** - * Constructs a new ListAssetsResponse. + * Constructs a new CreateSourceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1beta1.IListAssetsResponse); - - /** ListAssetsResponse listAssetsResults. */ - public listAssetsResults: google.cloud.securitycenter.v1beta1.ListAssetsResponse.IListAssetsResult[]; - - /** ListAssetsResponse readTime. */ - public readTime?: (google.protobuf.ITimestamp|null); + constructor(properties?: google.cloud.securitycenter.v1beta1.ICreateSourceRequest); - /** ListAssetsResponse nextPageToken. */ - public nextPageToken: string; + /** CreateSourceRequest parent. */ + public parent: string; - /** ListAssetsResponse totalSize. */ - public totalSize: number; + /** CreateSourceRequest source. */ + public source?: (google.cloud.securitycenter.v1beta1.ISource|null); /** - * Creates a new ListAssetsResponse instance using the specified properties. + * Creates a new CreateSourceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListAssetsResponse instance + * @returns CreateSourceRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1beta1.IListAssetsResponse): google.cloud.securitycenter.v1beta1.ListAssetsResponse; + public static create(properties?: google.cloud.securitycenter.v1beta1.ICreateSourceRequest): google.cloud.securitycenter.v1beta1.CreateSourceRequest; /** - * Encodes the specified ListAssetsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListAssetsResponse.verify|verify} messages. - * @param message ListAssetsResponse message or plain object to encode + * Encodes the specified CreateSourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.CreateSourceRequest.verify|verify} messages. + * @param message CreateSourceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1beta1.IListAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1beta1.ICreateSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListAssetsResponse.verify|verify} messages. - * @param message ListAssetsResponse message or plain object to encode + * Encodes the specified CreateSourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.CreateSourceRequest.verify|verify} messages. + * @param message CreateSourceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IListAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.ICreateSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListAssetsResponse message from the specified reader or buffer. + * Decodes a CreateSourceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListAssetsResponse + * @returns CreateSourceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.ListAssetsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.CreateSourceRequest; /** - * Decodes a ListAssetsResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateSourceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListAssetsResponse + * @returns CreateSourceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.ListAssetsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.CreateSourceRequest; /** - * Verifies a ListAssetsResponse message. + * Verifies a CreateSourceRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListAssetsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateSourceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListAssetsResponse + * @returns CreateSourceRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.ListAssetsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.CreateSourceRequest; /** - * Creates a plain object from a ListAssetsResponse message. Also converts values to other types if specified. - * @param message ListAssetsResponse + * Creates a plain object from a CreateSourceRequest message. Also converts values to other types if specified. + * @param message CreateSourceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1beta1.ListAssetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1beta1.CreateSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListAssetsResponse to JSON. + * Converts this CreateSourceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace ListAssetsResponse { + /** Properties of a GetOrganizationSettingsRequest. */ + interface IGetOrganizationSettingsRequest { - /** Properties of a ListAssetsResult. */ - interface IListAssetsResult { + /** GetOrganizationSettingsRequest name */ + name?: (string|null); + } - /** ListAssetsResult asset */ - asset?: (google.cloud.securitycenter.v1beta1.IAsset|null); - - /** ListAssetsResult state */ - state?: (google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult.State|null); - } - - /** Represents a ListAssetsResult. */ - class ListAssetsResult implements IListAssetsResult { - - /** - * Constructs a new ListAssetsResult. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1beta1.ListAssetsResponse.IListAssetsResult); - - /** ListAssetsResult asset. */ - public asset?: (google.cloud.securitycenter.v1beta1.IAsset|null); - - /** ListAssetsResult state. */ - public state: google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult.State; - - /** - * Creates a new ListAssetsResult instance using the specified properties. - * @param [properties] Properties to set - * @returns ListAssetsResult instance - */ - public static create(properties?: google.cloud.securitycenter.v1beta1.ListAssetsResponse.IListAssetsResult): google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult; - - /** - * Encodes the specified ListAssetsResult message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult.verify|verify} messages. - * @param message ListAssetsResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1beta1.ListAssetsResponse.IListAssetsResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListAssetsResult message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult.verify|verify} messages. - * @param message ListAssetsResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.ListAssetsResponse.IListAssetsResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListAssetsResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListAssetsResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult; - - /** - * Decodes a ListAssetsResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListAssetsResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult; - - /** - * Verifies a ListAssetsResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListAssetsResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListAssetsResult - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult; - - /** - * Creates a plain object from a ListAssetsResult message. Also converts values to other types if specified. - * @param message ListAssetsResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListAssetsResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace ListAssetsResult { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - UNUSED = 1, - ADDED = 2, - REMOVED = 3, - ACTIVE = 4 - } - } - } - - /** Properties of a ListFindingsRequest. */ - interface IListFindingsRequest { - - /** ListFindingsRequest parent */ - parent?: (string|null); - - /** ListFindingsRequest filter */ - filter?: (string|null); - - /** ListFindingsRequest orderBy */ - orderBy?: (string|null); - - /** ListFindingsRequest readTime */ - readTime?: (google.protobuf.ITimestamp|null); - - /** ListFindingsRequest fieldMask */ - fieldMask?: (google.protobuf.IFieldMask|null); - - /** ListFindingsRequest pageToken */ - pageToken?: (string|null); - - /** ListFindingsRequest pageSize */ - pageSize?: (number|null); - } - - /** Represents a ListFindingsRequest. */ - class ListFindingsRequest implements IListFindingsRequest { + /** Represents a GetOrganizationSettingsRequest. */ + class GetOrganizationSettingsRequest implements IGetOrganizationSettingsRequest { /** - * Constructs a new ListFindingsRequest. + * Constructs a new GetOrganizationSettingsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1beta1.IListFindingsRequest); - - /** ListFindingsRequest parent. */ - public parent: string; - - /** ListFindingsRequest filter. */ - public filter: string; - - /** ListFindingsRequest orderBy. */ - public orderBy: string; - - /** ListFindingsRequest readTime. */ - public readTime?: (google.protobuf.ITimestamp|null); - - /** ListFindingsRequest fieldMask. */ - public fieldMask?: (google.protobuf.IFieldMask|null); - - /** ListFindingsRequest pageToken. */ - public pageToken: string; + constructor(properties?: google.cloud.securitycenter.v1beta1.IGetOrganizationSettingsRequest); - /** ListFindingsRequest pageSize. */ - public pageSize: number; + /** GetOrganizationSettingsRequest name. */ + public name: string; /** - * Creates a new ListFindingsRequest instance using the specified properties. + * Creates a new GetOrganizationSettingsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListFindingsRequest instance + * @returns GetOrganizationSettingsRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1beta1.IListFindingsRequest): google.cloud.securitycenter.v1beta1.ListFindingsRequest; + public static create(properties?: google.cloud.securitycenter.v1beta1.IGetOrganizationSettingsRequest): google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest; /** - * Encodes the specified ListFindingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListFindingsRequest.verify|verify} messages. - * @param message ListFindingsRequest message or plain object to encode + * Encodes the specified GetOrganizationSettingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest.verify|verify} messages. + * @param message GetOrganizationSettingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1beta1.IListFindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1beta1.IGetOrganizationSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListFindingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListFindingsRequest.verify|verify} messages. - * @param message ListFindingsRequest message or plain object to encode + * Encodes the specified GetOrganizationSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest.verify|verify} messages. + * @param message GetOrganizationSettingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IListFindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IGetOrganizationSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListFindingsRequest message from the specified reader or buffer. + * Decodes a GetOrganizationSettingsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListFindingsRequest + * @returns GetOrganizationSettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.ListFindingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest; /** - * Decodes a ListFindingsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetOrganizationSettingsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListFindingsRequest + * @returns GetOrganizationSettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.ListFindingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest; /** - * Verifies a ListFindingsRequest message. + * Verifies a GetOrganizationSettingsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListFindingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetOrganizationSettingsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListFindingsRequest + * @returns GetOrganizationSettingsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.ListFindingsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest; /** - * Creates a plain object from a ListFindingsRequest message. Also converts values to other types if specified. - * @param message ListFindingsRequest + * Creates a plain object from a GetOrganizationSettingsRequest message. Also converts values to other types if specified. + * @param message GetOrganizationSettingsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1beta1.ListFindingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListFindingsRequest to JSON. + * Converts this GetOrganizationSettingsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListFindingsResponse. */ - interface IListFindingsResponse { - - /** ListFindingsResponse findings */ - findings?: (google.cloud.securitycenter.v1beta1.IFinding[]|null); - - /** ListFindingsResponse readTime */ - readTime?: (google.protobuf.ITimestamp|null); - - /** ListFindingsResponse nextPageToken */ - nextPageToken?: (string|null); + /** Properties of a GetSourceRequest. */ + interface IGetSourceRequest { - /** ListFindingsResponse totalSize */ - totalSize?: (number|null); + /** GetSourceRequest name */ + name?: (string|null); } - /** Represents a ListFindingsResponse. */ - class ListFindingsResponse implements IListFindingsResponse { + /** Represents a GetSourceRequest. */ + class GetSourceRequest implements IGetSourceRequest { /** - * Constructs a new ListFindingsResponse. + * Constructs a new GetSourceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1beta1.IListFindingsResponse); - - /** ListFindingsResponse findings. */ - public findings: google.cloud.securitycenter.v1beta1.IFinding[]; - - /** ListFindingsResponse readTime. */ - public readTime?: (google.protobuf.ITimestamp|null); - - /** ListFindingsResponse nextPageToken. */ - public nextPageToken: string; + constructor(properties?: google.cloud.securitycenter.v1beta1.IGetSourceRequest); - /** ListFindingsResponse totalSize. */ - public totalSize: number; + /** GetSourceRequest name. */ + public name: string; /** - * Creates a new ListFindingsResponse instance using the specified properties. + * Creates a new GetSourceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListFindingsResponse instance + * @returns GetSourceRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1beta1.IListFindingsResponse): google.cloud.securitycenter.v1beta1.ListFindingsResponse; + public static create(properties?: google.cloud.securitycenter.v1beta1.IGetSourceRequest): google.cloud.securitycenter.v1beta1.GetSourceRequest; /** - * Encodes the specified ListFindingsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListFindingsResponse.verify|verify} messages. - * @param message ListFindingsResponse message or plain object to encode + * Encodes the specified GetSourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GetSourceRequest.verify|verify} messages. + * @param message GetSourceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1beta1.IListFindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1beta1.IGetSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListFindingsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListFindingsResponse.verify|verify} messages. - * @param message ListFindingsResponse message or plain object to encode - * @param [writer] Writer to encode to + * Encodes the specified GetSourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GetSourceRequest.verify|verify} messages. + * @param message GetSourceRequest message or plain object to encode + * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IListFindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IGetSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListFindingsResponse message from the specified reader or buffer. + * Decodes a GetSourceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListFindingsResponse + * @returns GetSourceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.ListFindingsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.GetSourceRequest; /** - * Decodes a ListFindingsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetSourceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListFindingsResponse + * @returns GetSourceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.ListFindingsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.GetSourceRequest; /** - * Verifies a ListFindingsResponse message. + * Verifies a GetSourceRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListFindingsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetSourceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListFindingsResponse + * @returns GetSourceRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.ListFindingsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.GetSourceRequest; /** - * Creates a plain object from a ListFindingsResponse message. Also converts values to other types if specified. - * @param message ListFindingsResponse + * Creates a plain object from a GetSourceRequest message. Also converts values to other types if specified. + * @param message GetSourceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1beta1.ListFindingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1beta1.GetSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListFindingsResponse to JSON. + * Converts this GetSourceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SetFindingStateRequest. */ - interface ISetFindingStateRequest { + /** Properties of a GroupAssetsRequest. */ + interface IGroupAssetsRequest { - /** SetFindingStateRequest name */ - name?: (string|null); + /** GroupAssetsRequest parent */ + parent?: (string|null); - /** SetFindingStateRequest state */ - state?: (google.cloud.securitycenter.v1beta1.Finding.State|null); + /** GroupAssetsRequest filter */ + filter?: (string|null); - /** SetFindingStateRequest startTime */ - startTime?: (google.protobuf.ITimestamp|null); + /** GroupAssetsRequest groupBy */ + groupBy?: (string|null); + + /** GroupAssetsRequest compareDuration */ + compareDuration?: (google.protobuf.IDuration|null); + + /** GroupAssetsRequest readTime */ + readTime?: (google.protobuf.ITimestamp|null); + + /** GroupAssetsRequest pageToken */ + pageToken?: (string|null); + + /** GroupAssetsRequest pageSize */ + pageSize?: (number|null); } - /** Represents a SetFindingStateRequest. */ - class SetFindingStateRequest implements ISetFindingStateRequest { + /** Represents a GroupAssetsRequest. */ + class GroupAssetsRequest implements IGroupAssetsRequest { /** - * Constructs a new SetFindingStateRequest. + * Constructs a new GroupAssetsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1beta1.ISetFindingStateRequest); + constructor(properties?: google.cloud.securitycenter.v1beta1.IGroupAssetsRequest); - /** SetFindingStateRequest name. */ - public name: string; + /** GroupAssetsRequest parent. */ + public parent: string; - /** SetFindingStateRequest state. */ - public state: google.cloud.securitycenter.v1beta1.Finding.State; + /** GroupAssetsRequest filter. */ + public filter: string; - /** SetFindingStateRequest startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); + /** GroupAssetsRequest groupBy. */ + public groupBy: string; + + /** GroupAssetsRequest compareDuration. */ + public compareDuration?: (google.protobuf.IDuration|null); + + /** GroupAssetsRequest readTime. */ + public readTime?: (google.protobuf.ITimestamp|null); + + /** GroupAssetsRequest pageToken. */ + public pageToken: string; + + /** GroupAssetsRequest pageSize. */ + public pageSize: number; /** - * Creates a new SetFindingStateRequest instance using the specified properties. + * Creates a new GroupAssetsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SetFindingStateRequest instance + * @returns GroupAssetsRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1beta1.ISetFindingStateRequest): google.cloud.securitycenter.v1beta1.SetFindingStateRequest; + public static create(properties?: google.cloud.securitycenter.v1beta1.IGroupAssetsRequest): google.cloud.securitycenter.v1beta1.GroupAssetsRequest; /** - * Encodes the specified SetFindingStateRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.SetFindingStateRequest.verify|verify} messages. - * @param message SetFindingStateRequest message or plain object to encode + * Encodes the specified GroupAssetsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupAssetsRequest.verify|verify} messages. + * @param message GroupAssetsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1beta1.ISetFindingStateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1beta1.IGroupAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SetFindingStateRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.SetFindingStateRequest.verify|verify} messages. - * @param message SetFindingStateRequest message or plain object to encode + * Encodes the specified GroupAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupAssetsRequest.verify|verify} messages. + * @param message GroupAssetsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.ISetFindingStateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IGroupAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SetFindingStateRequest message from the specified reader or buffer. + * Decodes a GroupAssetsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SetFindingStateRequest + * @returns GroupAssetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.SetFindingStateRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.GroupAssetsRequest; /** - * Decodes a SetFindingStateRequest message from the specified reader or buffer, length delimited. + * Decodes a GroupAssetsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SetFindingStateRequest + * @returns GroupAssetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.SetFindingStateRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.GroupAssetsRequest; /** - * Verifies a SetFindingStateRequest message. + * Verifies a GroupAssetsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SetFindingStateRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GroupAssetsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SetFindingStateRequest + * @returns GroupAssetsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.SetFindingStateRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.GroupAssetsRequest; /** - * Creates a plain object from a SetFindingStateRequest message. Also converts values to other types if specified. - * @param message SetFindingStateRequest + * Creates a plain object from a GroupAssetsRequest message. Also converts values to other types if specified. + * @param message GroupAssetsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1beta1.SetFindingStateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1beta1.GroupAssetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SetFindingStateRequest to JSON. + * Converts this GroupAssetsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a RunAssetDiscoveryRequest. */ - interface IRunAssetDiscoveryRequest { + /** Properties of a GroupAssetsResponse. */ + interface IGroupAssetsResponse { - /** RunAssetDiscoveryRequest parent */ - parent?: (string|null); + /** GroupAssetsResponse groupByResults */ + groupByResults?: (google.cloud.securitycenter.v1beta1.IGroupResult[]|null); + + /** GroupAssetsResponse readTime */ + readTime?: (google.protobuf.ITimestamp|null); + + /** GroupAssetsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a RunAssetDiscoveryRequest. */ - class RunAssetDiscoveryRequest implements IRunAssetDiscoveryRequest { + /** Represents a GroupAssetsResponse. */ + class GroupAssetsResponse implements IGroupAssetsResponse { /** - * Constructs a new RunAssetDiscoveryRequest. + * Constructs a new GroupAssetsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1beta1.IRunAssetDiscoveryRequest); + constructor(properties?: google.cloud.securitycenter.v1beta1.IGroupAssetsResponse); - /** RunAssetDiscoveryRequest parent. */ - public parent: string; + /** GroupAssetsResponse groupByResults. */ + public groupByResults: google.cloud.securitycenter.v1beta1.IGroupResult[]; + + /** GroupAssetsResponse readTime. */ + public readTime?: (google.protobuf.ITimestamp|null); + + /** GroupAssetsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new RunAssetDiscoveryRequest instance using the specified properties. + * Creates a new GroupAssetsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns RunAssetDiscoveryRequest instance + * @returns GroupAssetsResponse instance */ - public static create(properties?: google.cloud.securitycenter.v1beta1.IRunAssetDiscoveryRequest): google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest; + public static create(properties?: google.cloud.securitycenter.v1beta1.IGroupAssetsResponse): google.cloud.securitycenter.v1beta1.GroupAssetsResponse; /** - * Encodes the specified RunAssetDiscoveryRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest.verify|verify} messages. - * @param message RunAssetDiscoveryRequest message or plain object to encode + * Encodes the specified GroupAssetsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupAssetsResponse.verify|verify} messages. + * @param message GroupAssetsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1beta1.IRunAssetDiscoveryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1beta1.IGroupAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RunAssetDiscoveryRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest.verify|verify} messages. - * @param message RunAssetDiscoveryRequest message or plain object to encode + * Encodes the specified GroupAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupAssetsResponse.verify|verify} messages. + * @param message GroupAssetsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IRunAssetDiscoveryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IGroupAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RunAssetDiscoveryRequest message from the specified reader or buffer. + * Decodes a GroupAssetsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RunAssetDiscoveryRequest + * @returns GroupAssetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.GroupAssetsResponse; /** - * Decodes a RunAssetDiscoveryRequest message from the specified reader or buffer, length delimited. + * Decodes a GroupAssetsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RunAssetDiscoveryRequest + * @returns GroupAssetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.GroupAssetsResponse; /** - * Verifies a RunAssetDiscoveryRequest message. + * Verifies a GroupAssetsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RunAssetDiscoveryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GroupAssetsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RunAssetDiscoveryRequest + * @returns GroupAssetsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.GroupAssetsResponse; /** - * Creates a plain object from a RunAssetDiscoveryRequest message. Also converts values to other types if specified. - * @param message RunAssetDiscoveryRequest + * Creates a plain object from a GroupAssetsResponse message. Also converts values to other types if specified. + * @param message GroupAssetsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1beta1.GroupAssetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RunAssetDiscoveryRequest to JSON. + * Converts this GroupAssetsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateFindingRequest. */ - interface IUpdateFindingRequest { + /** Properties of a GroupFindingsRequest. */ + interface IGroupFindingsRequest { - /** UpdateFindingRequest finding */ - finding?: (google.cloud.securitycenter.v1beta1.IFinding|null); + /** GroupFindingsRequest parent */ + parent?: (string|null); - /** UpdateFindingRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } + /** GroupFindingsRequest filter */ + filter?: (string|null); - /** Represents an UpdateFindingRequest. */ - class UpdateFindingRequest implements IUpdateFindingRequest { + /** GroupFindingsRequest groupBy */ + groupBy?: (string|null); - /** - * Constructs a new UpdateFindingRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1beta1.IUpdateFindingRequest); + /** GroupFindingsRequest readTime */ + readTime?: (google.protobuf.ITimestamp|null); - /** UpdateFindingRequest finding. */ - public finding?: (google.cloud.securitycenter.v1beta1.IFinding|null); + /** GroupFindingsRequest pageToken */ + pageToken?: (string|null); - /** UpdateFindingRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** GroupFindingsRequest pageSize */ + pageSize?: (number|null); + } + + /** Represents a GroupFindingsRequest. */ + class GroupFindingsRequest implements IGroupFindingsRequest { /** - * Creates a new UpdateFindingRequest instance using the specified properties. + * Constructs a new GroupFindingsRequest. * @param [properties] Properties to set - * @returns UpdateFindingRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1beta1.IUpdateFindingRequest): google.cloud.securitycenter.v1beta1.UpdateFindingRequest; + constructor(properties?: google.cloud.securitycenter.v1beta1.IGroupFindingsRequest); + + /** GroupFindingsRequest parent. */ + public parent: string; + + /** GroupFindingsRequest filter. */ + public filter: string; + + /** GroupFindingsRequest groupBy. */ + public groupBy: string; + + /** GroupFindingsRequest readTime. */ + public readTime?: (google.protobuf.ITimestamp|null); + + /** GroupFindingsRequest pageToken. */ + public pageToken: string; + + /** GroupFindingsRequest pageSize. */ + public pageSize: number; /** - * Encodes the specified UpdateFindingRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.UpdateFindingRequest.verify|verify} messages. - * @param message UpdateFindingRequest message or plain object to encode + * Creates a new GroupFindingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GroupFindingsRequest instance + */ + public static create(properties?: google.cloud.securitycenter.v1beta1.IGroupFindingsRequest): google.cloud.securitycenter.v1beta1.GroupFindingsRequest; + + /** + * Encodes the specified GroupFindingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupFindingsRequest.verify|verify} messages. + * @param message GroupFindingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1beta1.IUpdateFindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1beta1.IGroupFindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateFindingRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.UpdateFindingRequest.verify|verify} messages. - * @param message UpdateFindingRequest message or plain object to encode + * Encodes the specified GroupFindingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupFindingsRequest.verify|verify} messages. + * @param message GroupFindingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IUpdateFindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IGroupFindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateFindingRequest message from the specified reader or buffer. + * Decodes a GroupFindingsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateFindingRequest + * @returns GroupFindingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.UpdateFindingRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.GroupFindingsRequest; /** - * Decodes an UpdateFindingRequest message from the specified reader or buffer, length delimited. + * Decodes a GroupFindingsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateFindingRequest + * @returns GroupFindingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.UpdateFindingRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.GroupFindingsRequest; /** - * Verifies an UpdateFindingRequest message. + * Verifies a GroupFindingsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateFindingRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GroupFindingsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateFindingRequest + * @returns GroupFindingsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.UpdateFindingRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.GroupFindingsRequest; /** - * Creates a plain object from an UpdateFindingRequest message. Also converts values to other types if specified. - * @param message UpdateFindingRequest + * Creates a plain object from a GroupFindingsRequest message. Also converts values to other types if specified. + * @param message GroupFindingsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1beta1.UpdateFindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1beta1.GroupFindingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateFindingRequest to JSON. + * Converts this GroupFindingsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateOrganizationSettingsRequest. */ - interface IUpdateOrganizationSettingsRequest { + /** Properties of a GroupFindingsResponse. */ + interface IGroupFindingsResponse { - /** UpdateOrganizationSettingsRequest organizationSettings */ - organizationSettings?: (google.cloud.securitycenter.v1beta1.IOrganizationSettings|null); + /** GroupFindingsResponse groupByResults */ + groupByResults?: (google.cloud.securitycenter.v1beta1.IGroupResult[]|null); - /** UpdateOrganizationSettingsRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** GroupFindingsResponse readTime */ + readTime?: (google.protobuf.ITimestamp|null); + + /** GroupFindingsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents an UpdateOrganizationSettingsRequest. */ - class UpdateOrganizationSettingsRequest implements IUpdateOrganizationSettingsRequest { + /** Represents a GroupFindingsResponse. */ + class GroupFindingsResponse implements IGroupFindingsResponse { /** - * Constructs a new UpdateOrganizationSettingsRequest. + * Constructs a new GroupFindingsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1beta1.IUpdateOrganizationSettingsRequest); + constructor(properties?: google.cloud.securitycenter.v1beta1.IGroupFindingsResponse); - /** UpdateOrganizationSettingsRequest organizationSettings. */ - public organizationSettings?: (google.cloud.securitycenter.v1beta1.IOrganizationSettings|null); + /** GroupFindingsResponse groupByResults. */ + public groupByResults: google.cloud.securitycenter.v1beta1.IGroupResult[]; - /** UpdateOrganizationSettingsRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** GroupFindingsResponse readTime. */ + public readTime?: (google.protobuf.ITimestamp|null); + + /** GroupFindingsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new UpdateOrganizationSettingsRequest instance using the specified properties. + * Creates a new GroupFindingsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateOrganizationSettingsRequest instance + * @returns GroupFindingsResponse instance */ - public static create(properties?: google.cloud.securitycenter.v1beta1.IUpdateOrganizationSettingsRequest): google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest; + public static create(properties?: google.cloud.securitycenter.v1beta1.IGroupFindingsResponse): google.cloud.securitycenter.v1beta1.GroupFindingsResponse; /** - * Encodes the specified UpdateOrganizationSettingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest.verify|verify} messages. - * @param message UpdateOrganizationSettingsRequest message or plain object to encode + * Encodes the specified GroupFindingsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupFindingsResponse.verify|verify} messages. + * @param message GroupFindingsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1beta1.IUpdateOrganizationSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1beta1.IGroupFindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateOrganizationSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest.verify|verify} messages. - * @param message UpdateOrganizationSettingsRequest message or plain object to encode + * Encodes the specified GroupFindingsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupFindingsResponse.verify|verify} messages. + * @param message GroupFindingsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IUpdateOrganizationSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IGroupFindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateOrganizationSettingsRequest message from the specified reader or buffer. + * Decodes a GroupFindingsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateOrganizationSettingsRequest + * @returns GroupFindingsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.GroupFindingsResponse; /** - * Decodes an UpdateOrganizationSettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a GroupFindingsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateOrganizationSettingsRequest + * @returns GroupFindingsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.GroupFindingsResponse; /** - * Verifies an UpdateOrganizationSettingsRequest message. + * Verifies a GroupFindingsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateOrganizationSettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GroupFindingsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateOrganizationSettingsRequest + * @returns GroupFindingsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.GroupFindingsResponse; /** - * Creates a plain object from an UpdateOrganizationSettingsRequest message. Also converts values to other types if specified. - * @param message UpdateOrganizationSettingsRequest + * Creates a plain object from a GroupFindingsResponse message. Also converts values to other types if specified. + * @param message GroupFindingsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1beta1.GroupFindingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateOrganizationSettingsRequest to JSON. + * Converts this GroupFindingsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateSourceRequest. */ - interface IUpdateSourceRequest { + /** Properties of a GroupResult. */ + interface IGroupResult { - /** UpdateSourceRequest source */ - source?: (google.cloud.securitycenter.v1beta1.ISource|null); + /** GroupResult properties */ + properties?: ({ [k: string]: google.protobuf.IValue }|null); - /** UpdateSourceRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** GroupResult count */ + count?: (number|Long|null); } - /** Represents an UpdateSourceRequest. */ - class UpdateSourceRequest implements IUpdateSourceRequest { + /** Represents a GroupResult. */ + class GroupResult implements IGroupResult { /** - * Constructs a new UpdateSourceRequest. + * Constructs a new GroupResult. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1beta1.IUpdateSourceRequest); + constructor(properties?: google.cloud.securitycenter.v1beta1.IGroupResult); - /** UpdateSourceRequest source. */ - public source?: (google.cloud.securitycenter.v1beta1.ISource|null); + /** GroupResult properties. */ + public properties: { [k: string]: google.protobuf.IValue }; - /** UpdateSourceRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** GroupResult count. */ + public count: (number|Long); /** - * Creates a new UpdateSourceRequest instance using the specified properties. + * Creates a new GroupResult instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateSourceRequest instance + * @returns GroupResult instance */ - public static create(properties?: google.cloud.securitycenter.v1beta1.IUpdateSourceRequest): google.cloud.securitycenter.v1beta1.UpdateSourceRequest; + public static create(properties?: google.cloud.securitycenter.v1beta1.IGroupResult): google.cloud.securitycenter.v1beta1.GroupResult; /** - * Encodes the specified UpdateSourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.UpdateSourceRequest.verify|verify} messages. - * @param message UpdateSourceRequest message or plain object to encode + * Encodes the specified GroupResult message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupResult.verify|verify} messages. + * @param message GroupResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1beta1.IUpdateSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1beta1.IGroupResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateSourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.UpdateSourceRequest.verify|verify} messages. - * @param message UpdateSourceRequest message or plain object to encode + * Encodes the specified GroupResult message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupResult.verify|verify} messages. + * @param message GroupResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IUpdateSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IGroupResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateSourceRequest message from the specified reader or buffer. + * Decodes a GroupResult message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateSourceRequest + * @returns GroupResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.UpdateSourceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.GroupResult; /** - * Decodes an UpdateSourceRequest message from the specified reader or buffer, length delimited. + * Decodes a GroupResult message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateSourceRequest + * @returns GroupResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.UpdateSourceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.GroupResult; /** - * Verifies an UpdateSourceRequest message. + * Verifies a GroupResult message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateSourceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GroupResult message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateSourceRequest + * @returns GroupResult */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.UpdateSourceRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.GroupResult; /** - * Creates a plain object from an UpdateSourceRequest message. Also converts values to other types if specified. - * @param message UpdateSourceRequest + * Creates a plain object from a GroupResult message. Also converts values to other types if specified. + * @param message GroupResult * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1beta1.UpdateSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1beta1.GroupResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateSourceRequest to JSON. + * Converts this GroupResult to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateSecurityMarksRequest. */ - interface IUpdateSecurityMarksRequest { + /** Properties of a ListSourcesRequest. */ + interface IListSourcesRequest { - /** UpdateSecurityMarksRequest securityMarks */ - securityMarks?: (google.cloud.securitycenter.v1beta1.ISecurityMarks|null); + /** ListSourcesRequest parent */ + parent?: (string|null); - /** UpdateSecurityMarksRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** ListSourcesRequest pageToken */ + pageToken?: (string|null); - /** UpdateSecurityMarksRequest startTime */ - startTime?: (google.protobuf.ITimestamp|null); + /** ListSourcesRequest pageSize */ + pageSize?: (number|null); } - /** Represents an UpdateSecurityMarksRequest. */ - class UpdateSecurityMarksRequest implements IUpdateSecurityMarksRequest { + /** Represents a ListSourcesRequest. */ + class ListSourcesRequest implements IListSourcesRequest { /** - * Constructs a new UpdateSecurityMarksRequest. + * Constructs a new ListSourcesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1beta1.IUpdateSecurityMarksRequest); - - /** UpdateSecurityMarksRequest securityMarks. */ - public securityMarks?: (google.cloud.securitycenter.v1beta1.ISecurityMarks|null); + constructor(properties?: google.cloud.securitycenter.v1beta1.IListSourcesRequest); - /** UpdateSecurityMarksRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** ListSourcesRequest parent. */ + public parent: string; - /** UpdateSecurityMarksRequest startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); + /** ListSourcesRequest pageToken. */ + public pageToken: string; + + /** ListSourcesRequest pageSize. */ + public pageSize: number; /** - * Creates a new UpdateSecurityMarksRequest instance using the specified properties. + * Creates a new ListSourcesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateSecurityMarksRequest instance + * @returns ListSourcesRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1beta1.IUpdateSecurityMarksRequest): google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest; + public static create(properties?: google.cloud.securitycenter.v1beta1.IListSourcesRequest): google.cloud.securitycenter.v1beta1.ListSourcesRequest; /** - * Encodes the specified UpdateSecurityMarksRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest.verify|verify} messages. - * @param message UpdateSecurityMarksRequest message or plain object to encode + * Encodes the specified ListSourcesRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListSourcesRequest.verify|verify} messages. + * @param message ListSourcesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1beta1.IUpdateSecurityMarksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1beta1.IListSourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateSecurityMarksRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest.verify|verify} messages. - * @param message UpdateSecurityMarksRequest message or plain object to encode + * Encodes the specified ListSourcesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListSourcesRequest.verify|verify} messages. + * @param message ListSourcesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IUpdateSecurityMarksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IListSourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateSecurityMarksRequest message from the specified reader or buffer. + * Decodes a ListSourcesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateSecurityMarksRequest + * @returns ListSourcesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.ListSourcesRequest; /** - * Decodes an UpdateSecurityMarksRequest message from the specified reader or buffer, length delimited. + * Decodes a ListSourcesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateSecurityMarksRequest + * @returns ListSourcesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.ListSourcesRequest; /** - * Verifies an UpdateSecurityMarksRequest message. + * Verifies a ListSourcesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateSecurityMarksRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListSourcesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateSecurityMarksRequest + * @returns ListSourcesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.ListSourcesRequest; /** - * Creates a plain object from an UpdateSecurityMarksRequest message. Also converts values to other types if specified. - * @param message UpdateSecurityMarksRequest + * Creates a plain object from a ListSourcesRequest message. Also converts values to other types if specified. + * @param message ListSourcesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1beta1.ListSourcesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateSecurityMarksRequest to JSON. + * Converts this ListSourcesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an Asset. */ - interface IAsset { - - /** Asset name */ - name?: (string|null); - - /** Asset securityCenterProperties */ - securityCenterProperties?: (google.cloud.securitycenter.v1beta1.Asset.ISecurityCenterProperties|null); - - /** Asset resourceProperties */ - resourceProperties?: ({ [k: string]: google.protobuf.IValue }|null); - - /** Asset securityMarks */ - securityMarks?: (google.cloud.securitycenter.v1beta1.ISecurityMarks|null); + /** Properties of a ListSourcesResponse. */ + interface IListSourcesResponse { - /** Asset createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** ListSourcesResponse sources */ + sources?: (google.cloud.securitycenter.v1beta1.ISource[]|null); - /** Asset updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** ListSourcesResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents an Asset. */ - class Asset implements IAsset { + /** Represents a ListSourcesResponse. */ + class ListSourcesResponse implements IListSourcesResponse { /** - * Constructs a new Asset. + * Constructs a new ListSourcesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1beta1.IAsset); - - /** Asset name. */ - public name: string; - - /** Asset securityCenterProperties. */ - public securityCenterProperties?: (google.cloud.securitycenter.v1beta1.Asset.ISecurityCenterProperties|null); - - /** Asset resourceProperties. */ - public resourceProperties: { [k: string]: google.protobuf.IValue }; - - /** Asset securityMarks. */ - public securityMarks?: (google.cloud.securitycenter.v1beta1.ISecurityMarks|null); + constructor(properties?: google.cloud.securitycenter.v1beta1.IListSourcesResponse); - /** Asset createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** ListSourcesResponse sources. */ + public sources: google.cloud.securitycenter.v1beta1.ISource[]; - /** Asset updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** ListSourcesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new Asset instance using the specified properties. + * Creates a new ListSourcesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns Asset instance + * @returns ListSourcesResponse instance */ - public static create(properties?: google.cloud.securitycenter.v1beta1.IAsset): google.cloud.securitycenter.v1beta1.Asset; + public static create(properties?: google.cloud.securitycenter.v1beta1.IListSourcesResponse): google.cloud.securitycenter.v1beta1.ListSourcesResponse; /** - * Encodes the specified Asset message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.Asset.verify|verify} messages. - * @param message Asset message or plain object to encode + * Encodes the specified ListSourcesResponse message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListSourcesResponse.verify|verify} messages. + * @param message ListSourcesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1beta1.IAsset, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1beta1.IListSourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Asset message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.Asset.verify|verify} messages. - * @param message Asset message or plain object to encode + * Encodes the specified ListSourcesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListSourcesResponse.verify|verify} messages. + * @param message ListSourcesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IAsset, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IListSourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Asset message from the specified reader or buffer. + * Decodes a ListSourcesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Asset + * @returns ListSourcesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.Asset; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.ListSourcesResponse; /** - * Decodes an Asset message from the specified reader or buffer, length delimited. + * Decodes a ListSourcesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Asset + * @returns ListSourcesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.Asset; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.ListSourcesResponse; /** - * Verifies an Asset message. + * Verifies a ListSourcesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an Asset message from a plain object. Also converts values to their respective internal types. + * Creates a ListSourcesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Asset + * @returns ListSourcesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.Asset; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.ListSourcesResponse; /** - * Creates a plain object from an Asset message. Also converts values to other types if specified. - * @param message Asset + * Creates a plain object from a ListSourcesResponse message. Also converts values to other types if specified. + * @param message ListSourcesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1beta1.Asset, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1beta1.ListSourcesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Asset to JSON. + * Converts this ListSourcesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Asset { - - /** Properties of a SecurityCenterProperties. */ - interface ISecurityCenterProperties { + /** Properties of a ListAssetsRequest. */ + interface IListAssetsRequest { - /** SecurityCenterProperties resourceName */ - resourceName?: (string|null); + /** ListAssetsRequest parent */ + parent?: (string|null); - /** SecurityCenterProperties resourceType */ - resourceType?: (string|null); + /** ListAssetsRequest filter */ + filter?: (string|null); - /** SecurityCenterProperties resourceParent */ - resourceParent?: (string|null); + /** ListAssetsRequest orderBy */ + orderBy?: (string|null); - /** SecurityCenterProperties resourceProject */ - resourceProject?: (string|null); + /** ListAssetsRequest readTime */ + readTime?: (google.protobuf.ITimestamp|null); - /** SecurityCenterProperties resourceOwners */ - resourceOwners?: (string[]|null); - } + /** ListAssetsRequest compareDuration */ + compareDuration?: (google.protobuf.IDuration|null); - /** Represents a SecurityCenterProperties. */ - class SecurityCenterProperties implements ISecurityCenterProperties { + /** ListAssetsRequest fieldMask */ + fieldMask?: (google.protobuf.IFieldMask|null); - /** - * Constructs a new SecurityCenterProperties. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1beta1.Asset.ISecurityCenterProperties); + /** ListAssetsRequest pageToken */ + pageToken?: (string|null); - /** SecurityCenterProperties resourceName. */ - public resourceName: string; + /** ListAssetsRequest pageSize */ + pageSize?: (number|null); + } - /** SecurityCenterProperties resourceType. */ - public resourceType: string; + /** Represents a ListAssetsRequest. */ + class ListAssetsRequest implements IListAssetsRequest { - /** SecurityCenterProperties resourceParent. */ - public resourceParent: string; + /** + * Constructs a new ListAssetsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1beta1.IListAssetsRequest); - /** SecurityCenterProperties resourceProject. */ - public resourceProject: string; + /** ListAssetsRequest parent. */ + public parent: string; - /** SecurityCenterProperties resourceOwners. */ - public resourceOwners: string[]; + /** ListAssetsRequest filter. */ + public filter: string; - /** - * Creates a new SecurityCenterProperties instance using the specified properties. - * @param [properties] Properties to set - * @returns SecurityCenterProperties instance - */ - public static create(properties?: google.cloud.securitycenter.v1beta1.Asset.ISecurityCenterProperties): google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties; + /** ListAssetsRequest orderBy. */ + public orderBy: string; - /** - * Encodes the specified SecurityCenterProperties message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties.verify|verify} messages. - * @param message SecurityCenterProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1beta1.Asset.ISecurityCenterProperties, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListAssetsRequest readTime. */ + public readTime?: (google.protobuf.ITimestamp|null); - /** - * Encodes the specified SecurityCenterProperties message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties.verify|verify} messages. - * @param message SecurityCenterProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.Asset.ISecurityCenterProperties, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListAssetsRequest compareDuration. */ + public compareDuration?: (google.protobuf.IDuration|null); - /** - * Decodes a SecurityCenterProperties message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SecurityCenterProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties; + /** ListAssetsRequest fieldMask. */ + public fieldMask?: (google.protobuf.IFieldMask|null); - /** - * Decodes a SecurityCenterProperties message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SecurityCenterProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties; + /** ListAssetsRequest pageToken. */ + public pageToken: string; - /** - * Verifies a SecurityCenterProperties message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SecurityCenterProperties message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SecurityCenterProperties - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties; - - /** - * Creates a plain object from a SecurityCenterProperties message. Also converts values to other types if specified. - * @param message SecurityCenterProperties - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SecurityCenterProperties to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of a SecurityMarks. */ - interface ISecurityMarks { - - /** SecurityMarks name */ - name?: (string|null); - - /** SecurityMarks marks */ - marks?: ({ [k: string]: string }|null); - } - - /** Represents a SecurityMarks. */ - class SecurityMarks implements ISecurityMarks { - - /** - * Constructs a new SecurityMarks. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1beta1.ISecurityMarks); - - /** SecurityMarks name. */ - public name: string; - - /** SecurityMarks marks. */ - public marks: { [k: string]: string }; + /** ListAssetsRequest pageSize. */ + public pageSize: number; /** - * Creates a new SecurityMarks instance using the specified properties. + * Creates a new ListAssetsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SecurityMarks instance + * @returns ListAssetsRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1beta1.ISecurityMarks): google.cloud.securitycenter.v1beta1.SecurityMarks; + public static create(properties?: google.cloud.securitycenter.v1beta1.IListAssetsRequest): google.cloud.securitycenter.v1beta1.ListAssetsRequest; /** - * Encodes the specified SecurityMarks message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.SecurityMarks.verify|verify} messages. - * @param message SecurityMarks message or plain object to encode + * Encodes the specified ListAssetsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListAssetsRequest.verify|verify} messages. + * @param message ListAssetsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1beta1.ISecurityMarks, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1beta1.IListAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SecurityMarks message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.SecurityMarks.verify|verify} messages. - * @param message SecurityMarks message or plain object to encode + * Encodes the specified ListAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListAssetsRequest.verify|verify} messages. + * @param message ListAssetsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.ISecurityMarks, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IListAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SecurityMarks message from the specified reader or buffer. + * Decodes a ListAssetsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SecurityMarks + * @returns ListAssetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.SecurityMarks; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.ListAssetsRequest; /** - * Decodes a SecurityMarks message from the specified reader or buffer, length delimited. + * Decodes a ListAssetsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SecurityMarks + * @returns ListAssetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.SecurityMarks; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.ListAssetsRequest; /** - * Verifies a SecurityMarks message. + * Verifies a ListAssetsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SecurityMarks message from a plain object. Also converts values to their respective internal types. + * Creates a ListAssetsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SecurityMarks + * @returns ListAssetsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.SecurityMarks; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.ListAssetsRequest; /** - * Creates a plain object from a SecurityMarks message. Also converts values to other types if specified. - * @param message SecurityMarks + * Creates a plain object from a ListAssetsRequest message. Also converts values to other types if specified. + * @param message ListAssetsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1beta1.SecurityMarks, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1beta1.ListAssetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SecurityMarks to JSON. + * Converts this ListAssetsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Finding. */ - interface IFinding { - - /** Finding name */ - name?: (string|null); - - /** Finding parent */ - parent?: (string|null); - - /** Finding resourceName */ - resourceName?: (string|null); - - /** Finding state */ - state?: (google.cloud.securitycenter.v1beta1.Finding.State|null); - - /** Finding category */ - category?: (string|null); - - /** Finding externalUri */ - externalUri?: (string|null); + /** Properties of a ListAssetsResponse. */ + interface IListAssetsResponse { - /** Finding sourceProperties */ - sourceProperties?: ({ [k: string]: google.protobuf.IValue }|null); + /** ListAssetsResponse listAssetsResults */ + listAssetsResults?: (google.cloud.securitycenter.v1beta1.ListAssetsResponse.IListAssetsResult[]|null); - /** Finding securityMarks */ - securityMarks?: (google.cloud.securitycenter.v1beta1.ISecurityMarks|null); + /** ListAssetsResponse readTime */ + readTime?: (google.protobuf.ITimestamp|null); - /** Finding eventTime */ - eventTime?: (google.protobuf.ITimestamp|null); + /** ListAssetsResponse nextPageToken */ + nextPageToken?: (string|null); - /** Finding createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** ListAssetsResponse totalSize */ + totalSize?: (number|null); } - /** Represents a Finding. */ - class Finding implements IFinding { + /** Represents a ListAssetsResponse. */ + class ListAssetsResponse implements IListAssetsResponse { /** - * Constructs a new Finding. + * Constructs a new ListAssetsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1beta1.IFinding); - - /** Finding name. */ - public name: string; - - /** Finding parent. */ - public parent: string; - - /** Finding resourceName. */ - public resourceName: string; - - /** Finding state. */ - public state: google.cloud.securitycenter.v1beta1.Finding.State; - - /** Finding category. */ - public category: string; - - /** Finding externalUri. */ - public externalUri: string; + constructor(properties?: google.cloud.securitycenter.v1beta1.IListAssetsResponse); - /** Finding sourceProperties. */ - public sourceProperties: { [k: string]: google.protobuf.IValue }; + /** ListAssetsResponse listAssetsResults. */ + public listAssetsResults: google.cloud.securitycenter.v1beta1.ListAssetsResponse.IListAssetsResult[]; - /** Finding securityMarks. */ - public securityMarks?: (google.cloud.securitycenter.v1beta1.ISecurityMarks|null); + /** ListAssetsResponse readTime. */ + public readTime?: (google.protobuf.ITimestamp|null); - /** Finding eventTime. */ - public eventTime?: (google.protobuf.ITimestamp|null); + /** ListAssetsResponse nextPageToken. */ + public nextPageToken: string; - /** Finding createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** ListAssetsResponse totalSize. */ + public totalSize: number; /** - * Creates a new Finding instance using the specified properties. + * Creates a new ListAssetsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns Finding instance + * @returns ListAssetsResponse instance */ - public static create(properties?: google.cloud.securitycenter.v1beta1.IFinding): google.cloud.securitycenter.v1beta1.Finding; + public static create(properties?: google.cloud.securitycenter.v1beta1.IListAssetsResponse): google.cloud.securitycenter.v1beta1.ListAssetsResponse; /** - * Encodes the specified Finding message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.Finding.verify|verify} messages. - * @param message Finding message or plain object to encode + * Encodes the specified ListAssetsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListAssetsResponse.verify|verify} messages. + * @param message ListAssetsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1beta1.IFinding, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1beta1.IListAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Finding message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.Finding.verify|verify} messages. - * @param message Finding message or plain object to encode + * Encodes the specified ListAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListAssetsResponse.verify|verify} messages. + * @param message ListAssetsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IFinding, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IListAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Finding message from the specified reader or buffer. + * Decodes a ListAssetsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Finding + * @returns ListAssetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.Finding; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.ListAssetsResponse; /** - * Decodes a Finding message from the specified reader or buffer, length delimited. + * Decodes a ListAssetsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Finding + * @returns ListAssetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.Finding; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.ListAssetsResponse; /** - * Verifies a Finding message. + * Verifies a ListAssetsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Finding message from a plain object. Also converts values to their respective internal types. + * Creates a ListAssetsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Finding + * @returns ListAssetsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.Finding; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.ListAssetsResponse; /** - * Creates a plain object from a Finding message. Also converts values to other types if specified. - * @param message Finding + * Creates a plain object from a ListAssetsResponse message. Also converts values to other types if specified. + * @param message ListAssetsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1beta1.Finding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1beta1.ListAssetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Finding to JSON. + * Converts this ListAssetsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Finding { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - ACTIVE = 1, - INACTIVE = 2 - } - } + namespace ListAssetsResponse { - /** Properties of an OrganizationSettings. */ - interface IOrganizationSettings { + /** Properties of a ListAssetsResult. */ + interface IListAssetsResult { - /** OrganizationSettings name */ - name?: (string|null); + /** ListAssetsResult asset */ + asset?: (google.cloud.securitycenter.v1beta1.IAsset|null); - /** OrganizationSettings enableAssetDiscovery */ - enableAssetDiscovery?: (boolean|null); + /** ListAssetsResult state */ + state?: (google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult.State|null); + } - /** OrganizationSettings assetDiscoveryConfig */ - assetDiscoveryConfig?: (google.cloud.securitycenter.v1beta1.OrganizationSettings.IAssetDiscoveryConfig|null); - } - - /** Represents an OrganizationSettings. */ - class OrganizationSettings implements IOrganizationSettings { - - /** - * Constructs a new OrganizationSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1beta1.IOrganizationSettings); - - /** OrganizationSettings name. */ - public name: string; - - /** OrganizationSettings enableAssetDiscovery. */ - public enableAssetDiscovery: boolean; - - /** OrganizationSettings assetDiscoveryConfig. */ - public assetDiscoveryConfig?: (google.cloud.securitycenter.v1beta1.OrganizationSettings.IAssetDiscoveryConfig|null); - - /** - * Creates a new OrganizationSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns OrganizationSettings instance - */ - public static create(properties?: google.cloud.securitycenter.v1beta1.IOrganizationSettings): google.cloud.securitycenter.v1beta1.OrganizationSettings; - - /** - * Encodes the specified OrganizationSettings message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.OrganizationSettings.verify|verify} messages. - * @param message OrganizationSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1beta1.IOrganizationSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OrganizationSettings message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.OrganizationSettings.verify|verify} messages. - * @param message OrganizationSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IOrganizationSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OrganizationSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OrganizationSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.OrganizationSettings; - - /** - * Decodes an OrganizationSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OrganizationSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.OrganizationSettings; - - /** - * Verifies an OrganizationSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OrganizationSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OrganizationSettings - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.OrganizationSettings; - - /** - * Creates a plain object from an OrganizationSettings message. Also converts values to other types if specified. - * @param message OrganizationSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1beta1.OrganizationSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OrganizationSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace OrganizationSettings { - - /** Properties of an AssetDiscoveryConfig. */ - interface IAssetDiscoveryConfig { - - /** AssetDiscoveryConfig projectIds */ - projectIds?: (string[]|null); - - /** AssetDiscoveryConfig inclusionMode */ - inclusionMode?: (google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode|null); - } - - /** Represents an AssetDiscoveryConfig. */ - class AssetDiscoveryConfig implements IAssetDiscoveryConfig { + /** Represents a ListAssetsResult. */ + class ListAssetsResult implements IListAssetsResult { /** - * Constructs a new AssetDiscoveryConfig. + * Constructs a new ListAssetsResult. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1beta1.OrganizationSettings.IAssetDiscoveryConfig); + constructor(properties?: google.cloud.securitycenter.v1beta1.ListAssetsResponse.IListAssetsResult); - /** AssetDiscoveryConfig projectIds. */ - public projectIds: string[]; + /** ListAssetsResult asset. */ + public asset?: (google.cloud.securitycenter.v1beta1.IAsset|null); - /** AssetDiscoveryConfig inclusionMode. */ - public inclusionMode: google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode; + /** ListAssetsResult state. */ + public state: google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult.State; /** - * Creates a new AssetDiscoveryConfig instance using the specified properties. + * Creates a new ListAssetsResult instance using the specified properties. * @param [properties] Properties to set - * @returns AssetDiscoveryConfig instance + * @returns ListAssetsResult instance */ - public static create(properties?: google.cloud.securitycenter.v1beta1.OrganizationSettings.IAssetDiscoveryConfig): google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig; + public static create(properties?: google.cloud.securitycenter.v1beta1.ListAssetsResponse.IListAssetsResult): google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult; /** - * Encodes the specified AssetDiscoveryConfig message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig.verify|verify} messages. - * @param message AssetDiscoveryConfig message or plain object to encode + * Encodes the specified ListAssetsResult message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult.verify|verify} messages. + * @param message ListAssetsResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1beta1.OrganizationSettings.IAssetDiscoveryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1beta1.ListAssetsResponse.IListAssetsResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AssetDiscoveryConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig.verify|verify} messages. - * @param message AssetDiscoveryConfig message or plain object to encode + * Encodes the specified ListAssetsResult message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult.verify|verify} messages. + * @param message ListAssetsResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.OrganizationSettings.IAssetDiscoveryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.ListAssetsResponse.IListAssetsResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AssetDiscoveryConfig message from the specified reader or buffer. + * Decodes a ListAssetsResult message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AssetDiscoveryConfig + * @returns ListAssetsResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult; /** - * Decodes an AssetDiscoveryConfig message from the specified reader or buffer, length delimited. + * Decodes a ListAssetsResult message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AssetDiscoveryConfig + * @returns ListAssetsResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult; /** - * Verifies an AssetDiscoveryConfig message. + * Verifies a ListAssetsResult message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an AssetDiscoveryConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ListAssetsResult message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AssetDiscoveryConfig + * @returns ListAssetsResult */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult; /** - * Creates a plain object from an AssetDiscoveryConfig message. Also converts values to other types if specified. - * @param message AssetDiscoveryConfig + * Creates a plain object from a ListAssetsResult message. Also converts values to other types if specified. + * @param message ListAssetsResult * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AssetDiscoveryConfig to JSON. + * Converts this ListAssetsResult to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace AssetDiscoveryConfig { + namespace ListAssetsResult { - /** InclusionMode enum. */ - enum InclusionMode { - INCLUSION_MODE_UNSPECIFIED = 0, - INCLUDE_ONLY = 1, - EXCLUDE = 2 + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + UNUSED = 1, + ADDED = 2, + REMOVED = 3, + ACTIVE = 4 } } } - /** Properties of a Source. */ - interface ISource { + /** Properties of a ListFindingsRequest. */ + interface IListFindingsRequest { - /** Source name */ - name?: (string|null); + /** ListFindingsRequest parent */ + parent?: (string|null); - /** Source displayName */ - displayName?: (string|null); + /** ListFindingsRequest filter */ + filter?: (string|null); - /** Source description */ - description?: (string|null); + /** ListFindingsRequest orderBy */ + orderBy?: (string|null); + + /** ListFindingsRequest readTime */ + readTime?: (google.protobuf.ITimestamp|null); + + /** ListFindingsRequest fieldMask */ + fieldMask?: (google.protobuf.IFieldMask|null); + + /** ListFindingsRequest pageToken */ + pageToken?: (string|null); + + /** ListFindingsRequest pageSize */ + pageSize?: (number|null); } - /** Represents a Source. */ - class Source implements ISource { + /** Represents a ListFindingsRequest. */ + class ListFindingsRequest implements IListFindingsRequest { /** - * Constructs a new Source. + * Constructs a new ListFindingsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1beta1.ISource); + constructor(properties?: google.cloud.securitycenter.v1beta1.IListFindingsRequest); - /** Source name. */ - public name: string; + /** ListFindingsRequest parent. */ + public parent: string; - /** Source displayName. */ - public displayName: string; + /** ListFindingsRequest filter. */ + public filter: string; - /** Source description. */ - public description: string; + /** ListFindingsRequest orderBy. */ + public orderBy: string; + + /** ListFindingsRequest readTime. */ + public readTime?: (google.protobuf.ITimestamp|null); + + /** ListFindingsRequest fieldMask. */ + public fieldMask?: (google.protobuf.IFieldMask|null); + + /** ListFindingsRequest pageToken. */ + public pageToken: string; + + /** ListFindingsRequest pageSize. */ + public pageSize: number; /** - * Creates a new Source instance using the specified properties. + * Creates a new ListFindingsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Source instance + * @returns ListFindingsRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1beta1.ISource): google.cloud.securitycenter.v1beta1.Source; + public static create(properties?: google.cloud.securitycenter.v1beta1.IListFindingsRequest): google.cloud.securitycenter.v1beta1.ListFindingsRequest; /** - * Encodes the specified Source message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.Source.verify|verify} messages. - * @param message Source message or plain object to encode + * Encodes the specified ListFindingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListFindingsRequest.verify|verify} messages. + * @param message ListFindingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1beta1.ISource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1beta1.IListFindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Source message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.Source.verify|verify} messages. - * @param message Source message or plain object to encode + * Encodes the specified ListFindingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListFindingsRequest.verify|verify} messages. + * @param message ListFindingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.ISource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IListFindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Source message from the specified reader or buffer. + * Decodes a ListFindingsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Source + * @returns ListFindingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.Source; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.ListFindingsRequest; /** - * Decodes a Source message from the specified reader or buffer, length delimited. + * Decodes a ListFindingsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Source + * @returns ListFindingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.Source; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.ListFindingsRequest; /** - * Verifies a Source message. + * Verifies a ListFindingsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Source message from a plain object. Also converts values to their respective internal types. + * Creates a ListFindingsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Source + * @returns ListFindingsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.Source; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.ListFindingsRequest; /** - * Creates a plain object from a Source message. Also converts values to other types if specified. - * @param message Source + * Creates a plain object from a ListFindingsRequest message. Also converts values to other types if specified. + * @param message ListFindingsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1beta1.Source, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1beta1.ListFindingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListFindingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListFindingsResponse. */ + interface IListFindingsResponse { + + /** ListFindingsResponse findings */ + findings?: (google.cloud.securitycenter.v1beta1.IFinding[]|null); + + /** ListFindingsResponse readTime */ + readTime?: (google.protobuf.ITimestamp|null); + + /** ListFindingsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListFindingsResponse totalSize */ + totalSize?: (number|null); + } + + /** Represents a ListFindingsResponse. */ + class ListFindingsResponse implements IListFindingsResponse { + + /** + * Constructs a new ListFindingsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1beta1.IListFindingsResponse); + + /** ListFindingsResponse findings. */ + public findings: google.cloud.securitycenter.v1beta1.IFinding[]; + + /** ListFindingsResponse readTime. */ + public readTime?: (google.protobuf.ITimestamp|null); + + /** ListFindingsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListFindingsResponse totalSize. */ + public totalSize: number; + + /** + * Creates a new ListFindingsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListFindingsResponse instance + */ + public static create(properties?: google.cloud.securitycenter.v1beta1.IListFindingsResponse): google.cloud.securitycenter.v1beta1.ListFindingsResponse; + + /** + * Encodes the specified ListFindingsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListFindingsResponse.verify|verify} messages. + * @param message ListFindingsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1beta1.IListFindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListFindingsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListFindingsResponse.verify|verify} messages. + * @param message ListFindingsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IListFindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListFindingsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListFindingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.ListFindingsResponse; + + /** + * Decodes a ListFindingsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListFindingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.ListFindingsResponse; + + /** + * Verifies a ListFindingsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListFindingsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListFindingsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.ListFindingsResponse; + + /** + * Creates a plain object from a ListFindingsResponse message. Also converts values to other types if specified. + * @param message ListFindingsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1beta1.ListFindingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListFindingsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SetFindingStateRequest. */ + interface ISetFindingStateRequest { + + /** SetFindingStateRequest name */ + name?: (string|null); + + /** SetFindingStateRequest state */ + state?: (google.cloud.securitycenter.v1beta1.Finding.State|null); + + /** SetFindingStateRequest startTime */ + startTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a SetFindingStateRequest. */ + class SetFindingStateRequest implements ISetFindingStateRequest { + + /** + * Constructs a new SetFindingStateRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1beta1.ISetFindingStateRequest); + + /** SetFindingStateRequest name. */ + public name: string; + + /** SetFindingStateRequest state. */ + public state: google.cloud.securitycenter.v1beta1.Finding.State; + + /** SetFindingStateRequest startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new SetFindingStateRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetFindingStateRequest instance + */ + public static create(properties?: google.cloud.securitycenter.v1beta1.ISetFindingStateRequest): google.cloud.securitycenter.v1beta1.SetFindingStateRequest; + + /** + * Encodes the specified SetFindingStateRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.SetFindingStateRequest.verify|verify} messages. + * @param message SetFindingStateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1beta1.ISetFindingStateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetFindingStateRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.SetFindingStateRequest.verify|verify} messages. + * @param message SetFindingStateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.ISetFindingStateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetFindingStateRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetFindingStateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.SetFindingStateRequest; + + /** + * Decodes a SetFindingStateRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetFindingStateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.SetFindingStateRequest; + + /** + * Verifies a SetFindingStateRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetFindingStateRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetFindingStateRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.SetFindingStateRequest; + + /** + * Creates a plain object from a SetFindingStateRequest message. Also converts values to other types if specified. + * @param message SetFindingStateRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1beta1.SetFindingStateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetFindingStateRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RunAssetDiscoveryRequest. */ + interface IRunAssetDiscoveryRequest { + + /** RunAssetDiscoveryRequest parent */ + parent?: (string|null); + } + + /** Represents a RunAssetDiscoveryRequest. */ + class RunAssetDiscoveryRequest implements IRunAssetDiscoveryRequest { + + /** + * Constructs a new RunAssetDiscoveryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1beta1.IRunAssetDiscoveryRequest); + + /** RunAssetDiscoveryRequest parent. */ + public parent: string; + + /** + * Creates a new RunAssetDiscoveryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RunAssetDiscoveryRequest instance + */ + public static create(properties?: google.cloud.securitycenter.v1beta1.IRunAssetDiscoveryRequest): google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest; + + /** + * Encodes the specified RunAssetDiscoveryRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest.verify|verify} messages. + * @param message RunAssetDiscoveryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1beta1.IRunAssetDiscoveryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunAssetDiscoveryRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest.verify|verify} messages. + * @param message RunAssetDiscoveryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IRunAssetDiscoveryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunAssetDiscoveryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunAssetDiscoveryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest; + + /** + * Decodes a RunAssetDiscoveryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunAssetDiscoveryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest; + + /** + * Verifies a RunAssetDiscoveryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RunAssetDiscoveryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunAssetDiscoveryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest; + + /** + * Creates a plain object from a RunAssetDiscoveryRequest message. Also converts values to other types if specified. + * @param message RunAssetDiscoveryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunAssetDiscoveryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateFindingRequest. */ + interface IUpdateFindingRequest { + + /** UpdateFindingRequest finding */ + finding?: (google.cloud.securitycenter.v1beta1.IFinding|null); + + /** UpdateFindingRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateFindingRequest. */ + class UpdateFindingRequest implements IUpdateFindingRequest { + + /** + * Constructs a new UpdateFindingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1beta1.IUpdateFindingRequest); + + /** UpdateFindingRequest finding. */ + public finding?: (google.cloud.securitycenter.v1beta1.IFinding|null); + + /** UpdateFindingRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateFindingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateFindingRequest instance + */ + public static create(properties?: google.cloud.securitycenter.v1beta1.IUpdateFindingRequest): google.cloud.securitycenter.v1beta1.UpdateFindingRequest; + + /** + * Encodes the specified UpdateFindingRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.UpdateFindingRequest.verify|verify} messages. + * @param message UpdateFindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1beta1.IUpdateFindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateFindingRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.UpdateFindingRequest.verify|verify} messages. + * @param message UpdateFindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IUpdateFindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateFindingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateFindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.UpdateFindingRequest; + + /** + * Decodes an UpdateFindingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateFindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.UpdateFindingRequest; + + /** + * Verifies an UpdateFindingRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateFindingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateFindingRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.UpdateFindingRequest; + + /** + * Creates a plain object from an UpdateFindingRequest message. Also converts values to other types if specified. + * @param message UpdateFindingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1beta1.UpdateFindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateFindingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateOrganizationSettingsRequest. */ + interface IUpdateOrganizationSettingsRequest { + + /** UpdateOrganizationSettingsRequest organizationSettings */ + organizationSettings?: (google.cloud.securitycenter.v1beta1.IOrganizationSettings|null); + + /** UpdateOrganizationSettingsRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateOrganizationSettingsRequest. */ + class UpdateOrganizationSettingsRequest implements IUpdateOrganizationSettingsRequest { + + /** + * Constructs a new UpdateOrganizationSettingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1beta1.IUpdateOrganizationSettingsRequest); + + /** UpdateOrganizationSettingsRequest organizationSettings. */ + public organizationSettings?: (google.cloud.securitycenter.v1beta1.IOrganizationSettings|null); + + /** UpdateOrganizationSettingsRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateOrganizationSettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateOrganizationSettingsRequest instance + */ + public static create(properties?: google.cloud.securitycenter.v1beta1.IUpdateOrganizationSettingsRequest): google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest; + + /** + * Encodes the specified UpdateOrganizationSettingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest.verify|verify} messages. + * @param message UpdateOrganizationSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1beta1.IUpdateOrganizationSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateOrganizationSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest.verify|verify} messages. + * @param message UpdateOrganizationSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IUpdateOrganizationSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateOrganizationSettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateOrganizationSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest; + + /** + * Decodes an UpdateOrganizationSettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateOrganizationSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest; + + /** + * Verifies an UpdateOrganizationSettingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateOrganizationSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateOrganizationSettingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest; + + /** + * Creates a plain object from an UpdateOrganizationSettingsRequest message. Also converts values to other types if specified. + * @param message UpdateOrganizationSettingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateOrganizationSettingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateSourceRequest. */ + interface IUpdateSourceRequest { + + /** UpdateSourceRequest source */ + source?: (google.cloud.securitycenter.v1beta1.ISource|null); + + /** UpdateSourceRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateSourceRequest. */ + class UpdateSourceRequest implements IUpdateSourceRequest { + + /** + * Constructs a new UpdateSourceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1beta1.IUpdateSourceRequest); + + /** UpdateSourceRequest source. */ + public source?: (google.cloud.securitycenter.v1beta1.ISource|null); + + /** UpdateSourceRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateSourceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateSourceRequest instance + */ + public static create(properties?: google.cloud.securitycenter.v1beta1.IUpdateSourceRequest): google.cloud.securitycenter.v1beta1.UpdateSourceRequest; + + /** + * Encodes the specified UpdateSourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.UpdateSourceRequest.verify|verify} messages. + * @param message UpdateSourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1beta1.IUpdateSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateSourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.UpdateSourceRequest.verify|verify} messages. + * @param message UpdateSourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IUpdateSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateSourceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.UpdateSourceRequest; + + /** + * Decodes an UpdateSourceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.UpdateSourceRequest; + + /** + * Verifies an UpdateSourceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateSourceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateSourceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.UpdateSourceRequest; + + /** + * Creates a plain object from an UpdateSourceRequest message. Also converts values to other types if specified. + * @param message UpdateSourceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1beta1.UpdateSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateSourceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateSecurityMarksRequest. */ + interface IUpdateSecurityMarksRequest { + + /** UpdateSecurityMarksRequest securityMarks */ + securityMarks?: (google.cloud.securitycenter.v1beta1.ISecurityMarks|null); + + /** UpdateSecurityMarksRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateSecurityMarksRequest startTime */ + startTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an UpdateSecurityMarksRequest. */ + class UpdateSecurityMarksRequest implements IUpdateSecurityMarksRequest { + + /** + * Constructs a new UpdateSecurityMarksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1beta1.IUpdateSecurityMarksRequest); + + /** UpdateSecurityMarksRequest securityMarks. */ + public securityMarks?: (google.cloud.securitycenter.v1beta1.ISecurityMarks|null); + + /** UpdateSecurityMarksRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateSecurityMarksRequest startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new UpdateSecurityMarksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateSecurityMarksRequest instance + */ + public static create(properties?: google.cloud.securitycenter.v1beta1.IUpdateSecurityMarksRequest): google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest; + + /** + * Encodes the specified UpdateSecurityMarksRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest.verify|verify} messages. + * @param message UpdateSecurityMarksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1beta1.IUpdateSecurityMarksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateSecurityMarksRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest.verify|verify} messages. + * @param message UpdateSecurityMarksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1beta1.IUpdateSecurityMarksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateSecurityMarksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateSecurityMarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest; + + /** + * Decodes an UpdateSecurityMarksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateSecurityMarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest; + + /** + * Verifies an UpdateSecurityMarksRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateSecurityMarksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateSecurityMarksRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest; + + /** + * Creates a plain object from an UpdateSecurityMarksRequest message. Also converts values to other types if specified. + * @param message UpdateSecurityMarksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateSecurityMarksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: google.api.ResourceDescriptor.History; + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this Source to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } - } - - /** Namespace api. */ - namespace api { /** Properties of a Http. */ interface IHttp { @@ -7693,242 +8174,6 @@ export namespace google { */ public toJSON(): { [k: string]: any }; } - - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5 - } - - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { - - /** ResourceDescriptor type */ - type?: (string|null); - - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); - - /** ResourceDescriptor nameField */ - nameField?: (string|null); - - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|null); - - /** ResourceDescriptor plural */ - plural?: (string|null); - - /** ResourceDescriptor singular */ - singular?: (string|null); - } - - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { - - /** - * Constructs a new ResourceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceDescriptor); - - /** ResourceDescriptor type. */ - public type: string; - - /** ResourceDescriptor pattern. */ - public pattern: string[]; - - /** ResourceDescriptor nameField. */ - public nameField: string; - - /** ResourceDescriptor history. */ - public history: google.api.ResourceDescriptor.History; - - /** ResourceDescriptor plural. */ - public plural: string; - - /** ResourceDescriptor singular. */ - public singular: string; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceDescriptor instance - */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; - - /** - * Verifies a ResourceDescriptor message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace ResourceDescriptor { - - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } - } - - /** Properties of a ResourceReference. */ - interface IResourceReference { - - /** ResourceReference type */ - type?: (string|null); - - /** ResourceReference childType */ - childType?: (string|null); - } - - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { - - /** - * Constructs a new ResourceReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceReference); - - /** ResourceReference type. */ - public type: string; - - /** ResourceReference childType. */ - public childType: string; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceReference instance - */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; - - /** - * Verifies a ResourceReference message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceReference - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } } /** Namespace protobuf. */ diff --git a/packages/google-cloud-securitycenter/protos/protos.js b/packages/google-cloud-securitycenter/protos/protos.js index bc5292fa10f..88c9349500e 100644 --- a/packages/google-cloud-securitycenter/protos/protos.js +++ b/packages/google-cloud-securitycenter/protos/protos.js @@ -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. @@ -66,757 +66,888 @@ */ var v1 = {}; - v1.SecurityCenter = (function() { + v1.Finding = (function() { /** - * Constructs a new SecurityCenter service. + * Properties of a Finding. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a SecurityCenter - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function SecurityCenter(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (SecurityCenter.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = SecurityCenter; - - /** - * Creates new SecurityCenter service using the specified rpc implementation. - * @function create - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {SecurityCenter} RPC service. Useful where requests and/or responses are streamed. + * @interface IFinding + * @property {string|null} [name] Finding name + * @property {string|null} [parent] Finding parent + * @property {string|null} [resourceName] Finding resourceName + * @property {google.cloud.securitycenter.v1.Finding.State|null} [state] Finding state + * @property {string|null} [category] Finding category + * @property {string|null} [externalUri] Finding externalUri + * @property {Object.|null} [sourceProperties] Finding sourceProperties + * @property {google.cloud.securitycenter.v1.ISecurityMarks|null} [securityMarks] Finding securityMarks + * @property {google.protobuf.ITimestamp|null} [eventTime] Finding eventTime + * @property {google.protobuf.ITimestamp|null} [createTime] Finding createTime */ - SecurityCenter.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#createSource}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef CreateSourceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.Source} [response] Source + * Constructs a new Finding. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a Finding. + * @implements IFinding + * @constructor + * @param {google.cloud.securitycenter.v1.IFinding=} [properties] Properties to set */ + function Finding(properties) { + this.sourceProperties = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls CreateSource. - * @function createSource - * @memberof google.cloud.securitycenter.v1.SecurityCenter + * Finding name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.Finding * @instance - * @param {google.cloud.securitycenter.v1.ICreateSourceRequest} request CreateSourceRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.CreateSourceCallback} callback Node-style callback called with the error, if any, and Source - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(SecurityCenter.prototype.createSource = function createSource(request, callback) { - return this.rpcCall(createSource, $root.google.cloud.securitycenter.v1.CreateSourceRequest, $root.google.cloud.securitycenter.v1.Source, request, callback); - }, "name", { value: "CreateSource" }); + Finding.prototype.name = ""; /** - * Calls CreateSource. - * @function createSource - * @memberof google.cloud.securitycenter.v1.SecurityCenter + * Finding parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1.Finding * @instance - * @param {google.cloud.securitycenter.v1.ICreateSourceRequest} request CreateSourceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + Finding.prototype.parent = ""; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#createFinding}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef CreateFindingCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.Finding} [response] Finding + * Finding resourceName. + * @member {string} resourceName + * @memberof google.cloud.securitycenter.v1.Finding + * @instance */ + Finding.prototype.resourceName = ""; /** - * Calls CreateFinding. - * @function createFinding - * @memberof google.cloud.securitycenter.v1.SecurityCenter + * Finding state. + * @member {google.cloud.securitycenter.v1.Finding.State} state + * @memberof google.cloud.securitycenter.v1.Finding * @instance - * @param {google.cloud.securitycenter.v1.ICreateFindingRequest} request CreateFindingRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.CreateFindingCallback} callback Node-style callback called with the error, if any, and Finding - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(SecurityCenter.prototype.createFinding = function createFinding(request, callback) { - return this.rpcCall(createFinding, $root.google.cloud.securitycenter.v1.CreateFindingRequest, $root.google.cloud.securitycenter.v1.Finding, request, callback); - }, "name", { value: "CreateFinding" }); + Finding.prototype.state = 0; /** - * Calls CreateFinding. - * @function createFinding - * @memberof google.cloud.securitycenter.v1.SecurityCenter + * Finding category. + * @member {string} category + * @memberof google.cloud.securitycenter.v1.Finding * @instance - * @param {google.cloud.securitycenter.v1.ICreateFindingRequest} request CreateFindingRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + Finding.prototype.category = ""; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#getIamPolicy}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef GetIamPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.Policy} [response] Policy + * Finding externalUri. + * @member {string} externalUri + * @memberof google.cloud.securitycenter.v1.Finding + * @instance */ + Finding.prototype.externalUri = ""; /** - * Calls GetIamPolicy. - * @function getIamPolicy - * @memberof google.cloud.securitycenter.v1.SecurityCenter + * Finding sourceProperties. + * @member {Object.} sourceProperties + * @memberof google.cloud.securitycenter.v1.Finding * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(SecurityCenter.prototype.getIamPolicy = function getIamPolicy(request, callback) { - return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); - }, "name", { value: "GetIamPolicy" }); + Finding.prototype.sourceProperties = $util.emptyObject; /** - * Calls GetIamPolicy. - * @function getIamPolicy - * @memberof google.cloud.securitycenter.v1.SecurityCenter + * Finding securityMarks. + * @member {google.cloud.securitycenter.v1.ISecurityMarks|null|undefined} securityMarks + * @memberof google.cloud.securitycenter.v1.Finding * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + Finding.prototype.securityMarks = null; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#getOrganizationSettings}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef GetOrganizationSettingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.OrganizationSettings} [response] OrganizationSettings + * Finding eventTime. + * @member {google.protobuf.ITimestamp|null|undefined} eventTime + * @memberof google.cloud.securitycenter.v1.Finding + * @instance */ + Finding.prototype.eventTime = null; /** - * Calls GetOrganizationSettings. - * @function getOrganizationSettings - * @memberof google.cloud.securitycenter.v1.SecurityCenter + * Finding createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.securitycenter.v1.Finding * @instance - * @param {google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest} request GetOrganizationSettingsRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.GetOrganizationSettingsCallback} callback Node-style callback called with the error, if any, and OrganizationSettings - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(SecurityCenter.prototype.getOrganizationSettings = function getOrganizationSettings(request, callback) { - return this.rpcCall(getOrganizationSettings, $root.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest, $root.google.cloud.securitycenter.v1.OrganizationSettings, request, callback); - }, "name", { value: "GetOrganizationSettings" }); + Finding.prototype.createTime = null; /** - * Calls GetOrganizationSettings. - * @function getOrganizationSettings - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest} request GetOrganizationSettingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new Finding instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.Finding + * @static + * @param {google.cloud.securitycenter.v1.IFinding=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Finding} Finding instance */ + Finding.create = function create(properties) { + return new Finding(properties); + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#getSource}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef GetSourceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.Source} [response] Source + * Encodes the specified Finding message. Does not implicitly {@link google.cloud.securitycenter.v1.Finding.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.Finding + * @static + * @param {google.cloud.securitycenter.v1.IFinding} message Finding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + Finding.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.parent); + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.resourceName); + if (message.state != null && message.hasOwnProperty("state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.category != null && message.hasOwnProperty("category")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.category); + if (message.externalUri != null && message.hasOwnProperty("externalUri")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.externalUri); + if (message.sourceProperties != null && message.hasOwnProperty("sourceProperties")) + for (var keys = Object.keys(message.sourceProperties), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.protobuf.Value.encode(message.sourceProperties[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) + $root.google.cloud.securitycenter.v1.SecurityMarks.encode(message.securityMarks, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.eventTime != null && message.hasOwnProperty("eventTime")) + $root.google.protobuf.Timestamp.encode(message.eventTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.createTime != null && message.hasOwnProperty("createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; /** - * Calls GetSource. - * @function getSource - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IGetSourceRequest} request GetSourceRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.GetSourceCallback} callback Node-style callback called with the error, if any, and Source - * @returns {undefined} - * @variation 1 + * Encodes the specified Finding message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Finding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.Finding + * @static + * @param {google.cloud.securitycenter.v1.IFinding} message Finding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(SecurityCenter.prototype.getSource = function getSource(request, callback) { - return this.rpcCall(getSource, $root.google.cloud.securitycenter.v1.GetSourceRequest, $root.google.cloud.securitycenter.v1.Source, request, callback); - }, "name", { value: "GetSource" }); + Finding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls GetSource. - * @function getSource - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IGetSourceRequest} request GetSourceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#groupAssets}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef GroupAssetsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.GroupAssetsResponse} [response] GroupAssetsResponse + * Decodes a Finding message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.Finding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.Finding} Finding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + Finding.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.Finding(), key; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.parent = reader.string(); + break; + case 3: + message.resourceName = reader.string(); + break; + case 4: + message.state = reader.int32(); + break; + case 5: + message.category = reader.string(); + break; + case 6: + message.externalUri = reader.string(); + break; + case 7: + reader.skip().pos++; + if (message.sourceProperties === $util.emptyObject) + message.sourceProperties = {}; + key = reader.string(); + reader.pos++; + message.sourceProperties[key] = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + case 8: + message.securityMarks = $root.google.cloud.securitycenter.v1.SecurityMarks.decode(reader, reader.uint32()); + break; + case 9: + message.eventTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 10: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls GroupAssets. - * @function groupAssets - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IGroupAssetsRequest} request GroupAssetsRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.GroupAssetsCallback} callback Node-style callback called with the error, if any, and GroupAssetsResponse - * @returns {undefined} - * @variation 1 + * Decodes a Finding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.Finding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.Finding} Finding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(SecurityCenter.prototype.groupAssets = function groupAssets(request, callback) { - return this.rpcCall(groupAssets, $root.google.cloud.securitycenter.v1.GroupAssetsRequest, $root.google.cloud.securitycenter.v1.GroupAssetsResponse, request, callback); - }, "name", { value: "GroupAssets" }); + Finding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls GroupAssets. - * @function groupAssets - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IGroupAssetsRequest} request GroupAssetsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a Finding message. + * @function verify + * @memberof google.cloud.securitycenter.v1.Finding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + Finding.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + if (!$util.isString(message.resourceName)) + return "resourceName: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.category != null && message.hasOwnProperty("category")) + if (!$util.isString(message.category)) + return "category: string expected"; + if (message.externalUri != null && message.hasOwnProperty("externalUri")) + if (!$util.isString(message.externalUri)) + return "externalUri: string expected"; + if (message.sourceProperties != null && message.hasOwnProperty("sourceProperties")) { + if (!$util.isObject(message.sourceProperties)) + return "sourceProperties: object expected"; + var key = Object.keys(message.sourceProperties); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.sourceProperties[key[i]]); + if (error) + return "sourceProperties." + error; + } + } + if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) { + var error = $root.google.cloud.securitycenter.v1.SecurityMarks.verify(message.securityMarks); + if (error) + return "securityMarks." + error; + } + if (message.eventTime != null && message.hasOwnProperty("eventTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.eventTime); + if (error) + return "eventTime." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + return null; + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#groupFindings}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef GroupFindingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.GroupFindingsResponse} [response] GroupFindingsResponse + * Creates a Finding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.Finding + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.Finding} Finding */ + Finding.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Finding) + return object; + var message = new $root.google.cloud.securitycenter.v1.Finding(); + if (object.name != null) + message.name = String(object.name); + if (object.parent != null) + message.parent = String(object.parent); + if (object.resourceName != null) + message.resourceName = String(object.resourceName); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ACTIVE": + case 1: + message.state = 1; + break; + case "INACTIVE": + case 2: + message.state = 2; + break; + } + if (object.category != null) + message.category = String(object.category); + if (object.externalUri != null) + message.externalUri = String(object.externalUri); + if (object.sourceProperties) { + if (typeof object.sourceProperties !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.sourceProperties: object expected"); + message.sourceProperties = {}; + for (var keys = Object.keys(object.sourceProperties), i = 0; i < keys.length; ++i) { + if (typeof object.sourceProperties[keys[i]] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.sourceProperties: object expected"); + message.sourceProperties[keys[i]] = $root.google.protobuf.Value.fromObject(object.sourceProperties[keys[i]]); + } + } + if (object.securityMarks != null) { + if (typeof object.securityMarks !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.securityMarks: object expected"); + message.securityMarks = $root.google.cloud.securitycenter.v1.SecurityMarks.fromObject(object.securityMarks); + } + if (object.eventTime != null) { + if (typeof object.eventTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.eventTime: object expected"); + message.eventTime = $root.google.protobuf.Timestamp.fromObject(object.eventTime); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + return message; + }; /** - * Calls GroupFindings. - * @function groupFindings - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IGroupFindingsRequest} request GroupFindingsRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.GroupFindingsCallback} callback Node-style callback called with the error, if any, and GroupFindingsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecurityCenter.prototype.groupFindings = function groupFindings(request, callback) { - return this.rpcCall(groupFindings, $root.google.cloud.securitycenter.v1.GroupFindingsRequest, $root.google.cloud.securitycenter.v1.GroupFindingsResponse, request, callback); - }, "name", { value: "GroupFindings" }); - - /** - * Calls GroupFindings. - * @function groupFindings - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IGroupFindingsRequest} request GroupFindingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#listAssets}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef ListAssetsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.ListAssetsResponse} [response] ListAssetsResponse + * Creates a plain object from a Finding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.Finding + * @static + * @param {google.cloud.securitycenter.v1.Finding} message Finding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + Finding.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.sourceProperties = {}; + if (options.defaults) { + object.name = ""; + object.parent = ""; + object.resourceName = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.category = ""; + object.externalUri = ""; + object.securityMarks = null; + object.eventTime = null; + object.createTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + object.resourceName = message.resourceName; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.securitycenter.v1.Finding.State[message.state] : message.state; + if (message.category != null && message.hasOwnProperty("category")) + object.category = message.category; + if (message.externalUri != null && message.hasOwnProperty("externalUri")) + object.externalUri = message.externalUri; + var keys2; + if (message.sourceProperties && (keys2 = Object.keys(message.sourceProperties)).length) { + object.sourceProperties = {}; + for (var j = 0; j < keys2.length; ++j) + object.sourceProperties[keys2[j]] = $root.google.protobuf.Value.toObject(message.sourceProperties[keys2[j]], options); + } + if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) + object.securityMarks = $root.google.cloud.securitycenter.v1.SecurityMarks.toObject(message.securityMarks, options); + if (message.eventTime != null && message.hasOwnProperty("eventTime")) + object.eventTime = $root.google.protobuf.Timestamp.toObject(message.eventTime, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + return object; + }; /** - * Calls ListAssets. - * @function listAssets - * @memberof google.cloud.securitycenter.v1.SecurityCenter + * Converts this Finding to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.Finding * @instance - * @param {google.cloud.securitycenter.v1.IListAssetsRequest} request ListAssetsRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.ListAssetsCallback} callback Node-style callback called with the error, if any, and ListAssetsResponse - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(SecurityCenter.prototype.listAssets = function listAssets(request, callback) { - return this.rpcCall(listAssets, $root.google.cloud.securitycenter.v1.ListAssetsRequest, $root.google.cloud.securitycenter.v1.ListAssetsResponse, request, callback); - }, "name", { value: "ListAssets" }); + Finding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls ListAssets. - * @function listAssets - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IListAssetsRequest} request ListAssetsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * State enum. + * @name google.cloud.securitycenter.v1.Finding.State + * @enum {string} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} INACTIVE=2 INACTIVE value */ + Finding.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "INACTIVE"] = 2; + return values; + })(); - /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#listFindings}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef ListFindingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.ListFindingsResponse} [response] ListFindingsResponse - */ + return Finding; + })(); - /** - * Calls ListFindings. - * @function listFindings - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IListFindingsRequest} request ListFindingsRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.ListFindingsCallback} callback Node-style callback called with the error, if any, and ListFindingsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecurityCenter.prototype.listFindings = function listFindings(request, callback) { - return this.rpcCall(listFindings, $root.google.cloud.securitycenter.v1.ListFindingsRequest, $root.google.cloud.securitycenter.v1.ListFindingsResponse, request, callback); - }, "name", { value: "ListFindings" }); + v1.SecurityMarks = (function() { /** - * Calls ListFindings. - * @function listFindings - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IListFindingsRequest} request ListFindingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Properties of a SecurityMarks. + * @memberof google.cloud.securitycenter.v1 + * @interface ISecurityMarks + * @property {string|null} [name] SecurityMarks name + * @property {Object.|null} [marks] SecurityMarks marks */ /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#listSources}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef ListSourcesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.ListSourcesResponse} [response] ListSourcesResponse + * Constructs a new SecurityMarks. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a SecurityMarks. + * @implements ISecurityMarks + * @constructor + * @param {google.cloud.securitycenter.v1.ISecurityMarks=} [properties] Properties to set */ + function SecurityMarks(properties) { + this.marks = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls ListSources. - * @function listSources - * @memberof google.cloud.securitycenter.v1.SecurityCenter + * SecurityMarks name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.SecurityMarks * @instance - * @param {google.cloud.securitycenter.v1.IListSourcesRequest} request ListSourcesRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.ListSourcesCallback} callback Node-style callback called with the error, if any, and ListSourcesResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(SecurityCenter.prototype.listSources = function listSources(request, callback) { - return this.rpcCall(listSources, $root.google.cloud.securitycenter.v1.ListSourcesRequest, $root.google.cloud.securitycenter.v1.ListSourcesResponse, request, callback); - }, "name", { value: "ListSources" }); + SecurityMarks.prototype.name = ""; /** - * Calls ListSources. - * @function listSources - * @memberof google.cloud.securitycenter.v1.SecurityCenter + * SecurityMarks marks. + * @member {Object.} marks + * @memberof google.cloud.securitycenter.v1.SecurityMarks * @instance - * @param {google.cloud.securitycenter.v1.IListSourcesRequest} request ListSourcesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + SecurityMarks.prototype.marks = $util.emptyObject; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#runAssetDiscovery}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef RunAssetDiscoveryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Creates a new SecurityMarks instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.SecurityMarks + * @static + * @param {google.cloud.securitycenter.v1.ISecurityMarks=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.SecurityMarks} SecurityMarks instance */ + SecurityMarks.create = function create(properties) { + return new SecurityMarks(properties); + }; /** - * Calls RunAssetDiscovery. - * @function runAssetDiscovery - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest} request RunAssetDiscoveryRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.RunAssetDiscoveryCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Encodes the specified SecurityMarks message. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityMarks.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.SecurityMarks + * @static + * @param {google.cloud.securitycenter.v1.ISecurityMarks} message SecurityMarks message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(SecurityCenter.prototype.runAssetDiscovery = function runAssetDiscovery(request, callback) { - return this.rpcCall(runAssetDiscovery, $root.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "RunAssetDiscovery" }); + SecurityMarks.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.marks != null && message.hasOwnProperty("marks")) + for (var keys = Object.keys(message.marks), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.marks[keys[i]]).ldelim(); + return writer; + }; /** - * Calls RunAssetDiscovery. - * @function runAssetDiscovery - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest} request RunAssetDiscoveryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified SecurityMarks message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityMarks.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.SecurityMarks + * @static + * @param {google.cloud.securitycenter.v1.ISecurityMarks} message SecurityMarks message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + SecurityMarks.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#setFindingState}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef SetFindingStateCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.Finding} [response] Finding + * Decodes a SecurityMarks message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.SecurityMarks + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.SecurityMarks} SecurityMarks + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - - /** - * Calls SetFindingState. - * @function setFindingState - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.ISetFindingStateRequest} request SetFindingStateRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.SetFindingStateCallback} callback Node-style callback called with the error, if any, and Finding - * @returns {undefined} - * @variation 1 + SecurityMarks.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.SecurityMarks(), key; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + reader.skip().pos++; + if (message.marks === $util.emptyObject) + message.marks = {}; + key = reader.string(); + reader.pos++; + message.marks[key] = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SecurityMarks message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.SecurityMarks + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.SecurityMarks} SecurityMarks + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(SecurityCenter.prototype.setFindingState = function setFindingState(request, callback) { - return this.rpcCall(setFindingState, $root.google.cloud.securitycenter.v1.SetFindingStateRequest, $root.google.cloud.securitycenter.v1.Finding, request, callback); - }, "name", { value: "SetFindingState" }); + SecurityMarks.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls SetFindingState. - * @function setFindingState - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.ISetFindingStateRequest} request SetFindingStateRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a SecurityMarks message. + * @function verify + * @memberof google.cloud.securitycenter.v1.SecurityMarks + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + SecurityMarks.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.marks != null && message.hasOwnProperty("marks")) { + if (!$util.isObject(message.marks)) + return "marks: object expected"; + var key = Object.keys(message.marks); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.marks[key[i]])) + return "marks: string{k:string} expected"; + } + return null; + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#setIamPolicy}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef SetIamPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.Policy} [response] Policy + * Creates a SecurityMarks message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.SecurityMarks + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.SecurityMarks} SecurityMarks */ + SecurityMarks.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.SecurityMarks) + return object; + var message = new $root.google.cloud.securitycenter.v1.SecurityMarks(); + if (object.name != null) + message.name = String(object.name); + if (object.marks) { + if (typeof object.marks !== "object") + throw TypeError(".google.cloud.securitycenter.v1.SecurityMarks.marks: object expected"); + message.marks = {}; + for (var keys = Object.keys(object.marks), i = 0; i < keys.length; ++i) + message.marks[keys[i]] = String(object.marks[keys[i]]); + } + return message; + }; /** - * Calls SetIamPolicy. - * @function setIamPolicy - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 + * Creates a plain object from a SecurityMarks message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.SecurityMarks + * @static + * @param {google.cloud.securitycenter.v1.SecurityMarks} message SecurityMarks + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(SecurityCenter.prototype.setIamPolicy = function setIamPolicy(request, callback) { - return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); - }, "name", { value: "SetIamPolicy" }); + SecurityMarks.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.marks = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + var keys2; + if (message.marks && (keys2 = Object.keys(message.marks)).length) { + object.marks = {}; + for (var j = 0; j < keys2.length; ++j) + object.marks[keys2[j]] = message.marks[keys2[j]]; + } + return object; + }; /** - * Calls SetIamPolicy. - * @function setIamPolicy - * @memberof google.cloud.securitycenter.v1.SecurityCenter + * Converts this SecurityMarks to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.SecurityMarks * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + SecurityMarks.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SecurityMarks; + })(); + + v1.Asset = (function() { /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#testIamPermissions}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef TestIamPermissionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse + * Properties of an Asset. + * @memberof google.cloud.securitycenter.v1 + * @interface IAsset + * @property {string|null} [name] Asset name + * @property {google.cloud.securitycenter.v1.Asset.ISecurityCenterProperties|null} [securityCenterProperties] Asset securityCenterProperties + * @property {Object.|null} [resourceProperties] Asset resourceProperties + * @property {google.cloud.securitycenter.v1.ISecurityMarks|null} [securityMarks] Asset securityMarks + * @property {google.protobuf.ITimestamp|null} [createTime] Asset createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Asset updateTime + * @property {google.cloud.securitycenter.v1.Asset.IIamPolicy|null} [iamPolicy] Asset iamPolicy */ /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse - * @returns {undefined} - * @variation 1 + * Constructs a new Asset. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents an Asset. + * @implements IAsset + * @constructor + * @param {google.cloud.securitycenter.v1.IAsset=} [properties] Properties to set */ - Object.defineProperty(SecurityCenter.prototype.testIamPermissions = function testIamPermissions(request, callback) { - return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); - }, "name", { value: "TestIamPermissions" }); + function Asset(properties) { + this.resourceProperties = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.cloud.securitycenter.v1.SecurityCenter + * Asset name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.Asset * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + Asset.prototype.name = ""; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#updateFinding}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef UpdateFindingCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.Finding} [response] Finding + * Asset securityCenterProperties. + * @member {google.cloud.securitycenter.v1.Asset.ISecurityCenterProperties|null|undefined} securityCenterProperties + * @memberof google.cloud.securitycenter.v1.Asset + * @instance */ + Asset.prototype.securityCenterProperties = null; /** - * Calls UpdateFinding. - * @function updateFinding - * @memberof google.cloud.securitycenter.v1.SecurityCenter + * Asset resourceProperties. + * @member {Object.} resourceProperties + * @memberof google.cloud.securitycenter.v1.Asset * @instance - * @param {google.cloud.securitycenter.v1.IUpdateFindingRequest} request UpdateFindingRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.UpdateFindingCallback} callback Node-style callback called with the error, if any, and Finding - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(SecurityCenter.prototype.updateFinding = function updateFinding(request, callback) { - return this.rpcCall(updateFinding, $root.google.cloud.securitycenter.v1.UpdateFindingRequest, $root.google.cloud.securitycenter.v1.Finding, request, callback); - }, "name", { value: "UpdateFinding" }); + Asset.prototype.resourceProperties = $util.emptyObject; /** - * Calls UpdateFinding. - * @function updateFinding - * @memberof google.cloud.securitycenter.v1.SecurityCenter + * Asset securityMarks. + * @member {google.cloud.securitycenter.v1.ISecurityMarks|null|undefined} securityMarks + * @memberof google.cloud.securitycenter.v1.Asset * @instance - * @param {google.cloud.securitycenter.v1.IUpdateFindingRequest} request UpdateFindingRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + Asset.prototype.securityMarks = null; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#updateOrganizationSettings}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef UpdateOrganizationSettingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.OrganizationSettings} [response] OrganizationSettings + * Asset createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.securitycenter.v1.Asset + * @instance */ + Asset.prototype.createTime = null; /** - * Calls UpdateOrganizationSettings. - * @function updateOrganizationSettings - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest} request UpdateOrganizationSettingsRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.UpdateOrganizationSettingsCallback} callback Node-style callback called with the error, if any, and OrganizationSettings - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecurityCenter.prototype.updateOrganizationSettings = function updateOrganizationSettings(request, callback) { - return this.rpcCall(updateOrganizationSettings, $root.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest, $root.google.cloud.securitycenter.v1.OrganizationSettings, request, callback); - }, "name", { value: "UpdateOrganizationSettings" }); - - /** - * Calls UpdateOrganizationSettings. - * @function updateOrganizationSettings - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest} request UpdateOrganizationSettingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#updateSource}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef UpdateSourceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.Source} [response] Source - */ - - /** - * Calls UpdateSource. - * @function updateSource - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IUpdateSourceRequest} request UpdateSourceRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.UpdateSourceCallback} callback Node-style callback called with the error, if any, and Source - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecurityCenter.prototype.updateSource = function updateSource(request, callback) { - return this.rpcCall(updateSource, $root.google.cloud.securitycenter.v1.UpdateSourceRequest, $root.google.cloud.securitycenter.v1.Source, request, callback); - }, "name", { value: "UpdateSource" }); - - /** - * Calls UpdateSource. - * @function updateSource - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IUpdateSourceRequest} request UpdateSourceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#updateSecurityMarks}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef UpdateSecurityMarksCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.SecurityMarks} [response] SecurityMarks - */ - - /** - * Calls UpdateSecurityMarks. - * @function updateSecurityMarks - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest} request UpdateSecurityMarksRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.UpdateSecurityMarksCallback} callback Node-style callback called with the error, if any, and SecurityMarks - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecurityCenter.prototype.updateSecurityMarks = function updateSecurityMarks(request, callback) { - return this.rpcCall(updateSecurityMarks, $root.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest, $root.google.cloud.securitycenter.v1.SecurityMarks, request, callback); - }, "name", { value: "UpdateSecurityMarks" }); - - /** - * Calls UpdateSecurityMarks. - * @function updateSecurityMarks - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest} request UpdateSecurityMarksRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return SecurityCenter; - })(); - - v1.CreateFindingRequest = (function() { - - /** - * Properties of a CreateFindingRequest. - * @memberof google.cloud.securitycenter.v1 - * @interface ICreateFindingRequest - * @property {string|null} [parent] CreateFindingRequest parent - * @property {string|null} [findingId] CreateFindingRequest findingId - * @property {google.cloud.securitycenter.v1.IFinding|null} [finding] CreateFindingRequest finding - */ - - /** - * Constructs a new CreateFindingRequest. - * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a CreateFindingRequest. - * @implements ICreateFindingRequest - * @constructor - * @param {google.cloud.securitycenter.v1.ICreateFindingRequest=} [properties] Properties to set - */ - function CreateFindingRequest(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]]; - } - - /** - * CreateFindingRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycenter.v1.CreateFindingRequest - * @instance - */ - CreateFindingRequest.prototype.parent = ""; - - /** - * CreateFindingRequest findingId. - * @member {string} findingId - * @memberof google.cloud.securitycenter.v1.CreateFindingRequest + * Asset updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.securitycenter.v1.Asset * @instance */ - CreateFindingRequest.prototype.findingId = ""; + Asset.prototype.updateTime = null; /** - * CreateFindingRequest finding. - * @member {google.cloud.securitycenter.v1.IFinding|null|undefined} finding - * @memberof google.cloud.securitycenter.v1.CreateFindingRequest + * Asset iamPolicy. + * @member {google.cloud.securitycenter.v1.Asset.IIamPolicy|null|undefined} iamPolicy + * @memberof google.cloud.securitycenter.v1.Asset * @instance */ - CreateFindingRequest.prototype.finding = null; + Asset.prototype.iamPolicy = null; /** - * Creates a new CreateFindingRequest instance using the specified properties. + * Creates a new Asset instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.CreateFindingRequest + * @memberof google.cloud.securitycenter.v1.Asset * @static - * @param {google.cloud.securitycenter.v1.ICreateFindingRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.CreateFindingRequest} CreateFindingRequest instance + * @param {google.cloud.securitycenter.v1.IAsset=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Asset} Asset instance */ - CreateFindingRequest.create = function create(properties) { - return new CreateFindingRequest(properties); + Asset.create = function create(properties) { + return new Asset(properties); }; /** - * Encodes the specified CreateFindingRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.CreateFindingRequest.verify|verify} messages. + * Encodes the specified Asset message. Does not implicitly {@link google.cloud.securitycenter.v1.Asset.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.CreateFindingRequest + * @memberof google.cloud.securitycenter.v1.Asset * @static - * @param {google.cloud.securitycenter.v1.ICreateFindingRequest} message CreateFindingRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IAsset} message Asset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateFindingRequest.encode = function encode(message, writer) { + Asset.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.findingId != null && message.hasOwnProperty("findingId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.findingId); - if (message.finding != null && message.hasOwnProperty("finding")) - $root.google.cloud.securitycenter.v1.Finding.encode(message.finding, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.securityCenterProperties != null && message.hasOwnProperty("securityCenterProperties")) + $root.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.encode(message.securityCenterProperties, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.resourceProperties != null && message.hasOwnProperty("resourceProperties")) + for (var keys = Object.keys(message.resourceProperties), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.protobuf.Value.encode(message.resourceProperties[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) + $root.google.cloud.securitycenter.v1.SecurityMarks.encode(message.securityMarks, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.createTime != null && message.hasOwnProperty("createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.iamPolicy != null && message.hasOwnProperty("iamPolicy")) + $root.google.cloud.securitycenter.v1.Asset.IamPolicy.encode(message.iamPolicy, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateFindingRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CreateFindingRequest.verify|verify} messages. + * Encodes the specified Asset message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Asset.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.CreateFindingRequest + * @memberof google.cloud.securitycenter.v1.Asset * @static - * @param {google.cloud.securitycenter.v1.ICreateFindingRequest} message CreateFindingRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IAsset} message Asset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateFindingRequest.encodeDelimited = function encodeDelimited(message, writer) { + Asset.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateFindingRequest message from the specified reader or buffer. + * Decodes an Asset message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.CreateFindingRequest + * @memberof google.cloud.securitycenter.v1.Asset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.CreateFindingRequest} CreateFindingRequest + * @returns {google.cloud.securitycenter.v1.Asset} Asset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateFindingRequest.decode = function decode(reader, length) { + Asset.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.CreateFindingRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.Asset(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.name = reader.string(); break; case 2: - message.findingId = reader.string(); + message.securityCenterProperties = $root.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.decode(reader, reader.uint32()); break; - case 3: - message.finding = $root.google.cloud.securitycenter.v1.Finding.decode(reader, reader.uint32()); + case 7: + reader.skip().pos++; + if (message.resourceProperties === $util.emptyObject) + message.resourceProperties = {}; + key = reader.string(); + reader.pos++; + message.resourceProperties[key] = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + case 8: + message.securityMarks = $root.google.cloud.securitycenter.v1.SecurityMarks.decode(reader, reader.uint32()); + break; + case 9: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 10: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 11: + message.iamPolicy = $root.google.cloud.securitycenter.v1.Asset.IamPolicy.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -827,531 +958,749 @@ }; /** - * Decodes a CreateFindingRequest message from the specified reader or buffer, length delimited. + * Decodes an Asset message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.CreateFindingRequest + * @memberof google.cloud.securitycenter.v1.Asset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.CreateFindingRequest} CreateFindingRequest + * @returns {google.cloud.securitycenter.v1.Asset} Asset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateFindingRequest.decodeDelimited = function decodeDelimited(reader) { + Asset.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateFindingRequest message. + * Verifies an Asset message. * @function verify - * @memberof google.cloud.securitycenter.v1.CreateFindingRequest + * @memberof google.cloud.securitycenter.v1.Asset * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateFindingRequest.verify = function verify(message) { + Asset.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.findingId != null && message.hasOwnProperty("findingId")) - if (!$util.isString(message.findingId)) - return "findingId: string expected"; - if (message.finding != null && message.hasOwnProperty("finding")) { - var error = $root.google.cloud.securitycenter.v1.Finding.verify(message.finding); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.securityCenterProperties != null && message.hasOwnProperty("securityCenterProperties")) { + var error = $root.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.verify(message.securityCenterProperties); if (error) - return "finding." + error; + return "securityCenterProperties." + error; } - return null; - }; - - /** - * Creates a CreateFindingRequest message from a plain object. Also converts values to their respective internal types. + if (message.resourceProperties != null && message.hasOwnProperty("resourceProperties")) { + if (!$util.isObject(message.resourceProperties)) + return "resourceProperties: object expected"; + var key = Object.keys(message.resourceProperties); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.resourceProperties[key[i]]); + if (error) + return "resourceProperties." + error; + } + } + if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) { + var error = $root.google.cloud.securitycenter.v1.SecurityMarks.verify(message.securityMarks); + if (error) + return "securityMarks." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.iamPolicy != null && message.hasOwnProperty("iamPolicy")) { + var error = $root.google.cloud.securitycenter.v1.Asset.IamPolicy.verify(message.iamPolicy); + if (error) + return "iamPolicy." + error; + } + return null; + }; + + /** + * Creates an Asset message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.CreateFindingRequest + * @memberof google.cloud.securitycenter.v1.Asset * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.CreateFindingRequest} CreateFindingRequest + * @returns {google.cloud.securitycenter.v1.Asset} Asset */ - CreateFindingRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.CreateFindingRequest) + Asset.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Asset) return object; - var message = new $root.google.cloud.securitycenter.v1.CreateFindingRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.findingId != null) - message.findingId = String(object.findingId); - if (object.finding != null) { - if (typeof object.finding !== "object") - throw TypeError(".google.cloud.securitycenter.v1.CreateFindingRequest.finding: object expected"); - message.finding = $root.google.cloud.securitycenter.v1.Finding.fromObject(object.finding); + var message = new $root.google.cloud.securitycenter.v1.Asset(); + if (object.name != null) + message.name = String(object.name); + if (object.securityCenterProperties != null) { + if (typeof object.securityCenterProperties !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Asset.securityCenterProperties: object expected"); + message.securityCenterProperties = $root.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.fromObject(object.securityCenterProperties); + } + if (object.resourceProperties) { + if (typeof object.resourceProperties !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Asset.resourceProperties: object expected"); + message.resourceProperties = {}; + for (var keys = Object.keys(object.resourceProperties), i = 0; i < keys.length; ++i) { + if (typeof object.resourceProperties[keys[i]] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Asset.resourceProperties: object expected"); + message.resourceProperties[keys[i]] = $root.google.protobuf.Value.fromObject(object.resourceProperties[keys[i]]); + } + } + if (object.securityMarks != null) { + if (typeof object.securityMarks !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Asset.securityMarks: object expected"); + message.securityMarks = $root.google.cloud.securitycenter.v1.SecurityMarks.fromObject(object.securityMarks); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Asset.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Asset.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.iamPolicy != null) { + if (typeof object.iamPolicy !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Asset.iamPolicy: object expected"); + message.iamPolicy = $root.google.cloud.securitycenter.v1.Asset.IamPolicy.fromObject(object.iamPolicy); } return message; }; /** - * Creates a plain object from a CreateFindingRequest message. Also converts values to other types if specified. + * Creates a plain object from an Asset message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.CreateFindingRequest + * @memberof google.cloud.securitycenter.v1.Asset * @static - * @param {google.cloud.securitycenter.v1.CreateFindingRequest} message CreateFindingRequest + * @param {google.cloud.securitycenter.v1.Asset} message Asset * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateFindingRequest.toObject = function toObject(message, options) { + Asset.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.resourceProperties = {}; if (options.defaults) { - object.parent = ""; - object.findingId = ""; - object.finding = null; + object.name = ""; + object.securityCenterProperties = null; + object.securityMarks = null; + object.createTime = null; + object.updateTime = null; + object.iamPolicy = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.findingId != null && message.hasOwnProperty("findingId")) - object.findingId = message.findingId; - if (message.finding != null && message.hasOwnProperty("finding")) - object.finding = $root.google.cloud.securitycenter.v1.Finding.toObject(message.finding, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.securityCenterProperties != null && message.hasOwnProperty("securityCenterProperties")) + object.securityCenterProperties = $root.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.toObject(message.securityCenterProperties, options); + var keys2; + if (message.resourceProperties && (keys2 = Object.keys(message.resourceProperties)).length) { + object.resourceProperties = {}; + for (var j = 0; j < keys2.length; ++j) + object.resourceProperties[keys2[j]] = $root.google.protobuf.Value.toObject(message.resourceProperties[keys2[j]], options); + } + if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) + object.securityMarks = $root.google.cloud.securitycenter.v1.SecurityMarks.toObject(message.securityMarks, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.iamPolicy != null && message.hasOwnProperty("iamPolicy")) + object.iamPolicy = $root.google.cloud.securitycenter.v1.Asset.IamPolicy.toObject(message.iamPolicy, options); return object; }; /** - * Converts this CreateFindingRequest to JSON. + * Converts this Asset to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.CreateFindingRequest + * @memberof google.cloud.securitycenter.v1.Asset * @instance * @returns {Object.} JSON object */ - CreateFindingRequest.prototype.toJSON = function toJSON() { + Asset.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateFindingRequest; - })(); + Asset.SecurityCenterProperties = (function() { - v1.CreateSourceRequest = (function() { + /** + * Properties of a SecurityCenterProperties. + * @memberof google.cloud.securitycenter.v1.Asset + * @interface ISecurityCenterProperties + * @property {string|null} [resourceName] SecurityCenterProperties resourceName + * @property {string|null} [resourceType] SecurityCenterProperties resourceType + * @property {string|null} [resourceParent] SecurityCenterProperties resourceParent + * @property {string|null} [resourceProject] SecurityCenterProperties resourceProject + * @property {Array.|null} [resourceOwners] SecurityCenterProperties resourceOwners + * @property {string|null} [resourceDisplayName] SecurityCenterProperties resourceDisplayName + * @property {string|null} [resourceParentDisplayName] SecurityCenterProperties resourceParentDisplayName + * @property {string|null} [resourceProjectDisplayName] SecurityCenterProperties resourceProjectDisplayName + */ - /** - * Properties of a CreateSourceRequest. - * @memberof google.cloud.securitycenter.v1 - * @interface ICreateSourceRequest - * @property {string|null} [parent] CreateSourceRequest parent - * @property {google.cloud.securitycenter.v1.ISource|null} [source] CreateSourceRequest source - */ + /** + * Constructs a new SecurityCenterProperties. + * @memberof google.cloud.securitycenter.v1.Asset + * @classdesc Represents a SecurityCenterProperties. + * @implements ISecurityCenterProperties + * @constructor + * @param {google.cloud.securitycenter.v1.Asset.ISecurityCenterProperties=} [properties] Properties to set + */ + function SecurityCenterProperties(properties) { + this.resourceOwners = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new CreateSourceRequest. - * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a CreateSourceRequest. - * @implements ICreateSourceRequest - * @constructor - * @param {google.cloud.securitycenter.v1.ICreateSourceRequest=} [properties] Properties to set - */ - function CreateSourceRequest(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]]; - } + /** + * SecurityCenterProperties resourceName. + * @member {string} resourceName + * @memberof google.cloud.securitycenter.v1.Asset.SecurityCenterProperties + * @instance + */ + SecurityCenterProperties.prototype.resourceName = ""; - /** - * CreateSourceRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycenter.v1.CreateSourceRequest - * @instance - */ - CreateSourceRequest.prototype.parent = ""; + /** + * SecurityCenterProperties resourceType. + * @member {string} resourceType + * @memberof google.cloud.securitycenter.v1.Asset.SecurityCenterProperties + * @instance + */ + SecurityCenterProperties.prototype.resourceType = ""; - /** - * CreateSourceRequest source. - * @member {google.cloud.securitycenter.v1.ISource|null|undefined} source - * @memberof google.cloud.securitycenter.v1.CreateSourceRequest - * @instance - */ - CreateSourceRequest.prototype.source = null; + /** + * SecurityCenterProperties resourceParent. + * @member {string} resourceParent + * @memberof google.cloud.securitycenter.v1.Asset.SecurityCenterProperties + * @instance + */ + SecurityCenterProperties.prototype.resourceParent = ""; - /** - * Creates a new CreateSourceRequest instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.CreateSourceRequest - * @static - * @param {google.cloud.securitycenter.v1.ICreateSourceRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.CreateSourceRequest} CreateSourceRequest instance - */ - CreateSourceRequest.create = function create(properties) { - return new CreateSourceRequest(properties); - }; + /** + * SecurityCenterProperties resourceProject. + * @member {string} resourceProject + * @memberof google.cloud.securitycenter.v1.Asset.SecurityCenterProperties + * @instance + */ + SecurityCenterProperties.prototype.resourceProject = ""; - /** - * Encodes the specified CreateSourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.CreateSourceRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.CreateSourceRequest - * @static - * @param {google.cloud.securitycenter.v1.ICreateSourceRequest} message CreateSourceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateSourceRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.source != null && message.hasOwnProperty("source")) - $root.google.cloud.securitycenter.v1.Source.encode(message.source, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateSourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CreateSourceRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.CreateSourceRequest - * @static - * @param {google.cloud.securitycenter.v1.ICreateSourceRequest} message CreateSourceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateSourceRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.CreateSourceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.CreateSourceRequest} CreateSourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateSourceRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.CreateSourceRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.source = $root.google.cloud.securitycenter.v1.Source.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * SecurityCenterProperties resourceOwners. + * @member {Array.} resourceOwners + * @memberof google.cloud.securitycenter.v1.Asset.SecurityCenterProperties + * @instance + */ + SecurityCenterProperties.prototype.resourceOwners = $util.emptyArray; - /** - * Decodes a CreateSourceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.CreateSourceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.CreateSourceRequest} CreateSourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateSourceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * SecurityCenterProperties resourceDisplayName. + * @member {string} resourceDisplayName + * @memberof google.cloud.securitycenter.v1.Asset.SecurityCenterProperties + * @instance + */ + SecurityCenterProperties.prototype.resourceDisplayName = ""; - /** - * Verifies a CreateSourceRequest message. - * @function verify - * @memberof google.cloud.securitycenter.v1.CreateSourceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateSourceRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.source != null && message.hasOwnProperty("source")) { - var error = $root.google.cloud.securitycenter.v1.Source.verify(message.source); - if (error) - return "source." + error; - } - return null; - }; + /** + * SecurityCenterProperties resourceParentDisplayName. + * @member {string} resourceParentDisplayName + * @memberof google.cloud.securitycenter.v1.Asset.SecurityCenterProperties + * @instance + */ + SecurityCenterProperties.prototype.resourceParentDisplayName = ""; - /** - * Creates a CreateSourceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.CreateSourceRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.CreateSourceRequest} CreateSourceRequest - */ - CreateSourceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.CreateSourceRequest) - return object; - var message = new $root.google.cloud.securitycenter.v1.CreateSourceRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.source != null) { - if (typeof object.source !== "object") - throw TypeError(".google.cloud.securitycenter.v1.CreateSourceRequest.source: object expected"); - message.source = $root.google.cloud.securitycenter.v1.Source.fromObject(object.source); - } - return message; - }; + /** + * SecurityCenterProperties resourceProjectDisplayName. + * @member {string} resourceProjectDisplayName + * @memberof google.cloud.securitycenter.v1.Asset.SecurityCenterProperties + * @instance + */ + SecurityCenterProperties.prototype.resourceProjectDisplayName = ""; - /** - * Creates a plain object from a CreateSourceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.CreateSourceRequest - * @static - * @param {google.cloud.securitycenter.v1.CreateSourceRequest} message CreateSourceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateSourceRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.source = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.source != null && message.hasOwnProperty("source")) - object.source = $root.google.cloud.securitycenter.v1.Source.toObject(message.source, options); - return object; - }; + /** + * Creates a new SecurityCenterProperties instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.Asset.SecurityCenterProperties + * @static + * @param {google.cloud.securitycenter.v1.Asset.ISecurityCenterProperties=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Asset.SecurityCenterProperties} SecurityCenterProperties instance + */ + SecurityCenterProperties.create = function create(properties) { + return new SecurityCenterProperties(properties); + }; - /** - * Converts this CreateSourceRequest to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.CreateSourceRequest - * @instance - * @returns {Object.} JSON object - */ - CreateSourceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified SecurityCenterProperties message. Does not implicitly {@link google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.Asset.SecurityCenterProperties + * @static + * @param {google.cloud.securitycenter.v1.Asset.ISecurityCenterProperties} message SecurityCenterProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecurityCenterProperties.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceName); + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceType); + if (message.resourceParent != null && message.hasOwnProperty("resourceParent")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.resourceParent); + if (message.resourceProject != null && message.hasOwnProperty("resourceProject")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.resourceProject); + if (message.resourceOwners != null && message.resourceOwners.length) + for (var i = 0; i < message.resourceOwners.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.resourceOwners[i]); + if (message.resourceDisplayName != null && message.hasOwnProperty("resourceDisplayName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.resourceDisplayName); + if (message.resourceParentDisplayName != null && message.hasOwnProperty("resourceParentDisplayName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.resourceParentDisplayName); + if (message.resourceProjectDisplayName != null && message.hasOwnProperty("resourceProjectDisplayName")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.resourceProjectDisplayName); + return writer; + }; - return CreateSourceRequest; - })(); + /** + * Encodes the specified SecurityCenterProperties message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.Asset.SecurityCenterProperties + * @static + * @param {google.cloud.securitycenter.v1.Asset.ISecurityCenterProperties} message SecurityCenterProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecurityCenterProperties.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - v1.GetOrganizationSettingsRequest = (function() { + /** + * Decodes a SecurityCenterProperties message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.Asset.SecurityCenterProperties + * @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.Asset.SecurityCenterProperties} SecurityCenterProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecurityCenterProperties.decode = function decode(reader, 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.Asset.SecurityCenterProperties(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.resourceName = reader.string(); + break; + case 2: + message.resourceType = reader.string(); + break; + case 3: + message.resourceParent = reader.string(); + break; + case 4: + message.resourceProject = reader.string(); + break; + case 5: + if (!(message.resourceOwners && message.resourceOwners.length)) + message.resourceOwners = []; + message.resourceOwners.push(reader.string()); + break; + case 6: + message.resourceDisplayName = reader.string(); + break; + case 7: + message.resourceParentDisplayName = reader.string(); + break; + case 8: + message.resourceProjectDisplayName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Properties of a GetOrganizationSettingsRequest. - * @memberof google.cloud.securitycenter.v1 - * @interface IGetOrganizationSettingsRequest - * @property {string|null} [name] GetOrganizationSettingsRequest name - */ - - /** - * Constructs a new GetOrganizationSettingsRequest. - * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a GetOrganizationSettingsRequest. - * @implements IGetOrganizationSettingsRequest - * @constructor - * @param {google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest=} [properties] Properties to set - */ - function GetOrganizationSettingsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Decodes a SecurityCenterProperties message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.Asset.SecurityCenterProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.Asset.SecurityCenterProperties} SecurityCenterProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecurityCenterProperties.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * GetOrganizationSettingsRequest name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest - * @instance - */ - GetOrganizationSettingsRequest.prototype.name = ""; + /** + * Verifies a SecurityCenterProperties message. + * @function verify + * @memberof google.cloud.securitycenter.v1.Asset.SecurityCenterProperties + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SecurityCenterProperties.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + if (!$util.isString(message.resourceName)) + return "resourceName: string expected"; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + if (!$util.isString(message.resourceType)) + return "resourceType: string expected"; + if (message.resourceParent != null && message.hasOwnProperty("resourceParent")) + if (!$util.isString(message.resourceParent)) + return "resourceParent: string expected"; + if (message.resourceProject != null && message.hasOwnProperty("resourceProject")) + if (!$util.isString(message.resourceProject)) + return "resourceProject: string expected"; + if (message.resourceOwners != null && message.hasOwnProperty("resourceOwners")) { + if (!Array.isArray(message.resourceOwners)) + return "resourceOwners: array expected"; + for (var i = 0; i < message.resourceOwners.length; ++i) + if (!$util.isString(message.resourceOwners[i])) + return "resourceOwners: string[] expected"; + } + if (message.resourceDisplayName != null && message.hasOwnProperty("resourceDisplayName")) + if (!$util.isString(message.resourceDisplayName)) + return "resourceDisplayName: string expected"; + if (message.resourceParentDisplayName != null && message.hasOwnProperty("resourceParentDisplayName")) + if (!$util.isString(message.resourceParentDisplayName)) + return "resourceParentDisplayName: string expected"; + if (message.resourceProjectDisplayName != null && message.hasOwnProperty("resourceProjectDisplayName")) + if (!$util.isString(message.resourceProjectDisplayName)) + return "resourceProjectDisplayName: string expected"; + return null; + }; - /** - * Creates a new GetOrganizationSettingsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest - * @static - * @param {google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.GetOrganizationSettingsRequest} GetOrganizationSettingsRequest instance - */ - GetOrganizationSettingsRequest.create = function create(properties) { - return new GetOrganizationSettingsRequest(properties); - }; + /** + * Creates a SecurityCenterProperties message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.Asset.SecurityCenterProperties + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.Asset.SecurityCenterProperties} SecurityCenterProperties + */ + SecurityCenterProperties.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties) + return object; + var message = new $root.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties(); + if (object.resourceName != null) + message.resourceName = String(object.resourceName); + if (object.resourceType != null) + message.resourceType = String(object.resourceType); + if (object.resourceParent != null) + message.resourceParent = String(object.resourceParent); + if (object.resourceProject != null) + message.resourceProject = String(object.resourceProject); + if (object.resourceOwners) { + if (!Array.isArray(object.resourceOwners)) + throw TypeError(".google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.resourceOwners: array expected"); + message.resourceOwners = []; + for (var i = 0; i < object.resourceOwners.length; ++i) + message.resourceOwners[i] = String(object.resourceOwners[i]); + } + if (object.resourceDisplayName != null) + message.resourceDisplayName = String(object.resourceDisplayName); + if (object.resourceParentDisplayName != null) + message.resourceParentDisplayName = String(object.resourceParentDisplayName); + if (object.resourceProjectDisplayName != null) + message.resourceProjectDisplayName = String(object.resourceProjectDisplayName); + return message; + }; - /** - * Encodes the specified GetOrganizationSettingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetOrganizationSettingsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest - * @static - * @param {google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest} message GetOrganizationSettingsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOrganizationSettingsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; + /** + * Creates a plain object from a SecurityCenterProperties message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.Asset.SecurityCenterProperties + * @static + * @param {google.cloud.securitycenter.v1.Asset.SecurityCenterProperties} message SecurityCenterProperties + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SecurityCenterProperties.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.resourceOwners = []; + if (options.defaults) { + object.resourceName = ""; + object.resourceType = ""; + object.resourceParent = ""; + object.resourceProject = ""; + object.resourceDisplayName = ""; + object.resourceParentDisplayName = ""; + object.resourceProjectDisplayName = ""; + } + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + object.resourceName = message.resourceName; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + object.resourceType = message.resourceType; + if (message.resourceParent != null && message.hasOwnProperty("resourceParent")) + object.resourceParent = message.resourceParent; + if (message.resourceProject != null && message.hasOwnProperty("resourceProject")) + object.resourceProject = message.resourceProject; + if (message.resourceOwners && message.resourceOwners.length) { + object.resourceOwners = []; + for (var j = 0; j < message.resourceOwners.length; ++j) + object.resourceOwners[j] = message.resourceOwners[j]; + } + if (message.resourceDisplayName != null && message.hasOwnProperty("resourceDisplayName")) + object.resourceDisplayName = message.resourceDisplayName; + if (message.resourceParentDisplayName != null && message.hasOwnProperty("resourceParentDisplayName")) + object.resourceParentDisplayName = message.resourceParentDisplayName; + if (message.resourceProjectDisplayName != null && message.hasOwnProperty("resourceProjectDisplayName")) + object.resourceProjectDisplayName = message.resourceProjectDisplayName; + return object; + }; - /** - * Encodes the specified GetOrganizationSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetOrganizationSettingsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest - * @static - * @param {google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest} message GetOrganizationSettingsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOrganizationSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Converts this SecurityCenterProperties to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.Asset.SecurityCenterProperties + * @instance + * @returns {Object.} JSON object + */ + SecurityCenterProperties.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Decodes a GetOrganizationSettingsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.GetOrganizationSettingsRequest} GetOrganizationSettingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOrganizationSettingsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return SecurityCenterProperties; + })(); - /** - * Decodes a GetOrganizationSettingsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.GetOrganizationSettingsRequest} GetOrganizationSettingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOrganizationSettingsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Asset.IamPolicy = (function() { - /** - * Verifies a GetOrganizationSettingsRequest message. - * @function verify - * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetOrganizationSettingsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; + /** + * Properties of an IamPolicy. + * @memberof google.cloud.securitycenter.v1.Asset + * @interface IIamPolicy + * @property {string|null} [policyBlob] IamPolicy policyBlob + */ - /** - * Creates a GetOrganizationSettingsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.GetOrganizationSettingsRequest} GetOrganizationSettingsRequest - */ - GetOrganizationSettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest) + /** + * Constructs a new IamPolicy. + * @memberof google.cloud.securitycenter.v1.Asset + * @classdesc Represents an IamPolicy. + * @implements IIamPolicy + * @constructor + * @param {google.cloud.securitycenter.v1.Asset.IIamPolicy=} [properties] Properties to set + */ + function IamPolicy(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]]; + } + + /** + * IamPolicy policyBlob. + * @member {string} policyBlob + * @memberof google.cloud.securitycenter.v1.Asset.IamPolicy + * @instance + */ + IamPolicy.prototype.policyBlob = ""; + + /** + * Creates a new IamPolicy instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.Asset.IamPolicy + * @static + * @param {google.cloud.securitycenter.v1.Asset.IIamPolicy=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Asset.IamPolicy} IamPolicy instance + */ + IamPolicy.create = function create(properties) { + return new IamPolicy(properties); + }; + + /** + * Encodes the specified IamPolicy message. Does not implicitly {@link google.cloud.securitycenter.v1.Asset.IamPolicy.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.Asset.IamPolicy + * @static + * @param {google.cloud.securitycenter.v1.Asset.IIamPolicy} message IamPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IamPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.policyBlob != null && message.hasOwnProperty("policyBlob")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.policyBlob); + return writer; + }; + + /** + * Encodes the specified IamPolicy message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Asset.IamPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.Asset.IamPolicy + * @static + * @param {google.cloud.securitycenter.v1.Asset.IIamPolicy} message IamPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IamPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IamPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.Asset.IamPolicy + * @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.Asset.IamPolicy} IamPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IamPolicy.decode = function decode(reader, 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.Asset.IamPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.policyBlob = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IamPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.Asset.IamPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.Asset.IamPolicy} IamPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IamPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IamPolicy message. + * @function verify + * @memberof google.cloud.securitycenter.v1.Asset.IamPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IamPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.policyBlob != null && message.hasOwnProperty("policyBlob")) + if (!$util.isString(message.policyBlob)) + return "policyBlob: string expected"; + return null; + }; + + /** + * Creates an IamPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.Asset.IamPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.Asset.IamPolicy} IamPolicy + */ + IamPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Asset.IamPolicy) + return object; + var message = new $root.google.cloud.securitycenter.v1.Asset.IamPolicy(); + if (object.policyBlob != null) + message.policyBlob = String(object.policyBlob); + return message; + }; + + /** + * Creates a plain object from an IamPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.Asset.IamPolicy + * @static + * @param {google.cloud.securitycenter.v1.Asset.IamPolicy} message IamPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IamPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.policyBlob = ""; + if (message.policyBlob != null && message.hasOwnProperty("policyBlob")) + object.policyBlob = message.policyBlob; return object; - var message = new $root.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + }; - /** - * Creates a plain object from a GetOrganizationSettingsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest - * @static - * @param {google.cloud.securitycenter.v1.GetOrganizationSettingsRequest} message GetOrganizationSettingsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetOrganizationSettingsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; + /** + * Converts this IamPolicy to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.Asset.IamPolicy + * @instance + * @returns {Object.} JSON object + */ + IamPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this GetOrganizationSettingsRequest to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest - * @instance - * @returns {Object.} JSON object - */ - GetOrganizationSettingsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return IamPolicy; + })(); - return GetOrganizationSettingsRequest; + return Asset; })(); - v1.GetSourceRequest = (function() { + v1.Source = (function() { /** - * Properties of a GetSourceRequest. + * Properties of a Source. * @memberof google.cloud.securitycenter.v1 - * @interface IGetSourceRequest - * @property {string|null} [name] GetSourceRequest name + * @interface ISource + * @property {string|null} [name] Source name + * @property {string|null} [displayName] Source displayName + * @property {string|null} [description] Source description */ /** - * Constructs a new GetSourceRequest. + * Constructs a new Source. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a GetSourceRequest. - * @implements IGetSourceRequest + * @classdesc Represents a Source. + * @implements ISource * @constructor - * @param {google.cloud.securitycenter.v1.IGetSourceRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.ISource=} [properties] Properties to set */ - function GetSourceRequest(properties) { + function Source(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1359,76 +1708,102 @@ } /** - * GetSourceRequest name. + * Source name. * @member {string} name - * @memberof google.cloud.securitycenter.v1.GetSourceRequest + * @memberof google.cloud.securitycenter.v1.Source * @instance */ - GetSourceRequest.prototype.name = ""; + Source.prototype.name = ""; /** - * Creates a new GetSourceRequest instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.GetSourceRequest - * @static - * @param {google.cloud.securitycenter.v1.IGetSourceRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.GetSourceRequest} GetSourceRequest instance + * Source displayName. + * @member {string} displayName + * @memberof google.cloud.securitycenter.v1.Source + * @instance */ - GetSourceRequest.create = function create(properties) { - return new GetSourceRequest(properties); + Source.prototype.displayName = ""; + + /** + * Source description. + * @member {string} description + * @memberof google.cloud.securitycenter.v1.Source + * @instance + */ + Source.prototype.description = ""; + + /** + * Creates a new Source instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.Source + * @static + * @param {google.cloud.securitycenter.v1.ISource=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Source} Source instance + */ + Source.create = function create(properties) { + return new Source(properties); }; /** - * Encodes the specified GetSourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetSourceRequest.verify|verify} messages. + * Encodes the specified Source message. Does not implicitly {@link google.cloud.securitycenter.v1.Source.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.GetSourceRequest + * @memberof google.cloud.securitycenter.v1.Source * @static - * @param {google.cloud.securitycenter.v1.IGetSourceRequest} message GetSourceRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.ISource} message Source message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSourceRequest.encode = function encode(message, writer) { + Source.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); return writer; }; /** - * Encodes the specified GetSourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetSourceRequest.verify|verify} messages. + * Encodes the specified Source message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Source.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.GetSourceRequest + * @memberof google.cloud.securitycenter.v1.Source * @static - * @param {google.cloud.securitycenter.v1.IGetSourceRequest} message GetSourceRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.ISource} message Source message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { + Source.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSourceRequest message from the specified reader or buffer. + * Decodes a Source message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.GetSourceRequest + * @memberof google.cloud.securitycenter.v1.Source * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.GetSourceRequest} GetSourceRequest + * @returns {google.cloud.securitycenter.v1.Source} Source * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSourceRequest.decode = function decode(reader, length) { + Source.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.GetSourceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.Source(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; + case 2: + message.displayName = reader.string(); + break; + case 3: + message.description = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -1438,113 +1813,125 @@ }; /** - * Decodes a GetSourceRequest message from the specified reader or buffer, length delimited. + * Decodes a Source message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.GetSourceRequest + * @memberof google.cloud.securitycenter.v1.Source * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.GetSourceRequest} GetSourceRequest + * @returns {google.cloud.securitycenter.v1.Source} Source * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSourceRequest.decodeDelimited = function decodeDelimited(reader) { + Source.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSourceRequest message. + * Verifies a Source message. * @function verify - * @memberof google.cloud.securitycenter.v1.GetSourceRequest + * @memberof google.cloud.securitycenter.v1.Source * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSourceRequest.verify = function verify(message) { + Source.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; return null; }; /** - * Creates a GetSourceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Source message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.GetSourceRequest + * @memberof google.cloud.securitycenter.v1.Source * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.GetSourceRequest} GetSourceRequest + * @returns {google.cloud.securitycenter.v1.Source} Source */ - GetSourceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.GetSourceRequest) + Source.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Source) return object; - var message = new $root.google.cloud.securitycenter.v1.GetSourceRequest(); + var message = new $root.google.cloud.securitycenter.v1.Source(); if (object.name != null) message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); return message; }; /** - * Creates a plain object from a GetSourceRequest message. Also converts values to other types if specified. + * Creates a plain object from a Source message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.GetSourceRequest + * @memberof google.cloud.securitycenter.v1.Source * @static - * @param {google.cloud.securitycenter.v1.GetSourceRequest} message GetSourceRequest + * @param {google.cloud.securitycenter.v1.Source} message Source * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSourceRequest.toObject = function toObject(message, options) { + Source.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.name = ""; + object.displayName = ""; + object.description = ""; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; return object; }; /** - * Converts this GetSourceRequest to JSON. + * Converts this Source to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.GetSourceRequest + * @memberof google.cloud.securitycenter.v1.Source * @instance * @returns {Object.} JSON object */ - GetSourceRequest.prototype.toJSON = function toJSON() { + Source.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetSourceRequest; + return Source; })(); - v1.GroupAssetsRequest = (function() { + v1.RunAssetDiscoveryResponse = (function() { /** - * Properties of a GroupAssetsRequest. + * Properties of a RunAssetDiscoveryResponse. * @memberof google.cloud.securitycenter.v1 - * @interface IGroupAssetsRequest - * @property {string|null} [parent] GroupAssetsRequest parent - * @property {string|null} [filter] GroupAssetsRequest filter - * @property {string|null} [groupBy] GroupAssetsRequest groupBy - * @property {google.protobuf.IDuration|null} [compareDuration] GroupAssetsRequest compareDuration - * @property {google.protobuf.ITimestamp|null} [readTime] GroupAssetsRequest readTime - * @property {string|null} [pageToken] GroupAssetsRequest pageToken - * @property {number|null} [pageSize] GroupAssetsRequest pageSize + * @interface IRunAssetDiscoveryResponse + * @property {google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State|null} [state] RunAssetDiscoveryResponse state + * @property {google.protobuf.IDuration|null} [duration] RunAssetDiscoveryResponse duration */ /** - * Constructs a new GroupAssetsRequest. + * Constructs a new RunAssetDiscoveryResponse. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a GroupAssetsRequest. - * @implements IGroupAssetsRequest + * @classdesc Represents a RunAssetDiscoveryResponse. + * @implements IRunAssetDiscoveryResponse * @constructor - * @param {google.cloud.securitycenter.v1.IGroupAssetsRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse=} [properties] Properties to set */ - function GroupAssetsRequest(properties) { + function RunAssetDiscoveryResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1552,153 +1939,88 @@ } /** - * GroupAssetsRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest - * @instance - */ - GroupAssetsRequest.prototype.parent = ""; - - /** - * GroupAssetsRequest filter. - * @member {string} filter - * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest - * @instance - */ - GroupAssetsRequest.prototype.filter = ""; - - /** - * GroupAssetsRequest groupBy. - * @member {string} groupBy - * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest - * @instance - */ - GroupAssetsRequest.prototype.groupBy = ""; - - /** - * GroupAssetsRequest compareDuration. - * @member {google.protobuf.IDuration|null|undefined} compareDuration - * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest - * @instance - */ - GroupAssetsRequest.prototype.compareDuration = null; - - /** - * GroupAssetsRequest readTime. - * @member {google.protobuf.ITimestamp|null|undefined} readTime - * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest - * @instance - */ - GroupAssetsRequest.prototype.readTime = null; - - /** - * GroupAssetsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * RunAssetDiscoveryResponse state. + * @member {google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State} state + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse * @instance */ - GroupAssetsRequest.prototype.pageToken = ""; + RunAssetDiscoveryResponse.prototype.state = 0; /** - * GroupAssetsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * RunAssetDiscoveryResponse duration. + * @member {google.protobuf.IDuration|null|undefined} duration + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse * @instance */ - GroupAssetsRequest.prototype.pageSize = 0; + RunAssetDiscoveryResponse.prototype.duration = null; /** - * Creates a new GroupAssetsRequest instance using the specified properties. + * Creates a new RunAssetDiscoveryResponse instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse * @static - * @param {google.cloud.securitycenter.v1.IGroupAssetsRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.GroupAssetsRequest} GroupAssetsRequest instance + * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.RunAssetDiscoveryResponse} RunAssetDiscoveryResponse instance */ - GroupAssetsRequest.create = function create(properties) { - return new GroupAssetsRequest(properties); + RunAssetDiscoveryResponse.create = function create(properties) { + return new RunAssetDiscoveryResponse(properties); }; /** - * Encodes the specified GroupAssetsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupAssetsRequest.verify|verify} messages. + * Encodes the specified RunAssetDiscoveryResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse * @static - * @param {google.cloud.securitycenter.v1.IGroupAssetsRequest} message GroupAssetsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse} message RunAssetDiscoveryResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GroupAssetsRequest.encode = function encode(message, writer) { + RunAssetDiscoveryResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.groupBy != null && message.hasOwnProperty("groupBy")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.groupBy); - if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) - $root.google.protobuf.Duration.encode(message.compareDuration, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.readTime != null && message.hasOwnProperty("readTime")) - $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.pageToken); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.pageSize); + if (message.state != null && message.hasOwnProperty("state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.duration != null && message.hasOwnProperty("duration")) + $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified GroupAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupAssetsRequest.verify|verify} messages. + * Encodes the specified RunAssetDiscoveryResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse * @static - * @param {google.cloud.securitycenter.v1.IGroupAssetsRequest} message GroupAssetsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse} message RunAssetDiscoveryResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GroupAssetsRequest.encodeDelimited = function encodeDelimited(message, writer) { + RunAssetDiscoveryResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GroupAssetsRequest message from the specified reader or buffer. + * Decodes a RunAssetDiscoveryResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.GroupAssetsRequest} GroupAssetsRequest + * @returns {google.cloud.securitycenter.v1.RunAssetDiscoveryResponse} RunAssetDiscoveryResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GroupAssetsRequest.decode = function decode(reader, length) { + RunAssetDiscoveryResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.GroupAssetsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.RunAssetDiscoveryResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.state = reader.int32(); break; case 2: - message.filter = reader.string(); - break; - case 3: - message.groupBy = reader.string(); - break; - case 4: - message.compareDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 5: - message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 7: - message.pageToken = reader.string(); - break; - case 8: - message.pageSize = reader.int32(); + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -1709,170 +2031,164 @@ }; /** - * Decodes a GroupAssetsRequest message from the specified reader or buffer, length delimited. + * Decodes a RunAssetDiscoveryResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.GroupAssetsRequest} GroupAssetsRequest + * @returns {google.cloud.securitycenter.v1.RunAssetDiscoveryResponse} RunAssetDiscoveryResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GroupAssetsRequest.decodeDelimited = function decodeDelimited(reader) { + RunAssetDiscoveryResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GroupAssetsRequest message. + * Verifies a RunAssetDiscoveryResponse message. * @function verify - * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GroupAssetsRequest.verify = function verify(message) { + RunAssetDiscoveryResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.groupBy != null && message.hasOwnProperty("groupBy")) - if (!$util.isString(message.groupBy)) - return "groupBy: string expected"; - if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) { - var error = $root.google.protobuf.Duration.verify(message.compareDuration); - if (error) - return "compareDuration." + error; - } - if (message.readTime != null && message.hasOwnProperty("readTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.readTime); + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.google.protobuf.Duration.verify(message.duration); if (error) - return "readTime." + error; + return "duration." + error; } - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; return null; }; /** - * Creates a GroupAssetsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RunAssetDiscoveryResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.GroupAssetsRequest} GroupAssetsRequest + * @returns {google.cloud.securitycenter.v1.RunAssetDiscoveryResponse} RunAssetDiscoveryResponse */ - GroupAssetsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.GroupAssetsRequest) + RunAssetDiscoveryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.RunAssetDiscoveryResponse) return object; - var message = new $root.google.cloud.securitycenter.v1.GroupAssetsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.filter != null) - message.filter = String(object.filter); - if (object.groupBy != null) - message.groupBy = String(object.groupBy); - if (object.compareDuration != null) { - if (typeof object.compareDuration !== "object") - throw TypeError(".google.cloud.securitycenter.v1.GroupAssetsRequest.compareDuration: object expected"); - message.compareDuration = $root.google.protobuf.Duration.fromObject(object.compareDuration); + var message = new $root.google.cloud.securitycenter.v1.RunAssetDiscoveryResponse(); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "COMPLETED": + case 1: + message.state = 1; + break; + case "SUPERSEDED": + case 2: + message.state = 2; + break; + case "TERMINATED": + case 3: + message.state = 3; + break; } - if (object.readTime != null) { - if (typeof object.readTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.GroupAssetsRequest.readTime: object expected"); - message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.duration: object expected"); + message.duration = $root.google.protobuf.Duration.fromObject(object.duration); } - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; return message; }; /** - * Creates a plain object from a GroupAssetsRequest message. Also converts values to other types if specified. + * Creates a plain object from a RunAssetDiscoveryResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse * @static - * @param {google.cloud.securitycenter.v1.GroupAssetsRequest} message GroupAssetsRequest + * @param {google.cloud.securitycenter.v1.RunAssetDiscoveryResponse} message RunAssetDiscoveryResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GroupAssetsRequest.toObject = function toObject(message, options) { + RunAssetDiscoveryResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.filter = ""; - object.groupBy = ""; - object.compareDuration = null; - object.readTime = null; - object.pageToken = ""; - object.pageSize = 0; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.duration = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.groupBy != null && message.hasOwnProperty("groupBy")) - object.groupBy = message.groupBy; - if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) - object.compareDuration = $root.google.protobuf.Duration.toObject(message.compareDuration, options); - if (message.readTime != null && message.hasOwnProperty("readTime")) - object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State[message.state] : message.state; + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); return object; }; /** - * Converts this GroupAssetsRequest to JSON. + * Converts this RunAssetDiscoveryResponse to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse * @instance * @returns {Object.} JSON object */ - GroupAssetsRequest.prototype.toJSON = function toJSON() { + RunAssetDiscoveryResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GroupAssetsRequest; + /** + * State enum. + * @name google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State + * @enum {string} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} COMPLETED=1 COMPLETED value + * @property {number} SUPERSEDED=2 SUPERSEDED value + * @property {number} TERMINATED=3 TERMINATED value + */ + RunAssetDiscoveryResponse.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "COMPLETED"] = 1; + values[valuesById[2] = "SUPERSEDED"] = 2; + values[valuesById[3] = "TERMINATED"] = 3; + return values; + })(); + + return RunAssetDiscoveryResponse; })(); - v1.GroupAssetsResponse = (function() { + v1.OrganizationSettings = (function() { /** - * Properties of a GroupAssetsResponse. + * Properties of an OrganizationSettings. * @memberof google.cloud.securitycenter.v1 - * @interface IGroupAssetsResponse - * @property {Array.|null} [groupByResults] GroupAssetsResponse groupByResults - * @property {google.protobuf.ITimestamp|null} [readTime] GroupAssetsResponse readTime - * @property {string|null} [nextPageToken] GroupAssetsResponse nextPageToken - * @property {number|null} [totalSize] GroupAssetsResponse totalSize + * @interface IOrganizationSettings + * @property {string|null} [name] OrganizationSettings name + * @property {boolean|null} [enableAssetDiscovery] OrganizationSettings enableAssetDiscovery + * @property {google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig|null} [assetDiscoveryConfig] OrganizationSettings assetDiscoveryConfig */ /** - * Constructs a new GroupAssetsResponse. + * Constructs a new OrganizationSettings. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a GroupAssetsResponse. - * @implements IGroupAssetsResponse + * @classdesc Represents an OrganizationSettings. + * @implements IOrganizationSettings * @constructor - * @param {google.cloud.securitycenter.v1.IGroupAssetsResponse=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IOrganizationSettings=} [properties] Properties to set */ - function GroupAssetsResponse(properties) { - this.groupByResults = []; + function OrganizationSettings(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1880,117 +2196,101 @@ } /** - * GroupAssetsResponse groupByResults. - * @member {Array.} groupByResults - * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse - * @instance - */ - GroupAssetsResponse.prototype.groupByResults = $util.emptyArray; - - /** - * GroupAssetsResponse readTime. - * @member {google.protobuf.ITimestamp|null|undefined} readTime - * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse + * OrganizationSettings name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.OrganizationSettings * @instance */ - GroupAssetsResponse.prototype.readTime = null; + OrganizationSettings.prototype.name = ""; /** - * GroupAssetsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse + * OrganizationSettings enableAssetDiscovery. + * @member {boolean} enableAssetDiscovery + * @memberof google.cloud.securitycenter.v1.OrganizationSettings * @instance */ - GroupAssetsResponse.prototype.nextPageToken = ""; + OrganizationSettings.prototype.enableAssetDiscovery = false; /** - * GroupAssetsResponse totalSize. - * @member {number} totalSize - * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse + * OrganizationSettings assetDiscoveryConfig. + * @member {google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig|null|undefined} assetDiscoveryConfig + * @memberof google.cloud.securitycenter.v1.OrganizationSettings * @instance */ - GroupAssetsResponse.prototype.totalSize = 0; + OrganizationSettings.prototype.assetDiscoveryConfig = null; /** - * Creates a new GroupAssetsResponse instance using the specified properties. + * Creates a new OrganizationSettings instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse + * @memberof google.cloud.securitycenter.v1.OrganizationSettings * @static - * @param {google.cloud.securitycenter.v1.IGroupAssetsResponse=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.GroupAssetsResponse} GroupAssetsResponse instance + * @param {google.cloud.securitycenter.v1.IOrganizationSettings=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.OrganizationSettings} OrganizationSettings instance */ - GroupAssetsResponse.create = function create(properties) { - return new GroupAssetsResponse(properties); + OrganizationSettings.create = function create(properties) { + return new OrganizationSettings(properties); }; /** - * Encodes the specified GroupAssetsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupAssetsResponse.verify|verify} messages. + * Encodes the specified OrganizationSettings message. Does not implicitly {@link google.cloud.securitycenter.v1.OrganizationSettings.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse + * @memberof google.cloud.securitycenter.v1.OrganizationSettings * @static - * @param {google.cloud.securitycenter.v1.IGroupAssetsResponse} message GroupAssetsResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1.IOrganizationSettings} message OrganizationSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GroupAssetsResponse.encode = function encode(message, writer) { + OrganizationSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.groupByResults != null && message.groupByResults.length) - for (var i = 0; i < message.groupByResults.length; ++i) - $root.google.cloud.securitycenter.v1.GroupResult.encode(message.groupByResults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.readTime != null && message.hasOwnProperty("readTime")) - $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nextPageToken); - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.totalSize); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.enableAssetDiscovery != null && message.hasOwnProperty("enableAssetDiscovery")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enableAssetDiscovery); + if (message.assetDiscoveryConfig != null && message.hasOwnProperty("assetDiscoveryConfig")) + $root.google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.encode(message.assetDiscoveryConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified GroupAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupAssetsResponse.verify|verify} messages. + * Encodes the specified OrganizationSettings message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.OrganizationSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse + * @memberof google.cloud.securitycenter.v1.OrganizationSettings * @static - * @param {google.cloud.securitycenter.v1.IGroupAssetsResponse} message GroupAssetsResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1.IOrganizationSettings} message OrganizationSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GroupAssetsResponse.encodeDelimited = function encodeDelimited(message, writer) { + OrganizationSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GroupAssetsResponse message from the specified reader or buffer. + * Decodes an OrganizationSettings message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse + * @memberof google.cloud.securitycenter.v1.OrganizationSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.GroupAssetsResponse} GroupAssetsResponse + * @returns {google.cloud.securitycenter.v1.OrganizationSettings} OrganizationSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GroupAssetsResponse.decode = function decode(reader, length) { + OrganizationSettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.GroupAssetsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.OrganizationSettings(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.groupByResults && message.groupByResults.length)) - message.groupByResults = []; - message.groupByResults.push($root.google.cloud.securitycenter.v1.GroupResult.decode(reader, reader.uint32())); + message.name = reader.string(); break; case 2: - message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.enableAssetDiscovery = reader.bool(); break; case 3: - message.nextPageToken = reader.string(); - break; - case 4: - message.totalSize = reader.int32(); + message.assetDiscoveryConfig = $root.google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -2001,1111 +2301,1111 @@ }; /** - * Decodes a GroupAssetsResponse message from the specified reader or buffer, length delimited. + * Decodes an OrganizationSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse + * @memberof google.cloud.securitycenter.v1.OrganizationSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.GroupAssetsResponse} GroupAssetsResponse + * @returns {google.cloud.securitycenter.v1.OrganizationSettings} OrganizationSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GroupAssetsResponse.decodeDelimited = function decodeDelimited(reader) { + OrganizationSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GroupAssetsResponse message. + * Verifies an OrganizationSettings message. * @function verify - * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse + * @memberof google.cloud.securitycenter.v1.OrganizationSettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GroupAssetsResponse.verify = function verify(message) { + OrganizationSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.groupByResults != null && message.hasOwnProperty("groupByResults")) { - if (!Array.isArray(message.groupByResults)) - return "groupByResults: array expected"; - for (var i = 0; i < message.groupByResults.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.GroupResult.verify(message.groupByResults[i]); - if (error) - return "groupByResults." + error; - } - } - if (message.readTime != null && message.hasOwnProperty("readTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.readTime); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.enableAssetDiscovery != null && message.hasOwnProperty("enableAssetDiscovery")) + if (typeof message.enableAssetDiscovery !== "boolean") + return "enableAssetDiscovery: boolean expected"; + if (message.assetDiscoveryConfig != null && message.hasOwnProperty("assetDiscoveryConfig")) { + var error = $root.google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.verify(message.assetDiscoveryConfig); if (error) - return "readTime." + error; + return "assetDiscoveryConfig." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - if (!$util.isInteger(message.totalSize)) - return "totalSize: integer expected"; return null; }; /** - * Creates a GroupAssetsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an OrganizationSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse + * @memberof google.cloud.securitycenter.v1.OrganizationSettings * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.GroupAssetsResponse} GroupAssetsResponse + * @returns {google.cloud.securitycenter.v1.OrganizationSettings} OrganizationSettings */ - GroupAssetsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.GroupAssetsResponse) + OrganizationSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.OrganizationSettings) return object; - var message = new $root.google.cloud.securitycenter.v1.GroupAssetsResponse(); - if (object.groupByResults) { - if (!Array.isArray(object.groupByResults)) - throw TypeError(".google.cloud.securitycenter.v1.GroupAssetsResponse.groupByResults: array expected"); - message.groupByResults = []; - for (var i = 0; i < object.groupByResults.length; ++i) { - if (typeof object.groupByResults[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.GroupAssetsResponse.groupByResults: object expected"); - message.groupByResults[i] = $root.google.cloud.securitycenter.v1.GroupResult.fromObject(object.groupByResults[i]); - } - } - if (object.readTime != null) { - if (typeof object.readTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.GroupAssetsResponse.readTime: object expected"); - message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); + var message = new $root.google.cloud.securitycenter.v1.OrganizationSettings(); + if (object.name != null) + message.name = String(object.name); + if (object.enableAssetDiscovery != null) + message.enableAssetDiscovery = Boolean(object.enableAssetDiscovery); + if (object.assetDiscoveryConfig != null) { + if (typeof object.assetDiscoveryConfig !== "object") + throw TypeError(".google.cloud.securitycenter.v1.OrganizationSettings.assetDiscoveryConfig: object expected"); + message.assetDiscoveryConfig = $root.google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.fromObject(object.assetDiscoveryConfig); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.totalSize != null) - message.totalSize = object.totalSize | 0; return message; }; /** - * Creates a plain object from a GroupAssetsResponse message. Also converts values to other types if specified. + * Creates a plain object from an OrganizationSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse + * @memberof google.cloud.securitycenter.v1.OrganizationSettings * @static - * @param {google.cloud.securitycenter.v1.GroupAssetsResponse} message GroupAssetsResponse + * @param {google.cloud.securitycenter.v1.OrganizationSettings} message OrganizationSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GroupAssetsResponse.toObject = function toObject(message, options) { + OrganizationSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.groupByResults = []; if (options.defaults) { - object.readTime = null; - object.nextPageToken = ""; - object.totalSize = 0; - } - if (message.groupByResults && message.groupByResults.length) { - object.groupByResults = []; - for (var j = 0; j < message.groupByResults.length; ++j) - object.groupByResults[j] = $root.google.cloud.securitycenter.v1.GroupResult.toObject(message.groupByResults[j], options); + object.name = ""; + object.enableAssetDiscovery = false; + object.assetDiscoveryConfig = null; } - if (message.readTime != null && message.hasOwnProperty("readTime")) - object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - object.totalSize = message.totalSize; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.enableAssetDiscovery != null && message.hasOwnProperty("enableAssetDiscovery")) + object.enableAssetDiscovery = message.enableAssetDiscovery; + if (message.assetDiscoveryConfig != null && message.hasOwnProperty("assetDiscoveryConfig")) + object.assetDiscoveryConfig = $root.google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.toObject(message.assetDiscoveryConfig, options); return object; }; /** - * Converts this GroupAssetsResponse to JSON. + * Converts this OrganizationSettings to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse + * @memberof google.cloud.securitycenter.v1.OrganizationSettings * @instance * @returns {Object.} JSON object */ - GroupAssetsResponse.prototype.toJSON = function toJSON() { + OrganizationSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GroupAssetsResponse; - })(); + OrganizationSettings.AssetDiscoveryConfig = (function() { - v1.GroupFindingsRequest = (function() { + /** + * Properties of an AssetDiscoveryConfig. + * @memberof google.cloud.securitycenter.v1.OrganizationSettings + * @interface IAssetDiscoveryConfig + * @property {Array.|null} [projectIds] AssetDiscoveryConfig projectIds + * @property {google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode|null} [inclusionMode] AssetDiscoveryConfig inclusionMode + */ - /** - * Properties of a GroupFindingsRequest. - * @memberof google.cloud.securitycenter.v1 - * @interface IGroupFindingsRequest - * @property {string|null} [parent] GroupFindingsRequest parent - * @property {string|null} [filter] GroupFindingsRequest filter - * @property {string|null} [groupBy] GroupFindingsRequest groupBy - * @property {google.protobuf.ITimestamp|null} [readTime] GroupFindingsRequest readTime - * @property {google.protobuf.IDuration|null} [compareDuration] GroupFindingsRequest compareDuration - * @property {string|null} [pageToken] GroupFindingsRequest pageToken - * @property {number|null} [pageSize] GroupFindingsRequest pageSize - */ + /** + * Constructs a new AssetDiscoveryConfig. + * @memberof google.cloud.securitycenter.v1.OrganizationSettings + * @classdesc Represents an AssetDiscoveryConfig. + * @implements IAssetDiscoveryConfig + * @constructor + * @param {google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig=} [properties] Properties to set + */ + function AssetDiscoveryConfig(properties) { + this.projectIds = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new GroupFindingsRequest. - * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a GroupFindingsRequest. - * @implements IGroupFindingsRequest - * @constructor - * @param {google.cloud.securitycenter.v1.IGroupFindingsRequest=} [properties] Properties to set - */ - function GroupFindingsRequest(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]]; - } + /** + * AssetDiscoveryConfig projectIds. + * @member {Array.} projectIds + * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig + * @instance + */ + AssetDiscoveryConfig.prototype.projectIds = $util.emptyArray; - /** - * GroupFindingsRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest - * @instance - */ - GroupFindingsRequest.prototype.parent = ""; + /** + * AssetDiscoveryConfig inclusionMode. + * @member {google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode} inclusionMode + * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig + * @instance + */ + AssetDiscoveryConfig.prototype.inclusionMode = 0; - /** - * GroupFindingsRequest filter. - * @member {string} filter - * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest - * @instance - */ - GroupFindingsRequest.prototype.filter = ""; + /** + * Creates a new AssetDiscoveryConfig instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig + * @static + * @param {google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig} AssetDiscoveryConfig instance + */ + AssetDiscoveryConfig.create = function create(properties) { + return new AssetDiscoveryConfig(properties); + }; - /** - * GroupFindingsRequest groupBy. - * @member {string} groupBy - * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest - * @instance - */ - GroupFindingsRequest.prototype.groupBy = ""; + /** + * Encodes the specified AssetDiscoveryConfig message. Does not implicitly {@link google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig + * @static + * @param {google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig} message AssetDiscoveryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AssetDiscoveryConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectIds != null && message.projectIds.length) + for (var i = 0; i < message.projectIds.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectIds[i]); + if (message.inclusionMode != null && message.hasOwnProperty("inclusionMode")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.inclusionMode); + return writer; + }; - /** - * GroupFindingsRequest readTime. - * @member {google.protobuf.ITimestamp|null|undefined} readTime - * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest - * @instance - */ - GroupFindingsRequest.prototype.readTime = null; + /** + * Encodes the specified AssetDiscoveryConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig + * @static + * @param {google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig} message AssetDiscoveryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AssetDiscoveryConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * GroupFindingsRequest compareDuration. - * @member {google.protobuf.IDuration|null|undefined} compareDuration - * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest - * @instance - */ - GroupFindingsRequest.prototype.compareDuration = null; + /** + * Decodes an AssetDiscoveryConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig} AssetDiscoveryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AssetDiscoveryConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.projectIds && message.projectIds.length)) + message.projectIds = []; + message.projectIds.push(reader.string()); + break; + case 2: + message.inclusionMode = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * GroupFindingsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest - * @instance - */ - GroupFindingsRequest.prototype.pageToken = ""; + /** + * Decodes an AssetDiscoveryConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig} AssetDiscoveryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AssetDiscoveryConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AssetDiscoveryConfig message. + * @function verify + * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AssetDiscoveryConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectIds != null && message.hasOwnProperty("projectIds")) { + if (!Array.isArray(message.projectIds)) + return "projectIds: array expected"; + for (var i = 0; i < message.projectIds.length; ++i) + if (!$util.isString(message.projectIds[i])) + return "projectIds: string[] expected"; + } + if (message.inclusionMode != null && message.hasOwnProperty("inclusionMode")) + switch (message.inclusionMode) { + default: + return "inclusionMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an AssetDiscoveryConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig} AssetDiscoveryConfig + */ + AssetDiscoveryConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig) + return object; + var message = new $root.google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig(); + if (object.projectIds) { + if (!Array.isArray(object.projectIds)) + throw TypeError(".google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.projectIds: array expected"); + message.projectIds = []; + for (var i = 0; i < object.projectIds.length; ++i) + message.projectIds[i] = String(object.projectIds[i]); + } + switch (object.inclusionMode) { + case "INCLUSION_MODE_UNSPECIFIED": + case 0: + message.inclusionMode = 0; + break; + case "INCLUDE_ONLY": + case 1: + message.inclusionMode = 1; + break; + case "EXCLUDE": + case 2: + message.inclusionMode = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an AssetDiscoveryConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig + * @static + * @param {google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig} message AssetDiscoveryConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AssetDiscoveryConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.projectIds = []; + if (options.defaults) + object.inclusionMode = options.enums === String ? "INCLUSION_MODE_UNSPECIFIED" : 0; + if (message.projectIds && message.projectIds.length) { + object.projectIds = []; + for (var j = 0; j < message.projectIds.length; ++j) + object.projectIds[j] = message.projectIds[j]; + } + if (message.inclusionMode != null && message.hasOwnProperty("inclusionMode")) + object.inclusionMode = options.enums === String ? $root.google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode[message.inclusionMode] : message.inclusionMode; + return object; + }; + + /** + * Converts this AssetDiscoveryConfig to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig + * @instance + * @returns {Object.} JSON object + */ + AssetDiscoveryConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * InclusionMode enum. + * @name google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode + * @enum {string} + * @property {number} INCLUSION_MODE_UNSPECIFIED=0 INCLUSION_MODE_UNSPECIFIED value + * @property {number} INCLUDE_ONLY=1 INCLUDE_ONLY value + * @property {number} EXCLUDE=2 EXCLUDE value + */ + AssetDiscoveryConfig.InclusionMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INCLUSION_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INCLUDE_ONLY"] = 1; + values[valuesById[2] = "EXCLUDE"] = 2; + return values; + })(); + + return AssetDiscoveryConfig; + })(); + + return OrganizationSettings; + })(); + + v1.SecurityCenter = (function() { /** - * GroupFindingsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest - * @instance + * Constructs a new SecurityCenter service. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a SecurityCenter + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ - GroupFindingsRequest.prototype.pageSize = 0; + function SecurityCenter(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (SecurityCenter.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = SecurityCenter; /** - * Creates a new GroupFindingsRequest instance using the specified properties. + * Creates new SecurityCenter service using the specified rpc implementation. * @function create - * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest + * @memberof google.cloud.securitycenter.v1.SecurityCenter * @static - * @param {google.cloud.securitycenter.v1.IGroupFindingsRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.GroupFindingsRequest} GroupFindingsRequest instance + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {SecurityCenter} RPC service. Useful where requests and/or responses are streamed. */ - GroupFindingsRequest.create = function create(properties) { - return new GroupFindingsRequest(properties); + SecurityCenter.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); }; /** - * Encodes the specified GroupFindingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupFindingsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest - * @static - * @param {google.cloud.securitycenter.v1.IGroupFindingsRequest} message GroupFindingsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#createSource}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef CreateSourceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.Source} [response] Source */ - GroupFindingsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.groupBy != null && message.hasOwnProperty("groupBy")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.groupBy); - if (message.readTime != null && message.hasOwnProperty("readTime")) - $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) - $root.google.protobuf.Duration.encode(message.compareDuration, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.pageToken); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.pageSize); - return writer; - }; /** - * Encodes the specified GroupFindingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupFindingsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest - * @static - * @param {google.cloud.securitycenter.v1.IGroupFindingsRequest} message GroupFindingsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls CreateSource. + * @function createSource + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.ICreateSourceRequest} request CreateSourceRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.CreateSourceCallback} callback Node-style callback called with the error, if any, and Source + * @returns {undefined} + * @variation 1 */ - GroupFindingsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(SecurityCenter.prototype.createSource = function createSource(request, callback) { + return this.rpcCall(createSource, $root.google.cloud.securitycenter.v1.CreateSourceRequest, $root.google.cloud.securitycenter.v1.Source, request, callback); + }, "name", { value: "CreateSource" }); /** - * Decodes a GroupFindingsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.GroupFindingsRequest} GroupFindingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls CreateSource. + * @function createSource + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.ICreateSourceRequest} request CreateSourceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GroupFindingsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.GroupFindingsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.filter = reader.string(); - break; - case 3: - message.groupBy = reader.string(); - break; - case 4: - message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.compareDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 7: - message.pageToken = reader.string(); - break; - case 8: - message.pageSize = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a GroupFindingsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.GroupFindingsRequest} GroupFindingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#createFinding}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef CreateFindingCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.Finding} [response] Finding */ - GroupFindingsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a GroupFindingsRequest message. - * @function verify - * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls CreateFinding. + * @function createFinding + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.ICreateFindingRequest} request CreateFindingRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.CreateFindingCallback} callback Node-style callback called with the error, if any, and Finding + * @returns {undefined} + * @variation 1 */ - GroupFindingsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.groupBy != null && message.hasOwnProperty("groupBy")) - if (!$util.isString(message.groupBy)) - return "groupBy: string expected"; - if (message.readTime != null && message.hasOwnProperty("readTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.readTime); - if (error) - return "readTime." + error; - } - if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) { - var error = $root.google.protobuf.Duration.verify(message.compareDuration); - if (error) - return "compareDuration." + error; - } - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - return null; - }; + Object.defineProperty(SecurityCenter.prototype.createFinding = function createFinding(request, callback) { + return this.rpcCall(createFinding, $root.google.cloud.securitycenter.v1.CreateFindingRequest, $root.google.cloud.securitycenter.v1.Finding, request, callback); + }, "name", { value: "CreateFinding" }); /** - * Creates a GroupFindingsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.GroupFindingsRequest} GroupFindingsRequest + * Calls CreateFinding. + * @function createFinding + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.ICreateFindingRequest} request CreateFindingRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GroupFindingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.GroupFindingsRequest) - return object; - var message = new $root.google.cloud.securitycenter.v1.GroupFindingsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.filter != null) - message.filter = String(object.filter); - if (object.groupBy != null) - message.groupBy = String(object.groupBy); - if (object.readTime != null) { - if (typeof object.readTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.GroupFindingsRequest.readTime: object expected"); - message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); - } - if (object.compareDuration != null) { - if (typeof object.compareDuration !== "object") - throw TypeError(".google.cloud.securitycenter.v1.GroupFindingsRequest.compareDuration: object expected"); - message.compareDuration = $root.google.protobuf.Duration.fromObject(object.compareDuration); - } - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - return message; - }; /** - * Creates a plain object from a GroupFindingsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest - * @static - * @param {google.cloud.securitycenter.v1.GroupFindingsRequest} message GroupFindingsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#getIamPolicy}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef GetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy */ - GroupFindingsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.filter = ""; - object.groupBy = ""; - object.readTime = null; - object.compareDuration = null; - object.pageToken = ""; - object.pageSize = 0; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.groupBy != null && message.hasOwnProperty("groupBy")) - object.groupBy = message.groupBy; - if (message.readTime != null && message.hasOwnProperty("readTime")) - object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); - if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) - object.compareDuration = $root.google.protobuf.Duration.toObject(message.compareDuration, options); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - return object; - }; /** - * Converts this GroupFindingsRequest to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.cloud.securitycenter.v1.SecurityCenter * @instance - * @returns {Object.} JSON object + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 */ - GroupFindingsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GroupFindingsRequest; - })(); - - v1.GroupFindingsResponse = (function() { + Object.defineProperty(SecurityCenter.prototype.getIamPolicy = function getIamPolicy(request, callback) { + return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "GetIamPolicy" }); /** - * Properties of a GroupFindingsResponse. - * @memberof google.cloud.securitycenter.v1 - * @interface IGroupFindingsResponse - * @property {Array.|null} [groupByResults] GroupFindingsResponse groupByResults - * @property {google.protobuf.ITimestamp|null} [readTime] GroupFindingsResponse readTime - * @property {string|null} [nextPageToken] GroupFindingsResponse nextPageToken - * @property {number|null} [totalSize] GroupFindingsResponse totalSize + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new GroupFindingsResponse. - * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a GroupFindingsResponse. - * @implements IGroupFindingsResponse - * @constructor - * @param {google.cloud.securitycenter.v1.IGroupFindingsResponse=} [properties] Properties to set + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#getOrganizationSettings}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef GetOrganizationSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.OrganizationSettings} [response] OrganizationSettings */ - function GroupFindingsResponse(properties) { - this.groupByResults = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } /** - * GroupFindingsResponse groupByResults. - * @member {Array.} groupByResults - * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse + * Calls GetOrganizationSettings. + * @function getOrganizationSettings + * @memberof google.cloud.securitycenter.v1.SecurityCenter * @instance + * @param {google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest} request GetOrganizationSettingsRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.GetOrganizationSettingsCallback} callback Node-style callback called with the error, if any, and OrganizationSettings + * @returns {undefined} + * @variation 1 */ - GroupFindingsResponse.prototype.groupByResults = $util.emptyArray; + Object.defineProperty(SecurityCenter.prototype.getOrganizationSettings = function getOrganizationSettings(request, callback) { + return this.rpcCall(getOrganizationSettings, $root.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest, $root.google.cloud.securitycenter.v1.OrganizationSettings, request, callback); + }, "name", { value: "GetOrganizationSettings" }); /** - * GroupFindingsResponse readTime. - * @member {google.protobuf.ITimestamp|null|undefined} readTime - * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse + * Calls GetOrganizationSettings. + * @function getOrganizationSettings + * @memberof google.cloud.securitycenter.v1.SecurityCenter * @instance + * @param {google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest} request GetOrganizationSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GroupFindingsResponse.prototype.readTime = null; /** - * GroupFindingsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse - * @instance + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#getSource}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef GetSourceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.Source} [response] Source */ - GroupFindingsResponse.prototype.nextPageToken = ""; /** - * GroupFindingsResponse totalSize. - * @member {number} totalSize - * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse + * Calls GetSource. + * @function getSource + * @memberof google.cloud.securitycenter.v1.SecurityCenter * @instance + * @param {google.cloud.securitycenter.v1.IGetSourceRequest} request GetSourceRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.GetSourceCallback} callback Node-style callback called with the error, if any, and Source + * @returns {undefined} + * @variation 1 */ - GroupFindingsResponse.prototype.totalSize = 0; + Object.defineProperty(SecurityCenter.prototype.getSource = function getSource(request, callback) { + return this.rpcCall(getSource, $root.google.cloud.securitycenter.v1.GetSourceRequest, $root.google.cloud.securitycenter.v1.Source, request, callback); + }, "name", { value: "GetSource" }); /** - * Creates a new GroupFindingsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse - * @static - * @param {google.cloud.securitycenter.v1.IGroupFindingsResponse=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.GroupFindingsResponse} GroupFindingsResponse instance + * Calls GetSource. + * @function getSource + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IGetSourceRequest} request GetSourceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GroupFindingsResponse.create = function create(properties) { - return new GroupFindingsResponse(properties); - }; /** - * Encodes the specified GroupFindingsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupFindingsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse - * @static - * @param {google.cloud.securitycenter.v1.IGroupFindingsResponse} message GroupFindingsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#groupAssets}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef GroupAssetsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.GroupAssetsResponse} [response] GroupAssetsResponse */ - GroupFindingsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.groupByResults != null && message.groupByResults.length) - for (var i = 0; i < message.groupByResults.length; ++i) - $root.google.cloud.securitycenter.v1.GroupResult.encode(message.groupByResults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.readTime != null && message.hasOwnProperty("readTime")) - $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nextPageToken); - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.totalSize); - return writer; - }; /** - * Encodes the specified GroupFindingsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupFindingsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse - * @static - * @param {google.cloud.securitycenter.v1.IGroupFindingsResponse} message GroupFindingsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GroupAssets. + * @function groupAssets + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IGroupAssetsRequest} request GroupAssetsRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.GroupAssetsCallback} callback Node-style callback called with the error, if any, and GroupAssetsResponse + * @returns {undefined} + * @variation 1 */ - GroupFindingsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(SecurityCenter.prototype.groupAssets = function groupAssets(request, callback) { + return this.rpcCall(groupAssets, $root.google.cloud.securitycenter.v1.GroupAssetsRequest, $root.google.cloud.securitycenter.v1.GroupAssetsResponse, request, callback); + }, "name", { value: "GroupAssets" }); /** - * Decodes a GroupFindingsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.GroupFindingsResponse} GroupFindingsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GroupAssets. + * @function groupAssets + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IGroupAssetsRequest} request GroupAssetsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GroupFindingsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.GroupFindingsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.groupByResults && message.groupByResults.length)) - message.groupByResults = []; - message.groupByResults.push($root.google.cloud.securitycenter.v1.GroupResult.decode(reader, reader.uint32())); - break; - case 2: - message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 3: - message.nextPageToken = reader.string(); - break; - case 4: - message.totalSize = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a GroupFindingsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.GroupFindingsResponse} GroupFindingsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#groupFindings}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef GroupFindingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.GroupFindingsResponse} [response] GroupFindingsResponse */ - GroupFindingsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a GroupFindingsResponse message. - * @function verify - * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls GroupFindings. + * @function groupFindings + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IGroupFindingsRequest} request GroupFindingsRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.GroupFindingsCallback} callback Node-style callback called with the error, if any, and GroupFindingsResponse + * @returns {undefined} + * @variation 1 */ - GroupFindingsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.groupByResults != null && message.hasOwnProperty("groupByResults")) { - if (!Array.isArray(message.groupByResults)) - return "groupByResults: array expected"; - for (var i = 0; i < message.groupByResults.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.GroupResult.verify(message.groupByResults[i]); - if (error) - return "groupByResults." + error; - } - } - if (message.readTime != null && message.hasOwnProperty("readTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.readTime); - if (error) - return "readTime." + error; - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - if (!$util.isInteger(message.totalSize)) - return "totalSize: integer expected"; - return null; - }; + Object.defineProperty(SecurityCenter.prototype.groupFindings = function groupFindings(request, callback) { + return this.rpcCall(groupFindings, $root.google.cloud.securitycenter.v1.GroupFindingsRequest, $root.google.cloud.securitycenter.v1.GroupFindingsResponse, request, callback); + }, "name", { value: "GroupFindings" }); /** - * Creates a GroupFindingsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.GroupFindingsResponse} GroupFindingsResponse + * Calls GroupFindings. + * @function groupFindings + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IGroupFindingsRequest} request GroupFindingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GroupFindingsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.GroupFindingsResponse) - return object; - var message = new $root.google.cloud.securitycenter.v1.GroupFindingsResponse(); - if (object.groupByResults) { - if (!Array.isArray(object.groupByResults)) - throw TypeError(".google.cloud.securitycenter.v1.GroupFindingsResponse.groupByResults: array expected"); - message.groupByResults = []; - for (var i = 0; i < object.groupByResults.length; ++i) { - if (typeof object.groupByResults[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.GroupFindingsResponse.groupByResults: object expected"); - message.groupByResults[i] = $root.google.cloud.securitycenter.v1.GroupResult.fromObject(object.groupByResults[i]); - } - } - if (object.readTime != null) { - if (typeof object.readTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.GroupFindingsResponse.readTime: object expected"); - message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.totalSize != null) - message.totalSize = object.totalSize | 0; - return message; - }; /** - * Creates a plain object from a GroupFindingsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse - * @static - * @param {google.cloud.securitycenter.v1.GroupFindingsResponse} message GroupFindingsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#listAssets}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef ListAssetsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.ListAssetsResponse} [response] ListAssetsResponse */ - GroupFindingsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.groupByResults = []; - if (options.defaults) { - object.readTime = null; - object.nextPageToken = ""; - object.totalSize = 0; - } - if (message.groupByResults && message.groupByResults.length) { - object.groupByResults = []; - for (var j = 0; j < message.groupByResults.length; ++j) - object.groupByResults[j] = $root.google.cloud.securitycenter.v1.GroupResult.toObject(message.groupByResults[j], options); - } - if (message.readTime != null && message.hasOwnProperty("readTime")) - object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - object.totalSize = message.totalSize; - return object; - }; /** - * Converts this GroupFindingsResponse to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse + * Calls ListAssets. + * @function listAssets + * @memberof google.cloud.securitycenter.v1.SecurityCenter * @instance - * @returns {Object.} JSON object + * @param {google.cloud.securitycenter.v1.IListAssetsRequest} request ListAssetsRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.ListAssetsCallback} callback Node-style callback called with the error, if any, and ListAssetsResponse + * @returns {undefined} + * @variation 1 */ - GroupFindingsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GroupFindingsResponse; - })(); - - v1.GroupResult = (function() { + Object.defineProperty(SecurityCenter.prototype.listAssets = function listAssets(request, callback) { + return this.rpcCall(listAssets, $root.google.cloud.securitycenter.v1.ListAssetsRequest, $root.google.cloud.securitycenter.v1.ListAssetsResponse, request, callback); + }, "name", { value: "ListAssets" }); /** - * Properties of a GroupResult. - * @memberof google.cloud.securitycenter.v1 - * @interface IGroupResult - * @property {Object.|null} [properties] GroupResult properties - * @property {number|Long|null} [count] GroupResult count + * Calls ListAssets. + * @function listAssets + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IListAssetsRequest} request ListAssetsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new GroupResult. - * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a GroupResult. - * @implements IGroupResult - * @constructor - * @param {google.cloud.securitycenter.v1.IGroupResult=} [properties] Properties to set + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#listFindings}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef ListFindingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.ListFindingsResponse} [response] ListFindingsResponse */ - function GroupResult(properties) { - this.properties = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } /** - * GroupResult properties. - * @member {Object.} properties - * @memberof google.cloud.securitycenter.v1.GroupResult + * Calls ListFindings. + * @function listFindings + * @memberof google.cloud.securitycenter.v1.SecurityCenter * @instance + * @param {google.cloud.securitycenter.v1.IListFindingsRequest} request ListFindingsRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.ListFindingsCallback} callback Node-style callback called with the error, if any, and ListFindingsResponse + * @returns {undefined} + * @variation 1 */ - GroupResult.prototype.properties = $util.emptyObject; + Object.defineProperty(SecurityCenter.prototype.listFindings = function listFindings(request, callback) { + return this.rpcCall(listFindings, $root.google.cloud.securitycenter.v1.ListFindingsRequest, $root.google.cloud.securitycenter.v1.ListFindingsResponse, request, callback); + }, "name", { value: "ListFindings" }); /** - * GroupResult count. - * @member {number|Long} count - * @memberof google.cloud.securitycenter.v1.GroupResult + * Calls ListFindings. + * @function listFindings + * @memberof google.cloud.securitycenter.v1.SecurityCenter * @instance + * @param {google.cloud.securitycenter.v1.IListFindingsRequest} request ListFindingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GroupResult.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new GroupResult instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.GroupResult - * @static - * @param {google.cloud.securitycenter.v1.IGroupResult=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.GroupResult} GroupResult instance + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#listSources}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef ListSourcesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.ListSourcesResponse} [response] ListSourcesResponse */ - GroupResult.create = function create(properties) { - return new GroupResult(properties); - }; /** - * Encodes the specified GroupResult message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.GroupResult - * @static - * @param {google.cloud.securitycenter.v1.IGroupResult} message GroupResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ListSources. + * @function listSources + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IListSourcesRequest} request ListSourcesRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.ListSourcesCallback} callback Node-style callback called with the error, if any, and ListSourcesResponse + * @returns {undefined} + * @variation 1 */ - GroupResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.properties != null && message.hasOwnProperty("properties")) - for (var keys = Object.keys(message.properties), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.protobuf.Value.encode(message.properties[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.count != null && message.hasOwnProperty("count")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.count); - return writer; - }; + Object.defineProperty(SecurityCenter.prototype.listSources = function listSources(request, callback) { + return this.rpcCall(listSources, $root.google.cloud.securitycenter.v1.ListSourcesRequest, $root.google.cloud.securitycenter.v1.ListSourcesResponse, request, callback); + }, "name", { value: "ListSources" }); /** - * Encodes the specified GroupResult message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.GroupResult - * @static - * @param {google.cloud.securitycenter.v1.IGroupResult} message GroupResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ListSources. + * @function listSources + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IListSourcesRequest} request ListSourcesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GroupResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a GroupResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.GroupResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.GroupResult} GroupResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#runAssetDiscovery}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef RunAssetDiscoveryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - GroupResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.GroupResult(), key; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - reader.skip().pos++; - if (message.properties === $util.emptyObject) - message.properties = {}; - key = reader.string(); - reader.pos++; - message.properties[key] = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - case 2: - message.count = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a GroupResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.GroupResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.GroupResult} GroupResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls RunAssetDiscovery. + * @function runAssetDiscovery + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest} request RunAssetDiscoveryRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.RunAssetDiscoveryCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - GroupResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(SecurityCenter.prototype.runAssetDiscovery = function runAssetDiscovery(request, callback) { + return this.rpcCall(runAssetDiscovery, $root.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "RunAssetDiscovery" }); /** - * Verifies a GroupResult message. - * @function verify - * @memberof google.cloud.securitycenter.v1.GroupResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls RunAssetDiscovery. + * @function runAssetDiscovery + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest} request RunAssetDiscoveryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GroupResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.properties != null && message.hasOwnProperty("properties")) { - if (!$util.isObject(message.properties)) - return "properties: object expected"; - var key = Object.keys(message.properties); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.properties[key[i]]); - if (error) - return "properties." + error; - } - } - if (message.count != null && message.hasOwnProperty("count")) - if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) - return "count: integer|Long expected"; - return null; - }; /** - * Creates a GroupResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.GroupResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.GroupResult} GroupResult + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#setFindingState}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef SetFindingStateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.Finding} [response] Finding */ - GroupResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.GroupResult) - return object; - var message = new $root.google.cloud.securitycenter.v1.GroupResult(); - if (object.properties) { - if (typeof object.properties !== "object") - throw TypeError(".google.cloud.securitycenter.v1.GroupResult.properties: object expected"); - message.properties = {}; - for (var keys = Object.keys(object.properties), i = 0; i < keys.length; ++i) { - if (typeof object.properties[keys[i]] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.GroupResult.properties: object expected"); - message.properties[keys[i]] = $root.google.protobuf.Value.fromObject(object.properties[keys[i]]); - } - } - if (object.count != null) - if ($util.Long) - (message.count = $util.Long.fromValue(object.count)).unsigned = false; - else if (typeof object.count === "string") - message.count = parseInt(object.count, 10); - else if (typeof object.count === "number") - message.count = object.count; - else if (typeof object.count === "object") - message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); - return message; - }; /** - * Creates a plain object from a GroupResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.GroupResult - * @static - * @param {google.cloud.securitycenter.v1.GroupResult} message GroupResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls SetFindingState. + * @function setFindingState + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.ISetFindingStateRequest} request SetFindingStateRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.SetFindingStateCallback} callback Node-style callback called with the error, if any, and Finding + * @returns {undefined} + * @variation 1 */ - GroupResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.properties = {}; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.count = options.longs === String ? "0" : 0; - var keys2; - if (message.properties && (keys2 = Object.keys(message.properties)).length) { - object.properties = {}; - for (var j = 0; j < keys2.length; ++j) - object.properties[keys2[j]] = $root.google.protobuf.Value.toObject(message.properties[keys2[j]], options); - } - if (message.count != null && message.hasOwnProperty("count")) - if (typeof message.count === "number") - object.count = options.longs === String ? String(message.count) : message.count; - else - object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; - return object; - }; + Object.defineProperty(SecurityCenter.prototype.setFindingState = function setFindingState(request, callback) { + return this.rpcCall(setFindingState, $root.google.cloud.securitycenter.v1.SetFindingStateRequest, $root.google.cloud.securitycenter.v1.Finding, request, callback); + }, "name", { value: "SetFindingState" }); /** - * Converts this GroupResult to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.GroupResult + * Calls SetFindingState. + * @function setFindingState + * @memberof google.cloud.securitycenter.v1.SecurityCenter * @instance - * @returns {Object.} JSON object + * @param {google.cloud.securitycenter.v1.ISetFindingStateRequest} request SetFindingStateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GroupResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - return GroupResult; - })(); + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#setIamPolicy}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef SetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ - v1.ListSourcesRequest = (function() { + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.setIamPolicy = function setIamPolicy(request, callback) { + return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "SetIamPolicy" }); /** - * Properties of a ListSourcesRequest. - * @memberof google.cloud.securitycenter.v1 - * @interface IListSourcesRequest - * @property {string|null} [parent] ListSourcesRequest parent - * @property {string|null} [pageToken] ListSourcesRequest pageToken - * @property {number|null} [pageSize] ListSourcesRequest pageSize + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new ListSourcesRequest. - * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a ListSourcesRequest. - * @implements IListSourcesRequest - * @constructor - * @param {google.cloud.securitycenter.v1.IListSourcesRequest=} [properties] Properties to set + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#testIamPermissions}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef TestIamPermissionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse */ - function ListSourcesRequest(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]]; - } /** - * ListSourcesRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycenter.v1.ListSourcesRequest + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.cloud.securitycenter.v1.SecurityCenter * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + * @returns {undefined} + * @variation 1 */ - ListSourcesRequest.prototype.parent = ""; + Object.defineProperty(SecurityCenter.prototype.testIamPermissions = function testIamPermissions(request, callback) { + return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); + }, "name", { value: "TestIamPermissions" }); /** - * ListSourcesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.securitycenter.v1.ListSourcesRequest + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.cloud.securitycenter.v1.SecurityCenter * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListSourcesRequest.prototype.pageToken = ""; /** - * ListSourcesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.securitycenter.v1.ListSourcesRequest - * @instance + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#updateFinding}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef UpdateFindingCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.Finding} [response] Finding */ - ListSourcesRequest.prototype.pageSize = 0; /** - * Creates a new ListSourcesRequest instance using the specified properties. + * Calls UpdateFinding. + * @function updateFinding + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IUpdateFindingRequest} request UpdateFindingRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.UpdateFindingCallback} callback Node-style callback called with the error, if any, and Finding + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.updateFinding = function updateFinding(request, callback) { + return this.rpcCall(updateFinding, $root.google.cloud.securitycenter.v1.UpdateFindingRequest, $root.google.cloud.securitycenter.v1.Finding, request, callback); + }, "name", { value: "UpdateFinding" }); + + /** + * Calls UpdateFinding. + * @function updateFinding + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IUpdateFindingRequest} request UpdateFindingRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#updateOrganizationSettings}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef UpdateOrganizationSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.OrganizationSettings} [response] OrganizationSettings + */ + + /** + * Calls UpdateOrganizationSettings. + * @function updateOrganizationSettings + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest} request UpdateOrganizationSettingsRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.UpdateOrganizationSettingsCallback} callback Node-style callback called with the error, if any, and OrganizationSettings + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.updateOrganizationSettings = function updateOrganizationSettings(request, callback) { + return this.rpcCall(updateOrganizationSettings, $root.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest, $root.google.cloud.securitycenter.v1.OrganizationSettings, request, callback); + }, "name", { value: "UpdateOrganizationSettings" }); + + /** + * Calls UpdateOrganizationSettings. + * @function updateOrganizationSettings + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest} request UpdateOrganizationSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#updateSource}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef UpdateSourceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.Source} [response] Source + */ + + /** + * Calls UpdateSource. + * @function updateSource + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IUpdateSourceRequest} request UpdateSourceRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.UpdateSourceCallback} callback Node-style callback called with the error, if any, and Source + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.updateSource = function updateSource(request, callback) { + return this.rpcCall(updateSource, $root.google.cloud.securitycenter.v1.UpdateSourceRequest, $root.google.cloud.securitycenter.v1.Source, request, callback); + }, "name", { value: "UpdateSource" }); + + /** + * Calls UpdateSource. + * @function updateSource + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IUpdateSourceRequest} request UpdateSourceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter#updateSecurityMarks}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef UpdateSecurityMarksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.SecurityMarks} [response] SecurityMarks + */ + + /** + * Calls UpdateSecurityMarks. + * @function updateSecurityMarks + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest} request UpdateSecurityMarksRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.UpdateSecurityMarksCallback} callback Node-style callback called with the error, if any, and SecurityMarks + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.updateSecurityMarks = function updateSecurityMarks(request, callback) { + return this.rpcCall(updateSecurityMarks, $root.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest, $root.google.cloud.securitycenter.v1.SecurityMarks, request, callback); + }, "name", { value: "UpdateSecurityMarks" }); + + /** + * Calls UpdateSecurityMarks. + * @function updateSecurityMarks + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest} request UpdateSecurityMarksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return SecurityCenter; + })(); + + v1.CreateFindingRequest = (function() { + + /** + * Properties of a CreateFindingRequest. + * @memberof google.cloud.securitycenter.v1 + * @interface ICreateFindingRequest + * @property {string|null} [parent] CreateFindingRequest parent + * @property {string|null} [findingId] CreateFindingRequest findingId + * @property {google.cloud.securitycenter.v1.IFinding|null} [finding] CreateFindingRequest finding + */ + + /** + * Constructs a new CreateFindingRequest. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a CreateFindingRequest. + * @implements ICreateFindingRequest + * @constructor + * @param {google.cloud.securitycenter.v1.ICreateFindingRequest=} [properties] Properties to set + */ + function CreateFindingRequest(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]]; + } + + /** + * CreateFindingRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1.CreateFindingRequest + * @instance + */ + CreateFindingRequest.prototype.parent = ""; + + /** + * CreateFindingRequest findingId. + * @member {string} findingId + * @memberof google.cloud.securitycenter.v1.CreateFindingRequest + * @instance + */ + CreateFindingRequest.prototype.findingId = ""; + + /** + * CreateFindingRequest finding. + * @member {google.cloud.securitycenter.v1.IFinding|null|undefined} finding + * @memberof google.cloud.securitycenter.v1.CreateFindingRequest + * @instance + */ + CreateFindingRequest.prototype.finding = null; + + /** + * Creates a new CreateFindingRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.ListSourcesRequest + * @memberof google.cloud.securitycenter.v1.CreateFindingRequest * @static - * @param {google.cloud.securitycenter.v1.IListSourcesRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.ListSourcesRequest} ListSourcesRequest instance + * @param {google.cloud.securitycenter.v1.ICreateFindingRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.CreateFindingRequest} CreateFindingRequest instance */ - ListSourcesRequest.create = function create(properties) { - return new ListSourcesRequest(properties); + CreateFindingRequest.create = function create(properties) { + return new CreateFindingRequest(properties); }; /** - * Encodes the specified ListSourcesRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListSourcesRequest.verify|verify} messages. + * Encodes the specified CreateFindingRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.CreateFindingRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.ListSourcesRequest + * @memberof google.cloud.securitycenter.v1.CreateFindingRequest * @static - * @param {google.cloud.securitycenter.v1.IListSourcesRequest} message ListSourcesRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.ICreateFindingRequest} message CreateFindingRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSourcesRequest.encode = function encode(message, writer) { + CreateFindingRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && message.hasOwnProperty("parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.pageSize); + if (message.findingId != null && message.hasOwnProperty("findingId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.findingId); + if (message.finding != null && message.hasOwnProperty("finding")) + $root.google.cloud.securitycenter.v1.Finding.encode(message.finding, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListSourcesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListSourcesRequest.verify|verify} messages. + * Encodes the specified CreateFindingRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CreateFindingRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.ListSourcesRequest + * @memberof google.cloud.securitycenter.v1.CreateFindingRequest * @static - * @param {google.cloud.securitycenter.v1.IListSourcesRequest} message ListSourcesRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.ICreateFindingRequest} message CreateFindingRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSourcesRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateFindingRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSourcesRequest message from the specified reader or buffer. + * Decodes a CreateFindingRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.ListSourcesRequest + * @memberof google.cloud.securitycenter.v1.CreateFindingRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.ListSourcesRequest} ListSourcesRequest + * @returns {google.cloud.securitycenter.v1.CreateFindingRequest} CreateFindingRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSourcesRequest.decode = function decode(reader, length) { + CreateFindingRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListSourcesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.CreateFindingRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -3113,10 +3413,10 @@ message.parent = reader.string(); break; case 2: - message.pageToken = reader.string(); + message.findingId = reader.string(); break; - case 7: - message.pageSize = reader.int32(); + case 3: + message.finding = $root.google.cloud.securitycenter.v1.Finding.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -3127,126 +3427,130 @@ }; /** - * Decodes a ListSourcesRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateFindingRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.ListSourcesRequest + * @memberof google.cloud.securitycenter.v1.CreateFindingRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.ListSourcesRequest} ListSourcesRequest + * @returns {google.cloud.securitycenter.v1.CreateFindingRequest} CreateFindingRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSourcesRequest.decodeDelimited = function decodeDelimited(reader) { + CreateFindingRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListSourcesRequest message. + * Verifies a CreateFindingRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.ListSourcesRequest + * @memberof google.cloud.securitycenter.v1.CreateFindingRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListSourcesRequest.verify = function verify(message) { + CreateFindingRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; + if (message.findingId != null && message.hasOwnProperty("findingId")) + if (!$util.isString(message.findingId)) + return "findingId: string expected"; + if (message.finding != null && message.hasOwnProperty("finding")) { + var error = $root.google.cloud.securitycenter.v1.Finding.verify(message.finding); + if (error) + return "finding." + error; + } return null; }; /** - * Creates a ListSourcesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateFindingRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.ListSourcesRequest + * @memberof google.cloud.securitycenter.v1.CreateFindingRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.ListSourcesRequest} ListSourcesRequest + * @returns {google.cloud.securitycenter.v1.CreateFindingRequest} CreateFindingRequest */ - ListSourcesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.ListSourcesRequest) + CreateFindingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.CreateFindingRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.ListSourcesRequest(); + var message = new $root.google.cloud.securitycenter.v1.CreateFindingRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; + if (object.findingId != null) + message.findingId = String(object.findingId); + if (object.finding != null) { + if (typeof object.finding !== "object") + throw TypeError(".google.cloud.securitycenter.v1.CreateFindingRequest.finding: object expected"); + message.finding = $root.google.cloud.securitycenter.v1.Finding.fromObject(object.finding); + } return message; }; /** - * Creates a plain object from a ListSourcesRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateFindingRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.ListSourcesRequest + * @memberof google.cloud.securitycenter.v1.CreateFindingRequest * @static - * @param {google.cloud.securitycenter.v1.ListSourcesRequest} message ListSourcesRequest + * @param {google.cloud.securitycenter.v1.CreateFindingRequest} message CreateFindingRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSourcesRequest.toObject = function toObject(message, options) { + CreateFindingRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.pageToken = ""; - object.pageSize = 0; + object.findingId = ""; + object.finding = null; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; + if (message.findingId != null && message.hasOwnProperty("findingId")) + object.findingId = message.findingId; + if (message.finding != null && message.hasOwnProperty("finding")) + object.finding = $root.google.cloud.securitycenter.v1.Finding.toObject(message.finding, options); return object; }; /** - * Converts this ListSourcesRequest to JSON. + * Converts this CreateFindingRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.ListSourcesRequest + * @memberof google.cloud.securitycenter.v1.CreateFindingRequest * @instance * @returns {Object.} JSON object */ - ListSourcesRequest.prototype.toJSON = function toJSON() { + CreateFindingRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListSourcesRequest; + return CreateFindingRequest; })(); - v1.ListSourcesResponse = (function() { + v1.CreateSourceRequest = (function() { /** - * Properties of a ListSourcesResponse. + * Properties of a CreateSourceRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IListSourcesResponse - * @property {Array.|null} [sources] ListSourcesResponse sources - * @property {string|null} [nextPageToken] ListSourcesResponse nextPageToken + * @interface ICreateSourceRequest + * @property {string|null} [parent] CreateSourceRequest parent + * @property {google.cloud.securitycenter.v1.ISource|null} [source] CreateSourceRequest source */ /** - * Constructs a new ListSourcesResponse. + * Constructs a new CreateSourceRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a ListSourcesResponse. - * @implements IListSourcesResponse + * @classdesc Represents a CreateSourceRequest. + * @implements ICreateSourceRequest * @constructor - * @param {google.cloud.securitycenter.v1.IListSourcesResponse=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.ICreateSourceRequest=} [properties] Properties to set */ - function ListSourcesResponse(properties) { - this.sources = []; + function CreateSourceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3254,91 +3558,88 @@ } /** - * ListSourcesResponse sources. - * @member {Array.} sources - * @memberof google.cloud.securitycenter.v1.ListSourcesResponse + * CreateSourceRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1.CreateSourceRequest * @instance */ - ListSourcesResponse.prototype.sources = $util.emptyArray; + CreateSourceRequest.prototype.parent = ""; /** - * ListSourcesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.securitycenter.v1.ListSourcesResponse + * CreateSourceRequest source. + * @member {google.cloud.securitycenter.v1.ISource|null|undefined} source + * @memberof google.cloud.securitycenter.v1.CreateSourceRequest * @instance */ - ListSourcesResponse.prototype.nextPageToken = ""; + CreateSourceRequest.prototype.source = null; /** - * Creates a new ListSourcesResponse instance using the specified properties. + * Creates a new CreateSourceRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.ListSourcesResponse + * @memberof google.cloud.securitycenter.v1.CreateSourceRequest * @static - * @param {google.cloud.securitycenter.v1.IListSourcesResponse=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.ListSourcesResponse} ListSourcesResponse instance + * @param {google.cloud.securitycenter.v1.ICreateSourceRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.CreateSourceRequest} CreateSourceRequest instance */ - ListSourcesResponse.create = function create(properties) { - return new ListSourcesResponse(properties); + CreateSourceRequest.create = function create(properties) { + return new CreateSourceRequest(properties); }; /** - * Encodes the specified ListSourcesResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListSourcesResponse.verify|verify} messages. + * Encodes the specified CreateSourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.CreateSourceRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.ListSourcesResponse + * @memberof google.cloud.securitycenter.v1.CreateSourceRequest * @static - * @param {google.cloud.securitycenter.v1.IListSourcesResponse} message ListSourcesResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1.ICreateSourceRequest} message CreateSourceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSourcesResponse.encode = function encode(message, writer) { + CreateSourceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sources != null && message.sources.length) - for (var i = 0; i < message.sources.length; ++i) - $root.google.cloud.securitycenter.v1.Source.encode(message.sources[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.source != null && message.hasOwnProperty("source")) + $root.google.cloud.securitycenter.v1.Source.encode(message.source, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListSourcesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListSourcesResponse.verify|verify} messages. + * Encodes the specified CreateSourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CreateSourceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.ListSourcesResponse + * @memberof google.cloud.securitycenter.v1.CreateSourceRequest * @static - * @param {google.cloud.securitycenter.v1.IListSourcesResponse} message ListSourcesResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1.ICreateSourceRequest} message CreateSourceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSourcesResponse.encodeDelimited = function encodeDelimited(message, writer) { + CreateSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSourcesResponse message from the specified reader or buffer. + * Decodes a CreateSourceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.ListSourcesResponse + * @memberof google.cloud.securitycenter.v1.CreateSourceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.ListSourcesResponse} ListSourcesResponse + * @returns {google.cloud.securitycenter.v1.CreateSourceRequest} CreateSourceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSourcesResponse.decode = function decode(reader, length) { + CreateSourceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListSourcesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.CreateSourceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.sources && message.sources.length)) - message.sources = []; - message.sources.push($root.google.cloud.securitycenter.v1.Source.decode(reader, reader.uint32())); + message.parent = reader.string(); break; case 2: - message.nextPageToken = reader.string(); + message.source = $root.google.cloud.securitycenter.v1.Source.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -3349,140 +3650,121 @@ }; /** - * Decodes a ListSourcesResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateSourceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.ListSourcesResponse + * @memberof google.cloud.securitycenter.v1.CreateSourceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.ListSourcesResponse} ListSourcesResponse + * @returns {google.cloud.securitycenter.v1.CreateSourceRequest} CreateSourceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSourcesResponse.decodeDelimited = function decodeDelimited(reader) { + CreateSourceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListSourcesResponse message. + * Verifies a CreateSourceRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.ListSourcesResponse + * @memberof google.cloud.securitycenter.v1.CreateSourceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListSourcesResponse.verify = function verify(message) { + CreateSourceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sources != null && message.hasOwnProperty("sources")) { - if (!Array.isArray(message.sources)) - return "sources: array expected"; - for (var i = 0; i < message.sources.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.Source.verify(message.sources[i]); - if (error) - return "sources." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.source != null && message.hasOwnProperty("source")) { + var error = $root.google.cloud.securitycenter.v1.Source.verify(message.source); + if (error) + return "source." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListSourcesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateSourceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.ListSourcesResponse + * @memberof google.cloud.securitycenter.v1.CreateSourceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.ListSourcesResponse} ListSourcesResponse + * @returns {google.cloud.securitycenter.v1.CreateSourceRequest} CreateSourceRequest */ - ListSourcesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.ListSourcesResponse) + CreateSourceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.CreateSourceRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.ListSourcesResponse(); - if (object.sources) { - if (!Array.isArray(object.sources)) - throw TypeError(".google.cloud.securitycenter.v1.ListSourcesResponse.sources: array expected"); - message.sources = []; - for (var i = 0; i < object.sources.length; ++i) { - if (typeof object.sources[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ListSourcesResponse.sources: object expected"); - message.sources[i] = $root.google.cloud.securitycenter.v1.Source.fromObject(object.sources[i]); - } + var message = new $root.google.cloud.securitycenter.v1.CreateSourceRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.source != null) { + if (typeof object.source !== "object") + throw TypeError(".google.cloud.securitycenter.v1.CreateSourceRequest.source: object expected"); + message.source = $root.google.cloud.securitycenter.v1.Source.fromObject(object.source); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListSourcesResponse message. Also converts values to other types if specified. + * Creates a plain object from a CreateSourceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.ListSourcesResponse + * @memberof google.cloud.securitycenter.v1.CreateSourceRequest * @static - * @param {google.cloud.securitycenter.v1.ListSourcesResponse} message ListSourcesResponse + * @param {google.cloud.securitycenter.v1.CreateSourceRequest} message CreateSourceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSourcesResponse.toObject = function toObject(message, options) { + CreateSourceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.sources = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.sources && message.sources.length) { - object.sources = []; - for (var j = 0; j < message.sources.length; ++j) - object.sources[j] = $root.google.cloud.securitycenter.v1.Source.toObject(message.sources[j], options); + if (options.defaults) { + object.parent = ""; + object.source = null; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.source != null && message.hasOwnProperty("source")) + object.source = $root.google.cloud.securitycenter.v1.Source.toObject(message.source, options); return object; }; /** - * Converts this ListSourcesResponse to JSON. + * Converts this CreateSourceRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.ListSourcesResponse + * @memberof google.cloud.securitycenter.v1.CreateSourceRequest * @instance * @returns {Object.} JSON object */ - ListSourcesResponse.prototype.toJSON = function toJSON() { + CreateSourceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListSourcesResponse; + return CreateSourceRequest; })(); - v1.ListAssetsRequest = (function() { + v1.GetOrganizationSettingsRequest = (function() { /** - * Properties of a ListAssetsRequest. + * Properties of a GetOrganizationSettingsRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IListAssetsRequest - * @property {string|null} [parent] ListAssetsRequest parent - * @property {string|null} [filter] ListAssetsRequest filter - * @property {string|null} [orderBy] ListAssetsRequest orderBy - * @property {google.protobuf.ITimestamp|null} [readTime] ListAssetsRequest readTime - * @property {google.protobuf.IDuration|null} [compareDuration] ListAssetsRequest compareDuration - * @property {google.protobuf.IFieldMask|null} [fieldMask] ListAssetsRequest fieldMask - * @property {string|null} [pageToken] ListAssetsRequest pageToken - * @property {number|null} [pageSize] ListAssetsRequest pageSize + * @interface IGetOrganizationSettingsRequest + * @property {string|null} [name] GetOrganizationSettingsRequest name */ /** - * Constructs a new ListAssetsRequest. + * Constructs a new GetOrganizationSettingsRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a ListAssetsRequest. - * @implements IListAssetsRequest + * @classdesc Represents a GetOrganizationSettingsRequest. + * @implements IGetOrganizationSettingsRequest * @constructor - * @param {google.cloud.securitycenter.v1.IListAssetsRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest=} [properties] Properties to set */ - function ListAssetsRequest(properties) { + function GetOrganizationSettingsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3490,166 +3772,75 @@ } /** - * ListAssetsRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycenter.v1.ListAssetsRequest - * @instance - */ - ListAssetsRequest.prototype.parent = ""; - - /** - * ListAssetsRequest filter. - * @member {string} filter - * @memberof google.cloud.securitycenter.v1.ListAssetsRequest - * @instance - */ - ListAssetsRequest.prototype.filter = ""; - - /** - * ListAssetsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.securitycenter.v1.ListAssetsRequest - * @instance - */ - ListAssetsRequest.prototype.orderBy = ""; - - /** - * ListAssetsRequest readTime. - * @member {google.protobuf.ITimestamp|null|undefined} readTime - * @memberof google.cloud.securitycenter.v1.ListAssetsRequest - * @instance - */ - ListAssetsRequest.prototype.readTime = null; - - /** - * ListAssetsRequest compareDuration. - * @member {google.protobuf.IDuration|null|undefined} compareDuration - * @memberof google.cloud.securitycenter.v1.ListAssetsRequest - * @instance - */ - ListAssetsRequest.prototype.compareDuration = null; - - /** - * ListAssetsRequest fieldMask. - * @member {google.protobuf.IFieldMask|null|undefined} fieldMask - * @memberof google.cloud.securitycenter.v1.ListAssetsRequest - * @instance - */ - ListAssetsRequest.prototype.fieldMask = null; - - /** - * ListAssetsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.securitycenter.v1.ListAssetsRequest - * @instance - */ - ListAssetsRequest.prototype.pageToken = ""; - - /** - * ListAssetsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.securitycenter.v1.ListAssetsRequest + * GetOrganizationSettingsRequest name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest * @instance */ - ListAssetsRequest.prototype.pageSize = 0; + GetOrganizationSettingsRequest.prototype.name = ""; /** - * Creates a new ListAssetsRequest instance using the specified properties. + * Creates a new GetOrganizationSettingsRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.ListAssetsRequest + * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest * @static - * @param {google.cloud.securitycenter.v1.IListAssetsRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.ListAssetsRequest} ListAssetsRequest instance + * @param {google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.GetOrganizationSettingsRequest} GetOrganizationSettingsRequest instance */ - ListAssetsRequest.create = function create(properties) { - return new ListAssetsRequest(properties); + GetOrganizationSettingsRequest.create = function create(properties) { + return new GetOrganizationSettingsRequest(properties); }; /** - * Encodes the specified ListAssetsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsRequest.verify|verify} messages. + * Encodes the specified GetOrganizationSettingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetOrganizationSettingsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.ListAssetsRequest + * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest * @static - * @param {google.cloud.securitycenter.v1.IListAssetsRequest} message ListAssetsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest} message GetOrganizationSettingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAssetsRequest.encode = function encode(message, writer) { + GetOrganizationSettingsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.orderBy); - if (message.readTime != null && message.hasOwnProperty("readTime")) - $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) - $root.google.protobuf.Duration.encode(message.compareDuration, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) - $root.google.protobuf.FieldMask.encode(message.fieldMask, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.pageToken); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.pageSize); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsRequest.verify|verify} messages. + * Encodes the specified GetOrganizationSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetOrganizationSettingsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.ListAssetsRequest + * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest * @static - * @param {google.cloud.securitycenter.v1.IListAssetsRequest} message ListAssetsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest} message GetOrganizationSettingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAssetsRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetOrganizationSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListAssetsRequest message from the specified reader or buffer. + * Decodes a GetOrganizationSettingsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.ListAssetsRequest + * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.ListAssetsRequest} ListAssetsRequest + * @returns {google.cloud.securitycenter.v1.GetOrganizationSettingsRequest} GetOrganizationSettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAssetsRequest.decode = function decode(reader, length) { + GetOrganizationSettingsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListAssetsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); - break; - case 2: - message.filter = reader.string(); - break; - case 3: - message.orderBy = reader.string(); - break; - case 4: - message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.compareDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 7: - message.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 8: - message.pageToken = reader.string(); - break; - case 9: - message.pageSize = reader.int32(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -3660,183 +3851,107 @@ }; /** - * Decodes a ListAssetsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetOrganizationSettingsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.ListAssetsRequest + * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.ListAssetsRequest} ListAssetsRequest + * @returns {google.cloud.securitycenter.v1.GetOrganizationSettingsRequest} GetOrganizationSettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAssetsRequest.decodeDelimited = function decodeDelimited(reader) { + GetOrganizationSettingsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListAssetsRequest message. + * Verifies a GetOrganizationSettingsRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.ListAssetsRequest + * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListAssetsRequest.verify = function verify(message) { + GetOrganizationSettingsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - if (message.readTime != null && message.hasOwnProperty("readTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.readTime); - if (error) - return "readTime." + error; - } - if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) { - var error = $root.google.protobuf.Duration.verify(message.compareDuration); - if (error) - return "compareDuration." + error; - } - if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.fieldMask); - if (error) - return "fieldMask." + error; - } - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListAssetsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetOrganizationSettingsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.ListAssetsRequest + * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.ListAssetsRequest} ListAssetsRequest + * @returns {google.cloud.securitycenter.v1.GetOrganizationSettingsRequest} GetOrganizationSettingsRequest */ - ListAssetsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.ListAssetsRequest) + GetOrganizationSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.ListAssetsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - if (object.readTime != null) { - if (typeof object.readTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ListAssetsRequest.readTime: object expected"); - message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); - } - if (object.compareDuration != null) { - if (typeof object.compareDuration !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ListAssetsRequest.compareDuration: object expected"); - message.compareDuration = $root.google.protobuf.Duration.fromObject(object.compareDuration); - } - if (object.fieldMask != null) { - if (typeof object.fieldMask !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ListAssetsRequest.fieldMask: object expected"); - message.fieldMask = $root.google.protobuf.FieldMask.fromObject(object.fieldMask); - } - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; + var message = new $root.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListAssetsRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetOrganizationSettingsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.ListAssetsRequest + * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest * @static - * @param {google.cloud.securitycenter.v1.ListAssetsRequest} message ListAssetsRequest + * @param {google.cloud.securitycenter.v1.GetOrganizationSettingsRequest} message GetOrganizationSettingsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListAssetsRequest.toObject = function toObject(message, options) { + GetOrganizationSettingsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.filter = ""; - object.orderBy = ""; - object.readTime = null; - object.compareDuration = null; - object.fieldMask = null; - object.pageToken = ""; - object.pageSize = 0; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.readTime != null && message.hasOwnProperty("readTime")) - object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); - if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) - object.compareDuration = $root.google.protobuf.Duration.toObject(message.compareDuration, options); - if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) - object.fieldMask = $root.google.protobuf.FieldMask.toObject(message.fieldMask, options); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListAssetsRequest to JSON. + * Converts this GetOrganizationSettingsRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.ListAssetsRequest + * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest * @instance * @returns {Object.} JSON object */ - ListAssetsRequest.prototype.toJSON = function toJSON() { + GetOrganizationSettingsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListAssetsRequest; + return GetOrganizationSettingsRequest; })(); - v1.ListAssetsResponse = (function() { + v1.GetSourceRequest = (function() { /** - * Properties of a ListAssetsResponse. + * Properties of a GetSourceRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IListAssetsResponse - * @property {Array.|null} [listAssetsResults] ListAssetsResponse listAssetsResults - * @property {google.protobuf.ITimestamp|null} [readTime] ListAssetsResponse readTime - * @property {string|null} [nextPageToken] ListAssetsResponse nextPageToken - * @property {number|null} [totalSize] ListAssetsResponse totalSize + * @interface IGetSourceRequest + * @property {string|null} [name] GetSourceRequest name */ /** - * Constructs a new ListAssetsResponse. + * Constructs a new GetSourceRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a ListAssetsResponse. - * @implements IListAssetsResponse + * @classdesc Represents a GetSourceRequest. + * @implements IGetSourceRequest * @constructor - * @param {google.cloud.securitycenter.v1.IListAssetsResponse=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IGetSourceRequest=} [properties] Properties to set */ - function ListAssetsResponse(properties) { - this.listAssetsResults = []; + function GetSourceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3844,117 +3959,75 @@ } /** - * ListAssetsResponse listAssetsResults. - * @member {Array.} listAssetsResults - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse - * @instance - */ - ListAssetsResponse.prototype.listAssetsResults = $util.emptyArray; - - /** - * ListAssetsResponse readTime. - * @member {google.protobuf.ITimestamp|null|undefined} readTime - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse - * @instance - */ - ListAssetsResponse.prototype.readTime = null; - - /** - * ListAssetsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse - * @instance - */ - ListAssetsResponse.prototype.nextPageToken = ""; - - /** - * ListAssetsResponse totalSize. - * @member {number} totalSize - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse + * GetSourceRequest name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.GetSourceRequest * @instance */ - ListAssetsResponse.prototype.totalSize = 0; + GetSourceRequest.prototype.name = ""; /** - * Creates a new ListAssetsResponse instance using the specified properties. + * Creates a new GetSourceRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse + * @memberof google.cloud.securitycenter.v1.GetSourceRequest * @static - * @param {google.cloud.securitycenter.v1.IListAssetsResponse=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.ListAssetsResponse} ListAssetsResponse instance + * @param {google.cloud.securitycenter.v1.IGetSourceRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.GetSourceRequest} GetSourceRequest instance */ - ListAssetsResponse.create = function create(properties) { - return new ListAssetsResponse(properties); + GetSourceRequest.create = function create(properties) { + return new GetSourceRequest(properties); }; /** - * Encodes the specified ListAssetsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsResponse.verify|verify} messages. + * Encodes the specified GetSourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetSourceRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse + * @memberof google.cloud.securitycenter.v1.GetSourceRequest * @static - * @param {google.cloud.securitycenter.v1.IListAssetsResponse} message ListAssetsResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1.IGetSourceRequest} message GetSourceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAssetsResponse.encode = function encode(message, writer) { + GetSourceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.listAssetsResults != null && message.listAssetsResults.length) - for (var i = 0; i < message.listAssetsResults.length; ++i) - $root.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.encode(message.listAssetsResults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.readTime != null && message.hasOwnProperty("readTime")) - $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nextPageToken); - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.totalSize); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsResponse.verify|verify} messages. + * Encodes the specified GetSourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetSourceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse + * @memberof google.cloud.securitycenter.v1.GetSourceRequest * @static - * @param {google.cloud.securitycenter.v1.IListAssetsResponse} message ListAssetsResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1.IGetSourceRequest} message GetSourceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAssetsResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListAssetsResponse message from the specified reader or buffer. + * Decodes a GetSourceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse + * @memberof google.cloud.securitycenter.v1.GetSourceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.ListAssetsResponse} ListAssetsResponse + * @returns {google.cloud.securitycenter.v1.GetSourceRequest} GetSourceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAssetsResponse.decode = function decode(reader, length) { + GetSourceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListAssetsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.GetSourceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.listAssetsResults && message.listAssetsResults.length)) - message.listAssetsResults = []; - message.listAssetsResults.push($root.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.decode(reader, reader.uint32())); - break; - case 2: - message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 3: - message.nextPageToken = reader.string(); - break; - case 4: - message.totalSize = reader.int32(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -3965,559 +4038,244 @@ }; /** - * Decodes a ListAssetsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetSourceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse + * @memberof google.cloud.securitycenter.v1.GetSourceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.ListAssetsResponse} ListAssetsResponse + * @returns {google.cloud.securitycenter.v1.GetSourceRequest} GetSourceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAssetsResponse.decodeDelimited = function decodeDelimited(reader) { + GetSourceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListAssetsResponse message. + * Verifies a GetSourceRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse + * @memberof google.cloud.securitycenter.v1.GetSourceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListAssetsResponse.verify = function verify(message) { + GetSourceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.listAssetsResults != null && message.hasOwnProperty("listAssetsResults")) { - if (!Array.isArray(message.listAssetsResults)) - return "listAssetsResults: array expected"; - for (var i = 0; i < message.listAssetsResults.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.verify(message.listAssetsResults[i]); - if (error) - return "listAssetsResults." + error; - } - } - if (message.readTime != null && message.hasOwnProperty("readTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.readTime); - if (error) - return "readTime." + error; - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - if (!$util.isInteger(message.totalSize)) - return "totalSize: integer expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListAssetsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetSourceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse + * @memberof google.cloud.securitycenter.v1.GetSourceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.ListAssetsResponse} ListAssetsResponse + * @returns {google.cloud.securitycenter.v1.GetSourceRequest} GetSourceRequest */ - ListAssetsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.ListAssetsResponse) + GetSourceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.GetSourceRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.ListAssetsResponse(); - if (object.listAssetsResults) { - if (!Array.isArray(object.listAssetsResults)) - throw TypeError(".google.cloud.securitycenter.v1.ListAssetsResponse.listAssetsResults: array expected"); - message.listAssetsResults = []; - for (var i = 0; i < object.listAssetsResults.length; ++i) { - if (typeof object.listAssetsResults[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ListAssetsResponse.listAssetsResults: object expected"); - message.listAssetsResults[i] = $root.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.fromObject(object.listAssetsResults[i]); - } - } - if (object.readTime != null) { - if (typeof object.readTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ListAssetsResponse.readTime: object expected"); - message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.totalSize != null) - message.totalSize = object.totalSize | 0; + var message = new $root.google.cloud.securitycenter.v1.GetSourceRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListAssetsResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetSourceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse + * @memberof google.cloud.securitycenter.v1.GetSourceRequest * @static - * @param {google.cloud.securitycenter.v1.ListAssetsResponse} message ListAssetsResponse + * @param {google.cloud.securitycenter.v1.GetSourceRequest} message GetSourceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListAssetsResponse.toObject = function toObject(message, options) { + GetSourceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.listAssetsResults = []; - if (options.defaults) { - object.readTime = null; - object.nextPageToken = ""; - object.totalSize = 0; - } - if (message.listAssetsResults && message.listAssetsResults.length) { - object.listAssetsResults = []; - for (var j = 0; j < message.listAssetsResults.length; ++j) - object.listAssetsResults[j] = $root.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.toObject(message.listAssetsResults[j], options); - } - if (message.readTime != null && message.hasOwnProperty("readTime")) - object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - object.totalSize = message.totalSize; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListAssetsResponse to JSON. + * Converts this GetSourceRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse + * @memberof google.cloud.securitycenter.v1.GetSourceRequest * @instance * @returns {Object.} JSON object */ - ListAssetsResponse.prototype.toJSON = function toJSON() { + GetSourceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - ListAssetsResponse.ListAssetsResult = (function() { + return GetSourceRequest; + })(); - /** - * Properties of a ListAssetsResult. - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse - * @interface IListAssetsResult - * @property {google.cloud.securitycenter.v1.IAsset|null} [asset] ListAssetsResult asset - * @property {google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange|null} [stateChange] ListAssetsResult stateChange - */ + v1.GroupAssetsRequest = (function() { - /** - * Constructs a new ListAssetsResult. - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse - * @classdesc Represents a ListAssetsResult. - * @implements IListAssetsResult - * @constructor - * @param {google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult=} [properties] Properties to set - */ - function ListAssetsResult(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListAssetsResult asset. - * @member {google.cloud.securitycenter.v1.IAsset|null|undefined} asset - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult - * @instance - */ - ListAssetsResult.prototype.asset = null; + /** + * Properties of a GroupAssetsRequest. + * @memberof google.cloud.securitycenter.v1 + * @interface IGroupAssetsRequest + * @property {string|null} [parent] GroupAssetsRequest parent + * @property {string|null} [filter] GroupAssetsRequest filter + * @property {string|null} [groupBy] GroupAssetsRequest groupBy + * @property {google.protobuf.IDuration|null} [compareDuration] GroupAssetsRequest compareDuration + * @property {google.protobuf.ITimestamp|null} [readTime] GroupAssetsRequest readTime + * @property {string|null} [pageToken] GroupAssetsRequest pageToken + * @property {number|null} [pageSize] GroupAssetsRequest pageSize + */ - /** - * ListAssetsResult stateChange. - * @member {google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange} stateChange - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult - * @instance - */ - ListAssetsResult.prototype.stateChange = 0; + /** + * Constructs a new GroupAssetsRequest. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a GroupAssetsRequest. + * @implements IGroupAssetsRequest + * @constructor + * @param {google.cloud.securitycenter.v1.IGroupAssetsRequest=} [properties] Properties to set + */ + function GroupAssetsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new ListAssetsResult instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult - * @static - * @param {google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult} ListAssetsResult instance - */ - ListAssetsResult.create = function create(properties) { - return new ListAssetsResult(properties); - }; + /** + * GroupAssetsRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @instance + */ + GroupAssetsRequest.prototype.parent = ""; - /** - * Encodes the specified ListAssetsResult message. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult - * @static - * @param {google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult} message ListAssetsResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAssetsResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.asset != null && message.hasOwnProperty("asset")) - $root.google.cloud.securitycenter.v1.Asset.encode(message.asset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.stateChange != null && message.hasOwnProperty("stateChange")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.stateChange); - return writer; - }; + /** + * GroupAssetsRequest filter. + * @member {string} filter + * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @instance + */ + GroupAssetsRequest.prototype.filter = ""; - /** - * Encodes the specified ListAssetsResult message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult - * @static - * @param {google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult} message ListAssetsResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAssetsResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * GroupAssetsRequest groupBy. + * @member {string} groupBy + * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @instance + */ + GroupAssetsRequest.prototype.groupBy = ""; - /** - * Decodes a ListAssetsResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult} ListAssetsResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAssetsResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.asset = $root.google.cloud.securitycenter.v1.Asset.decode(reader, reader.uint32()); - break; - case 2: - message.stateChange = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * GroupAssetsRequest compareDuration. + * @member {google.protobuf.IDuration|null|undefined} compareDuration + * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @instance + */ + GroupAssetsRequest.prototype.compareDuration = null; - /** - * Decodes a ListAssetsResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult} ListAssetsResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAssetsResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * GroupAssetsRequest readTime. + * @member {google.protobuf.ITimestamp|null|undefined} readTime + * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @instance + */ + GroupAssetsRequest.prototype.readTime = null; - /** - * Verifies a ListAssetsResult message. - * @function verify - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListAssetsResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.asset != null && message.hasOwnProperty("asset")) { - var error = $root.google.cloud.securitycenter.v1.Asset.verify(message.asset); - if (error) - return "asset." + error; - } - if (message.stateChange != null && message.hasOwnProperty("stateChange")) - switch (message.stateChange) { - default: - return "stateChange: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - return null; - }; + /** + * GroupAssetsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @instance + */ + GroupAssetsRequest.prototype.pageToken = ""; - /** - * Creates a ListAssetsResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult} ListAssetsResult - */ - ListAssetsResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult) - return object; - var message = new $root.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult(); - if (object.asset != null) { - if (typeof object.asset !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.asset: object expected"); - message.asset = $root.google.cloud.securitycenter.v1.Asset.fromObject(object.asset); - } - switch (object.stateChange) { - case "UNUSED": - case 0: - message.stateChange = 0; - break; - case "ADDED": - case 1: - message.stateChange = 1; - break; - case "REMOVED": - case 2: - message.stateChange = 2; - break; - case "ACTIVE": - case 3: - message.stateChange = 3; - break; - } - return message; - }; - - /** - * Creates a plain object from a ListAssetsResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult - * @static - * @param {google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult} message ListAssetsResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListAssetsResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.asset = null; - object.stateChange = options.enums === String ? "UNUSED" : 0; - } - if (message.asset != null && message.hasOwnProperty("asset")) - object.asset = $root.google.cloud.securitycenter.v1.Asset.toObject(message.asset, options); - if (message.stateChange != null && message.hasOwnProperty("stateChange")) - object.stateChange = options.enums === String ? $root.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange[message.stateChange] : message.stateChange; - return object; - }; - - /** - * Converts this ListAssetsResult to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult - * @instance - * @returns {Object.} JSON object - */ - ListAssetsResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * StateChange enum. - * @name google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange - * @enum {string} - * @property {number} UNUSED=0 UNUSED value - * @property {number} ADDED=1 ADDED value - * @property {number} REMOVED=2 REMOVED value - * @property {number} ACTIVE=3 ACTIVE value - */ - ListAssetsResult.StateChange = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNUSED"] = 0; - values[valuesById[1] = "ADDED"] = 1; - values[valuesById[2] = "REMOVED"] = 2; - values[valuesById[3] = "ACTIVE"] = 3; - return values; - })(); - - return ListAssetsResult; - })(); - - return ListAssetsResponse; - })(); - - v1.ListFindingsRequest = (function() { - - /** - * Properties of a ListFindingsRequest. - * @memberof google.cloud.securitycenter.v1 - * @interface IListFindingsRequest - * @property {string|null} [parent] ListFindingsRequest parent - * @property {string|null} [filter] ListFindingsRequest filter - * @property {string|null} [orderBy] ListFindingsRequest orderBy - * @property {google.protobuf.ITimestamp|null} [readTime] ListFindingsRequest readTime - * @property {google.protobuf.IDuration|null} [compareDuration] ListFindingsRequest compareDuration - * @property {google.protobuf.IFieldMask|null} [fieldMask] ListFindingsRequest fieldMask - * @property {string|null} [pageToken] ListFindingsRequest pageToken - * @property {number|null} [pageSize] ListFindingsRequest pageSize - */ - - /** - * Constructs a new ListFindingsRequest. - * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a ListFindingsRequest. - * @implements IListFindingsRequest - * @constructor - * @param {google.cloud.securitycenter.v1.IListFindingsRequest=} [properties] Properties to set - */ - function ListFindingsRequest(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]]; - } - - /** - * ListFindingsRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycenter.v1.ListFindingsRequest - * @instance - */ - ListFindingsRequest.prototype.parent = ""; - - /** - * ListFindingsRequest filter. - * @member {string} filter - * @memberof google.cloud.securitycenter.v1.ListFindingsRequest - * @instance - */ - ListFindingsRequest.prototype.filter = ""; - - /** - * ListFindingsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.securitycenter.v1.ListFindingsRequest - * @instance - */ - ListFindingsRequest.prototype.orderBy = ""; - - /** - * ListFindingsRequest readTime. - * @member {google.protobuf.ITimestamp|null|undefined} readTime - * @memberof google.cloud.securitycenter.v1.ListFindingsRequest - * @instance - */ - ListFindingsRequest.prototype.readTime = null; - - /** - * ListFindingsRequest compareDuration. - * @member {google.protobuf.IDuration|null|undefined} compareDuration - * @memberof google.cloud.securitycenter.v1.ListFindingsRequest - * @instance - */ - ListFindingsRequest.prototype.compareDuration = null; - - /** - * ListFindingsRequest fieldMask. - * @member {google.protobuf.IFieldMask|null|undefined} fieldMask - * @memberof google.cloud.securitycenter.v1.ListFindingsRequest - * @instance - */ - ListFindingsRequest.prototype.fieldMask = null; - - /** - * ListFindingsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.securitycenter.v1.ListFindingsRequest - * @instance - */ - ListFindingsRequest.prototype.pageToken = ""; - - /** - * ListFindingsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.securitycenter.v1.ListFindingsRequest - * @instance - */ - ListFindingsRequest.prototype.pageSize = 0; + /** + * GroupAssetsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @instance + */ + GroupAssetsRequest.prototype.pageSize = 0; /** - * Creates a new ListFindingsRequest instance using the specified properties. + * Creates a new GroupAssetsRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.ListFindingsRequest + * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest * @static - * @param {google.cloud.securitycenter.v1.IListFindingsRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.ListFindingsRequest} ListFindingsRequest instance + * @param {google.cloud.securitycenter.v1.IGroupAssetsRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.GroupAssetsRequest} GroupAssetsRequest instance */ - ListFindingsRequest.create = function create(properties) { - return new ListFindingsRequest(properties); + GroupAssetsRequest.create = function create(properties) { + return new GroupAssetsRequest(properties); }; /** - * Encodes the specified ListFindingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsRequest.verify|verify} messages. + * Encodes the specified GroupAssetsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupAssetsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.ListFindingsRequest + * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest * @static - * @param {google.cloud.securitycenter.v1.IListFindingsRequest} message ListFindingsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IGroupAssetsRequest} message GroupAssetsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFindingsRequest.encode = function encode(message, writer) { + GroupAssetsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && message.hasOwnProperty("parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.filter != null && message.hasOwnProperty("filter")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.orderBy); - if (message.readTime != null && message.hasOwnProperty("readTime")) - $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.groupBy != null && message.hasOwnProperty("groupBy")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.groupBy); if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) - $root.google.protobuf.Duration.encode(message.compareDuration, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) - $root.google.protobuf.FieldMask.encode(message.fieldMask, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.compareDuration, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.readTime != null && message.hasOwnProperty("readTime")) + $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.pageToken); + writer.uint32(/* id 7, wireType 2 =*/58).string(message.pageToken); if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.pageSize); + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.pageSize); return writer; }; /** - * Encodes the specified ListFindingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsRequest.verify|verify} messages. + * Encodes the specified GroupAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupAssetsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.ListFindingsRequest + * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest * @static - * @param {google.cloud.securitycenter.v1.IListFindingsRequest} message ListFindingsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IGroupAssetsRequest} message GroupAssetsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFindingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + GroupAssetsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListFindingsRequest message from the specified reader or buffer. + * Decodes a GroupAssetsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.ListFindingsRequest + * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.ListFindingsRequest} ListFindingsRequest + * @returns {google.cloud.securitycenter.v1.GroupAssetsRequest} GroupAssetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFindingsRequest.decode = function decode(reader, length) { + GroupAssetsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListFindingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.GroupAssetsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -4528,21 +4286,18 @@ message.filter = reader.string(); break; case 3: - message.orderBy = reader.string(); + message.groupBy = reader.string(); break; case 4: - message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.compareDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; case 5: - message.compareDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; case 7: - message.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 8: message.pageToken = reader.string(); break; - case 9: + case 8: message.pageSize = reader.int32(); break; default: @@ -4554,30 +4309,30 @@ }; /** - * Decodes a ListFindingsRequest message from the specified reader or buffer, length delimited. + * Decodes a GroupAssetsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.ListFindingsRequest + * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.ListFindingsRequest} ListFindingsRequest + * @returns {google.cloud.securitycenter.v1.GroupAssetsRequest} GroupAssetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFindingsRequest.decodeDelimited = function decodeDelimited(reader) { + GroupAssetsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListFindingsRequest message. + * Verifies a GroupAssetsRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.ListFindingsRequest + * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListFindingsRequest.verify = function verify(message) { + GroupAssetsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) @@ -4586,23 +4341,18 @@ if (message.filter != null && message.hasOwnProperty("filter")) if (!$util.isString(message.filter)) return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - if (message.readTime != null && message.hasOwnProperty("readTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.readTime); - if (error) - return "readTime." + error; - } + if (message.groupBy != null && message.hasOwnProperty("groupBy")) + if (!$util.isString(message.groupBy)) + return "groupBy: string expected"; if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) { var error = $root.google.protobuf.Duration.verify(message.compareDuration); if (error) return "compareDuration." + error; } - if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.fieldMask); + if (message.readTime != null && message.hasOwnProperty("readTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.readTime); if (error) - return "fieldMask." + error; + return "readTime." + error; } if (message.pageToken != null && message.hasOwnProperty("pageToken")) if (!$util.isString(message.pageToken)) @@ -4614,37 +4364,32 @@ }; /** - * Creates a ListFindingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GroupAssetsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.ListFindingsRequest + * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.ListFindingsRequest} ListFindingsRequest + * @returns {google.cloud.securitycenter.v1.GroupAssetsRequest} GroupAssetsRequest */ - ListFindingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.ListFindingsRequest) + GroupAssetsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.GroupAssetsRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.ListFindingsRequest(); + var message = new $root.google.cloud.securitycenter.v1.GroupAssetsRequest(); if (object.parent != null) message.parent = String(object.parent); if (object.filter != null) message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - if (object.readTime != null) { - if (typeof object.readTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ListFindingsRequest.readTime: object expected"); - message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); - } + if (object.groupBy != null) + message.groupBy = String(object.groupBy); if (object.compareDuration != null) { if (typeof object.compareDuration !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ListFindingsRequest.compareDuration: object expected"); + throw TypeError(".google.cloud.securitycenter.v1.GroupAssetsRequest.compareDuration: object expected"); message.compareDuration = $root.google.protobuf.Duration.fromObject(object.compareDuration); } - if (object.fieldMask != null) { - if (typeof object.fieldMask !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ListFindingsRequest.fieldMask: object expected"); - message.fieldMask = $root.google.protobuf.FieldMask.fromObject(object.fieldMask); + if (object.readTime != null) { + if (typeof object.readTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.GroupAssetsRequest.readTime: object expected"); + message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); } if (object.pageToken != null) message.pageToken = String(object.pageToken); @@ -4654,25 +4399,24 @@ }; /** - * Creates a plain object from a ListFindingsRequest message. Also converts values to other types if specified. + * Creates a plain object from a GroupAssetsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.ListFindingsRequest + * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest * @static - * @param {google.cloud.securitycenter.v1.ListFindingsRequest} message ListFindingsRequest + * @param {google.cloud.securitycenter.v1.GroupAssetsRequest} message GroupAssetsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListFindingsRequest.toObject = function toObject(message, options) { + GroupAssetsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; object.filter = ""; - object.orderBy = ""; - object.readTime = null; + object.groupBy = ""; object.compareDuration = null; - object.fieldMask = null; + object.readTime = null; object.pageToken = ""; object.pageSize = 0; } @@ -4680,14 +4424,12 @@ object.parent = message.parent; if (message.filter != null && message.hasOwnProperty("filter")) object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.readTime != null && message.hasOwnProperty("readTime")) - object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); + if (message.groupBy != null && message.hasOwnProperty("groupBy")) + object.groupBy = message.groupBy; if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) object.compareDuration = $root.google.protobuf.Duration.toObject(message.compareDuration, options); - if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) - object.fieldMask = $root.google.protobuf.FieldMask.toObject(message.fieldMask, options); + if (message.readTime != null && message.hasOwnProperty("readTime")) + object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); if (message.pageToken != null && message.hasOwnProperty("pageToken")) object.pageToken = message.pageToken; if (message.pageSize != null && message.hasOwnProperty("pageSize")) @@ -4696,41 +4438,41 @@ }; /** - * Converts this ListFindingsRequest to JSON. + * Converts this GroupAssetsRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.ListFindingsRequest + * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest * @instance * @returns {Object.} JSON object */ - ListFindingsRequest.prototype.toJSON = function toJSON() { + GroupAssetsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListFindingsRequest; + return GroupAssetsRequest; })(); - v1.ListFindingsResponse = (function() { + v1.GroupAssetsResponse = (function() { /** - * Properties of a ListFindingsResponse. + * Properties of a GroupAssetsResponse. * @memberof google.cloud.securitycenter.v1 - * @interface IListFindingsResponse - * @property {Array.|null} [listFindingsResults] ListFindingsResponse listFindingsResults - * @property {google.protobuf.ITimestamp|null} [readTime] ListFindingsResponse readTime - * @property {string|null} [nextPageToken] ListFindingsResponse nextPageToken - * @property {number|null} [totalSize] ListFindingsResponse totalSize + * @interface IGroupAssetsResponse + * @property {Array.|null} [groupByResults] GroupAssetsResponse groupByResults + * @property {google.protobuf.ITimestamp|null} [readTime] GroupAssetsResponse readTime + * @property {string|null} [nextPageToken] GroupAssetsResponse nextPageToken + * @property {number|null} [totalSize] GroupAssetsResponse totalSize */ /** - * Constructs a new ListFindingsResponse. + * Constructs a new GroupAssetsResponse. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a ListFindingsResponse. - * @implements IListFindingsResponse + * @classdesc Represents a GroupAssetsResponse. + * @implements IGroupAssetsResponse * @constructor - * @param {google.cloud.securitycenter.v1.IListFindingsResponse=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IGroupAssetsResponse=} [properties] Properties to set */ - function ListFindingsResponse(properties) { - this.listFindingsResults = []; + function GroupAssetsResponse(properties) { + this.groupByResults = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4738,64 +4480,64 @@ } /** - * ListFindingsResponse listFindingsResults. - * @member {Array.} listFindingsResults - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse + * GroupAssetsResponse groupByResults. + * @member {Array.} groupByResults + * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse * @instance */ - ListFindingsResponse.prototype.listFindingsResults = $util.emptyArray; + GroupAssetsResponse.prototype.groupByResults = $util.emptyArray; /** - * ListFindingsResponse readTime. + * GroupAssetsResponse readTime. * @member {google.protobuf.ITimestamp|null|undefined} readTime - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse + * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse * @instance */ - ListFindingsResponse.prototype.readTime = null; + GroupAssetsResponse.prototype.readTime = null; /** - * ListFindingsResponse nextPageToken. + * GroupAssetsResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse + * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse * @instance */ - ListFindingsResponse.prototype.nextPageToken = ""; + GroupAssetsResponse.prototype.nextPageToken = ""; /** - * ListFindingsResponse totalSize. + * GroupAssetsResponse totalSize. * @member {number} totalSize - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse + * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse * @instance */ - ListFindingsResponse.prototype.totalSize = 0; + GroupAssetsResponse.prototype.totalSize = 0; /** - * Creates a new ListFindingsResponse instance using the specified properties. + * Creates a new GroupAssetsResponse instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse + * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse * @static - * @param {google.cloud.securitycenter.v1.IListFindingsResponse=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.ListFindingsResponse} ListFindingsResponse instance + * @param {google.cloud.securitycenter.v1.IGroupAssetsResponse=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.GroupAssetsResponse} GroupAssetsResponse instance */ - ListFindingsResponse.create = function create(properties) { - return new ListFindingsResponse(properties); + GroupAssetsResponse.create = function create(properties) { + return new GroupAssetsResponse(properties); }; /** - * Encodes the specified ListFindingsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.verify|verify} messages. + * Encodes the specified GroupAssetsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupAssetsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse + * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse * @static - * @param {google.cloud.securitycenter.v1.IListFindingsResponse} message ListFindingsResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1.IGroupAssetsResponse} message GroupAssetsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFindingsResponse.encode = function encode(message, writer) { + GroupAssetsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.listFindingsResults != null && message.listFindingsResults.length) - for (var i = 0; i < message.listFindingsResults.length; ++i) - $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.encode(message.listFindingsResults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.groupByResults != null && message.groupByResults.length) + for (var i = 0; i < message.groupByResults.length; ++i) + $root.google.cloud.securitycenter.v1.GroupResult.encode(message.groupByResults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.readTime != null && message.hasOwnProperty("readTime")) $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) @@ -4806,40 +4548,40 @@ }; /** - * Encodes the specified ListFindingsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.verify|verify} messages. + * Encodes the specified GroupAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupAssetsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse + * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse * @static - * @param {google.cloud.securitycenter.v1.IListFindingsResponse} message ListFindingsResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1.IGroupAssetsResponse} message GroupAssetsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFindingsResponse.encodeDelimited = function encodeDelimited(message, writer) { + GroupAssetsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListFindingsResponse message from the specified reader or buffer. + * Decodes a GroupAssetsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse + * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.ListFindingsResponse} ListFindingsResponse + * @returns {google.cloud.securitycenter.v1.GroupAssetsResponse} GroupAssetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFindingsResponse.decode = function decode(reader, length) { + GroupAssetsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListFindingsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.GroupAssetsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.listFindingsResults && message.listFindingsResults.length)) - message.listFindingsResults = []; - message.listFindingsResults.push($root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.decode(reader, reader.uint32())); + if (!(message.groupByResults && message.groupByResults.length)) + message.groupByResults = []; + message.groupByResults.push($root.google.cloud.securitycenter.v1.GroupResult.decode(reader, reader.uint32())); break; case 2: message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); @@ -4859,39 +4601,39 @@ }; /** - * Decodes a ListFindingsResponse message from the specified reader or buffer, length delimited. + * Decodes a GroupAssetsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse + * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.ListFindingsResponse} ListFindingsResponse + * @returns {google.cloud.securitycenter.v1.GroupAssetsResponse} GroupAssetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFindingsResponse.decodeDelimited = function decodeDelimited(reader) { + GroupAssetsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListFindingsResponse message. + * Verifies a GroupAssetsResponse message. * @function verify - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse + * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListFindingsResponse.verify = function verify(message) { + GroupAssetsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.listFindingsResults != null && message.hasOwnProperty("listFindingsResults")) { - if (!Array.isArray(message.listFindingsResults)) - return "listFindingsResults: array expected"; - for (var i = 0; i < message.listFindingsResults.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.verify(message.listFindingsResults[i]); + if (message.groupByResults != null && message.hasOwnProperty("groupByResults")) { + if (!Array.isArray(message.groupByResults)) + return "groupByResults: array expected"; + for (var i = 0; i < message.groupByResults.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.GroupResult.verify(message.groupByResults[i]); if (error) - return "listFindingsResults." + error; + return "groupByResults." + error; } } if (message.readTime != null && message.hasOwnProperty("readTime")) { @@ -4909,30 +4651,30 @@ }; /** - * Creates a ListFindingsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GroupAssetsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse + * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.ListFindingsResponse} ListFindingsResponse + * @returns {google.cloud.securitycenter.v1.GroupAssetsResponse} GroupAssetsResponse */ - ListFindingsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.ListFindingsResponse) + GroupAssetsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.GroupAssetsResponse) return object; - var message = new $root.google.cloud.securitycenter.v1.ListFindingsResponse(); - if (object.listFindingsResults) { - if (!Array.isArray(object.listFindingsResults)) - throw TypeError(".google.cloud.securitycenter.v1.ListFindingsResponse.listFindingsResults: array expected"); - message.listFindingsResults = []; - for (var i = 0; i < object.listFindingsResults.length; ++i) { - if (typeof object.listFindingsResults[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ListFindingsResponse.listFindingsResults: object expected"); - message.listFindingsResults[i] = $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.fromObject(object.listFindingsResults[i]); + var message = new $root.google.cloud.securitycenter.v1.GroupAssetsResponse(); + if (object.groupByResults) { + if (!Array.isArray(object.groupByResults)) + throw TypeError(".google.cloud.securitycenter.v1.GroupAssetsResponse.groupByResults: array expected"); + message.groupByResults = []; + for (var i = 0; i < object.groupByResults.length; ++i) { + if (typeof object.groupByResults[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.GroupAssetsResponse.groupByResults: object expected"); + message.groupByResults[i] = $root.google.cloud.securitycenter.v1.GroupResult.fromObject(object.groupByResults[i]); } } if (object.readTime != null) { if (typeof object.readTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ListFindingsResponse.readTime: object expected"); + throw TypeError(".google.cloud.securitycenter.v1.GroupAssetsResponse.readTime: object expected"); message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); } if (object.nextPageToken != null) @@ -4943,29 +4685,29 @@ }; /** - * Creates a plain object from a ListFindingsResponse message. Also converts values to other types if specified. + * Creates a plain object from a GroupAssetsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse + * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse * @static - * @param {google.cloud.securitycenter.v1.ListFindingsResponse} message ListFindingsResponse + * @param {google.cloud.securitycenter.v1.GroupAssetsResponse} message GroupAssetsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListFindingsResponse.toObject = function toObject(message, options) { + GroupAssetsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.listFindingsResults = []; + object.groupByResults = []; if (options.defaults) { object.readTime = null; object.nextPageToken = ""; object.totalSize = 0; } - if (message.listFindingsResults && message.listFindingsResults.length) { - object.listFindingsResults = []; - for (var j = 0; j < message.listFindingsResults.length; ++j) - object.listFindingsResults[j] = $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.toObject(message.listFindingsResults[j], options); + if (message.groupByResults && message.groupByResults.length) { + object.groupByResults = []; + for (var j = 0; j < message.groupByResults.length; ++j) + object.groupByResults[j] = $root.google.cloud.securitycenter.v1.GroupResult.toObject(message.groupByResults[j], options); } if (message.readTime != null && message.hasOwnProperty("readTime")) object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); @@ -4977,404 +4719,197 @@ }; /** - * Converts this ListFindingsResponse to JSON. + * Converts this GroupAssetsResponse to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse + * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse * @instance * @returns {Object.} JSON object */ - ListFindingsResponse.prototype.toJSON = function toJSON() { + GroupAssetsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - ListFindingsResponse.ListFindingsResult = (function() { + return GroupAssetsResponse; + })(); - /** - * Properties of a ListFindingsResult. - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse - * @interface IListFindingsResult - * @property {google.cloud.securitycenter.v1.IFinding|null} [finding] ListFindingsResult finding - * @property {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange|null} [stateChange] ListFindingsResult stateChange - */ + v1.GroupFindingsRequest = (function() { - /** - * Constructs a new ListFindingsResult. - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse - * @classdesc Represents a ListFindingsResult. - * @implements IListFindingsResult - * @constructor - * @param {google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult=} [properties] Properties to set - */ - function ListFindingsResult(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListFindingsResult finding. - * @member {google.cloud.securitycenter.v1.IFinding|null|undefined} finding - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult - * @instance - */ - ListFindingsResult.prototype.finding = null; + /** + * Properties of a GroupFindingsRequest. + * @memberof google.cloud.securitycenter.v1 + * @interface IGroupFindingsRequest + * @property {string|null} [parent] GroupFindingsRequest parent + * @property {string|null} [filter] GroupFindingsRequest filter + * @property {string|null} [groupBy] GroupFindingsRequest groupBy + * @property {google.protobuf.ITimestamp|null} [readTime] GroupFindingsRequest readTime + * @property {google.protobuf.IDuration|null} [compareDuration] GroupFindingsRequest compareDuration + * @property {string|null} [pageToken] GroupFindingsRequest pageToken + * @property {number|null} [pageSize] GroupFindingsRequest pageSize + */ - /** - * ListFindingsResult stateChange. - * @member {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange} stateChange - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult - * @instance - */ - ListFindingsResult.prototype.stateChange = 0; + /** + * Constructs a new GroupFindingsRequest. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a GroupFindingsRequest. + * @implements IGroupFindingsRequest + * @constructor + * @param {google.cloud.securitycenter.v1.IGroupFindingsRequest=} [properties] Properties to set + */ + function GroupFindingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new ListFindingsResult instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult - * @static - * @param {google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult} ListFindingsResult instance - */ - ListFindingsResult.create = function create(properties) { - return new ListFindingsResult(properties); - }; + /** + * GroupFindingsRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest + * @instance + */ + GroupFindingsRequest.prototype.parent = ""; - /** - * Encodes the specified ListFindingsResult message. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult - * @static - * @param {google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult} message ListFindingsResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListFindingsResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.finding != null && message.hasOwnProperty("finding")) - $root.google.cloud.securitycenter.v1.Finding.encode(message.finding, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.stateChange != null && message.hasOwnProperty("stateChange")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.stateChange); - return writer; - }; + /** + * GroupFindingsRequest filter. + * @member {string} filter + * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest + * @instance + */ + GroupFindingsRequest.prototype.filter = ""; - /** - * Encodes the specified ListFindingsResult message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult - * @static - * @param {google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult} message ListFindingsResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListFindingsResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * GroupFindingsRequest groupBy. + * @member {string} groupBy + * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest + * @instance + */ + GroupFindingsRequest.prototype.groupBy = ""; - /** - * Decodes a ListFindingsResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult} ListFindingsResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListFindingsResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.finding = $root.google.cloud.securitycenter.v1.Finding.decode(reader, reader.uint32()); - break; - case 2: - message.stateChange = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * GroupFindingsRequest readTime. + * @member {google.protobuf.ITimestamp|null|undefined} readTime + * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest + * @instance + */ + GroupFindingsRequest.prototype.readTime = null; - /** - * Decodes a ListFindingsResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult} ListFindingsResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListFindingsResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * GroupFindingsRequest compareDuration. + * @member {google.protobuf.IDuration|null|undefined} compareDuration + * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest + * @instance + */ + GroupFindingsRequest.prototype.compareDuration = null; - /** - * Verifies a ListFindingsResult message. - * @function verify - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListFindingsResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.finding != null && message.hasOwnProperty("finding")) { - var error = $root.google.cloud.securitycenter.v1.Finding.verify(message.finding); - if (error) - return "finding." + error; - } - if (message.stateChange != null && message.hasOwnProperty("stateChange")) - switch (message.stateChange) { - default: - return "stateChange: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - return null; - }; + /** + * GroupFindingsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest + * @instance + */ + GroupFindingsRequest.prototype.pageToken = ""; - /** - * Creates a ListFindingsResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult} ListFindingsResult - */ - ListFindingsResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult) - return object; - var message = new $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult(); - if (object.finding != null) { - if (typeof object.finding !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.finding: object expected"); - message.finding = $root.google.cloud.securitycenter.v1.Finding.fromObject(object.finding); - } - switch (object.stateChange) { - case "UNUSED": - case 0: - message.stateChange = 0; - break; - case "CHANGED": - case 1: - message.stateChange = 1; - break; - case "UNCHANGED": - case 2: - message.stateChange = 2; - break; - case "ADDED": - case 3: - message.stateChange = 3; - break; - case "REMOVED": - case 4: - message.stateChange = 4; - break; - } - return message; - }; - - /** - * Creates a plain object from a ListFindingsResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult - * @static - * @param {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult} message ListFindingsResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListFindingsResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.finding = null; - object.stateChange = options.enums === String ? "UNUSED" : 0; - } - if (message.finding != null && message.hasOwnProperty("finding")) - object.finding = $root.google.cloud.securitycenter.v1.Finding.toObject(message.finding, options); - if (message.stateChange != null && message.hasOwnProperty("stateChange")) - object.stateChange = options.enums === String ? $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange[message.stateChange] : message.stateChange; - return object; - }; - - /** - * Converts this ListFindingsResult to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult - * @instance - * @returns {Object.} JSON object - */ - ListFindingsResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * StateChange enum. - * @name google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange - * @enum {string} - * @property {number} UNUSED=0 UNUSED value - * @property {number} CHANGED=1 CHANGED value - * @property {number} UNCHANGED=2 UNCHANGED value - * @property {number} ADDED=3 ADDED value - * @property {number} REMOVED=4 REMOVED value - */ - ListFindingsResult.StateChange = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNUSED"] = 0; - values[valuesById[1] = "CHANGED"] = 1; - values[valuesById[2] = "UNCHANGED"] = 2; - values[valuesById[3] = "ADDED"] = 3; - values[valuesById[4] = "REMOVED"] = 4; - return values; - })(); - - return ListFindingsResult; - })(); - - return ListFindingsResponse; - })(); - - v1.SetFindingStateRequest = (function() { - - /** - * Properties of a SetFindingStateRequest. - * @memberof google.cloud.securitycenter.v1 - * @interface ISetFindingStateRequest - * @property {string|null} [name] SetFindingStateRequest name - * @property {google.cloud.securitycenter.v1.Finding.State|null} [state] SetFindingStateRequest state - * @property {google.protobuf.ITimestamp|null} [startTime] SetFindingStateRequest startTime - */ - - /** - * Constructs a new SetFindingStateRequest. - * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a SetFindingStateRequest. - * @implements ISetFindingStateRequest - * @constructor - * @param {google.cloud.securitycenter.v1.ISetFindingStateRequest=} [properties] Properties to set - */ - function SetFindingStateRequest(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]]; - } - - /** - * SetFindingStateRequest name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest - * @instance - */ - SetFindingStateRequest.prototype.name = ""; - - /** - * SetFindingStateRequest state. - * @member {google.cloud.securitycenter.v1.Finding.State} state - * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest - * @instance - */ - SetFindingStateRequest.prototype.state = 0; - - /** - * SetFindingStateRequest startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest - * @instance - */ - SetFindingStateRequest.prototype.startTime = null; + /** + * GroupFindingsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest + * @instance + */ + GroupFindingsRequest.prototype.pageSize = 0; /** - * Creates a new SetFindingStateRequest instance using the specified properties. + * Creates a new GroupFindingsRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest + * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest * @static - * @param {google.cloud.securitycenter.v1.ISetFindingStateRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.SetFindingStateRequest} SetFindingStateRequest instance + * @param {google.cloud.securitycenter.v1.IGroupFindingsRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.GroupFindingsRequest} GroupFindingsRequest instance */ - SetFindingStateRequest.create = function create(properties) { - return new SetFindingStateRequest(properties); + GroupFindingsRequest.create = function create(properties) { + return new GroupFindingsRequest(properties); }; /** - * Encodes the specified SetFindingStateRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.SetFindingStateRequest.verify|verify} messages. + * Encodes the specified GroupFindingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupFindingsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest + * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest * @static - * @param {google.cloud.securitycenter.v1.ISetFindingStateRequest} message SetFindingStateRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IGroupFindingsRequest} message GroupFindingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetFindingStateRequest.encode = function encode(message, writer) { + GroupFindingsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.state != null && message.hasOwnProperty("state")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); - if (message.startTime != null && message.hasOwnProperty("startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.groupBy != null && message.hasOwnProperty("groupBy")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.groupBy); + if (message.readTime != null && message.hasOwnProperty("readTime")) + $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) + $root.google.protobuf.Duration.encode(message.compareDuration, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.pageToken); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.pageSize); return writer; }; /** - * Encodes the specified SetFindingStateRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SetFindingStateRequest.verify|verify} messages. + * Encodes the specified GroupFindingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupFindingsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest + * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest * @static - * @param {google.cloud.securitycenter.v1.ISetFindingStateRequest} message SetFindingStateRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IGroupFindingsRequest} message GroupFindingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetFindingStateRequest.encodeDelimited = function encodeDelimited(message, writer) { + GroupFindingsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SetFindingStateRequest message from the specified reader or buffer. + * Decodes a GroupFindingsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest + * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.SetFindingStateRequest} SetFindingStateRequest + * @returns {google.cloud.securitycenter.v1.GroupFindingsRequest} GroupFindingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetFindingStateRequest.decode = function decode(reader, length) { + GroupFindingsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.SetFindingStateRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.GroupFindingsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.parent = reader.string(); break; case 2: - message.state = reader.int32(); + message.filter = reader.string(); break; case 3: - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.groupBy = reader.string(); + break; + case 4: + message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.compareDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 7: + message.pageToken = reader.string(); + break; + case 8: + message.pageSize = reader.int32(); break; default: reader.skipType(tag & 7); @@ -5385,147 +4920,170 @@ }; /** - * Decodes a SetFindingStateRequest message from the specified reader or buffer, length delimited. + * Decodes a GroupFindingsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest + * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.SetFindingStateRequest} SetFindingStateRequest + * @returns {google.cloud.securitycenter.v1.GroupFindingsRequest} GroupFindingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetFindingStateRequest.decodeDelimited = function decodeDelimited(reader) { + GroupFindingsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SetFindingStateRequest message. + * Verifies a GroupFindingsRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest + * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SetFindingStateRequest.verify = function verify(message) { + GroupFindingsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.groupBy != null && message.hasOwnProperty("groupBy")) + if (!$util.isString(message.groupBy)) + return "groupBy: string expected"; + if (message.readTime != null && message.hasOwnProperty("readTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.readTime); if (error) - return "startTime." + error; + return "readTime." + error; + } + if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) { + var error = $root.google.protobuf.Duration.verify(message.compareDuration); + if (error) + return "compareDuration." + error; } + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; return null; }; /** - * Creates a SetFindingStateRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GroupFindingsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest + * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.SetFindingStateRequest} SetFindingStateRequest + * @returns {google.cloud.securitycenter.v1.GroupFindingsRequest} GroupFindingsRequest */ - SetFindingStateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.SetFindingStateRequest) + GroupFindingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.GroupFindingsRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.SetFindingStateRequest(); - if (object.name != null) - message.name = String(object.name); - switch (object.state) { - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "ACTIVE": - case 1: - message.state = 1; - break; - case "INACTIVE": - case 2: - message.state = 2; - break; + var message = new $root.google.cloud.securitycenter.v1.GroupFindingsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + if (object.groupBy != null) + message.groupBy = String(object.groupBy); + if (object.readTime != null) { + if (typeof object.readTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.GroupFindingsRequest.readTime: object expected"); + message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.SetFindingStateRequest.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + if (object.compareDuration != null) { + if (typeof object.compareDuration !== "object") + throw TypeError(".google.cloud.securitycenter.v1.GroupFindingsRequest.compareDuration: object expected"); + message.compareDuration = $root.google.protobuf.Duration.fromObject(object.compareDuration); } + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; return message; }; /** - * Creates a plain object from a SetFindingStateRequest message. Also converts values to other types if specified. + * Creates a plain object from a GroupFindingsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest + * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest * @static - * @param {google.cloud.securitycenter.v1.SetFindingStateRequest} message SetFindingStateRequest + * @param {google.cloud.securitycenter.v1.GroupFindingsRequest} message GroupFindingsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SetFindingStateRequest.toObject = function toObject(message, options) { + GroupFindingsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.startTime = null; + object.parent = ""; + object.filter = ""; + object.groupBy = ""; + object.readTime = null; + object.compareDuration = null; + object.pageToken = ""; + object.pageSize = 0; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.securitycenter.v1.Finding.State[message.state] : message.state; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.groupBy != null && message.hasOwnProperty("groupBy")) + object.groupBy = message.groupBy; + if (message.readTime != null && message.hasOwnProperty("readTime")) + object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); + if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) + object.compareDuration = $root.google.protobuf.Duration.toObject(message.compareDuration, options); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; return object; }; /** - * Converts this SetFindingStateRequest to JSON. + * Converts this GroupFindingsRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest + * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest * @instance * @returns {Object.} JSON object */ - SetFindingStateRequest.prototype.toJSON = function toJSON() { + GroupFindingsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SetFindingStateRequest; + return GroupFindingsRequest; })(); - v1.RunAssetDiscoveryRequest = (function() { + v1.GroupFindingsResponse = (function() { /** - * Properties of a RunAssetDiscoveryRequest. + * Properties of a GroupFindingsResponse. * @memberof google.cloud.securitycenter.v1 - * @interface IRunAssetDiscoveryRequest - * @property {string|null} [parent] RunAssetDiscoveryRequest parent + * @interface IGroupFindingsResponse + * @property {Array.|null} [groupByResults] GroupFindingsResponse groupByResults + * @property {google.protobuf.ITimestamp|null} [readTime] GroupFindingsResponse readTime + * @property {string|null} [nextPageToken] GroupFindingsResponse nextPageToken + * @property {number|null} [totalSize] GroupFindingsResponse totalSize */ /** - * Constructs a new RunAssetDiscoveryRequest. + * Constructs a new GroupFindingsResponse. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a RunAssetDiscoveryRequest. - * @implements IRunAssetDiscoveryRequest + * @classdesc Represents a GroupFindingsResponse. + * @implements IGroupFindingsResponse * @constructor - * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IGroupFindingsResponse=} [properties] Properties to set */ - function RunAssetDiscoveryRequest(properties) { + function GroupFindingsResponse(properties) { + this.groupByResults = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5533,75 +5091,117 @@ } /** - * RunAssetDiscoveryRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest + * GroupFindingsResponse groupByResults. + * @member {Array.} groupByResults + * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse * @instance */ - RunAssetDiscoveryRequest.prototype.parent = ""; + GroupFindingsResponse.prototype.groupByResults = $util.emptyArray; /** - * Creates a new RunAssetDiscoveryRequest instance using the specified properties. + * GroupFindingsResponse readTime. + * @member {google.protobuf.ITimestamp|null|undefined} readTime + * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse + * @instance + */ + GroupFindingsResponse.prototype.readTime = null; + + /** + * GroupFindingsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse + * @instance + */ + GroupFindingsResponse.prototype.nextPageToken = ""; + + /** + * GroupFindingsResponse totalSize. + * @member {number} totalSize + * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse + * @instance + */ + GroupFindingsResponse.prototype.totalSize = 0; + + /** + * Creates a new GroupFindingsResponse instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest + * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse * @static - * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.RunAssetDiscoveryRequest} RunAssetDiscoveryRequest instance + * @param {google.cloud.securitycenter.v1.IGroupFindingsResponse=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.GroupFindingsResponse} GroupFindingsResponse instance */ - RunAssetDiscoveryRequest.create = function create(properties) { - return new RunAssetDiscoveryRequest(properties); + GroupFindingsResponse.create = function create(properties) { + return new GroupFindingsResponse(properties); }; /** - * Encodes the specified RunAssetDiscoveryRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.RunAssetDiscoveryRequest.verify|verify} messages. + * Encodes the specified GroupFindingsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupFindingsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest + * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse * @static - * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest} message RunAssetDiscoveryRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IGroupFindingsResponse} message GroupFindingsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunAssetDiscoveryRequest.encode = function encode(message, writer) { + GroupFindingsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.groupByResults != null && message.groupByResults.length) + for (var i = 0; i < message.groupByResults.length; ++i) + $root.google.cloud.securitycenter.v1.GroupResult.encode(message.groupByResults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.readTime != null && message.hasOwnProperty("readTime")) + $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nextPageToken); + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.totalSize); return writer; }; /** - * Encodes the specified RunAssetDiscoveryRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.RunAssetDiscoveryRequest.verify|verify} messages. + * Encodes the specified GroupFindingsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupFindingsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest + * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse * @static - * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest} message RunAssetDiscoveryRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IGroupFindingsResponse} message GroupFindingsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunAssetDiscoveryRequest.encodeDelimited = function encodeDelimited(message, writer) { + GroupFindingsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RunAssetDiscoveryRequest message from the specified reader or buffer. + * Decodes a GroupFindingsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest + * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.RunAssetDiscoveryRequest} RunAssetDiscoveryRequest + * @returns {google.cloud.securitycenter.v1.GroupFindingsResponse} GroupFindingsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RunAssetDiscoveryRequest.decode = function decode(reader, length) { + GroupFindingsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.GroupFindingsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + if (!(message.groupByResults && message.groupByResults.length)) + message.groupByResults = []; + message.groupByResults.push($root.google.cloud.securitycenter.v1.GroupResult.decode(reader, reader.uint32())); + break; + case 2: + message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.nextPageToken = reader.string(); + break; + case 4: + message.totalSize = reader.int32(); break; default: reader.skipType(tag & 7); @@ -5612,108 +5212,157 @@ }; /** - * Decodes a RunAssetDiscoveryRequest message from the specified reader or buffer, length delimited. + * Decodes a GroupFindingsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest + * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.RunAssetDiscoveryRequest} RunAssetDiscoveryRequest + * @returns {google.cloud.securitycenter.v1.GroupFindingsResponse} GroupFindingsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RunAssetDiscoveryRequest.decodeDelimited = function decodeDelimited(reader) { + GroupFindingsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RunAssetDiscoveryRequest message. + * Verifies a GroupFindingsResponse message. * @function verify - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest + * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RunAssetDiscoveryRequest.verify = function verify(message) { + GroupFindingsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; + if (message.groupByResults != null && message.hasOwnProperty("groupByResults")) { + if (!Array.isArray(message.groupByResults)) + return "groupByResults: array expected"; + for (var i = 0; i < message.groupByResults.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.GroupResult.verify(message.groupByResults[i]); + if (error) + return "groupByResults." + error; + } + } + if (message.readTime != null && message.hasOwnProperty("readTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.readTime); + if (error) + return "readTime." + error; + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; return null; }; /** - * Creates a RunAssetDiscoveryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GroupFindingsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest + * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.RunAssetDiscoveryRequest} RunAssetDiscoveryRequest + * @returns {google.cloud.securitycenter.v1.GroupFindingsResponse} GroupFindingsResponse */ - RunAssetDiscoveryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest) + GroupFindingsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.GroupFindingsResponse) return object; - var message = new $root.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest(); - if (object.parent != null) - message.parent = String(object.parent); - return message; - }; - - /** - * Creates a plain object from a RunAssetDiscoveryRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest - * @static - * @param {google.cloud.securitycenter.v1.RunAssetDiscoveryRequest} message RunAssetDiscoveryRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RunAssetDiscoveryRequest.toObject = function toObject(message, options) { - if (!options) + var message = new $root.google.cloud.securitycenter.v1.GroupFindingsResponse(); + if (object.groupByResults) { + if (!Array.isArray(object.groupByResults)) + throw TypeError(".google.cloud.securitycenter.v1.GroupFindingsResponse.groupByResults: array expected"); + message.groupByResults = []; + for (var i = 0; i < object.groupByResults.length; ++i) { + if (typeof object.groupByResults[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.GroupFindingsResponse.groupByResults: object expected"); + message.groupByResults[i] = $root.google.cloud.securitycenter.v1.GroupResult.fromObject(object.groupByResults[i]); + } + } + if (object.readTime != null) { + if (typeof object.readTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.GroupFindingsResponse.readTime: object expected"); + message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; + return message; + }; + + /** + * Creates a plain object from a GroupFindingsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse + * @static + * @param {google.cloud.securitycenter.v1.GroupFindingsResponse} message GroupFindingsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GroupFindingsResponse.toObject = function toObject(message, options) { + if (!options) options = {}; var object = {}; - if (options.defaults) - object.parent = ""; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; + if (options.arrays || options.defaults) + object.groupByResults = []; + if (options.defaults) { + object.readTime = null; + object.nextPageToken = ""; + object.totalSize = 0; + } + if (message.groupByResults && message.groupByResults.length) { + object.groupByResults = []; + for (var j = 0; j < message.groupByResults.length; ++j) + object.groupByResults[j] = $root.google.cloud.securitycenter.v1.GroupResult.toObject(message.groupByResults[j], options); + } + if (message.readTime != null && message.hasOwnProperty("readTime")) + object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; return object; }; /** - * Converts this RunAssetDiscoveryRequest to JSON. + * Converts this GroupFindingsResponse to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest + * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse * @instance * @returns {Object.} JSON object */ - RunAssetDiscoveryRequest.prototype.toJSON = function toJSON() { + GroupFindingsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RunAssetDiscoveryRequest; + return GroupFindingsResponse; })(); - v1.UpdateFindingRequest = (function() { + v1.GroupResult = (function() { /** - * Properties of an UpdateFindingRequest. + * Properties of a GroupResult. * @memberof google.cloud.securitycenter.v1 - * @interface IUpdateFindingRequest - * @property {google.cloud.securitycenter.v1.IFinding|null} [finding] UpdateFindingRequest finding - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateFindingRequest updateMask + * @interface IGroupResult + * @property {Object.|null} [properties] GroupResult properties + * @property {number|Long|null} [count] GroupResult count */ /** - * Constructs a new UpdateFindingRequest. + * Constructs a new GroupResult. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents an UpdateFindingRequest. - * @implements IUpdateFindingRequest + * @classdesc Represents a GroupResult. + * @implements IGroupResult * @constructor - * @param {google.cloud.securitycenter.v1.IUpdateFindingRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IGroupResult=} [properties] Properties to set */ - function UpdateFindingRequest(properties) { + function GroupResult(properties) { + this.properties = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5721,88 +5370,96 @@ } /** - * UpdateFindingRequest finding. - * @member {google.cloud.securitycenter.v1.IFinding|null|undefined} finding - * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest + * GroupResult properties. + * @member {Object.} properties + * @memberof google.cloud.securitycenter.v1.GroupResult * @instance */ - UpdateFindingRequest.prototype.finding = null; + GroupResult.prototype.properties = $util.emptyObject; /** - * UpdateFindingRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest + * GroupResult count. + * @member {number|Long} count + * @memberof google.cloud.securitycenter.v1.GroupResult * @instance */ - UpdateFindingRequest.prototype.updateMask = null; + GroupResult.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new UpdateFindingRequest instance using the specified properties. + * Creates a new GroupResult instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest + * @memberof google.cloud.securitycenter.v1.GroupResult * @static - * @param {google.cloud.securitycenter.v1.IUpdateFindingRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.UpdateFindingRequest} UpdateFindingRequest instance + * @param {google.cloud.securitycenter.v1.IGroupResult=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.GroupResult} GroupResult instance */ - UpdateFindingRequest.create = function create(properties) { - return new UpdateFindingRequest(properties); + GroupResult.create = function create(properties) { + return new GroupResult(properties); }; /** - * Encodes the specified UpdateFindingRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateFindingRequest.verify|verify} messages. + * Encodes the specified GroupResult message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupResult.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest + * @memberof google.cloud.securitycenter.v1.GroupResult * @static - * @param {google.cloud.securitycenter.v1.IUpdateFindingRequest} message UpdateFindingRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IGroupResult} message GroupResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateFindingRequest.encode = function encode(message, writer) { + GroupResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.finding != null && message.hasOwnProperty("finding")) - $root.google.cloud.securitycenter.v1.Finding.encode(message.finding, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.properties != null && message.hasOwnProperty("properties")) + for (var keys = Object.keys(message.properties), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.protobuf.Value.encode(message.properties[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.count != null && message.hasOwnProperty("count")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.count); return writer; }; /** - * Encodes the specified UpdateFindingRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateFindingRequest.verify|verify} messages. + * Encodes the specified GroupResult message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest + * @memberof google.cloud.securitycenter.v1.GroupResult * @static - * @param {google.cloud.securitycenter.v1.IUpdateFindingRequest} message UpdateFindingRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IGroupResult} message GroupResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateFindingRequest.encodeDelimited = function encodeDelimited(message, writer) { + GroupResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateFindingRequest message from the specified reader or buffer. + * Decodes a GroupResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest + * @memberof google.cloud.securitycenter.v1.GroupResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.UpdateFindingRequest} UpdateFindingRequest + * @returns {google.cloud.securitycenter.v1.GroupResult} GroupResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateFindingRequest.decode = function decode(reader, length) { + GroupResult.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.UpdateFindingRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.GroupResult(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.finding = $root.google.cloud.securitycenter.v1.Finding.decode(reader, reader.uint32()); + reader.skip().pos++; + if (message.properties === $util.emptyObject) + message.properties = {}; + key = reader.string(); + reader.pos++; + message.properties[key] = $root.google.protobuf.Value.decode(reader, reader.uint32()); break; case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.count = reader.int64(); break; default: reader.skipType(tag & 7); @@ -5813,127 +5470,151 @@ }; /** - * Decodes an UpdateFindingRequest message from the specified reader or buffer, length delimited. + * Decodes a GroupResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest + * @memberof google.cloud.securitycenter.v1.GroupResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.UpdateFindingRequest} UpdateFindingRequest + * @returns {google.cloud.securitycenter.v1.GroupResult} GroupResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateFindingRequest.decodeDelimited = function decodeDelimited(reader) { + GroupResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateFindingRequest message. + * Verifies a GroupResult message. * @function verify - * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest + * @memberof google.cloud.securitycenter.v1.GroupResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateFindingRequest.verify = function verify(message) { + GroupResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.finding != null && message.hasOwnProperty("finding")) { - var error = $root.google.cloud.securitycenter.v1.Finding.verify(message.finding); - if (error) - return "finding." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (message.properties != null && message.hasOwnProperty("properties")) { + if (!$util.isObject(message.properties)) + return "properties: object expected"; + var key = Object.keys(message.properties); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.properties[key[i]]); + if (error) + return "properties." + error; + } } + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; return null; }; /** - * Creates an UpdateFindingRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GroupResult message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest + * @memberof google.cloud.securitycenter.v1.GroupResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.UpdateFindingRequest} UpdateFindingRequest + * @returns {google.cloud.securitycenter.v1.GroupResult} GroupResult */ - UpdateFindingRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.UpdateFindingRequest) + GroupResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.GroupResult) return object; - var message = new $root.google.cloud.securitycenter.v1.UpdateFindingRequest(); - if (object.finding != null) { - if (typeof object.finding !== "object") - throw TypeError(".google.cloud.securitycenter.v1.UpdateFindingRequest.finding: object expected"); - message.finding = $root.google.cloud.securitycenter.v1.Finding.fromObject(object.finding); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.securitycenter.v1.UpdateFindingRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.securitycenter.v1.GroupResult(); + if (object.properties) { + if (typeof object.properties !== "object") + throw TypeError(".google.cloud.securitycenter.v1.GroupResult.properties: object expected"); + message.properties = {}; + for (var keys = Object.keys(object.properties), i = 0; i < keys.length; ++i) { + if (typeof object.properties[keys[i]] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.GroupResult.properties: object expected"); + message.properties[keys[i]] = $root.google.protobuf.Value.fromObject(object.properties[keys[i]]); + } } + if (object.count != null) + if ($util.Long) + (message.count = $util.Long.fromValue(object.count)).unsigned = false; + else if (typeof object.count === "string") + message.count = parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from an UpdateFindingRequest message. Also converts values to other types if specified. + * Creates a plain object from a GroupResult message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest + * @memberof google.cloud.securitycenter.v1.GroupResult * @static - * @param {google.cloud.securitycenter.v1.UpdateFindingRequest} message UpdateFindingRequest + * @param {google.cloud.securitycenter.v1.GroupResult} message GroupResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateFindingRequest.toObject = function toObject(message, options) { + GroupResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.finding = null; - object.updateMask = null; - } - if (message.finding != null && message.hasOwnProperty("finding")) - object.finding = $root.google.cloud.securitycenter.v1.Finding.toObject(message.finding, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; - - /** - * Converts this UpdateFindingRequest to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest + if (options.objects || options.defaults) + object.properties = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.count = options.longs === String ? "0" : 0; + var keys2; + if (message.properties && (keys2 = Object.keys(message.properties)).length) { + object.properties = {}; + for (var j = 0; j < keys2.length; ++j) + object.properties[keys2[j]] = $root.google.protobuf.Value.toObject(message.properties[keys2[j]], options); + } + if (message.count != null && message.hasOwnProperty("count")) + if (typeof message.count === "number") + object.count = options.longs === String ? String(message.count) : message.count; + else + object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; + return object; + }; + + /** + * Converts this GroupResult to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.GroupResult * @instance * @returns {Object.} JSON object */ - UpdateFindingRequest.prototype.toJSON = function toJSON() { + GroupResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateFindingRequest; + return GroupResult; })(); - v1.UpdateOrganizationSettingsRequest = (function() { + v1.ListSourcesRequest = (function() { /** - * Properties of an UpdateOrganizationSettingsRequest. + * Properties of a ListSourcesRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IUpdateOrganizationSettingsRequest - * @property {google.cloud.securitycenter.v1.IOrganizationSettings|null} [organizationSettings] UpdateOrganizationSettingsRequest organizationSettings - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateOrganizationSettingsRequest updateMask + * @interface IListSourcesRequest + * @property {string|null} [parent] ListSourcesRequest parent + * @property {string|null} [pageToken] ListSourcesRequest pageToken + * @property {number|null} [pageSize] ListSourcesRequest pageSize */ /** - * Constructs a new UpdateOrganizationSettingsRequest. + * Constructs a new ListSourcesRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents an UpdateOrganizationSettingsRequest. - * @implements IUpdateOrganizationSettingsRequest + * @classdesc Represents a ListSourcesRequest. + * @implements IListSourcesRequest * @constructor - * @param {google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IListSourcesRequest=} [properties] Properties to set */ - function UpdateOrganizationSettingsRequest(properties) { + function ListSourcesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5941,88 +5622,101 @@ } /** - * UpdateOrganizationSettingsRequest organizationSettings. - * @member {google.cloud.securitycenter.v1.IOrganizationSettings|null|undefined} organizationSettings - * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest + * ListSourcesRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1.ListSourcesRequest * @instance */ - UpdateOrganizationSettingsRequest.prototype.organizationSettings = null; + ListSourcesRequest.prototype.parent = ""; /** - * UpdateOrganizationSettingsRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest + * ListSourcesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.securitycenter.v1.ListSourcesRequest * @instance */ - UpdateOrganizationSettingsRequest.prototype.updateMask = null; + ListSourcesRequest.prototype.pageToken = ""; /** - * Creates a new UpdateOrganizationSettingsRequest instance using the specified properties. + * ListSourcesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.securitycenter.v1.ListSourcesRequest + * @instance + */ + ListSourcesRequest.prototype.pageSize = 0; + + /** + * Creates a new ListSourcesRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1.ListSourcesRequest * @static - * @param {google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest} UpdateOrganizationSettingsRequest instance + * @param {google.cloud.securitycenter.v1.IListSourcesRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListSourcesRequest} ListSourcesRequest instance */ - UpdateOrganizationSettingsRequest.create = function create(properties) { - return new UpdateOrganizationSettingsRequest(properties); + ListSourcesRequest.create = function create(properties) { + return new ListSourcesRequest(properties); }; /** - * Encodes the specified UpdateOrganizationSettingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest.verify|verify} messages. + * Encodes the specified ListSourcesRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListSourcesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1.ListSourcesRequest * @static - * @param {google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest} message UpdateOrganizationSettingsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListSourcesRequest} message ListSourcesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateOrganizationSettingsRequest.encode = function encode(message, writer) { + ListSourcesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.organizationSettings != null && message.hasOwnProperty("organizationSettings")) - $root.google.cloud.securitycenter.v1.OrganizationSettings.encode(message.organizationSettings, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.pageSize); return writer; }; /** - * Encodes the specified UpdateOrganizationSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest.verify|verify} messages. + * Encodes the specified ListSourcesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListSourcesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1.ListSourcesRequest * @static - * @param {google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest} message UpdateOrganizationSettingsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListSourcesRequest} message ListSourcesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateOrganizationSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListSourcesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateOrganizationSettingsRequest message from the specified reader or buffer. + * Decodes a ListSourcesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1.ListSourcesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest} UpdateOrganizationSettingsRequest + * @returns {google.cloud.securitycenter.v1.ListSourcesRequest} ListSourcesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateOrganizationSettingsRequest.decode = function decode(reader, length) { + ListSourcesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListSourcesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.organizationSettings = $root.google.cloud.securitycenter.v1.OrganizationSettings.decode(reader, reader.uint32()); + message.parent = reader.string(); break; case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.pageToken = reader.string(); + break; + case 7: + message.pageSize = reader.int32(); break; default: reader.skipType(tag & 7); @@ -6033,127 +5727,126 @@ }; /** - * Decodes an UpdateOrganizationSettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListSourcesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1.ListSourcesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest} UpdateOrganizationSettingsRequest + * @returns {google.cloud.securitycenter.v1.ListSourcesRequest} ListSourcesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateOrganizationSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + ListSourcesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateOrganizationSettingsRequest message. + * Verifies a ListSourcesRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1.ListSourcesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateOrganizationSettingsRequest.verify = function verify(message) { + ListSourcesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.organizationSettings != null && message.hasOwnProperty("organizationSettings")) { - var error = $root.google.cloud.securitycenter.v1.OrganizationSettings.verify(message.organizationSettings); - if (error) - return "organizationSettings." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; return null; }; /** - * Creates an UpdateOrganizationSettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListSourcesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1.ListSourcesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest} UpdateOrganizationSettingsRequest + * @returns {google.cloud.securitycenter.v1.ListSourcesRequest} ListSourcesRequest */ - UpdateOrganizationSettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest) + ListSourcesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListSourcesRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest(); - if (object.organizationSettings != null) { - if (typeof object.organizationSettings !== "object") - throw TypeError(".google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest.organizationSettings: object expected"); - message.organizationSettings = $root.google.cloud.securitycenter.v1.OrganizationSettings.fromObject(object.organizationSettings); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } + var message = new $root.google.cloud.securitycenter.v1.ListSourcesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; return message; }; /** - * Creates a plain object from an UpdateOrganizationSettingsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListSourcesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1.ListSourcesRequest * @static - * @param {google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest} message UpdateOrganizationSettingsRequest + * @param {google.cloud.securitycenter.v1.ListSourcesRequest} message ListSourcesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateOrganizationSettingsRequest.toObject = function toObject(message, options) { + ListSourcesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.organizationSettings = null; - object.updateMask = null; + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; } - if (message.organizationSettings != null && message.hasOwnProperty("organizationSettings")) - object.organizationSettings = $root.google.cloud.securitycenter.v1.OrganizationSettings.toObject(message.organizationSettings, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; return object; }; /** - * Converts this UpdateOrganizationSettingsRequest to JSON. + * Converts this ListSourcesRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1.ListSourcesRequest * @instance * @returns {Object.} JSON object */ - UpdateOrganizationSettingsRequest.prototype.toJSON = function toJSON() { + ListSourcesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateOrganizationSettingsRequest; + return ListSourcesRequest; })(); - v1.UpdateSourceRequest = (function() { + v1.ListSourcesResponse = (function() { /** - * Properties of an UpdateSourceRequest. + * Properties of a ListSourcesResponse. * @memberof google.cloud.securitycenter.v1 - * @interface IUpdateSourceRequest - * @property {google.cloud.securitycenter.v1.ISource|null} [source] UpdateSourceRequest source - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSourceRequest updateMask + * @interface IListSourcesResponse + * @property {Array.|null} [sources] ListSourcesResponse sources + * @property {string|null} [nextPageToken] ListSourcesResponse nextPageToken */ /** - * Constructs a new UpdateSourceRequest. + * Constructs a new ListSourcesResponse. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents an UpdateSourceRequest. - * @implements IUpdateSourceRequest + * @classdesc Represents a ListSourcesResponse. + * @implements IListSourcesResponse * @constructor - * @param {google.cloud.securitycenter.v1.IUpdateSourceRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IListSourcesResponse=} [properties] Properties to set */ - function UpdateSourceRequest(properties) { + function ListSourcesResponse(properties) { + this.sources = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6161,88 +5854,91 @@ } /** - * UpdateSourceRequest source. - * @member {google.cloud.securitycenter.v1.ISource|null|undefined} source - * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * ListSourcesResponse sources. + * @member {Array.} sources + * @memberof google.cloud.securitycenter.v1.ListSourcesResponse * @instance */ - UpdateSourceRequest.prototype.source = null; + ListSourcesResponse.prototype.sources = $util.emptyArray; /** - * UpdateSourceRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest - * @instance - */ - UpdateSourceRequest.prototype.updateMask = null; + * ListSourcesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.securitycenter.v1.ListSourcesResponse + * @instance + */ + ListSourcesResponse.prototype.nextPageToken = ""; /** - * Creates a new UpdateSourceRequest instance using the specified properties. + * Creates a new ListSourcesResponse instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @memberof google.cloud.securitycenter.v1.ListSourcesResponse * @static - * @param {google.cloud.securitycenter.v1.IUpdateSourceRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.UpdateSourceRequest} UpdateSourceRequest instance + * @param {google.cloud.securitycenter.v1.IListSourcesResponse=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListSourcesResponse} ListSourcesResponse instance */ - UpdateSourceRequest.create = function create(properties) { - return new UpdateSourceRequest(properties); + ListSourcesResponse.create = function create(properties) { + return new ListSourcesResponse(properties); }; /** - * Encodes the specified UpdateSourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSourceRequest.verify|verify} messages. + * Encodes the specified ListSourcesResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListSourcesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @memberof google.cloud.securitycenter.v1.ListSourcesResponse * @static - * @param {google.cloud.securitycenter.v1.IUpdateSourceRequest} message UpdateSourceRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListSourcesResponse} message ListSourcesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSourceRequest.encode = function encode(message, writer) { + ListSourcesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.source != null && message.hasOwnProperty("source")) - $root.google.cloud.securitycenter.v1.Source.encode(message.source, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.sources != null && message.sources.length) + for (var i = 0; i < message.sources.length; ++i) + $root.google.cloud.securitycenter.v1.Source.encode(message.sources[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified UpdateSourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSourceRequest.verify|verify} messages. + * Encodes the specified ListSourcesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListSourcesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @memberof google.cloud.securitycenter.v1.ListSourcesResponse * @static - * @param {google.cloud.securitycenter.v1.IUpdateSourceRequest} message UpdateSourceRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListSourcesResponse} message ListSourcesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListSourcesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateSourceRequest message from the specified reader or buffer. + * Decodes a ListSourcesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @memberof google.cloud.securitycenter.v1.ListSourcesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.UpdateSourceRequest} UpdateSourceRequest + * @returns {google.cloud.securitycenter.v1.ListSourcesResponse} ListSourcesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSourceRequest.decode = function decode(reader, length) { + ListSourcesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.UpdateSourceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListSourcesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.source = $root.google.cloud.securitycenter.v1.Source.decode(reader, reader.uint32()); + if (!(message.sources && message.sources.length)) + message.sources = []; + message.sources.push($root.google.cloud.securitycenter.v1.Source.decode(reader, reader.uint32())); break; case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -6253,128 +5949,140 @@ }; /** - * Decodes an UpdateSourceRequest message from the specified reader or buffer, length delimited. + * Decodes a ListSourcesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @memberof google.cloud.securitycenter.v1.ListSourcesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.UpdateSourceRequest} UpdateSourceRequest + * @returns {google.cloud.securitycenter.v1.ListSourcesResponse} ListSourcesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSourceRequest.decodeDelimited = function decodeDelimited(reader) { + ListSourcesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateSourceRequest message. + * Verifies a ListSourcesResponse message. * @function verify - * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @memberof google.cloud.securitycenter.v1.ListSourcesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateSourceRequest.verify = function verify(message) { + ListSourcesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.source != null && message.hasOwnProperty("source")) { - var error = $root.google.cloud.securitycenter.v1.Source.verify(message.source); - if (error) - return "source." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (message.sources != null && message.hasOwnProperty("sources")) { + if (!Array.isArray(message.sources)) + return "sources: array expected"; + for (var i = 0; i < message.sources.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.Source.verify(message.sources[i]); + if (error) + return "sources." + error; + } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates an UpdateSourceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListSourcesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @memberof google.cloud.securitycenter.v1.ListSourcesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.UpdateSourceRequest} UpdateSourceRequest + * @returns {google.cloud.securitycenter.v1.ListSourcesResponse} ListSourcesResponse */ - UpdateSourceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.UpdateSourceRequest) + ListSourcesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListSourcesResponse) return object; - var message = new $root.google.cloud.securitycenter.v1.UpdateSourceRequest(); - if (object.source != null) { - if (typeof object.source !== "object") - throw TypeError(".google.cloud.securitycenter.v1.UpdateSourceRequest.source: object expected"); - message.source = $root.google.cloud.securitycenter.v1.Source.fromObject(object.source); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.securitycenter.v1.UpdateSourceRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.securitycenter.v1.ListSourcesResponse(); + if (object.sources) { + if (!Array.isArray(object.sources)) + throw TypeError(".google.cloud.securitycenter.v1.ListSourcesResponse.sources: array expected"); + message.sources = []; + for (var i = 0; i < object.sources.length; ++i) { + if (typeof object.sources[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListSourcesResponse.sources: object expected"); + message.sources[i] = $root.google.cloud.securitycenter.v1.Source.fromObject(object.sources[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from an UpdateSourceRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListSourcesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @memberof google.cloud.securitycenter.v1.ListSourcesResponse * @static - * @param {google.cloud.securitycenter.v1.UpdateSourceRequest} message UpdateSourceRequest + * @param {google.cloud.securitycenter.v1.ListSourcesResponse} message ListSourcesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateSourceRequest.toObject = function toObject(message, options) { + ListSourcesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.source = null; - object.updateMask = null; + if (options.arrays || options.defaults) + object.sources = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.sources && message.sources.length) { + object.sources = []; + for (var j = 0; j < message.sources.length; ++j) + object.sources[j] = $root.google.cloud.securitycenter.v1.Source.toObject(message.sources[j], options); } - if (message.source != null && message.hasOwnProperty("source")) - object.source = $root.google.cloud.securitycenter.v1.Source.toObject(message.source, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this UpdateSourceRequest to JSON. + * Converts this ListSourcesResponse to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @memberof google.cloud.securitycenter.v1.ListSourcesResponse * @instance * @returns {Object.} JSON object */ - UpdateSourceRequest.prototype.toJSON = function toJSON() { + ListSourcesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateSourceRequest; + return ListSourcesResponse; })(); - v1.UpdateSecurityMarksRequest = (function() { + v1.ListAssetsRequest = (function() { /** - * Properties of an UpdateSecurityMarksRequest. + * Properties of a ListAssetsRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IUpdateSecurityMarksRequest - * @property {google.cloud.securitycenter.v1.ISecurityMarks|null} [securityMarks] UpdateSecurityMarksRequest securityMarks - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSecurityMarksRequest updateMask - * @property {google.protobuf.ITimestamp|null} [startTime] UpdateSecurityMarksRequest startTime + * @interface IListAssetsRequest + * @property {string|null} [parent] ListAssetsRequest parent + * @property {string|null} [filter] ListAssetsRequest filter + * @property {string|null} [orderBy] ListAssetsRequest orderBy + * @property {google.protobuf.ITimestamp|null} [readTime] ListAssetsRequest readTime + * @property {google.protobuf.IDuration|null} [compareDuration] ListAssetsRequest compareDuration + * @property {google.protobuf.IFieldMask|null} [fieldMask] ListAssetsRequest fieldMask + * @property {string|null} [pageToken] ListAssetsRequest pageToken + * @property {number|null} [pageSize] ListAssetsRequest pageSize */ /** - * Constructs a new UpdateSecurityMarksRequest. + * Constructs a new ListAssetsRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents an UpdateSecurityMarksRequest. - * @implements IUpdateSecurityMarksRequest + * @classdesc Represents a ListAssetsRequest. + * @implements IListAssetsRequest * @constructor - * @param {google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IListAssetsRequest=} [properties] Properties to set */ - function UpdateSecurityMarksRequest(properties) { + function ListAssetsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6382,101 +6090,166 @@ } /** - * UpdateSecurityMarksRequest securityMarks. - * @member {google.cloud.securitycenter.v1.ISecurityMarks|null|undefined} securityMarks - * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * ListAssetsRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1.ListAssetsRequest * @instance */ - UpdateSecurityMarksRequest.prototype.securityMarks = null; + ListAssetsRequest.prototype.parent = ""; /** - * UpdateSecurityMarksRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * ListAssetsRequest filter. + * @member {string} filter + * @memberof google.cloud.securitycenter.v1.ListAssetsRequest * @instance */ - UpdateSecurityMarksRequest.prototype.updateMask = null; + ListAssetsRequest.prototype.filter = ""; /** - * UpdateSecurityMarksRequest startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * ListAssetsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.securitycenter.v1.ListAssetsRequest * @instance */ - UpdateSecurityMarksRequest.prototype.startTime = null; + ListAssetsRequest.prototype.orderBy = ""; /** - * Creates a new UpdateSecurityMarksRequest instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest - * @static - * @param {google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.UpdateSecurityMarksRequest} UpdateSecurityMarksRequest instance + * ListAssetsRequest readTime. + * @member {google.protobuf.ITimestamp|null|undefined} readTime + * @memberof google.cloud.securitycenter.v1.ListAssetsRequest + * @instance */ - UpdateSecurityMarksRequest.create = function create(properties) { - return new UpdateSecurityMarksRequest(properties); - }; + ListAssetsRequest.prototype.readTime = null; /** - * Encodes the specified UpdateSecurityMarksRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSecurityMarksRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest - * @static - * @param {google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest} message UpdateSecurityMarksRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * ListAssetsRequest compareDuration. + * @member {google.protobuf.IDuration|null|undefined} compareDuration + * @memberof google.cloud.securitycenter.v1.ListAssetsRequest + * @instance */ - UpdateSecurityMarksRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) - $root.google.cloud.securitycenter.v1.SecurityMarks.encode(message.securityMarks, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.startTime != null && message.hasOwnProperty("startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + ListAssetsRequest.prototype.compareDuration = null; /** - * Encodes the specified UpdateSecurityMarksRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSecurityMarksRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest - * @static - * @param {google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest} message UpdateSecurityMarksRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateSecurityMarksRequest.encodeDelimited = function encodeDelimited(message, writer) { + * ListAssetsRequest fieldMask. + * @member {google.protobuf.IFieldMask|null|undefined} fieldMask + * @memberof google.cloud.securitycenter.v1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.fieldMask = null; + + /** + * ListAssetsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.securitycenter.v1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.pageToken = ""; + + /** + * ListAssetsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.securitycenter.v1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.pageSize = 0; + + /** + * Creates a new ListAssetsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.ListAssetsRequest + * @static + * @param {google.cloud.securitycenter.v1.IListAssetsRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListAssetsRequest} ListAssetsRequest instance + */ + ListAssetsRequest.create = function create(properties) { + return new ListAssetsRequest(properties); + }; + + /** + * Encodes the specified ListAssetsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.ListAssetsRequest + * @static + * @param {google.cloud.securitycenter.v1.IListAssetsRequest} message ListAssetsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAssetsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.orderBy); + if (message.readTime != null && message.hasOwnProperty("readTime")) + $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) + $root.google.protobuf.Duration.encode(message.compareDuration, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) + $root.google.protobuf.FieldMask.encode(message.fieldMask, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.pageToken); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.pageSize); + return writer; + }; + + /** + * Encodes the specified ListAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.ListAssetsRequest + * @static + * @param {google.cloud.securitycenter.v1.IListAssetsRequest} message ListAssetsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAssetsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateSecurityMarksRequest message from the specified reader or buffer. + * Decodes a ListAssetsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * @memberof google.cloud.securitycenter.v1.ListAssetsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.UpdateSecurityMarksRequest} UpdateSecurityMarksRequest + * @returns {google.cloud.securitycenter.v1.ListAssetsRequest} ListAssetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSecurityMarksRequest.decode = function decode(reader, length) { + ListAssetsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListAssetsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.securityMarks = $root.google.cloud.securitycenter.v1.SecurityMarks.decode(reader, reader.uint32()); + message.parent = reader.string(); break; case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.filter = reader.string(); break; case 3: - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.orderBy = reader.string(); + break; + case 4: + message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.compareDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 7: + message.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 8: + message.pageToken = reader.string(); + break; + case 9: + message.pageSize = reader.int32(); break; default: reader.skipType(tag & 7); @@ -6487,146 +6260,183 @@ }; /** - * Decodes an UpdateSecurityMarksRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAssetsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * @memberof google.cloud.securitycenter.v1.ListAssetsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.UpdateSecurityMarksRequest} UpdateSecurityMarksRequest + * @returns {google.cloud.securitycenter.v1.ListAssetsRequest} ListAssetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSecurityMarksRequest.decodeDelimited = function decodeDelimited(reader) { + ListAssetsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateSecurityMarksRequest message. + * Verifies a ListAssetsRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * @memberof google.cloud.securitycenter.v1.ListAssetsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateSecurityMarksRequest.verify = function verify(message) { + ListAssetsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) { - var error = $root.google.cloud.securitycenter.v1.SecurityMarks.verify(message.securityMarks); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.readTime != null && message.hasOwnProperty("readTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.readTime); if (error) - return "securityMarks." + error; + return "readTime." + error; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) { + var error = $root.google.protobuf.Duration.verify(message.compareDuration); if (error) - return "updateMask." + error; + return "compareDuration." + error; } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.fieldMask); if (error) - return "startTime." + error; + return "fieldMask." + error; } + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; return null; }; /** - * Creates an UpdateSecurityMarksRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAssetsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * @memberof google.cloud.securitycenter.v1.ListAssetsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.UpdateSecurityMarksRequest} UpdateSecurityMarksRequest + * @returns {google.cloud.securitycenter.v1.ListAssetsRequest} ListAssetsRequest */ - UpdateSecurityMarksRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest) + ListAssetsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListAssetsRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest(); - if (object.securityMarks != null) { - if (typeof object.securityMarks !== "object") - throw TypeError(".google.cloud.securitycenter.v1.UpdateSecurityMarksRequest.securityMarks: object expected"); - message.securityMarks = $root.google.cloud.securitycenter.v1.SecurityMarks.fromObject(object.securityMarks); + var message = new $root.google.cloud.securitycenter.v1.ListAssetsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.readTime != null) { + if (typeof object.readTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListAssetsRequest.readTime: object expected"); + message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.securitycenter.v1.UpdateSecurityMarksRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + if (object.compareDuration != null) { + if (typeof object.compareDuration !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListAssetsRequest.compareDuration: object expected"); + message.compareDuration = $root.google.protobuf.Duration.fromObject(object.compareDuration); } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.UpdateSecurityMarksRequest.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + if (object.fieldMask != null) { + if (typeof object.fieldMask !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListAssetsRequest.fieldMask: object expected"); + message.fieldMask = $root.google.protobuf.FieldMask.fromObject(object.fieldMask); } + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; return message; }; /** - * Creates a plain object from an UpdateSecurityMarksRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListAssetsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * @memberof google.cloud.securitycenter.v1.ListAssetsRequest * @static - * @param {google.cloud.securitycenter.v1.UpdateSecurityMarksRequest} message UpdateSecurityMarksRequest + * @param {google.cloud.securitycenter.v1.ListAssetsRequest} message ListAssetsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateSecurityMarksRequest.toObject = function toObject(message, options) { + ListAssetsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.securityMarks = null; - object.updateMask = null; - object.startTime = null; + object.parent = ""; + object.filter = ""; + object.orderBy = ""; + object.readTime = null; + object.compareDuration = null; + object.fieldMask = null; + object.pageToken = ""; + object.pageSize = 0; } - if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) - object.securityMarks = $root.google.cloud.securitycenter.v1.SecurityMarks.toObject(message.securityMarks, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.readTime != null && message.hasOwnProperty("readTime")) + object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); + if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) + object.compareDuration = $root.google.protobuf.Duration.toObject(message.compareDuration, options); + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) + object.fieldMask = $root.google.protobuf.FieldMask.toObject(message.fieldMask, options); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; return object; }; /** - * Converts this UpdateSecurityMarksRequest to JSON. + * Converts this ListAssetsRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * @memberof google.cloud.securitycenter.v1.ListAssetsRequest * @instance * @returns {Object.} JSON object */ - UpdateSecurityMarksRequest.prototype.toJSON = function toJSON() { + ListAssetsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateSecurityMarksRequest; + return ListAssetsRequest; })(); - v1.Asset = (function() { + v1.ListAssetsResponse = (function() { /** - * Properties of an Asset. + * Properties of a ListAssetsResponse. * @memberof google.cloud.securitycenter.v1 - * @interface IAsset - * @property {string|null} [name] Asset name - * @property {google.cloud.securitycenter.v1.Asset.ISecurityCenterProperties|null} [securityCenterProperties] Asset securityCenterProperties - * @property {Object.|null} [resourceProperties] Asset resourceProperties - * @property {google.cloud.securitycenter.v1.ISecurityMarks|null} [securityMarks] Asset securityMarks - * @property {google.protobuf.ITimestamp|null} [createTime] Asset createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Asset updateTime - * @property {google.cloud.securitycenter.v1.Asset.IIamPolicy|null} [iamPolicy] Asset iamPolicy + * @interface IListAssetsResponse + * @property {Array.|null} [listAssetsResults] ListAssetsResponse listAssetsResults + * @property {google.protobuf.ITimestamp|null} [readTime] ListAssetsResponse readTime + * @property {string|null} [nextPageToken] ListAssetsResponse nextPageToken + * @property {number|null} [totalSize] ListAssetsResponse totalSize */ /** - * Constructs a new Asset. + * Constructs a new ListAssetsResponse. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents an Asset. - * @implements IAsset + * @classdesc Represents a ListAssetsResponse. + * @implements IListAssetsResponse * @constructor - * @param {google.cloud.securitycenter.v1.IAsset=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IListAssetsResponse=} [properties] Properties to set */ - function Asset(properties) { - this.resourceProperties = {}; + function ListAssetsResponse(properties) { + this.listAssetsResults = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6634,161 +6444,117 @@ } /** - * Asset name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.Asset - * @instance - */ - Asset.prototype.name = ""; - - /** - * Asset securityCenterProperties. - * @member {google.cloud.securitycenter.v1.Asset.ISecurityCenterProperties|null|undefined} securityCenterProperties - * @memberof google.cloud.securitycenter.v1.Asset - * @instance - */ - Asset.prototype.securityCenterProperties = null; - - /** - * Asset resourceProperties. - * @member {Object.} resourceProperties - * @memberof google.cloud.securitycenter.v1.Asset - * @instance - */ - Asset.prototype.resourceProperties = $util.emptyObject; - - /** - * Asset securityMarks. - * @member {google.cloud.securitycenter.v1.ISecurityMarks|null|undefined} securityMarks - * @memberof google.cloud.securitycenter.v1.Asset + * ListAssetsResponse listAssetsResults. + * @member {Array.} listAssetsResults + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse * @instance */ - Asset.prototype.securityMarks = null; + ListAssetsResponse.prototype.listAssetsResults = $util.emptyArray; /** - * Asset createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.securitycenter.v1.Asset + * ListAssetsResponse readTime. + * @member {google.protobuf.ITimestamp|null|undefined} readTime + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse * @instance */ - Asset.prototype.createTime = null; + ListAssetsResponse.prototype.readTime = null; /** - * Asset updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.securitycenter.v1.Asset + * ListAssetsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse * @instance */ - Asset.prototype.updateTime = null; + ListAssetsResponse.prototype.nextPageToken = ""; /** - * Asset iamPolicy. - * @member {google.cloud.securitycenter.v1.Asset.IIamPolicy|null|undefined} iamPolicy - * @memberof google.cloud.securitycenter.v1.Asset + * ListAssetsResponse totalSize. + * @member {number} totalSize + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse * @instance */ - Asset.prototype.iamPolicy = null; + ListAssetsResponse.prototype.totalSize = 0; /** - * Creates a new Asset instance using the specified properties. + * Creates a new ListAssetsResponse instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.Asset + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse * @static - * @param {google.cloud.securitycenter.v1.IAsset=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Asset} Asset instance + * @param {google.cloud.securitycenter.v1.IListAssetsResponse=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListAssetsResponse} ListAssetsResponse instance */ - Asset.create = function create(properties) { - return new Asset(properties); + ListAssetsResponse.create = function create(properties) { + return new ListAssetsResponse(properties); }; /** - * Encodes the specified Asset message. Does not implicitly {@link google.cloud.securitycenter.v1.Asset.verify|verify} messages. + * Encodes the specified ListAssetsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.Asset + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse * @static - * @param {google.cloud.securitycenter.v1.IAsset} message Asset message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListAssetsResponse} message ListAssetsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Asset.encode = function encode(message, writer) { + ListAssetsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.securityCenterProperties != null && message.hasOwnProperty("securityCenterProperties")) - $root.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.encode(message.securityCenterProperties, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.resourceProperties != null && message.hasOwnProperty("resourceProperties")) - for (var keys = Object.keys(message.resourceProperties), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.protobuf.Value.encode(message.resourceProperties[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) - $root.google.cloud.securitycenter.v1.SecurityMarks.encode(message.securityMarks, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.createTime != null && message.hasOwnProperty("createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.iamPolicy != null && message.hasOwnProperty("iamPolicy")) - $root.google.cloud.securitycenter.v1.Asset.IamPolicy.encode(message.iamPolicy, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.listAssetsResults != null && message.listAssetsResults.length) + for (var i = 0; i < message.listAssetsResults.length; ++i) + $root.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.encode(message.listAssetsResults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.readTime != null && message.hasOwnProperty("readTime")) + $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nextPageToken); + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.totalSize); return writer; }; /** - * Encodes the specified Asset message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Asset.verify|verify} messages. + * Encodes the specified ListAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Asset + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse * @static - * @param {google.cloud.securitycenter.v1.IAsset} message Asset message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListAssetsResponse} message ListAssetsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Asset.encodeDelimited = function encodeDelimited(message, writer) { + ListAssetsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Asset message from the specified reader or buffer. + * Decodes a ListAssetsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.Asset + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.Asset} Asset + * @returns {google.cloud.securitycenter.v1.ListAssetsResponse} ListAssetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Asset.decode = function decode(reader, length) { + ListAssetsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.Asset(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListAssetsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + if (!(message.listAssetsResults && message.listAssetsResults.length)) + message.listAssetsResults = []; + message.listAssetsResults.push($root.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.decode(reader, reader.uint32())); break; case 2: - message.securityCenterProperties = $root.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.decode(reader, reader.uint32()); - break; - case 7: - reader.skip().pos++; - if (message.resourceProperties === $util.emptyObject) - message.resourceProperties = {}; - key = reader.string(); - reader.pos++; - message.resourceProperties[key] = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - case 8: - message.securityMarks = $root.google.cloud.securitycenter.v1.SecurityMarks.decode(reader, reader.uint32()); - break; - case 9: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; - case 10: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 3: + message.nextPageToken = reader.string(); break; - case 11: - message.iamPolicy = $root.google.cloud.securitycenter.v1.Asset.IamPolicy.decode(reader, reader.uint32()); + case 4: + message.totalSize = reader.int32(); break; default: reader.skipType(tag & 7); @@ -6799,203 +6565,153 @@ }; /** - * Decodes an Asset message from the specified reader or buffer, length delimited. + * Decodes a ListAssetsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Asset + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Asset} Asset + * @returns {google.cloud.securitycenter.v1.ListAssetsResponse} ListAssetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Asset.decodeDelimited = function decodeDelimited(reader) { + ListAssetsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Asset message. + * Verifies a ListAssetsResponse message. * @function verify - * @memberof google.cloud.securitycenter.v1.Asset + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Asset.verify = function verify(message) { + ListAssetsResponse.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.securityCenterProperties != null && message.hasOwnProperty("securityCenterProperties")) { - var error = $root.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.verify(message.securityCenterProperties); - if (error) - return "securityCenterProperties." + error; - } - if (message.resourceProperties != null && message.hasOwnProperty("resourceProperties")) { - if (!$util.isObject(message.resourceProperties)) - return "resourceProperties: object expected"; - var key = Object.keys(message.resourceProperties); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.resourceProperties[key[i]]); + if (message.listAssetsResults != null && message.hasOwnProperty("listAssetsResults")) { + if (!Array.isArray(message.listAssetsResults)) + return "listAssetsResults: array expected"; + for (var i = 0; i < message.listAssetsResults.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.verify(message.listAssetsResults[i]); if (error) - return "resourceProperties." + error; + return "listAssetsResults." + error; } } - if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) { - var error = $root.google.cloud.securitycenter.v1.SecurityMarks.verify(message.securityMarks); - if (error) - return "securityMarks." + error; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.iamPolicy != null && message.hasOwnProperty("iamPolicy")) { - var error = $root.google.cloud.securitycenter.v1.Asset.IamPolicy.verify(message.iamPolicy); + if (message.readTime != null && message.hasOwnProperty("readTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.readTime); if (error) - return "iamPolicy." + error; + return "readTime." + error; } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; return null; }; /** - * Creates an Asset message from a plain object. Also converts values to their respective internal types. + * Creates a ListAssetsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.Asset + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Asset} Asset + * @returns {google.cloud.securitycenter.v1.ListAssetsResponse} ListAssetsResponse */ - Asset.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Asset) + ListAssetsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListAssetsResponse) return object; - var message = new $root.google.cloud.securitycenter.v1.Asset(); - if (object.name != null) - message.name = String(object.name); - if (object.securityCenterProperties != null) { - if (typeof object.securityCenterProperties !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Asset.securityCenterProperties: object expected"); - message.securityCenterProperties = $root.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.fromObject(object.securityCenterProperties); - } - if (object.resourceProperties) { - if (typeof object.resourceProperties !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Asset.resourceProperties: object expected"); - message.resourceProperties = {}; - for (var keys = Object.keys(object.resourceProperties), i = 0; i < keys.length; ++i) { - if (typeof object.resourceProperties[keys[i]] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Asset.resourceProperties: object expected"); - message.resourceProperties[keys[i]] = $root.google.protobuf.Value.fromObject(object.resourceProperties[keys[i]]); + var message = new $root.google.cloud.securitycenter.v1.ListAssetsResponse(); + if (object.listAssetsResults) { + if (!Array.isArray(object.listAssetsResults)) + throw TypeError(".google.cloud.securitycenter.v1.ListAssetsResponse.listAssetsResults: array expected"); + message.listAssetsResults = []; + for (var i = 0; i < object.listAssetsResults.length; ++i) { + if (typeof object.listAssetsResults[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListAssetsResponse.listAssetsResults: object expected"); + message.listAssetsResults[i] = $root.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.fromObject(object.listAssetsResults[i]); } } - if (object.securityMarks != null) { - if (typeof object.securityMarks !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Asset.securityMarks: object expected"); - message.securityMarks = $root.google.cloud.securitycenter.v1.SecurityMarks.fromObject(object.securityMarks); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Asset.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Asset.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.iamPolicy != null) { - if (typeof object.iamPolicy !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Asset.iamPolicy: object expected"); - message.iamPolicy = $root.google.cloud.securitycenter.v1.Asset.IamPolicy.fromObject(object.iamPolicy); + if (object.readTime != null) { + if (typeof object.readTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListAssetsResponse.readTime: object expected"); + message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; return message; }; /** - * Creates a plain object from an Asset message. Also converts values to other types if specified. + * Creates a plain object from a ListAssetsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.Asset + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse * @static - * @param {google.cloud.securitycenter.v1.Asset} message Asset + * @param {google.cloud.securitycenter.v1.ListAssetsResponse} message ListAssetsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Asset.toObject = function toObject(message, options) { + ListAssetsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.resourceProperties = {}; + if (options.arrays || options.defaults) + object.listAssetsResults = []; if (options.defaults) { - object.name = ""; - object.securityCenterProperties = null; - object.securityMarks = null; - object.createTime = null; - object.updateTime = null; - object.iamPolicy = null; + object.readTime = null; + object.nextPageToken = ""; + object.totalSize = 0; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.securityCenterProperties != null && message.hasOwnProperty("securityCenterProperties")) - object.securityCenterProperties = $root.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.toObject(message.securityCenterProperties, options); - var keys2; - if (message.resourceProperties && (keys2 = Object.keys(message.resourceProperties)).length) { - object.resourceProperties = {}; - for (var j = 0; j < keys2.length; ++j) - object.resourceProperties[keys2[j]] = $root.google.protobuf.Value.toObject(message.resourceProperties[keys2[j]], options); + if (message.listAssetsResults && message.listAssetsResults.length) { + object.listAssetsResults = []; + for (var j = 0; j < message.listAssetsResults.length; ++j) + object.listAssetsResults[j] = $root.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.toObject(message.listAssetsResults[j], options); } - if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) - object.securityMarks = $root.google.cloud.securitycenter.v1.SecurityMarks.toObject(message.securityMarks, options); - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.iamPolicy != null && message.hasOwnProperty("iamPolicy")) - object.iamPolicy = $root.google.cloud.securitycenter.v1.Asset.IamPolicy.toObject(message.iamPolicy, options); + if (message.readTime != null && message.hasOwnProperty("readTime")) + object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; return object; }; /** - * Converts this Asset to JSON. + * Converts this ListAssetsResponse to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.Asset + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse * @instance * @returns {Object.} JSON object */ - Asset.prototype.toJSON = function toJSON() { + ListAssetsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - Asset.SecurityCenterProperties = (function() { + ListAssetsResponse.ListAssetsResult = (function() { /** - * Properties of a SecurityCenterProperties. - * @memberof google.cloud.securitycenter.v1.Asset - * @interface ISecurityCenterProperties - * @property {string|null} [resourceName] SecurityCenterProperties resourceName - * @property {string|null} [resourceType] SecurityCenterProperties resourceType - * @property {string|null} [resourceParent] SecurityCenterProperties resourceParent - * @property {string|null} [resourceProject] SecurityCenterProperties resourceProject - * @property {Array.|null} [resourceOwners] SecurityCenterProperties resourceOwners + * Properties of a ListAssetsResult. + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse + * @interface IListAssetsResult + * @property {google.cloud.securitycenter.v1.IAsset|null} [asset] ListAssetsResult asset + * @property {google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange|null} [stateChange] ListAssetsResult stateChange */ /** - * Constructs a new SecurityCenterProperties. - * @memberof google.cloud.securitycenter.v1.Asset - * @classdesc Represents a SecurityCenterProperties. - * @implements ISecurityCenterProperties + * Constructs a new ListAssetsResult. + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse + * @classdesc Represents a ListAssetsResult. + * @implements IListAssetsResult * @constructor - * @param {google.cloud.securitycenter.v1.Asset.ISecurityCenterProperties=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult=} [properties] Properties to set */ - function SecurityCenterProperties(properties) { - this.resourceOwners = []; + function ListAssetsResult(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7003,130 +6719,88 @@ } /** - * SecurityCenterProperties resourceName. - * @member {string} resourceName - * @memberof google.cloud.securitycenter.v1.Asset.SecurityCenterProperties - * @instance - */ - SecurityCenterProperties.prototype.resourceName = ""; - - /** - * SecurityCenterProperties resourceType. - * @member {string} resourceType - * @memberof google.cloud.securitycenter.v1.Asset.SecurityCenterProperties - * @instance - */ - SecurityCenterProperties.prototype.resourceType = ""; - - /** - * SecurityCenterProperties resourceParent. - * @member {string} resourceParent - * @memberof google.cloud.securitycenter.v1.Asset.SecurityCenterProperties - * @instance - */ - SecurityCenterProperties.prototype.resourceParent = ""; - - /** - * SecurityCenterProperties resourceProject. - * @member {string} resourceProject - * @memberof google.cloud.securitycenter.v1.Asset.SecurityCenterProperties + * ListAssetsResult asset. + * @member {google.cloud.securitycenter.v1.IAsset|null|undefined} asset + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult * @instance */ - SecurityCenterProperties.prototype.resourceProject = ""; + ListAssetsResult.prototype.asset = null; /** - * SecurityCenterProperties resourceOwners. - * @member {Array.} resourceOwners - * @memberof google.cloud.securitycenter.v1.Asset.SecurityCenterProperties + * ListAssetsResult stateChange. + * @member {google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange} stateChange + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult * @instance */ - SecurityCenterProperties.prototype.resourceOwners = $util.emptyArray; + ListAssetsResult.prototype.stateChange = 0; /** - * Creates a new SecurityCenterProperties instance using the specified properties. + * Creates a new ListAssetsResult instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.Asset.SecurityCenterProperties + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult * @static - * @param {google.cloud.securitycenter.v1.Asset.ISecurityCenterProperties=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Asset.SecurityCenterProperties} SecurityCenterProperties instance + * @param {google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult} ListAssetsResult instance */ - SecurityCenterProperties.create = function create(properties) { - return new SecurityCenterProperties(properties); + ListAssetsResult.create = function create(properties) { + return new ListAssetsResult(properties); }; /** - * Encodes the specified SecurityCenterProperties message. Does not implicitly {@link google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.verify|verify} messages. + * Encodes the specified ListAssetsResult message. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.Asset.SecurityCenterProperties + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult * @static - * @param {google.cloud.securitycenter.v1.Asset.ISecurityCenterProperties} message SecurityCenterProperties message or plain object to encode + * @param {google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult} message ListAssetsResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SecurityCenterProperties.encode = function encode(message, writer) { + ListAssetsResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.resourceName != null && message.hasOwnProperty("resourceName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceName); - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceType); - if (message.resourceParent != null && message.hasOwnProperty("resourceParent")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.resourceParent); - if (message.resourceProject != null && message.hasOwnProperty("resourceProject")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.resourceProject); - if (message.resourceOwners != null && message.resourceOwners.length) - for (var i = 0; i < message.resourceOwners.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.resourceOwners[i]); + if (message.asset != null && message.hasOwnProperty("asset")) + $root.google.cloud.securitycenter.v1.Asset.encode(message.asset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.stateChange != null && message.hasOwnProperty("stateChange")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.stateChange); return writer; }; /** - * Encodes the specified SecurityCenterProperties message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.verify|verify} messages. + * Encodes the specified ListAssetsResult message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Asset.SecurityCenterProperties + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult * @static - * @param {google.cloud.securitycenter.v1.Asset.ISecurityCenterProperties} message SecurityCenterProperties message or plain object to encode + * @param {google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult} message ListAssetsResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SecurityCenterProperties.encodeDelimited = function encodeDelimited(message, writer) { + ListAssetsResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SecurityCenterProperties message from the specified reader or buffer. + * Decodes a ListAssetsResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.Asset.SecurityCenterProperties + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.Asset.SecurityCenterProperties} SecurityCenterProperties + * @returns {google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult} ListAssetsResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SecurityCenterProperties.decode = function decode(reader, length) { + ListAssetsResult.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.resourceName = reader.string(); + message.asset = $root.google.cloud.securitycenter.v1.Asset.decode(reader, reader.uint32()); break; case 2: - message.resourceType = reader.string(); - break; - case 3: - message.resourceParent = reader.string(); - break; - case 4: - message.resourceProject = reader.string(); - break; - case 5: - if (!(message.resourceOwners && message.resourceOwners.length)) - message.resourceOwners = []; - message.resourceOwners.push(reader.string()); + message.stateChange = reader.int32(); break; default: reader.skipType(tag & 7); @@ -7137,440 +6811,339 @@ }; /** - * Decodes a SecurityCenterProperties message from the specified reader or buffer, length delimited. + * Decodes a ListAssetsResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Asset.SecurityCenterProperties + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Asset.SecurityCenterProperties} SecurityCenterProperties + * @returns {google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult} ListAssetsResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SecurityCenterProperties.decodeDelimited = function decodeDelimited(reader) { + ListAssetsResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SecurityCenterProperties message. + * Verifies a ListAssetsResult message. * @function verify - * @memberof google.cloud.securitycenter.v1.Asset.SecurityCenterProperties + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SecurityCenterProperties.verify = function verify(message) { + ListAssetsResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.resourceName != null && message.hasOwnProperty("resourceName")) - if (!$util.isString(message.resourceName)) - return "resourceName: string expected"; - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - if (!$util.isString(message.resourceType)) - return "resourceType: string expected"; - if (message.resourceParent != null && message.hasOwnProperty("resourceParent")) - if (!$util.isString(message.resourceParent)) - return "resourceParent: string expected"; - if (message.resourceProject != null && message.hasOwnProperty("resourceProject")) - if (!$util.isString(message.resourceProject)) - return "resourceProject: string expected"; - if (message.resourceOwners != null && message.hasOwnProperty("resourceOwners")) { - if (!Array.isArray(message.resourceOwners)) - return "resourceOwners: array expected"; - for (var i = 0; i < message.resourceOwners.length; ++i) - if (!$util.isString(message.resourceOwners[i])) - return "resourceOwners: string[] expected"; + if (message.asset != null && message.hasOwnProperty("asset")) { + var error = $root.google.cloud.securitycenter.v1.Asset.verify(message.asset); + if (error) + return "asset." + error; } + if (message.stateChange != null && message.hasOwnProperty("stateChange")) + switch (message.stateChange) { + default: + return "stateChange: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } return null; }; /** - * Creates a SecurityCenterProperties message from a plain object. Also converts values to their respective internal types. + * Creates a ListAssetsResult message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.Asset.SecurityCenterProperties + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Asset.SecurityCenterProperties} SecurityCenterProperties + * @returns {google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult} ListAssetsResult */ - SecurityCenterProperties.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties) + ListAssetsResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult) return object; - var message = new $root.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties(); - if (object.resourceName != null) - message.resourceName = String(object.resourceName); - if (object.resourceType != null) - message.resourceType = String(object.resourceType); - if (object.resourceParent != null) - message.resourceParent = String(object.resourceParent); - if (object.resourceProject != null) - message.resourceProject = String(object.resourceProject); - if (object.resourceOwners) { - if (!Array.isArray(object.resourceOwners)) - throw TypeError(".google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.resourceOwners: array expected"); - message.resourceOwners = []; - for (var i = 0; i < object.resourceOwners.length; ++i) - message.resourceOwners[i] = String(object.resourceOwners[i]); + var message = new $root.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult(); + if (object.asset != null) { + if (typeof object.asset !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.asset: object expected"); + message.asset = $root.google.cloud.securitycenter.v1.Asset.fromObject(object.asset); + } + switch (object.stateChange) { + case "UNUSED": + case 0: + message.stateChange = 0; + break; + case "ADDED": + case 1: + message.stateChange = 1; + break; + case "REMOVED": + case 2: + message.stateChange = 2; + break; + case "ACTIVE": + case 3: + message.stateChange = 3; + break; } return message; }; /** - * Creates a plain object from a SecurityCenterProperties message. Also converts values to other types if specified. + * Creates a plain object from a ListAssetsResult message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.Asset.SecurityCenterProperties + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult * @static - * @param {google.cloud.securitycenter.v1.Asset.SecurityCenterProperties} message SecurityCenterProperties + * @param {google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult} message ListAssetsResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SecurityCenterProperties.toObject = function toObject(message, options) { + ListAssetsResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.resourceOwners = []; if (options.defaults) { - object.resourceName = ""; - object.resourceType = ""; - object.resourceParent = ""; - object.resourceProject = ""; - } - if (message.resourceName != null && message.hasOwnProperty("resourceName")) - object.resourceName = message.resourceName; - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - object.resourceType = message.resourceType; - if (message.resourceParent != null && message.hasOwnProperty("resourceParent")) - object.resourceParent = message.resourceParent; - if (message.resourceProject != null && message.hasOwnProperty("resourceProject")) - object.resourceProject = message.resourceProject; - if (message.resourceOwners && message.resourceOwners.length) { - object.resourceOwners = []; - for (var j = 0; j < message.resourceOwners.length; ++j) - object.resourceOwners[j] = message.resourceOwners[j]; + object.asset = null; + object.stateChange = options.enums === String ? "UNUSED" : 0; } + if (message.asset != null && message.hasOwnProperty("asset")) + object.asset = $root.google.cloud.securitycenter.v1.Asset.toObject(message.asset, options); + if (message.stateChange != null && message.hasOwnProperty("stateChange")) + object.stateChange = options.enums === String ? $root.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange[message.stateChange] : message.stateChange; return object; }; /** - * Converts this SecurityCenterProperties to JSON. + * Converts this ListAssetsResult to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.Asset.SecurityCenterProperties + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult * @instance * @returns {Object.} JSON object */ - SecurityCenterProperties.prototype.toJSON = function toJSON() { + ListAssetsResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SecurityCenterProperties; - })(); - - Asset.IamPolicy = (function() { - /** - * Properties of an IamPolicy. - * @memberof google.cloud.securitycenter.v1.Asset - * @interface IIamPolicy - * @property {string|null} [policyBlob] IamPolicy policyBlob + * StateChange enum. + * @name google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange + * @enum {string} + * @property {number} UNUSED=0 UNUSED value + * @property {number} ADDED=1 ADDED value + * @property {number} REMOVED=2 REMOVED value + * @property {number} ACTIVE=3 ACTIVE value */ + ListAssetsResult.StateChange = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNUSED"] = 0; + values[valuesById[1] = "ADDED"] = 1; + values[valuesById[2] = "REMOVED"] = 2; + values[valuesById[3] = "ACTIVE"] = 3; + return values; + })(); - /** - * Constructs a new IamPolicy. - * @memberof google.cloud.securitycenter.v1.Asset - * @classdesc Represents an IamPolicy. - * @implements IIamPolicy - * @constructor - * @param {google.cloud.securitycenter.v1.Asset.IIamPolicy=} [properties] Properties to set - */ - function IamPolicy(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return ListAssetsResult; + })(); - /** - * IamPolicy policyBlob. - * @member {string} policyBlob - * @memberof google.cloud.securitycenter.v1.Asset.IamPolicy - * @instance - */ - IamPolicy.prototype.policyBlob = ""; + return ListAssetsResponse; + })(); - /** - * Creates a new IamPolicy instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.Asset.IamPolicy - * @static - * @param {google.cloud.securitycenter.v1.Asset.IIamPolicy=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Asset.IamPolicy} IamPolicy instance - */ - IamPolicy.create = function create(properties) { - return new IamPolicy(properties); - }; + v1.ListFindingsRequest = (function() { - /** - * Encodes the specified IamPolicy message. Does not implicitly {@link google.cloud.securitycenter.v1.Asset.IamPolicy.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.Asset.IamPolicy - * @static - * @param {google.cloud.securitycenter.v1.Asset.IIamPolicy} message IamPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IamPolicy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.policyBlob != null && message.hasOwnProperty("policyBlob")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.policyBlob); - return writer; - }; + /** + * Properties of a ListFindingsRequest. + * @memberof google.cloud.securitycenter.v1 + * @interface IListFindingsRequest + * @property {string|null} [parent] ListFindingsRequest parent + * @property {string|null} [filter] ListFindingsRequest filter + * @property {string|null} [orderBy] ListFindingsRequest orderBy + * @property {google.protobuf.ITimestamp|null} [readTime] ListFindingsRequest readTime + * @property {google.protobuf.IDuration|null} [compareDuration] ListFindingsRequest compareDuration + * @property {google.protobuf.IFieldMask|null} [fieldMask] ListFindingsRequest fieldMask + * @property {string|null} [pageToken] ListFindingsRequest pageToken + * @property {number|null} [pageSize] ListFindingsRequest pageSize + */ - /** - * Encodes the specified IamPolicy message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Asset.IamPolicy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Asset.IamPolicy - * @static - * @param {google.cloud.securitycenter.v1.Asset.IIamPolicy} message IamPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IamPolicy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Constructs a new ListFindingsRequest. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a ListFindingsRequest. + * @implements IListFindingsRequest + * @constructor + * @param {google.cloud.securitycenter.v1.IListFindingsRequest=} [properties] Properties to set + */ + function ListFindingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes an IamPolicy message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.Asset.IamPolicy - * @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.Asset.IamPolicy} IamPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IamPolicy.decode = function decode(reader, 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.Asset.IamPolicy(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.policyBlob = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * ListFindingsRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1.ListFindingsRequest + * @instance + */ + ListFindingsRequest.prototype.parent = ""; - /** - * Decodes an IamPolicy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Asset.IamPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Asset.IamPolicy} IamPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IamPolicy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IamPolicy message. - * @function verify - * @memberof google.cloud.securitycenter.v1.Asset.IamPolicy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IamPolicy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.policyBlob != null && message.hasOwnProperty("policyBlob")) - if (!$util.isString(message.policyBlob)) - return "policyBlob: string expected"; - return null; - }; - - /** - * Creates an IamPolicy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.Asset.IamPolicy - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Asset.IamPolicy} IamPolicy - */ - IamPolicy.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Asset.IamPolicy) - return object; - var message = new $root.google.cloud.securitycenter.v1.Asset.IamPolicy(); - if (object.policyBlob != null) - message.policyBlob = String(object.policyBlob); - return message; - }; - - /** - * Creates a plain object from an IamPolicy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.Asset.IamPolicy - * @static - * @param {google.cloud.securitycenter.v1.Asset.IamPolicy} message IamPolicy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IamPolicy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.policyBlob = ""; - if (message.policyBlob != null && message.hasOwnProperty("policyBlob")) - object.policyBlob = message.policyBlob; - return object; - }; - - /** - * Converts this IamPolicy to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.Asset.IamPolicy - * @instance - * @returns {Object.} JSON object - */ - IamPolicy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return IamPolicy; - })(); + /** + * ListFindingsRequest filter. + * @member {string} filter + * @memberof google.cloud.securitycenter.v1.ListFindingsRequest + * @instance + */ + ListFindingsRequest.prototype.filter = ""; - return Asset; - })(); + /** + * ListFindingsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.securitycenter.v1.ListFindingsRequest + * @instance + */ + ListFindingsRequest.prototype.orderBy = ""; - v1.SecurityMarks = (function() { + /** + * ListFindingsRequest readTime. + * @member {google.protobuf.ITimestamp|null|undefined} readTime + * @memberof google.cloud.securitycenter.v1.ListFindingsRequest + * @instance + */ + ListFindingsRequest.prototype.readTime = null; /** - * Properties of a SecurityMarks. - * @memberof google.cloud.securitycenter.v1 - * @interface ISecurityMarks - * @property {string|null} [name] SecurityMarks name - * @property {Object.|null} [marks] SecurityMarks marks + * ListFindingsRequest compareDuration. + * @member {google.protobuf.IDuration|null|undefined} compareDuration + * @memberof google.cloud.securitycenter.v1.ListFindingsRequest + * @instance */ + ListFindingsRequest.prototype.compareDuration = null; /** - * Constructs a new SecurityMarks. - * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a SecurityMarks. - * @implements ISecurityMarks - * @constructor - * @param {google.cloud.securitycenter.v1.ISecurityMarks=} [properties] Properties to set + * ListFindingsRequest fieldMask. + * @member {google.protobuf.IFieldMask|null|undefined} fieldMask + * @memberof google.cloud.securitycenter.v1.ListFindingsRequest + * @instance */ - function SecurityMarks(properties) { - this.marks = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + ListFindingsRequest.prototype.fieldMask = null; /** - * SecurityMarks name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.SecurityMarks + * ListFindingsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.securitycenter.v1.ListFindingsRequest * @instance */ - SecurityMarks.prototype.name = ""; + ListFindingsRequest.prototype.pageToken = ""; /** - * SecurityMarks marks. - * @member {Object.} marks - * @memberof google.cloud.securitycenter.v1.SecurityMarks + * ListFindingsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.securitycenter.v1.ListFindingsRequest * @instance */ - SecurityMarks.prototype.marks = $util.emptyObject; + ListFindingsRequest.prototype.pageSize = 0; /** - * Creates a new SecurityMarks instance using the specified properties. + * Creates a new ListFindingsRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.SecurityMarks + * @memberof google.cloud.securitycenter.v1.ListFindingsRequest * @static - * @param {google.cloud.securitycenter.v1.ISecurityMarks=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.SecurityMarks} SecurityMarks instance + * @param {google.cloud.securitycenter.v1.IListFindingsRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListFindingsRequest} ListFindingsRequest instance */ - SecurityMarks.create = function create(properties) { - return new SecurityMarks(properties); + ListFindingsRequest.create = function create(properties) { + return new ListFindingsRequest(properties); }; /** - * Encodes the specified SecurityMarks message. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityMarks.verify|verify} messages. + * Encodes the specified ListFindingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.SecurityMarks + * @memberof google.cloud.securitycenter.v1.ListFindingsRequest * @static - * @param {google.cloud.securitycenter.v1.ISecurityMarks} message SecurityMarks message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListFindingsRequest} message ListFindingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SecurityMarks.encode = function encode(message, writer) { + ListFindingsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.marks != null && message.hasOwnProperty("marks")) - for (var keys = Object.keys(message.marks), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.marks[keys[i]]).ldelim(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.orderBy); + if (message.readTime != null && message.hasOwnProperty("readTime")) + $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) + $root.google.protobuf.Duration.encode(message.compareDuration, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) + $root.google.protobuf.FieldMask.encode(message.fieldMask, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.pageToken); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.pageSize); return writer; }; /** - * Encodes the specified SecurityMarks message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityMarks.verify|verify} messages. + * Encodes the specified ListFindingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.SecurityMarks + * @memberof google.cloud.securitycenter.v1.ListFindingsRequest * @static - * @param {google.cloud.securitycenter.v1.ISecurityMarks} message SecurityMarks message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListFindingsRequest} message ListFindingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SecurityMarks.encodeDelimited = function encodeDelimited(message, writer) { + ListFindingsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SecurityMarks message from the specified reader or buffer. + * Decodes a ListFindingsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.SecurityMarks + * @memberof google.cloud.securitycenter.v1.ListFindingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.SecurityMarks} SecurityMarks + * @returns {google.cloud.securitycenter.v1.ListFindingsRequest} ListFindingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SecurityMarks.decode = function decode(reader, length) { + ListFindingsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.SecurityMarks(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListFindingsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.parent = reader.string(); break; case 2: - reader.skip().pos++; - if (message.marks === $util.emptyObject) - message.marks = {}; - key = reader.string(); - reader.pos++; - message.marks[key] = reader.string(); + message.filter = reader.string(); + break; + case 3: + message.orderBy = reader.string(); + break; + case 4: + message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.compareDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 7: + message.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 8: + message.pageToken = reader.string(); + break; + case 9: + message.pageSize = reader.int32(); break; default: reader.skipType(tag & 7); @@ -7581,140 +7154,183 @@ }; /** - * Decodes a SecurityMarks message from the specified reader or buffer, length delimited. + * Decodes a ListFindingsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.SecurityMarks + * @memberof google.cloud.securitycenter.v1.ListFindingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.SecurityMarks} SecurityMarks + * @returns {google.cloud.securitycenter.v1.ListFindingsRequest} ListFindingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SecurityMarks.decodeDelimited = function decodeDelimited(reader) { + ListFindingsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SecurityMarks message. + * Verifies a ListFindingsRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.SecurityMarks + * @memberof google.cloud.securitycenter.v1.ListFindingsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SecurityMarks.verify = function verify(message) { + ListFindingsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.marks != null && message.hasOwnProperty("marks")) { - if (!$util.isObject(message.marks)) - return "marks: object expected"; - var key = Object.keys(message.marks); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.marks[key[i]])) - return "marks: string{k:string} expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.readTime != null && message.hasOwnProperty("readTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.readTime); + if (error) + return "readTime." + error; + } + if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) { + var error = $root.google.protobuf.Duration.verify(message.compareDuration); + if (error) + return "compareDuration." + error; + } + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.fieldMask); + if (error) + return "fieldMask." + error; } + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; return null; }; /** - * Creates a SecurityMarks message from a plain object. Also converts values to their respective internal types. + * Creates a ListFindingsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.SecurityMarks + * @memberof google.cloud.securitycenter.v1.ListFindingsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.SecurityMarks} SecurityMarks + * @returns {google.cloud.securitycenter.v1.ListFindingsRequest} ListFindingsRequest */ - SecurityMarks.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.SecurityMarks) + ListFindingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListFindingsRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.SecurityMarks(); - if (object.name != null) - message.name = String(object.name); - if (object.marks) { - if (typeof object.marks !== "object") - throw TypeError(".google.cloud.securitycenter.v1.SecurityMarks.marks: object expected"); - message.marks = {}; - for (var keys = Object.keys(object.marks), i = 0; i < keys.length; ++i) - message.marks[keys[i]] = String(object.marks[keys[i]]); + var message = new $root.google.cloud.securitycenter.v1.ListFindingsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.readTime != null) { + if (typeof object.readTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListFindingsRequest.readTime: object expected"); + message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); } + if (object.compareDuration != null) { + if (typeof object.compareDuration !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListFindingsRequest.compareDuration: object expected"); + message.compareDuration = $root.google.protobuf.Duration.fromObject(object.compareDuration); + } + if (object.fieldMask != null) { + if (typeof object.fieldMask !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListFindingsRequest.fieldMask: object expected"); + message.fieldMask = $root.google.protobuf.FieldMask.fromObject(object.fieldMask); + } + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; return message; }; /** - * Creates a plain object from a SecurityMarks message. Also converts values to other types if specified. + * Creates a plain object from a ListFindingsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.SecurityMarks + * @memberof google.cloud.securitycenter.v1.ListFindingsRequest * @static - * @param {google.cloud.securitycenter.v1.SecurityMarks} message SecurityMarks + * @param {google.cloud.securitycenter.v1.ListFindingsRequest} message ListFindingsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SecurityMarks.toObject = function toObject(message, options) { + ListFindingsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.marks = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - var keys2; - if (message.marks && (keys2 = Object.keys(message.marks)).length) { - object.marks = {}; - for (var j = 0; j < keys2.length; ++j) - object.marks[keys2[j]] = message.marks[keys2[j]]; + if (options.defaults) { + object.parent = ""; + object.filter = ""; + object.orderBy = ""; + object.readTime = null; + object.compareDuration = null; + object.fieldMask = null; + object.pageToken = ""; + object.pageSize = 0; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.readTime != null && message.hasOwnProperty("readTime")) + object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); + if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) + object.compareDuration = $root.google.protobuf.Duration.toObject(message.compareDuration, options); + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) + object.fieldMask = $root.google.protobuf.FieldMask.toObject(message.fieldMask, options); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; return object; }; /** - * Converts this SecurityMarks to JSON. + * Converts this ListFindingsRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.SecurityMarks + * @memberof google.cloud.securitycenter.v1.ListFindingsRequest * @instance * @returns {Object.} JSON object */ - SecurityMarks.prototype.toJSON = function toJSON() { + ListFindingsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SecurityMarks; + return ListFindingsRequest; })(); - v1.Finding = (function() { + v1.ListFindingsResponse = (function() { /** - * Properties of a Finding. + * Properties of a ListFindingsResponse. * @memberof google.cloud.securitycenter.v1 - * @interface IFinding - * @property {string|null} [name] Finding name - * @property {string|null} [parent] Finding parent - * @property {string|null} [resourceName] Finding resourceName - * @property {google.cloud.securitycenter.v1.Finding.State|null} [state] Finding state - * @property {string|null} [category] Finding category - * @property {string|null} [externalUri] Finding externalUri - * @property {Object.|null} [sourceProperties] Finding sourceProperties - * @property {google.cloud.securitycenter.v1.ISecurityMarks|null} [securityMarks] Finding securityMarks - * @property {google.protobuf.ITimestamp|null} [eventTime] Finding eventTime - * @property {google.protobuf.ITimestamp|null} [createTime] Finding createTime + * @interface IListFindingsResponse + * @property {Array.|null} [listFindingsResults] ListFindingsResponse listFindingsResults + * @property {google.protobuf.ITimestamp|null} [readTime] ListFindingsResponse readTime + * @property {string|null} [nextPageToken] ListFindingsResponse nextPageToken + * @property {number|null} [totalSize] ListFindingsResponse totalSize */ /** - * Constructs a new Finding. + * Constructs a new ListFindingsResponse. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a Finding. - * @implements IFinding + * @classdesc Represents a ListFindingsResponse. + * @implements IListFindingsResponse * @constructor - * @param {google.cloud.securitycenter.v1.IFinding=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IListFindingsResponse=} [properties] Properties to set */ - function Finding(properties) { - this.sourceProperties = {}; + function ListFindingsResponse(properties) { + this.listFindingsResults = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7722,200 +7338,117 @@ } /** - * Finding name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.Finding + * ListFindingsResponse listFindingsResults. + * @member {Array.} listFindingsResults + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse * @instance */ - Finding.prototype.name = ""; + ListFindingsResponse.prototype.listFindingsResults = $util.emptyArray; /** - * Finding parent. - * @member {string} parent - * @memberof google.cloud.securitycenter.v1.Finding + * ListFindingsResponse readTime. + * @member {google.protobuf.ITimestamp|null|undefined} readTime + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse * @instance */ - Finding.prototype.parent = ""; + ListFindingsResponse.prototype.readTime = null; /** - * Finding resourceName. - * @member {string} resourceName - * @memberof google.cloud.securitycenter.v1.Finding + * ListFindingsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse * @instance */ - Finding.prototype.resourceName = ""; + ListFindingsResponse.prototype.nextPageToken = ""; /** - * Finding state. - * @member {google.cloud.securitycenter.v1.Finding.State} state - * @memberof google.cloud.securitycenter.v1.Finding + * ListFindingsResponse totalSize. + * @member {number} totalSize + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse * @instance */ - Finding.prototype.state = 0; + ListFindingsResponse.prototype.totalSize = 0; /** - * Finding category. - * @member {string} category - * @memberof google.cloud.securitycenter.v1.Finding - * @instance + * Creates a new ListFindingsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse + * @static + * @param {google.cloud.securitycenter.v1.IListFindingsResponse=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListFindingsResponse} ListFindingsResponse instance */ - Finding.prototype.category = ""; + ListFindingsResponse.create = function create(properties) { + return new ListFindingsResponse(properties); + }; /** - * Finding externalUri. - * @member {string} externalUri - * @memberof google.cloud.securitycenter.v1.Finding - * @instance + * Encodes the specified ListFindingsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse + * @static + * @param {google.cloud.securitycenter.v1.IListFindingsResponse} message ListFindingsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Finding.prototype.externalUri = ""; + ListFindingsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.listFindingsResults != null && message.listFindingsResults.length) + for (var i = 0; i < message.listFindingsResults.length; ++i) + $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.encode(message.listFindingsResults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.readTime != null && message.hasOwnProperty("readTime")) + $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nextPageToken); + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.totalSize); + return writer; + }; /** - * Finding sourceProperties. - * @member {Object.} sourceProperties - * @memberof google.cloud.securitycenter.v1.Finding - * @instance + * Encodes the specified ListFindingsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse + * @static + * @param {google.cloud.securitycenter.v1.IListFindingsResponse} message ListFindingsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Finding.prototype.sourceProperties = $util.emptyObject; + ListFindingsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Finding securityMarks. - * @member {google.cloud.securitycenter.v1.ISecurityMarks|null|undefined} securityMarks - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.securityMarks = null; - - /** - * Finding eventTime. - * @member {google.protobuf.ITimestamp|null|undefined} eventTime - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.eventTime = null; - - /** - * Finding createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.createTime = null; - - /** - * Creates a new Finding instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.Finding - * @static - * @param {google.cloud.securitycenter.v1.IFinding=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Finding} Finding instance - */ - Finding.create = function create(properties) { - return new Finding(properties); - }; - - /** - * Encodes the specified Finding message. Does not implicitly {@link google.cloud.securitycenter.v1.Finding.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.Finding - * @static - * @param {google.cloud.securitycenter.v1.IFinding} message Finding message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Finding.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.parent); - if (message.resourceName != null && message.hasOwnProperty("resourceName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.resourceName); - if (message.state != null && message.hasOwnProperty("state")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); - if (message.category != null && message.hasOwnProperty("category")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.category); - if (message.externalUri != null && message.hasOwnProperty("externalUri")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.externalUri); - if (message.sourceProperties != null && message.hasOwnProperty("sourceProperties")) - for (var keys = Object.keys(message.sourceProperties), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.protobuf.Value.encode(message.sourceProperties[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) - $root.google.cloud.securitycenter.v1.SecurityMarks.encode(message.securityMarks, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.eventTime != null && message.hasOwnProperty("eventTime")) - $root.google.protobuf.Timestamp.encode(message.eventTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.createTime != null && message.hasOwnProperty("createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Finding message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Finding.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Finding - * @static - * @param {google.cloud.securitycenter.v1.IFinding} message Finding message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Finding.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Finding message from the specified reader or buffer. + * Decodes a ListFindingsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.Finding + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.Finding} Finding + * @returns {google.cloud.securitycenter.v1.ListFindingsResponse} ListFindingsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Finding.decode = function decode(reader, length) { + ListFindingsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.Finding(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListFindingsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + if (!(message.listFindingsResults && message.listFindingsResults.length)) + message.listFindingsResults = []; + message.listFindingsResults.push($root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.decode(reader, reader.uint32())); break; case 2: - message.parent = reader.string(); + message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; case 3: - message.resourceName = reader.string(); + message.nextPageToken = reader.string(); break; case 4: - message.state = reader.int32(); - break; - case 5: - message.category = reader.string(); - break; - case 6: - message.externalUri = reader.string(); - break; - case 7: - reader.skip().pos++; - if (message.sourceProperties === $util.emptyObject) - message.sourceProperties = {}; - key = reader.string(); - reader.pos++; - message.sourceProperties[key] = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - case 8: - message.securityMarks = $root.google.cloud.securitycenter.v1.SecurityMarks.decode(reader, reader.uint32()); - break; - case 9: - message.eventTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 10: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.totalSize = reader.int32(); break; default: reader.skipType(tag & 7); @@ -7926,577 +7459,256 @@ }; /** - * Decodes a Finding message from the specified reader or buffer, length delimited. + * Decodes a ListFindingsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Finding + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Finding} Finding + * @returns {google.cloud.securitycenter.v1.ListFindingsResponse} ListFindingsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Finding.decodeDelimited = function decodeDelimited(reader) { + ListFindingsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Finding message. + * Verifies a ListFindingsResponse message. * @function verify - * @memberof google.cloud.securitycenter.v1.Finding + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Finding.verify = function verify(message) { + ListFindingsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.resourceName != null && message.hasOwnProperty("resourceName")) - if (!$util.isString(message.resourceName)) - return "resourceName: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.category != null && message.hasOwnProperty("category")) - if (!$util.isString(message.category)) - return "category: string expected"; - if (message.externalUri != null && message.hasOwnProperty("externalUri")) - if (!$util.isString(message.externalUri)) - return "externalUri: string expected"; - if (message.sourceProperties != null && message.hasOwnProperty("sourceProperties")) { - if (!$util.isObject(message.sourceProperties)) - return "sourceProperties: object expected"; - var key = Object.keys(message.sourceProperties); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.sourceProperties[key[i]]); + if (message.listFindingsResults != null && message.hasOwnProperty("listFindingsResults")) { + if (!Array.isArray(message.listFindingsResults)) + return "listFindingsResults: array expected"; + for (var i = 0; i < message.listFindingsResults.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.verify(message.listFindingsResults[i]); if (error) - return "sourceProperties." + error; + return "listFindingsResults." + error; } } - if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) { - var error = $root.google.cloud.securitycenter.v1.SecurityMarks.verify(message.securityMarks); - if (error) - return "securityMarks." + error; - } - if (message.eventTime != null && message.hasOwnProperty("eventTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.eventTime); - if (error) - return "eventTime." + error; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (message.readTime != null && message.hasOwnProperty("readTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.readTime); if (error) - return "createTime." + error; + return "readTime." + error; } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; return null; }; /** - * Creates a Finding message from a plain object. Also converts values to their respective internal types. + * Creates a ListFindingsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.Finding + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Finding} Finding + * @returns {google.cloud.securitycenter.v1.ListFindingsResponse} ListFindingsResponse */ - Finding.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Finding) + ListFindingsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListFindingsResponse) return object; - var message = new $root.google.cloud.securitycenter.v1.Finding(); - if (object.name != null) - message.name = String(object.name); - if (object.parent != null) - message.parent = String(object.parent); - if (object.resourceName != null) - message.resourceName = String(object.resourceName); - switch (object.state) { - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "ACTIVE": - case 1: - message.state = 1; - break; - case "INACTIVE": - case 2: - message.state = 2; - break; - } - if (object.category != null) - message.category = String(object.category); - if (object.externalUri != null) - message.externalUri = String(object.externalUri); - if (object.sourceProperties) { - if (typeof object.sourceProperties !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.sourceProperties: object expected"); - message.sourceProperties = {}; - for (var keys = Object.keys(object.sourceProperties), i = 0; i < keys.length; ++i) { - if (typeof object.sourceProperties[keys[i]] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.sourceProperties: object expected"); - message.sourceProperties[keys[i]] = $root.google.protobuf.Value.fromObject(object.sourceProperties[keys[i]]); + var message = new $root.google.cloud.securitycenter.v1.ListFindingsResponse(); + if (object.listFindingsResults) { + if (!Array.isArray(object.listFindingsResults)) + throw TypeError(".google.cloud.securitycenter.v1.ListFindingsResponse.listFindingsResults: array expected"); + message.listFindingsResults = []; + for (var i = 0; i < object.listFindingsResults.length; ++i) { + if (typeof object.listFindingsResults[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListFindingsResponse.listFindingsResults: object expected"); + message.listFindingsResults[i] = $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.fromObject(object.listFindingsResults[i]); } } - if (object.securityMarks != null) { - if (typeof object.securityMarks !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.securityMarks: object expected"); - message.securityMarks = $root.google.cloud.securitycenter.v1.SecurityMarks.fromObject(object.securityMarks); - } - if (object.eventTime != null) { - if (typeof object.eventTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.eventTime: object expected"); - message.eventTime = $root.google.protobuf.Timestamp.fromObject(object.eventTime); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + if (object.readTime != null) { + if (typeof object.readTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListFindingsResponse.readTime: object expected"); + message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; return message; }; /** - * Creates a plain object from a Finding message. Also converts values to other types if specified. + * Creates a plain object from a ListFindingsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.Finding + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse * @static - * @param {google.cloud.securitycenter.v1.Finding} message Finding + * @param {google.cloud.securitycenter.v1.ListFindingsResponse} message ListFindingsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Finding.toObject = function toObject(message, options) { + ListFindingsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.sourceProperties = {}; + if (options.arrays || options.defaults) + object.listFindingsResults = []; if (options.defaults) { - object.name = ""; - object.parent = ""; - object.resourceName = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.category = ""; - object.externalUri = ""; - object.securityMarks = null; - object.eventTime = null; - object.createTime = null; + object.readTime = null; + object.nextPageToken = ""; + object.totalSize = 0; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.resourceName != null && message.hasOwnProperty("resourceName")) - object.resourceName = message.resourceName; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.securitycenter.v1.Finding.State[message.state] : message.state; - if (message.category != null && message.hasOwnProperty("category")) - object.category = message.category; - if (message.externalUri != null && message.hasOwnProperty("externalUri")) - object.externalUri = message.externalUri; - var keys2; - if (message.sourceProperties && (keys2 = Object.keys(message.sourceProperties)).length) { - object.sourceProperties = {}; - for (var j = 0; j < keys2.length; ++j) - object.sourceProperties[keys2[j]] = $root.google.protobuf.Value.toObject(message.sourceProperties[keys2[j]], options); + if (message.listFindingsResults && message.listFindingsResults.length) { + object.listFindingsResults = []; + for (var j = 0; j < message.listFindingsResults.length; ++j) + object.listFindingsResults[j] = $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.toObject(message.listFindingsResults[j], options); } - if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) - object.securityMarks = $root.google.cloud.securitycenter.v1.SecurityMarks.toObject(message.securityMarks, options); - if (message.eventTime != null && message.hasOwnProperty("eventTime")) - object.eventTime = $root.google.protobuf.Timestamp.toObject(message.eventTime, options); - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.readTime != null && message.hasOwnProperty("readTime")) + object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; return object; }; /** - * Converts this Finding to JSON. + * Converts this ListFindingsResponse to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.Finding + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse * @instance * @returns {Object.} JSON object */ - Finding.prototype.toJSON = function toJSON() { + ListFindingsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * State enum. - * @name google.cloud.securitycenter.v1.Finding.State - * @enum {string} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} INACTIVE=2 INACTIVE value - */ - Finding.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "INACTIVE"] = 2; - return values; - })(); - - return Finding; - })(); + ListFindingsResponse.ListFindingsResult = (function() { - v1.OrganizationSettings = (function() { + /** + * Properties of a ListFindingsResult. + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse + * @interface IListFindingsResult + * @property {google.cloud.securitycenter.v1.IFinding|null} [finding] ListFindingsResult finding + * @property {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange|null} [stateChange] ListFindingsResult stateChange + * @property {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.IResource|null} [resource] ListFindingsResult resource + */ - /** - * Properties of an OrganizationSettings. - * @memberof google.cloud.securitycenter.v1 - * @interface IOrganizationSettings - * @property {string|null} [name] OrganizationSettings name - * @property {boolean|null} [enableAssetDiscovery] OrganizationSettings enableAssetDiscovery - * @property {google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig|null} [assetDiscoveryConfig] OrganizationSettings assetDiscoveryConfig - */ + /** + * Constructs a new ListFindingsResult. + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse + * @classdesc Represents a ListFindingsResult. + * @implements IListFindingsResult + * @constructor + * @param {google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult=} [properties] Properties to set + */ + function ListFindingsResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new OrganizationSettings. - * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents an OrganizationSettings. - * @implements IOrganizationSettings - * @constructor - * @param {google.cloud.securitycenter.v1.IOrganizationSettings=} [properties] Properties to set - */ - function OrganizationSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * ListFindingsResult finding. + * @member {google.cloud.securitycenter.v1.IFinding|null|undefined} finding + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult + * @instance + */ + ListFindingsResult.prototype.finding = null; - /** - * OrganizationSettings name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.OrganizationSettings - * @instance - */ - OrganizationSettings.prototype.name = ""; + /** + * ListFindingsResult stateChange. + * @member {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange} stateChange + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult + * @instance + */ + ListFindingsResult.prototype.stateChange = 0; - /** - * OrganizationSettings enableAssetDiscovery. - * @member {boolean} enableAssetDiscovery - * @memberof google.cloud.securitycenter.v1.OrganizationSettings - * @instance - */ - OrganizationSettings.prototype.enableAssetDiscovery = false; + /** + * ListFindingsResult resource. + * @member {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.IResource|null|undefined} resource + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult + * @instance + */ + ListFindingsResult.prototype.resource = null; - /** - * OrganizationSettings assetDiscoveryConfig. - * @member {google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig|null|undefined} assetDiscoveryConfig - * @memberof google.cloud.securitycenter.v1.OrganizationSettings - * @instance - */ - OrganizationSettings.prototype.assetDiscoveryConfig = null; + /** + * Creates a new ListFindingsResult instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult + * @static + * @param {google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult} ListFindingsResult instance + */ + ListFindingsResult.create = function create(properties) { + return new ListFindingsResult(properties); + }; - /** - * Creates a new OrganizationSettings instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.OrganizationSettings - * @static - * @param {google.cloud.securitycenter.v1.IOrganizationSettings=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.OrganizationSettings} OrganizationSettings instance - */ - OrganizationSettings.create = function create(properties) { - return new OrganizationSettings(properties); - }; + /** + * Encodes the specified ListFindingsResult message. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult + * @static + * @param {google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult} message ListFindingsResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFindingsResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.finding != null && message.hasOwnProperty("finding")) + $root.google.cloud.securitycenter.v1.Finding.encode(message.finding, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.stateChange != null && message.hasOwnProperty("stateChange")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.stateChange); + if (message.resource != null && message.hasOwnProperty("resource")) + $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource.encode(message.resource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified OrganizationSettings message. Does not implicitly {@link google.cloud.securitycenter.v1.OrganizationSettings.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.OrganizationSettings - * @static - * @param {google.cloud.securitycenter.v1.IOrganizationSettings} message OrganizationSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OrganizationSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.enableAssetDiscovery != null && message.hasOwnProperty("enableAssetDiscovery")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enableAssetDiscovery); - if (message.assetDiscoveryConfig != null && message.hasOwnProperty("assetDiscoveryConfig")) - $root.google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.encode(message.assetDiscoveryConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OrganizationSettings message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.OrganizationSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.OrganizationSettings - * @static - * @param {google.cloud.securitycenter.v1.IOrganizationSettings} message OrganizationSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OrganizationSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OrganizationSettings message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.OrganizationSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.OrganizationSettings} OrganizationSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OrganizationSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.OrganizationSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.enableAssetDiscovery = reader.bool(); - break; - case 3: - message.assetDiscoveryConfig = $root.google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OrganizationSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.OrganizationSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.OrganizationSettings} OrganizationSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OrganizationSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OrganizationSettings message. - * @function verify - * @memberof google.cloud.securitycenter.v1.OrganizationSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OrganizationSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.enableAssetDiscovery != null && message.hasOwnProperty("enableAssetDiscovery")) - if (typeof message.enableAssetDiscovery !== "boolean") - return "enableAssetDiscovery: boolean expected"; - if (message.assetDiscoveryConfig != null && message.hasOwnProperty("assetDiscoveryConfig")) { - var error = $root.google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.verify(message.assetDiscoveryConfig); - if (error) - return "assetDiscoveryConfig." + error; - } - return null; - }; - - /** - * Creates an OrganizationSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.OrganizationSettings - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.OrganizationSettings} OrganizationSettings - */ - OrganizationSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.OrganizationSettings) - return object; - var message = new $root.google.cloud.securitycenter.v1.OrganizationSettings(); - if (object.name != null) - message.name = String(object.name); - if (object.enableAssetDiscovery != null) - message.enableAssetDiscovery = Boolean(object.enableAssetDiscovery); - if (object.assetDiscoveryConfig != null) { - if (typeof object.assetDiscoveryConfig !== "object") - throw TypeError(".google.cloud.securitycenter.v1.OrganizationSettings.assetDiscoveryConfig: object expected"); - message.assetDiscoveryConfig = $root.google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.fromObject(object.assetDiscoveryConfig); - } - return message; - }; - - /** - * Creates a plain object from an OrganizationSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.OrganizationSettings - * @static - * @param {google.cloud.securitycenter.v1.OrganizationSettings} message OrganizationSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OrganizationSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.enableAssetDiscovery = false; - object.assetDiscoveryConfig = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.enableAssetDiscovery != null && message.hasOwnProperty("enableAssetDiscovery")) - object.enableAssetDiscovery = message.enableAssetDiscovery; - if (message.assetDiscoveryConfig != null && message.hasOwnProperty("assetDiscoveryConfig")) - object.assetDiscoveryConfig = $root.google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.toObject(message.assetDiscoveryConfig, options); - return object; - }; - - /** - * Converts this OrganizationSettings to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.OrganizationSettings - * @instance - * @returns {Object.} JSON object - */ - OrganizationSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - OrganizationSettings.AssetDiscoveryConfig = (function() { - - /** - * Properties of an AssetDiscoveryConfig. - * @memberof google.cloud.securitycenter.v1.OrganizationSettings - * @interface IAssetDiscoveryConfig - * @property {Array.|null} [projectIds] AssetDiscoveryConfig projectIds - * @property {google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode|null} [inclusionMode] AssetDiscoveryConfig inclusionMode - */ - - /** - * Constructs a new AssetDiscoveryConfig. - * @memberof google.cloud.securitycenter.v1.OrganizationSettings - * @classdesc Represents an AssetDiscoveryConfig. - * @implements IAssetDiscoveryConfig - * @constructor - * @param {google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig=} [properties] Properties to set - */ - function AssetDiscoveryConfig(properties) { - this.projectIds = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AssetDiscoveryConfig projectIds. - * @member {Array.} projectIds - * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig - * @instance - */ - AssetDiscoveryConfig.prototype.projectIds = $util.emptyArray; - - /** - * AssetDiscoveryConfig inclusionMode. - * @member {google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode} inclusionMode - * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig - * @instance - */ - AssetDiscoveryConfig.prototype.inclusionMode = 0; - - /** - * Creates a new AssetDiscoveryConfig instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig - * @static - * @param {google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig} AssetDiscoveryConfig instance - */ - AssetDiscoveryConfig.create = function create(properties) { - return new AssetDiscoveryConfig(properties); - }; - - /** - * Encodes the specified AssetDiscoveryConfig message. Does not implicitly {@link google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig - * @static - * @param {google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig} message AssetDiscoveryConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AssetDiscoveryConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectIds != null && message.projectIds.length) - for (var i = 0; i < message.projectIds.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectIds[i]); - if (message.inclusionMode != null && message.hasOwnProperty("inclusionMode")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.inclusionMode); - return writer; - }; - - /** - * Encodes the specified AssetDiscoveryConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig - * @static - * @param {google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig} message AssetDiscoveryConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AssetDiscoveryConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ListFindingsResult message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult + * @static + * @param {google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult} message ListFindingsResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFindingsResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Decodes an AssetDiscoveryConfig message from the specified reader or buffer. + * Decodes a ListFindingsResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig} AssetDiscoveryConfig + * @returns {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult} ListFindingsResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AssetDiscoveryConfig.decode = function decode(reader, length) { + ListFindingsResult.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.projectIds && message.projectIds.length)) - message.projectIds = []; - message.projectIds.push(reader.string()); + message.finding = $root.google.cloud.securitycenter.v1.Finding.decode(reader, reader.uint32()); break; case 2: - message.inclusionMode = reader.int32(); + message.stateChange = reader.int32(); + break; + case 3: + message.resource = $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -8507,166 +7719,463 @@ }; /** - * Decodes an AssetDiscoveryConfig message from the specified reader or buffer, length delimited. + * Decodes a ListFindingsResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig} AssetDiscoveryConfig + * @returns {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult} ListFindingsResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AssetDiscoveryConfig.decodeDelimited = function decodeDelimited(reader) { + ListFindingsResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AssetDiscoveryConfig message. + * Verifies a ListFindingsResult message. * @function verify - * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AssetDiscoveryConfig.verify = function verify(message) { + ListFindingsResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.projectIds != null && message.hasOwnProperty("projectIds")) { - if (!Array.isArray(message.projectIds)) - return "projectIds: array expected"; - for (var i = 0; i < message.projectIds.length; ++i) - if (!$util.isString(message.projectIds[i])) - return "projectIds: string[] expected"; + if (message.finding != null && message.hasOwnProperty("finding")) { + var error = $root.google.cloud.securitycenter.v1.Finding.verify(message.finding); + if (error) + return "finding." + error; } - if (message.inclusionMode != null && message.hasOwnProperty("inclusionMode")) - switch (message.inclusionMode) { + if (message.stateChange != null && message.hasOwnProperty("stateChange")) + switch (message.stateChange) { default: - return "inclusionMode: enum value expected"; + return "stateChange: enum value expected"; case 0: case 1: case 2: + case 3: + case 4: break; } + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource.verify(message.resource); + if (error) + return "resource." + error; + } return null; }; /** - * Creates an AssetDiscoveryConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ListFindingsResult message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig} AssetDiscoveryConfig + * @returns {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult} ListFindingsResult */ - AssetDiscoveryConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig) + ListFindingsResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult) return object; - var message = new $root.google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig(); - if (object.projectIds) { - if (!Array.isArray(object.projectIds)) - throw TypeError(".google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.projectIds: array expected"); - message.projectIds = []; - for (var i = 0; i < object.projectIds.length; ++i) - message.projectIds[i] = String(object.projectIds[i]); + var message = new $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult(); + if (object.finding != null) { + if (typeof object.finding !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.finding: object expected"); + message.finding = $root.google.cloud.securitycenter.v1.Finding.fromObject(object.finding); } - switch (object.inclusionMode) { - case "INCLUSION_MODE_UNSPECIFIED": + switch (object.stateChange) { + case "UNUSED": case 0: - message.inclusionMode = 0; + message.stateChange = 0; break; - case "INCLUDE_ONLY": + case "CHANGED": case 1: - message.inclusionMode = 1; + message.stateChange = 1; break; - case "EXCLUDE": + case "UNCHANGED": case 2: - message.inclusionMode = 2; + message.stateChange = 2; + break; + case "ADDED": + case 3: + message.stateChange = 3; + break; + case "REMOVED": + case 4: + message.stateChange = 4; break; } + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.resource: object expected"); + message.resource = $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource.fromObject(object.resource); + } return message; }; /** - * Creates a plain object from an AssetDiscoveryConfig message. Also converts values to other types if specified. + * Creates a plain object from a ListFindingsResult message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult * @static - * @param {google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig} message AssetDiscoveryConfig + * @param {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult} message ListFindingsResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AssetDiscoveryConfig.toObject = function toObject(message, options) { + ListFindingsResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.projectIds = []; - if (options.defaults) - object.inclusionMode = options.enums === String ? "INCLUSION_MODE_UNSPECIFIED" : 0; - if (message.projectIds && message.projectIds.length) { - object.projectIds = []; - for (var j = 0; j < message.projectIds.length; ++j) - object.projectIds[j] = message.projectIds[j]; + if (options.defaults) { + object.finding = null; + object.stateChange = options.enums === String ? "UNUSED" : 0; + object.resource = null; } - if (message.inclusionMode != null && message.hasOwnProperty("inclusionMode")) - object.inclusionMode = options.enums === String ? $root.google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode[message.inclusionMode] : message.inclusionMode; + if (message.finding != null && message.hasOwnProperty("finding")) + object.finding = $root.google.cloud.securitycenter.v1.Finding.toObject(message.finding, options); + if (message.stateChange != null && message.hasOwnProperty("stateChange")) + object.stateChange = options.enums === String ? $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange[message.stateChange] : message.stateChange; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource.toObject(message.resource, options); return object; }; /** - * Converts this AssetDiscoveryConfig to JSON. + * Converts this ListFindingsResult to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult * @instance * @returns {Object.} JSON object */ - AssetDiscoveryConfig.prototype.toJSON = function toJSON() { + ListFindingsResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + ListFindingsResult.Resource = (function() { + + /** + * Properties of a Resource. + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult + * @interface IResource + * @property {string|null} [name] Resource name + * @property {string|null} [projectName] Resource projectName + * @property {string|null} [projectDisplayName] Resource projectDisplayName + * @property {string|null} [parentName] Resource parentName + * @property {string|null} [parentDisplayName] Resource parentDisplayName + */ + + /** + * Constructs a new Resource. + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult + * @classdesc Represents a Resource. + * @implements IResource + * @constructor + * @param {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.IResource=} [properties] Properties to set + */ + function Resource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Resource name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @instance + */ + Resource.prototype.name = ""; + + /** + * Resource projectName. + * @member {string} projectName + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @instance + */ + Resource.prototype.projectName = ""; + + /** + * Resource projectDisplayName. + * @member {string} projectDisplayName + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @instance + */ + Resource.prototype.projectDisplayName = ""; + + /** + * Resource parentName. + * @member {string} parentName + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @instance + */ + Resource.prototype.parentName = ""; + + /** + * Resource parentDisplayName. + * @member {string} parentDisplayName + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @instance + */ + Resource.prototype.parentDisplayName = ""; + + /** + * Creates a new Resource instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @static + * @param {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.IResource=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource} Resource instance + */ + Resource.create = function create(properties) { + return new Resource(properties); + }; + + /** + * Encodes the specified Resource message. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @static + * @param {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.IResource} message Resource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Resource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.projectName != null && message.hasOwnProperty("projectName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.projectName); + if (message.projectDisplayName != null && message.hasOwnProperty("projectDisplayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.projectDisplayName); + if (message.parentName != null && message.hasOwnProperty("parentName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.parentName); + if (message.parentDisplayName != null && message.hasOwnProperty("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.ListFindingsResponse.ListFindingsResult.Resource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @static + * @param {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.IResource} message Resource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Resource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Resource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource} Resource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Resource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.projectName = reader.string(); + break; + case 3: + message.projectDisplayName = reader.string(); + break; + case 4: + message.parentName = reader.string(); + break; + case 5: + message.parentDisplayName = reader.string(); + break; + 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.ListFindingsResponse.ListFindingsResult.Resource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource} Resource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Resource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Resource message. + * @function verify + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Resource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.projectName != null && message.hasOwnProperty("projectName")) + if (!$util.isString(message.projectName)) + return "projectName: string expected"; + if (message.projectDisplayName != null && message.hasOwnProperty("projectDisplayName")) + if (!$util.isString(message.projectDisplayName)) + return "projectDisplayName: string expected"; + if (message.parentName != null && message.hasOwnProperty("parentName")) + if (!$util.isString(message.parentName)) + return "parentName: string expected"; + if (message.parentDisplayName != null && message.hasOwnProperty("parentDisplayName")) + if (!$util.isString(message.parentDisplayName)) + return "parentDisplayName: string expected"; + 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.ListFindingsResponse.ListFindingsResult.Resource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource} Resource + */ + Resource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource) + return object; + var message = new $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource(); + if (object.name != null) + message.name = String(object.name); + if (object.projectName != null) + message.projectName = String(object.projectName); + if (object.projectDisplayName != null) + message.projectDisplayName = String(object.projectDisplayName); + if (object.parentName != null) + message.parentName = String(object.parentName); + if (object.parentDisplayName != null) + message.parentDisplayName = String(object.parentDisplayName); + 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.ListFindingsResponse.ListFindingsResult.Resource + * @static + * @param {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource} message Resource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Resource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.projectName = ""; + object.projectDisplayName = ""; + object.parentName = ""; + object.parentDisplayName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.projectName != null && message.hasOwnProperty("projectName")) + object.projectName = message.projectName; + if (message.projectDisplayName != null && message.hasOwnProperty("projectDisplayName")) + object.projectDisplayName = message.projectDisplayName; + if (message.parentName != null && message.hasOwnProperty("parentName")) + object.parentName = message.parentName; + if (message.parentDisplayName != null && message.hasOwnProperty("parentDisplayName")) + object.parentDisplayName = message.parentDisplayName; + return object; + }; + + /** + * Converts this Resource to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @instance + * @returns {Object.} JSON object + */ + Resource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Resource; + })(); + /** - * InclusionMode enum. - * @name google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode + * StateChange enum. + * @name google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange * @enum {string} - * @property {number} INCLUSION_MODE_UNSPECIFIED=0 INCLUSION_MODE_UNSPECIFIED value - * @property {number} INCLUDE_ONLY=1 INCLUDE_ONLY value - * @property {number} EXCLUDE=2 EXCLUDE value + * @property {number} UNUSED=0 UNUSED value + * @property {number} CHANGED=1 CHANGED value + * @property {number} UNCHANGED=2 UNCHANGED value + * @property {number} ADDED=3 ADDED value + * @property {number} REMOVED=4 REMOVED value */ - AssetDiscoveryConfig.InclusionMode = (function() { + ListFindingsResult.StateChange = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INCLUSION_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INCLUDE_ONLY"] = 1; - values[valuesById[2] = "EXCLUDE"] = 2; + values[valuesById[0] = "UNUSED"] = 0; + values[valuesById[1] = "CHANGED"] = 1; + values[valuesById[2] = "UNCHANGED"] = 2; + values[valuesById[3] = "ADDED"] = 3; + values[valuesById[4] = "REMOVED"] = 4; return values; })(); - return AssetDiscoveryConfig; + return ListFindingsResult; })(); - return OrganizationSettings; + return ListFindingsResponse; })(); - v1.RunAssetDiscoveryResponse = (function() { + v1.SetFindingStateRequest = (function() { /** - * Properties of a RunAssetDiscoveryResponse. + * Properties of a SetFindingStateRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IRunAssetDiscoveryResponse - * @property {google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State|null} [state] RunAssetDiscoveryResponse state - * @property {google.protobuf.IDuration|null} [duration] RunAssetDiscoveryResponse duration + * @interface ISetFindingStateRequest + * @property {string|null} [name] SetFindingStateRequest name + * @property {google.cloud.securitycenter.v1.Finding.State|null} [state] SetFindingStateRequest state + * @property {google.protobuf.ITimestamp|null} [startTime] SetFindingStateRequest startTime */ /** - * Constructs a new RunAssetDiscoveryResponse. + * Constructs a new SetFindingStateRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a RunAssetDiscoveryResponse. - * @implements IRunAssetDiscoveryResponse + * @classdesc Represents a SetFindingStateRequest. + * @implements ISetFindingStateRequest * @constructor - * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.ISetFindingStateRequest=} [properties] Properties to set */ - function RunAssetDiscoveryResponse(properties) { + function SetFindingStateRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8674,88 +8183,101 @@ } /** - * RunAssetDiscoveryResponse state. - * @member {google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State} state - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + * SetFindingStateRequest name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest * @instance */ - RunAssetDiscoveryResponse.prototype.state = 0; + SetFindingStateRequest.prototype.name = ""; /** - * RunAssetDiscoveryResponse duration. - * @member {google.protobuf.IDuration|null|undefined} duration - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + * SetFindingStateRequest state. + * @member {google.cloud.securitycenter.v1.Finding.State} state + * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest * @instance */ - RunAssetDiscoveryResponse.prototype.duration = null; + SetFindingStateRequest.prototype.state = 0; /** - * Creates a new RunAssetDiscoveryResponse instance using the specified properties. + * SetFindingStateRequest startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest + * @instance + */ + SetFindingStateRequest.prototype.startTime = null; + + /** + * Creates a new SetFindingStateRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest * @static - * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.RunAssetDiscoveryResponse} RunAssetDiscoveryResponse instance + * @param {google.cloud.securitycenter.v1.ISetFindingStateRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.SetFindingStateRequest} SetFindingStateRequest instance */ - RunAssetDiscoveryResponse.create = function create(properties) { - return new RunAssetDiscoveryResponse(properties); + SetFindingStateRequest.create = function create(properties) { + return new SetFindingStateRequest(properties); }; /** - * Encodes the specified RunAssetDiscoveryResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.verify|verify} messages. + * Encodes the specified SetFindingStateRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.SetFindingStateRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest * @static - * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse} message RunAssetDiscoveryResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1.ISetFindingStateRequest} message SetFindingStateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunAssetDiscoveryResponse.encode = function encode(message, writer) { + SetFindingStateRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.state != null && message.hasOwnProperty("state")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); - if (message.duration != null && message.hasOwnProperty("duration")) - $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); + if (message.startTime != null && message.hasOwnProperty("startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified RunAssetDiscoveryResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.verify|verify} messages. + * Encodes the specified SetFindingStateRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SetFindingStateRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest * @static - * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse} message RunAssetDiscoveryResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1.ISetFindingStateRequest} message SetFindingStateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunAssetDiscoveryResponse.encodeDelimited = function encodeDelimited(message, writer) { + SetFindingStateRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RunAssetDiscoveryResponse message from the specified reader or buffer. + * Decodes a SetFindingStateRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.RunAssetDiscoveryResponse} RunAssetDiscoveryResponse + * @returns {google.cloud.securitycenter.v1.SetFindingStateRequest} SetFindingStateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RunAssetDiscoveryResponse.decode = function decode(reader, length) { + SetFindingStateRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.RunAssetDiscoveryResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.SetFindingStateRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.state = reader.int32(); + message.name = reader.string(); break; case 2: - message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.state = reader.int32(); + break; + case 3: + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -8766,32 +8288,35 @@ }; /** - * Decodes a RunAssetDiscoveryResponse message from the specified reader or buffer, length delimited. + * Decodes a SetFindingStateRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.RunAssetDiscoveryResponse} RunAssetDiscoveryResponse + * @returns {google.cloud.securitycenter.v1.SetFindingStateRequest} SetFindingStateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RunAssetDiscoveryResponse.decodeDelimited = function decodeDelimited(reader) { + SetFindingStateRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RunAssetDiscoveryResponse message. + * Verifies a SetFindingStateRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RunAssetDiscoveryResponse.verify = function verify(message) { + SetFindingStateRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; if (message.state != null && message.hasOwnProperty("state")) switch (message.state) { default: @@ -8799,131 +8324,111 @@ case 0: case 1: case 2: - case 3: break; } - if (message.duration != null && message.hasOwnProperty("duration")) { - var error = $root.google.protobuf.Duration.verify(message.duration); + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); if (error) - return "duration." + error; + return "startTime." + error; } return null; }; /** - * Creates a RunAssetDiscoveryResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SetFindingStateRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.RunAssetDiscoveryResponse} RunAssetDiscoveryResponse + * @returns {google.cloud.securitycenter.v1.SetFindingStateRequest} SetFindingStateRequest */ - RunAssetDiscoveryResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.RunAssetDiscoveryResponse) + SetFindingStateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.SetFindingStateRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.RunAssetDiscoveryResponse(); + var message = new $root.google.cloud.securitycenter.v1.SetFindingStateRequest(); + if (object.name != null) + message.name = String(object.name); switch (object.state) { case "STATE_UNSPECIFIED": case 0: message.state = 0; break; - case "COMPLETED": + case "ACTIVE": case 1: message.state = 1; break; - case "SUPERSEDED": + case "INACTIVE": case 2: message.state = 2; break; - case "TERMINATED": - case 3: - message.state = 3; - break; } - if (object.duration != null) { - if (typeof object.duration !== "object") - throw TypeError(".google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.duration: object expected"); - message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.SetFindingStateRequest.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); } return message; }; /** - * Creates a plain object from a RunAssetDiscoveryResponse message. Also converts values to other types if specified. + * Creates a plain object from a SetFindingStateRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest * @static - * @param {google.cloud.securitycenter.v1.RunAssetDiscoveryResponse} message RunAssetDiscoveryResponse + * @param {google.cloud.securitycenter.v1.SetFindingStateRequest} message SetFindingStateRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RunAssetDiscoveryResponse.toObject = function toObject(message, options) { + SetFindingStateRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { + object.name = ""; object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.duration = null; + object.startTime = null; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State[message.state] : message.state; - if (message.duration != null && message.hasOwnProperty("duration")) - object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); + object.state = options.enums === String ? $root.google.cloud.securitycenter.v1.Finding.State[message.state] : message.state; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); return object; }; /** - * Converts this RunAssetDiscoveryResponse to JSON. + * Converts this SetFindingStateRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest * @instance * @returns {Object.} JSON object */ - RunAssetDiscoveryResponse.prototype.toJSON = function toJSON() { + SetFindingStateRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * State enum. - * @name google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State - * @enum {string} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} COMPLETED=1 COMPLETED value - * @property {number} SUPERSEDED=2 SUPERSEDED value - * @property {number} TERMINATED=3 TERMINATED value - */ - RunAssetDiscoveryResponse.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "COMPLETED"] = 1; - values[valuesById[2] = "SUPERSEDED"] = 2; - values[valuesById[3] = "TERMINATED"] = 3; - return values; - })(); - - return RunAssetDiscoveryResponse; + return SetFindingStateRequest; })(); - v1.Source = (function() { + v1.RunAssetDiscoveryRequest = (function() { /** - * Properties of a Source. + * Properties of a RunAssetDiscoveryRequest. * @memberof google.cloud.securitycenter.v1 - * @interface ISource - * @property {string|null} [name] Source name - * @property {string|null} [displayName] Source displayName - * @property {string|null} [description] Source description + * @interface IRunAssetDiscoveryRequest + * @property {string|null} [parent] RunAssetDiscoveryRequest parent */ /** - * Constructs a new Source. + * Constructs a new RunAssetDiscoveryRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a Source. - * @implements ISource + * @classdesc Represents a RunAssetDiscoveryRequest. + * @implements IRunAssetDiscoveryRequest * @constructor - * @param {google.cloud.securitycenter.v1.ISource=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest=} [properties] Properties to set */ - function Source(properties) { + function RunAssetDiscoveryRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8931,101 +8436,75 @@ } /** - * Source name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.Source - * @instance - */ - Source.prototype.name = ""; - - /** - * Source displayName. - * @member {string} displayName - * @memberof google.cloud.securitycenter.v1.Source - * @instance - */ - Source.prototype.displayName = ""; - - /** - * Source description. - * @member {string} description - * @memberof google.cloud.securitycenter.v1.Source + * RunAssetDiscoveryRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest * @instance */ - Source.prototype.description = ""; + RunAssetDiscoveryRequest.prototype.parent = ""; /** - * Creates a new Source instance using the specified properties. + * Creates a new RunAssetDiscoveryRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.Source + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest * @static - * @param {google.cloud.securitycenter.v1.ISource=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Source} Source instance + * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.RunAssetDiscoveryRequest} RunAssetDiscoveryRequest instance */ - Source.create = function create(properties) { - return new Source(properties); + RunAssetDiscoveryRequest.create = function create(properties) { + return new RunAssetDiscoveryRequest(properties); }; /** - * Encodes the specified Source message. Does not implicitly {@link google.cloud.securitycenter.v1.Source.verify|verify} messages. + * Encodes the specified RunAssetDiscoveryRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.RunAssetDiscoveryRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.Source + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest * @static - * @param {google.cloud.securitycenter.v1.ISource} message Source message or plain object to encode + * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest} message RunAssetDiscoveryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Source.encode = function encode(message, writer) { + RunAssetDiscoveryRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && message.hasOwnProperty("displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.description != null && message.hasOwnProperty("description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); return writer; }; /** - * Encodes the specified Source message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Source.verify|verify} messages. + * Encodes the specified RunAssetDiscoveryRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.RunAssetDiscoveryRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Source + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest * @static - * @param {google.cloud.securitycenter.v1.ISource} message Source message or plain object to encode + * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest} message RunAssetDiscoveryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Source.encodeDelimited = function encodeDelimited(message, writer) { + RunAssetDiscoveryRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Source message from the specified reader or buffer. + * Decodes a RunAssetDiscoveryRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.Source + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.Source} Source + * @returns {google.cloud.securitycenter.v1.RunAssetDiscoveryRequest} RunAssetDiscoveryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Source.decode = function decode(reader, length) { + RunAssetDiscoveryRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.Source(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); - break; - case 2: - message.displayName = reader.string(); - break; - case 3: - message.description = reader.string(); + message.parent = reader.string(); break; default: reader.skipType(tag & 7); @@ -9036,869 +8515,871 @@ }; /** - * Decodes a Source message from the specified reader or buffer, length delimited. + * Decodes a RunAssetDiscoveryRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Source + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Source} Source + * @returns {google.cloud.securitycenter.v1.RunAssetDiscoveryRequest} RunAssetDiscoveryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Source.decodeDelimited = function decodeDelimited(reader) { + RunAssetDiscoveryRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Source message. + * Verifies a RunAssetDiscoveryRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.Source + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Source.verify = function verify(message) { + RunAssetDiscoveryRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; return null; }; /** - * Creates a Source message from a plain object. Also converts values to their respective internal types. + * Creates a RunAssetDiscoveryRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.Source + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Source} Source + * @returns {google.cloud.securitycenter.v1.RunAssetDiscoveryRequest} RunAssetDiscoveryRequest */ - Source.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Source) + RunAssetDiscoveryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.Source(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); + var message = new $root.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest(); + if (object.parent != null) + message.parent = String(object.parent); return message; }; /** - * Creates a plain object from a Source message. Also converts values to other types if specified. + * Creates a plain object from a RunAssetDiscoveryRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.Source + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest * @static - * @param {google.cloud.securitycenter.v1.Source} message Source + * @param {google.cloud.securitycenter.v1.RunAssetDiscoveryRequest} message RunAssetDiscoveryRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Source.toObject = function toObject(message, options) { + RunAssetDiscoveryRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.description = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; return object; }; /** - * Converts this Source to JSON. + * Converts this RunAssetDiscoveryRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.Source + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest * @instance * @returns {Object.} JSON object */ - Source.prototype.toJSON = function toJSON() { + RunAssetDiscoveryRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Source; + return RunAssetDiscoveryRequest; })(); - return v1; - })(); - - securitycenter.v1beta1 = (function() { - - /** - * Namespace v1beta1. - * @memberof google.cloud.securitycenter - * @namespace - */ - var v1beta1 = {}; - - v1beta1.SecurityCenter = (function() { + v1.UpdateFindingRequest = (function() { /** - * Constructs a new SecurityCenter service. - * @memberof google.cloud.securitycenter.v1beta1 - * @classdesc Represents a SecurityCenter - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * Properties of an UpdateFindingRequest. + * @memberof google.cloud.securitycenter.v1 + * @interface IUpdateFindingRequest + * @property {google.cloud.securitycenter.v1.IFinding|null} [finding] UpdateFindingRequest finding + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateFindingRequest updateMask */ - function SecurityCenter(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (SecurityCenter.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = SecurityCenter; /** - * Creates new SecurityCenter service using the specified rpc implementation. - * @function create - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {SecurityCenter} RPC service. Useful where requests and/or responses are streamed. + * Constructs a new UpdateFindingRequest. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents an UpdateFindingRequest. + * @implements IUpdateFindingRequest + * @constructor + * @param {google.cloud.securitycenter.v1.IUpdateFindingRequest=} [properties] Properties to set */ - SecurityCenter.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + function UpdateFindingRequest(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]]; + } /** - * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#createSource}. - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @typedef CreateSourceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1beta1.Source} [response] Source + * UpdateFindingRequest finding. + * @member {google.cloud.securitycenter.v1.IFinding|null|undefined} finding + * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest + * @instance */ + UpdateFindingRequest.prototype.finding = null; /** - * Calls CreateSource. - * @function createSource - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * UpdateFindingRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest * @instance - * @param {google.cloud.securitycenter.v1beta1.ICreateSourceRequest} request CreateSourceRequest message or plain object - * @param {google.cloud.securitycenter.v1beta1.SecurityCenter.CreateSourceCallback} callback Node-style callback called with the error, if any, and Source - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(SecurityCenter.prototype.createSource = function createSource(request, callback) { - return this.rpcCall(createSource, $root.google.cloud.securitycenter.v1beta1.CreateSourceRequest, $root.google.cloud.securitycenter.v1beta1.Source, request, callback); - }, "name", { value: "CreateSource" }); + UpdateFindingRequest.prototype.updateMask = null; /** - * Calls CreateSource. - * @function createSource - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1beta1.ICreateSourceRequest} request CreateSourceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new UpdateFindingRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest + * @static + * @param {google.cloud.securitycenter.v1.IUpdateFindingRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.UpdateFindingRequest} UpdateFindingRequest instance */ + UpdateFindingRequest.create = function create(properties) { + return new UpdateFindingRequest(properties); + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#createFinding}. - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @typedef CreateFindingCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1beta1.Finding} [response] Finding + * Encodes the specified UpdateFindingRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateFindingRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest + * @static + * @param {google.cloud.securitycenter.v1.IUpdateFindingRequest} message UpdateFindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + UpdateFindingRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.finding != null && message.hasOwnProperty("finding")) + $root.google.cloud.securitycenter.v1.Finding.encode(message.finding, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; /** - * Calls CreateFinding. - * @function createFinding - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1beta1.ICreateFindingRequest} request CreateFindingRequest message or plain object - * @param {google.cloud.securitycenter.v1beta1.SecurityCenter.CreateFindingCallback} callback Node-style callback called with the error, if any, and Finding - * @returns {undefined} - * @variation 1 + * Encodes the specified UpdateFindingRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateFindingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest + * @static + * @param {google.cloud.securitycenter.v1.IUpdateFindingRequest} message UpdateFindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(SecurityCenter.prototype.createFinding = function createFinding(request, callback) { - return this.rpcCall(createFinding, $root.google.cloud.securitycenter.v1beta1.CreateFindingRequest, $root.google.cloud.securitycenter.v1beta1.Finding, request, callback); - }, "name", { value: "CreateFinding" }); + UpdateFindingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls CreateFinding. - * @function createFinding - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1beta1.ICreateFindingRequest} request CreateFindingRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes an UpdateFindingRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.UpdateFindingRequest} UpdateFindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + UpdateFindingRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.UpdateFindingRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.finding = $root.google.cloud.securitycenter.v1.Finding.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#getIamPolicy}. - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @typedef GetIamPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.Policy} [response] Policy + * Decodes an UpdateFindingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.UpdateFindingRequest} UpdateFindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + UpdateFindingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls GetIamPolicy. - * @function getIamPolicy - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @param {google.cloud.securitycenter.v1beta1.SecurityCenter.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 + * Verifies an UpdateFindingRequest message. + * @function verify + * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(SecurityCenter.prototype.getIamPolicy = function getIamPolicy(request, callback) { - return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); - }, "name", { value: "GetIamPolicy" }); + UpdateFindingRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.finding != null && message.hasOwnProperty("finding")) { + var error = $root.google.cloud.securitycenter.v1.Finding.verify(message.finding); + if (error) + return "finding." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; /** - * Calls GetIamPolicy. - * @function getIamPolicy - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates an UpdateFindingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.UpdateFindingRequest} UpdateFindingRequest */ + UpdateFindingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.UpdateFindingRequest) + return object; + var message = new $root.google.cloud.securitycenter.v1.UpdateFindingRequest(); + if (object.finding != null) { + if (typeof object.finding !== "object") + throw TypeError(".google.cloud.securitycenter.v1.UpdateFindingRequest.finding: object expected"); + message.finding = $root.google.cloud.securitycenter.v1.Finding.fromObject(object.finding); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.securitycenter.v1.UpdateFindingRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#getOrganizationSettings}. - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @typedef GetOrganizationSettingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1beta1.OrganizationSettings} [response] OrganizationSettings + * Creates a plain object from an UpdateFindingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest + * @static + * @param {google.cloud.securitycenter.v1.UpdateFindingRequest} message UpdateFindingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + UpdateFindingRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.finding = null; + object.updateMask = null; + } + if (message.finding != null && message.hasOwnProperty("finding")) + object.finding = $root.google.cloud.securitycenter.v1.Finding.toObject(message.finding, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; /** - * Calls GetOrganizationSettings. - * @function getOrganizationSettings - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * Converts this UpdateFindingRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest * @instance - * @param {google.cloud.securitycenter.v1beta1.IGetOrganizationSettingsRequest} request GetOrganizationSettingsRequest message or plain object - * @param {google.cloud.securitycenter.v1beta1.SecurityCenter.GetOrganizationSettingsCallback} callback Node-style callback called with the error, if any, and OrganizationSettings - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(SecurityCenter.prototype.getOrganizationSettings = function getOrganizationSettings(request, callback) { - return this.rpcCall(getOrganizationSettings, $root.google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest, $root.google.cloud.securitycenter.v1beta1.OrganizationSettings, request, callback); - }, "name", { value: "GetOrganizationSettings" }); + UpdateFindingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Calls GetOrganizationSettings. - * @function getOrganizationSettings - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1beta1.IGetOrganizationSettingsRequest} request GetOrganizationSettingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + return UpdateFindingRequest; + })(); + + v1.UpdateOrganizationSettingsRequest = (function() { /** - * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#getSource}. - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @typedef GetSourceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1beta1.Source} [response] Source + * Properties of an UpdateOrganizationSettingsRequest. + * @memberof google.cloud.securitycenter.v1 + * @interface IUpdateOrganizationSettingsRequest + * @property {google.cloud.securitycenter.v1.IOrganizationSettings|null} [organizationSettings] UpdateOrganizationSettingsRequest organizationSettings + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateOrganizationSettingsRequest updateMask */ /** - * Calls GetSource. - * @function getSource - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1beta1.IGetSourceRequest} request GetSourceRequest message or plain object - * @param {google.cloud.securitycenter.v1beta1.SecurityCenter.GetSourceCallback} callback Node-style callback called with the error, if any, and Source - * @returns {undefined} - * @variation 1 + * Constructs a new UpdateOrganizationSettingsRequest. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents an UpdateOrganizationSettingsRequest. + * @implements IUpdateOrganizationSettingsRequest + * @constructor + * @param {google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest=} [properties] Properties to set */ - Object.defineProperty(SecurityCenter.prototype.getSource = function getSource(request, callback) { - return this.rpcCall(getSource, $root.google.cloud.securitycenter.v1beta1.GetSourceRequest, $root.google.cloud.securitycenter.v1beta1.Source, request, callback); - }, "name", { value: "GetSource" }); + function UpdateOrganizationSettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls GetSource. - * @function getSource - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * UpdateOrganizationSettingsRequest organizationSettings. + * @member {google.cloud.securitycenter.v1.IOrganizationSettings|null|undefined} organizationSettings + * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest * @instance - * @param {google.cloud.securitycenter.v1beta1.IGetSourceRequest} request GetSourceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + UpdateOrganizationSettingsRequest.prototype.organizationSettings = null; /** - * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#groupAssets}. - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @typedef GroupAssetsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1beta1.GroupAssetsResponse} [response] GroupAssetsResponse + * UpdateOrganizationSettingsRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest + * @instance */ + UpdateOrganizationSettingsRequest.prototype.updateMask = null; /** - * Calls GroupAssets. - * @function groupAssets - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1beta1.IGroupAssetsRequest} request GroupAssetsRequest message or plain object - * @param {google.cloud.securitycenter.v1beta1.SecurityCenter.GroupAssetsCallback} callback Node-style callback called with the error, if any, and GroupAssetsResponse - * @returns {undefined} - * @variation 1 + * Creates a new UpdateOrganizationSettingsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest + * @static + * @param {google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest} UpdateOrganizationSettingsRequest instance */ - Object.defineProperty(SecurityCenter.prototype.groupAssets = function groupAssets(request, callback) { - return this.rpcCall(groupAssets, $root.google.cloud.securitycenter.v1beta1.GroupAssetsRequest, $root.google.cloud.securitycenter.v1beta1.GroupAssetsResponse, request, callback); - }, "name", { value: "GroupAssets" }); + UpdateOrganizationSettingsRequest.create = function create(properties) { + return new UpdateOrganizationSettingsRequest(properties); + }; /** - * Calls GroupAssets. - * @function groupAssets - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1beta1.IGroupAssetsRequest} request GroupAssetsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified UpdateOrganizationSettingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest + * @static + * @param {google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest} message UpdateOrganizationSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + UpdateOrganizationSettingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.organizationSettings != null && message.hasOwnProperty("organizationSettings")) + $root.google.cloud.securitycenter.v1.OrganizationSettings.encode(message.organizationSettings, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#groupFindings}. - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @typedef GroupFindingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1beta1.GroupFindingsResponse} [response] GroupFindingsResponse + * Encodes the specified UpdateOrganizationSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest + * @static + * @param {google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest} message UpdateOrganizationSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + UpdateOrganizationSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls GroupFindings. - * @function groupFindings - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1beta1.IGroupFindingsRequest} request GroupFindingsRequest message or plain object - * @param {google.cloud.securitycenter.v1beta1.SecurityCenter.GroupFindingsCallback} callback Node-style callback called with the error, if any, and GroupFindingsResponse - * @returns {undefined} - * @variation 1 + * Decodes an UpdateOrganizationSettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest} UpdateOrganizationSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(SecurityCenter.prototype.groupFindings = function groupFindings(request, callback) { - return this.rpcCall(groupFindings, $root.google.cloud.securitycenter.v1beta1.GroupFindingsRequest, $root.google.cloud.securitycenter.v1beta1.GroupFindingsResponse, request, callback); - }, "name", { value: "GroupFindings" }); + UpdateOrganizationSettingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.organizationSettings = $root.google.cloud.securitycenter.v1.OrganizationSettings.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls GroupFindings. - * @function groupFindings - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1beta1.IGroupFindingsRequest} request GroupFindingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes an UpdateOrganizationSettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest} UpdateOrganizationSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + UpdateOrganizationSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#listAssets}. - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @typedef ListAssetsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1beta1.ListAssetsResponse} [response] ListAssetsResponse + * Verifies an UpdateOrganizationSettingsRequest message. + * @function verify + * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + UpdateOrganizationSettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.organizationSettings != null && message.hasOwnProperty("organizationSettings")) { + var error = $root.google.cloud.securitycenter.v1.OrganizationSettings.verify(message.organizationSettings); + if (error) + return "organizationSettings." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; /** - * Calls ListAssets. - * @function listAssets - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1beta1.IListAssetsRequest} request ListAssetsRequest message or plain object - * @param {google.cloud.securitycenter.v1beta1.SecurityCenter.ListAssetsCallback} callback Node-style callback called with the error, if any, and ListAssetsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecurityCenter.prototype.listAssets = function listAssets(request, callback) { - return this.rpcCall(listAssets, $root.google.cloud.securitycenter.v1beta1.ListAssetsRequest, $root.google.cloud.securitycenter.v1beta1.ListAssetsResponse, request, callback); - }, "name", { value: "ListAssets" }); - - /** - * Calls ListAssets. - * @function listAssets - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1beta1.IListAssetsRequest} request ListAssetsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates an UpdateOrganizationSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest} UpdateOrganizationSettingsRequest */ + UpdateOrganizationSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest) + return object; + var message = new $root.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest(); + if (object.organizationSettings != null) { + if (typeof object.organizationSettings !== "object") + throw TypeError(".google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest.organizationSettings: object expected"); + message.organizationSettings = $root.google.cloud.securitycenter.v1.OrganizationSettings.fromObject(object.organizationSettings); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#listFindings}. - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @typedef ListFindingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1beta1.ListFindingsResponse} [response] ListFindingsResponse + * Creates a plain object from an UpdateOrganizationSettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest + * @static + * @param {google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest} message UpdateOrganizationSettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + UpdateOrganizationSettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.organizationSettings = null; + object.updateMask = null; + } + if (message.organizationSettings != null && message.hasOwnProperty("organizationSettings")) + object.organizationSettings = $root.google.cloud.securitycenter.v1.OrganizationSettings.toObject(message.organizationSettings, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; /** - * Calls ListFindings. - * @function listFindings - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * Converts this UpdateOrganizationSettingsRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest * @instance - * @param {google.cloud.securitycenter.v1beta1.IListFindingsRequest} request ListFindingsRequest message or plain object - * @param {google.cloud.securitycenter.v1beta1.SecurityCenter.ListFindingsCallback} callback Node-style callback called with the error, if any, and ListFindingsResponse - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(SecurityCenter.prototype.listFindings = function listFindings(request, callback) { - return this.rpcCall(listFindings, $root.google.cloud.securitycenter.v1beta1.ListFindingsRequest, $root.google.cloud.securitycenter.v1beta1.ListFindingsResponse, request, callback); - }, "name", { value: "ListFindings" }); + UpdateOrganizationSettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateOrganizationSettingsRequest; + })(); + + v1.UpdateSourceRequest = (function() { /** - * Calls ListFindings. - * @function listFindings - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1beta1.IListFindingsRequest} request ListFindingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Properties of an UpdateSourceRequest. + * @memberof google.cloud.securitycenter.v1 + * @interface IUpdateSourceRequest + * @property {google.cloud.securitycenter.v1.ISource|null} [source] UpdateSourceRequest source + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSourceRequest updateMask */ /** - * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#listSources}. - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @typedef ListSourcesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1beta1.ListSourcesResponse} [response] ListSourcesResponse + * Constructs a new UpdateSourceRequest. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents an UpdateSourceRequest. + * @implements IUpdateSourceRequest + * @constructor + * @param {google.cloud.securitycenter.v1.IUpdateSourceRequest=} [properties] Properties to set */ + function UpdateSourceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls ListSources. - * @function listSources - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * UpdateSourceRequest source. + * @member {google.cloud.securitycenter.v1.ISource|null|undefined} source + * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest * @instance - * @param {google.cloud.securitycenter.v1beta1.IListSourcesRequest} request ListSourcesRequest message or plain object - * @param {google.cloud.securitycenter.v1beta1.SecurityCenter.ListSourcesCallback} callback Node-style callback called with the error, if any, and ListSourcesResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(SecurityCenter.prototype.listSources = function listSources(request, callback) { - return this.rpcCall(listSources, $root.google.cloud.securitycenter.v1beta1.ListSourcesRequest, $root.google.cloud.securitycenter.v1beta1.ListSourcesResponse, request, callback); - }, "name", { value: "ListSources" }); + UpdateSourceRequest.prototype.source = null; /** - * Calls ListSources. - * @function listSources - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * UpdateSourceRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest * @instance - * @param {google.cloud.securitycenter.v1beta1.IListSourcesRequest} request ListSourcesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + UpdateSourceRequest.prototype.updateMask = null; /** - * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#runAssetDiscovery}. - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @typedef RunAssetDiscoveryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Creates a new UpdateSourceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @static + * @param {google.cloud.securitycenter.v1.IUpdateSourceRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.UpdateSourceRequest} UpdateSourceRequest instance */ + UpdateSourceRequest.create = function create(properties) { + return new UpdateSourceRequest(properties); + }; /** - * Calls RunAssetDiscovery. - * @function runAssetDiscovery - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1beta1.IRunAssetDiscoveryRequest} request RunAssetDiscoveryRequest message or plain object - * @param {google.cloud.securitycenter.v1beta1.SecurityCenter.RunAssetDiscoveryCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Encodes the specified UpdateSourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSourceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @static + * @param {google.cloud.securitycenter.v1.IUpdateSourceRequest} message UpdateSourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(SecurityCenter.prototype.runAssetDiscovery = function runAssetDiscovery(request, callback) { - return this.rpcCall(runAssetDiscovery, $root.google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "RunAssetDiscovery" }); + UpdateSourceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.source != null && message.hasOwnProperty("source")) + $root.google.cloud.securitycenter.v1.Source.encode(message.source, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; /** - * Calls RunAssetDiscovery. - * @function runAssetDiscovery - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1beta1.IRunAssetDiscoveryRequest} request RunAssetDiscoveryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified UpdateSourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSourceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @static + * @param {google.cloud.securitycenter.v1.IUpdateSourceRequest} message UpdateSourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + UpdateSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#setFindingState}. - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @typedef SetFindingStateCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1beta1.Finding} [response] Finding + * Decodes an UpdateSourceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.UpdateSourceRequest} UpdateSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + UpdateSourceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.UpdateSourceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.source = $root.google.cloud.securitycenter.v1.Source.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls SetFindingState. - * @function setFindingState - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1beta1.ISetFindingStateRequest} request SetFindingStateRequest message or plain object - * @param {google.cloud.securitycenter.v1beta1.SecurityCenter.SetFindingStateCallback} callback Node-style callback called with the error, if any, and Finding - * @returns {undefined} - * @variation 1 + * Decodes an UpdateSourceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.UpdateSourceRequest} UpdateSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(SecurityCenter.prototype.setFindingState = function setFindingState(request, callback) { - return this.rpcCall(setFindingState, $root.google.cloud.securitycenter.v1beta1.SetFindingStateRequest, $root.google.cloud.securitycenter.v1beta1.Finding, request, callback); - }, "name", { value: "SetFindingState" }); + UpdateSourceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls SetFindingState. - * @function setFindingState - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1beta1.ISetFindingStateRequest} request SetFindingStateRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies an UpdateSourceRequest message. + * @function verify + * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + UpdateSourceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.source != null && message.hasOwnProperty("source")) { + var error = $root.google.cloud.securitycenter.v1.Source.verify(message.source); + if (error) + return "source." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#setIamPolicy}. - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @typedef SetIamPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.Policy} [response] Policy + * Creates an UpdateSourceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.UpdateSourceRequest} UpdateSourceRequest */ + UpdateSourceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.UpdateSourceRequest) + return object; + var message = new $root.google.cloud.securitycenter.v1.UpdateSourceRequest(); + if (object.source != null) { + if (typeof object.source !== "object") + throw TypeError(".google.cloud.securitycenter.v1.UpdateSourceRequest.source: object expected"); + message.source = $root.google.cloud.securitycenter.v1.Source.fromObject(object.source); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.securitycenter.v1.UpdateSourceRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; /** - * Calls SetIamPolicy. - * @function setIamPolicy - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @param {google.cloud.securitycenter.v1beta1.SecurityCenter.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 + * Creates a plain object from an UpdateSourceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @static + * @param {google.cloud.securitycenter.v1.UpdateSourceRequest} message UpdateSourceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(SecurityCenter.prototype.setIamPolicy = function setIamPolicy(request, callback) { - return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); - }, "name", { value: "SetIamPolicy" }); + UpdateSourceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.source = null; + object.updateMask = null; + } + if (message.source != null && message.hasOwnProperty("source")) + object.source = $root.google.cloud.securitycenter.v1.Source.toObject(message.source, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; /** - * Calls SetIamPolicy. - * @function setIamPolicy - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * Converts this UpdateSourceRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + UpdateSourceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#testIamPermissions}. - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @typedef TestIamPermissionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse - */ + return UpdateSourceRequest; + })(); + + v1.UpdateSecurityMarksRequest = (function() { /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @param {google.cloud.securitycenter.v1beta1.SecurityCenter.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse - * @returns {undefined} - * @variation 1 + * Properties of an UpdateSecurityMarksRequest. + * @memberof google.cloud.securitycenter.v1 + * @interface IUpdateSecurityMarksRequest + * @property {google.cloud.securitycenter.v1.ISecurityMarks|null} [securityMarks] UpdateSecurityMarksRequest securityMarks + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSecurityMarksRequest updateMask + * @property {google.protobuf.ITimestamp|null} [startTime] UpdateSecurityMarksRequest startTime */ - Object.defineProperty(SecurityCenter.prototype.testIamPermissions = function testIamPermissions(request, callback) { - return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); - }, "name", { value: "TestIamPermissions" }); /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Constructs a new UpdateSecurityMarksRequest. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents an UpdateSecurityMarksRequest. + * @implements IUpdateSecurityMarksRequest + * @constructor + * @param {google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest=} [properties] Properties to set */ + function UpdateSecurityMarksRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#updateFinding}. - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @typedef UpdateFindingCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1beta1.Finding} [response] Finding + * UpdateSecurityMarksRequest securityMarks. + * @member {google.cloud.securitycenter.v1.ISecurityMarks|null|undefined} securityMarks + * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * @instance */ + UpdateSecurityMarksRequest.prototype.securityMarks = null; /** - * Calls UpdateFinding. - * @function updateFinding - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * UpdateSecurityMarksRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest * @instance - * @param {google.cloud.securitycenter.v1beta1.IUpdateFindingRequest} request UpdateFindingRequest message or plain object - * @param {google.cloud.securitycenter.v1beta1.SecurityCenter.UpdateFindingCallback} callback Node-style callback called with the error, if any, and Finding - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(SecurityCenter.prototype.updateFinding = function updateFinding(request, callback) { - return this.rpcCall(updateFinding, $root.google.cloud.securitycenter.v1beta1.UpdateFindingRequest, $root.google.cloud.securitycenter.v1beta1.Finding, request, callback); - }, "name", { value: "UpdateFinding" }); + UpdateSecurityMarksRequest.prototype.updateMask = null; /** - * Calls UpdateFinding. - * @function updateFinding - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * UpdateSecurityMarksRequest startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest * @instance - * @param {google.cloud.securitycenter.v1beta1.IUpdateFindingRequest} request UpdateFindingRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + UpdateSecurityMarksRequest.prototype.startTime = null; /** - * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#updateOrganizationSettings}. - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @typedef UpdateOrganizationSettingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1beta1.OrganizationSettings} [response] OrganizationSettings + * Creates a new UpdateSecurityMarksRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * @static + * @param {google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.UpdateSecurityMarksRequest} UpdateSecurityMarksRequest instance */ + UpdateSecurityMarksRequest.create = function create(properties) { + return new UpdateSecurityMarksRequest(properties); + }; /** - * Calls UpdateOrganizationSettings. - * @function updateOrganizationSettings - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1beta1.IUpdateOrganizationSettingsRequest} request UpdateOrganizationSettingsRequest message or plain object - * @param {google.cloud.securitycenter.v1beta1.SecurityCenter.UpdateOrganizationSettingsCallback} callback Node-style callback called with the error, if any, and OrganizationSettings - * @returns {undefined} - * @variation 1 + * Encodes the specified UpdateSecurityMarksRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSecurityMarksRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * @static + * @param {google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest} message UpdateSecurityMarksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(SecurityCenter.prototype.updateOrganizationSettings = function updateOrganizationSettings(request, callback) { - return this.rpcCall(updateOrganizationSettings, $root.google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest, $root.google.cloud.securitycenter.v1beta1.OrganizationSettings, request, callback); - }, "name", { value: "UpdateOrganizationSettings" }); + UpdateSecurityMarksRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) + $root.google.cloud.securitycenter.v1.SecurityMarks.encode(message.securityMarks, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.startTime != null && message.hasOwnProperty("startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; /** - * Calls UpdateOrganizationSettings. - * @function updateOrganizationSettings - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1beta1.IUpdateOrganizationSettingsRequest} request UpdateOrganizationSettingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified UpdateSecurityMarksRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSecurityMarksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * @static + * @param {google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest} message UpdateSecurityMarksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + UpdateSecurityMarksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#updateSource}. - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @typedef UpdateSourceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1beta1.Source} [response] Source - */ - - /** - * Calls UpdateSource. - * @function updateSource - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1beta1.IUpdateSourceRequest} request UpdateSourceRequest message or plain object - * @param {google.cloud.securitycenter.v1beta1.SecurityCenter.UpdateSourceCallback} callback Node-style callback called with the error, if any, and Source - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecurityCenter.prototype.updateSource = function updateSource(request, callback) { - return this.rpcCall(updateSource, $root.google.cloud.securitycenter.v1beta1.UpdateSourceRequest, $root.google.cloud.securitycenter.v1beta1.Source, request, callback); - }, "name", { value: "UpdateSource" }); - - /** - * Calls UpdateSource. - * @function updateSource - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1beta1.IUpdateSourceRequest} request UpdateSourceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#updateSecurityMarks}. - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @typedef UpdateSecurityMarksCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1beta1.SecurityMarks} [response] SecurityMarks - */ - - /** - * Calls UpdateSecurityMarks. - * @function updateSecurityMarks - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1beta1.IUpdateSecurityMarksRequest} request UpdateSecurityMarksRequest message or plain object - * @param {google.cloud.securitycenter.v1beta1.SecurityCenter.UpdateSecurityMarksCallback} callback Node-style callback called with the error, if any, and SecurityMarks - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecurityCenter.prototype.updateSecurityMarks = function updateSecurityMarks(request, callback) { - return this.rpcCall(updateSecurityMarks, $root.google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest, $root.google.cloud.securitycenter.v1beta1.SecurityMarks, request, callback); - }, "name", { value: "UpdateSecurityMarks" }); - - /** - * Calls UpdateSecurityMarks. - * @function updateSecurityMarks - * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1beta1.IUpdateSecurityMarksRequest} request UpdateSecurityMarksRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return SecurityCenter; - })(); - - v1beta1.CreateFindingRequest = (function() { - - /** - * Properties of a CreateFindingRequest. - * @memberof google.cloud.securitycenter.v1beta1 - * @interface ICreateFindingRequest - * @property {string|null} [parent] CreateFindingRequest parent - * @property {string|null} [findingId] CreateFindingRequest findingId - * @property {google.cloud.securitycenter.v1beta1.IFinding|null} [finding] CreateFindingRequest finding - */ - - /** - * Constructs a new CreateFindingRequest. - * @memberof google.cloud.securitycenter.v1beta1 - * @classdesc Represents a CreateFindingRequest. - * @implements ICreateFindingRequest - * @constructor - * @param {google.cloud.securitycenter.v1beta1.ICreateFindingRequest=} [properties] Properties to set - */ - function CreateFindingRequest(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]]; - } - - /** - * CreateFindingRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycenter.v1beta1.CreateFindingRequest - * @instance - */ - CreateFindingRequest.prototype.parent = ""; - - /** - * CreateFindingRequest findingId. - * @member {string} findingId - * @memberof google.cloud.securitycenter.v1beta1.CreateFindingRequest - * @instance - */ - CreateFindingRequest.prototype.findingId = ""; - - /** - * CreateFindingRequest finding. - * @member {google.cloud.securitycenter.v1beta1.IFinding|null|undefined} finding - * @memberof google.cloud.securitycenter.v1beta1.CreateFindingRequest - * @instance - */ - CreateFindingRequest.prototype.finding = null; - - /** - * Creates a new CreateFindingRequest instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1beta1.CreateFindingRequest - * @static - * @param {google.cloud.securitycenter.v1beta1.ICreateFindingRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1beta1.CreateFindingRequest} CreateFindingRequest instance - */ - CreateFindingRequest.create = function create(properties) { - return new CreateFindingRequest(properties); - }; - - /** - * Encodes the specified CreateFindingRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.CreateFindingRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1beta1.CreateFindingRequest - * @static - * @param {google.cloud.securitycenter.v1beta1.ICreateFindingRequest} message CreateFindingRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateFindingRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.findingId != null && message.hasOwnProperty("findingId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.findingId); - if (message.finding != null && message.hasOwnProperty("finding")) - $root.google.cloud.securitycenter.v1beta1.Finding.encode(message.finding, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateFindingRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.CreateFindingRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.CreateFindingRequest - * @static - * @param {google.cloud.securitycenter.v1beta1.ICreateFindingRequest} message CreateFindingRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateFindingRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateFindingRequest message from the specified reader or buffer. + * Decodes an UpdateSecurityMarksRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1beta1.CreateFindingRequest + * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1beta1.CreateFindingRequest} CreateFindingRequest + * @returns {google.cloud.securitycenter.v1.UpdateSecurityMarksRequest} UpdateSecurityMarksRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateFindingRequest.decode = function decode(reader, length) { + UpdateSecurityMarksRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.CreateFindingRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.securityMarks = $root.google.cloud.securitycenter.v1.SecurityMarks.decode(reader, reader.uint32()); break; case 2: - message.findingId = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; case 3: - message.finding = $root.google.cloud.securitycenter.v1beta1.Finding.decode(reader, reader.uint32()); + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -9909,130 +9390,161 @@ }; /** - * Decodes a CreateFindingRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateSecurityMarksRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.CreateFindingRequest + * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1beta1.CreateFindingRequest} CreateFindingRequest + * @returns {google.cloud.securitycenter.v1.UpdateSecurityMarksRequest} UpdateSecurityMarksRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateFindingRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateSecurityMarksRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateFindingRequest message. + * Verifies an UpdateSecurityMarksRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1beta1.CreateFindingRequest + * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateFindingRequest.verify = function verify(message) { + UpdateSecurityMarksRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.findingId != null && message.hasOwnProperty("findingId")) - if (!$util.isString(message.findingId)) - return "findingId: string expected"; - if (message.finding != null && message.hasOwnProperty("finding")) { - var error = $root.google.cloud.securitycenter.v1beta1.Finding.verify(message.finding); + if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) { + var error = $root.google.cloud.securitycenter.v1.SecurityMarks.verify(message.securityMarks); if (error) - return "finding." + error; + return "securityMarks." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; } return null; }; /** - * Creates a CreateFindingRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateSecurityMarksRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1beta1.CreateFindingRequest + * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1beta1.CreateFindingRequest} CreateFindingRequest + * @returns {google.cloud.securitycenter.v1.UpdateSecurityMarksRequest} UpdateSecurityMarksRequest */ - CreateFindingRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1beta1.CreateFindingRequest) + UpdateSecurityMarksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest) return object; - var message = new $root.google.cloud.securitycenter.v1beta1.CreateFindingRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.findingId != null) - message.findingId = String(object.findingId); - if (object.finding != null) { - if (typeof object.finding !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.CreateFindingRequest.finding: object expected"); - message.finding = $root.google.cloud.securitycenter.v1beta1.Finding.fromObject(object.finding); + var message = new $root.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest(); + if (object.securityMarks != null) { + if (typeof object.securityMarks !== "object") + throw TypeError(".google.cloud.securitycenter.v1.UpdateSecurityMarksRequest.securityMarks: object expected"); + message.securityMarks = $root.google.cloud.securitycenter.v1.SecurityMarks.fromObject(object.securityMarks); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.securitycenter.v1.UpdateSecurityMarksRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.UpdateSecurityMarksRequest.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); } return message; }; /** - * Creates a plain object from a CreateFindingRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateSecurityMarksRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1beta1.CreateFindingRequest + * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest * @static - * @param {google.cloud.securitycenter.v1beta1.CreateFindingRequest} message CreateFindingRequest + * @param {google.cloud.securitycenter.v1.UpdateSecurityMarksRequest} message UpdateSecurityMarksRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateFindingRequest.toObject = function toObject(message, options) { + UpdateSecurityMarksRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.findingId = ""; - object.finding = null; + object.securityMarks = null; + object.updateMask = null; + object.startTime = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.findingId != null && message.hasOwnProperty("findingId")) - object.findingId = message.findingId; - if (message.finding != null && message.hasOwnProperty("finding")) - object.finding = $root.google.cloud.securitycenter.v1beta1.Finding.toObject(message.finding, options); + if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) + object.securityMarks = $root.google.cloud.securitycenter.v1.SecurityMarks.toObject(message.securityMarks, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); return object; }; /** - * Converts this CreateFindingRequest to JSON. + * Converts this UpdateSecurityMarksRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1beta1.CreateFindingRequest + * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest * @instance * @returns {Object.} JSON object */ - CreateFindingRequest.prototype.toJSON = function toJSON() { + UpdateSecurityMarksRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateFindingRequest; + return UpdateSecurityMarksRequest; })(); - v1beta1.CreateSourceRequest = (function() { + return v1; + })(); + + securitycenter.v1beta1 = (function() { + + /** + * Namespace v1beta1. + * @memberof google.cloud.securitycenter + * @namespace + */ + var v1beta1 = {}; + + v1beta1.Finding = (function() { /** - * Properties of a CreateSourceRequest. + * Properties of a Finding. * @memberof google.cloud.securitycenter.v1beta1 - * @interface ICreateSourceRequest - * @property {string|null} [parent] CreateSourceRequest parent - * @property {google.cloud.securitycenter.v1beta1.ISource|null} [source] CreateSourceRequest source + * @interface IFinding + * @property {string|null} [name] Finding name + * @property {string|null} [parent] Finding parent + * @property {string|null} [resourceName] Finding resourceName + * @property {google.cloud.securitycenter.v1beta1.Finding.State|null} [state] Finding state + * @property {string|null} [category] Finding category + * @property {string|null} [externalUri] Finding externalUri + * @property {Object.|null} [sourceProperties] Finding sourceProperties + * @property {google.cloud.securitycenter.v1beta1.ISecurityMarks|null} [securityMarks] Finding securityMarks + * @property {google.protobuf.ITimestamp|null} [eventTime] Finding eventTime + * @property {google.protobuf.ITimestamp|null} [createTime] Finding createTime */ /** - * Constructs a new CreateSourceRequest. + * Constructs a new Finding. * @memberof google.cloud.securitycenter.v1beta1 - * @classdesc Represents a CreateSourceRequest. - * @implements ICreateSourceRequest + * @classdesc Represents a Finding. + * @implements IFinding * @constructor - * @param {google.cloud.securitycenter.v1beta1.ICreateSourceRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1beta1.IFinding=} [properties] Properties to set */ - function CreateSourceRequest(properties) { + function Finding(properties) { + this.sourceProperties = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10040,88 +9552,200 @@ } /** - * CreateSourceRequest parent. + * Finding name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1beta1.Finding + * @instance + */ + Finding.prototype.name = ""; + + /** + * Finding parent. * @member {string} parent - * @memberof google.cloud.securitycenter.v1beta1.CreateSourceRequest + * @memberof google.cloud.securitycenter.v1beta1.Finding * @instance */ - CreateSourceRequest.prototype.parent = ""; + Finding.prototype.parent = ""; /** - * CreateSourceRequest source. - * @member {google.cloud.securitycenter.v1beta1.ISource|null|undefined} source - * @memberof google.cloud.securitycenter.v1beta1.CreateSourceRequest + * Finding resourceName. + * @member {string} resourceName + * @memberof google.cloud.securitycenter.v1beta1.Finding * @instance */ - CreateSourceRequest.prototype.source = null; + Finding.prototype.resourceName = ""; /** - * Creates a new CreateSourceRequest instance using the specified properties. + * Finding state. + * @member {google.cloud.securitycenter.v1beta1.Finding.State} state + * @memberof google.cloud.securitycenter.v1beta1.Finding + * @instance + */ + Finding.prototype.state = 0; + + /** + * Finding category. + * @member {string} category + * @memberof google.cloud.securitycenter.v1beta1.Finding + * @instance + */ + Finding.prototype.category = ""; + + /** + * Finding externalUri. + * @member {string} externalUri + * @memberof google.cloud.securitycenter.v1beta1.Finding + * @instance + */ + Finding.prototype.externalUri = ""; + + /** + * Finding sourceProperties. + * @member {Object.} sourceProperties + * @memberof google.cloud.securitycenter.v1beta1.Finding + * @instance + */ + Finding.prototype.sourceProperties = $util.emptyObject; + + /** + * Finding securityMarks. + * @member {google.cloud.securitycenter.v1beta1.ISecurityMarks|null|undefined} securityMarks + * @memberof google.cloud.securitycenter.v1beta1.Finding + * @instance + */ + Finding.prototype.securityMarks = null; + + /** + * Finding eventTime. + * @member {google.protobuf.ITimestamp|null|undefined} eventTime + * @memberof google.cloud.securitycenter.v1beta1.Finding + * @instance + */ + Finding.prototype.eventTime = null; + + /** + * Finding createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.securitycenter.v1beta1.Finding + * @instance + */ + Finding.prototype.createTime = null; + + /** + * Creates a new Finding instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1beta1.CreateSourceRequest + * @memberof google.cloud.securitycenter.v1beta1.Finding * @static - * @param {google.cloud.securitycenter.v1beta1.ICreateSourceRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1beta1.CreateSourceRequest} CreateSourceRequest instance + * @param {google.cloud.securitycenter.v1beta1.IFinding=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1beta1.Finding} Finding instance */ - CreateSourceRequest.create = function create(properties) { - return new CreateSourceRequest(properties); + Finding.create = function create(properties) { + return new Finding(properties); }; /** - * Encodes the specified CreateSourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.CreateSourceRequest.verify|verify} messages. + * Encodes the specified Finding message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.Finding.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1beta1.CreateSourceRequest + * @memberof google.cloud.securitycenter.v1beta1.Finding * @static - * @param {google.cloud.securitycenter.v1beta1.ICreateSourceRequest} message CreateSourceRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.IFinding} message Finding message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateSourceRequest.encode = function encode(message, writer) { + Finding.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.source != null && message.hasOwnProperty("source")) - $root.google.cloud.securitycenter.v1beta1.Source.encode(message.source, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.parent); + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.resourceName); + if (message.state != null && message.hasOwnProperty("state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.category != null && message.hasOwnProperty("category")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.category); + if (message.externalUri != null && message.hasOwnProperty("externalUri")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.externalUri); + if (message.sourceProperties != null && message.hasOwnProperty("sourceProperties")) + for (var keys = Object.keys(message.sourceProperties), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.protobuf.Value.encode(message.sourceProperties[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) + $root.google.cloud.securitycenter.v1beta1.SecurityMarks.encode(message.securityMarks, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.eventTime != null && message.hasOwnProperty("eventTime")) + $root.google.protobuf.Timestamp.encode(message.eventTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.createTime != null && message.hasOwnProperty("createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateSourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.CreateSourceRequest.verify|verify} messages. + * Encodes the specified Finding message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.Finding.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.CreateSourceRequest + * @memberof google.cloud.securitycenter.v1beta1.Finding * @static - * @param {google.cloud.securitycenter.v1beta1.ICreateSourceRequest} message CreateSourceRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.IFinding} message Finding message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { + Finding.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateSourceRequest message from the specified reader or buffer. + * Decodes a Finding message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1beta1.CreateSourceRequest + * @memberof google.cloud.securitycenter.v1beta1.Finding * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1beta1.CreateSourceRequest} CreateSourceRequest + * @returns {google.cloud.securitycenter.v1beta1.Finding} Finding * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateSourceRequest.decode = function decode(reader, length) { + Finding.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.CreateSourceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.Finding(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.name = reader.string(); break; case 2: - message.source = $root.google.cloud.securitycenter.v1beta1.Source.decode(reader, reader.uint32()); + message.parent = reader.string(); + break; + case 3: + message.resourceName = reader.string(); + break; + case 4: + message.state = reader.int32(); + break; + case 5: + message.category = reader.string(); + break; + case 6: + message.externalUri = reader.string(); + break; + case 7: + reader.skip().pos++; + if (message.sourceProperties === $util.emptyObject) + message.sourceProperties = {}; + key = reader.string(); + reader.pos++; + message.sourceProperties[key] = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + case 8: + message.securityMarks = $root.google.cloud.securitycenter.v1beta1.SecurityMarks.decode(reader, reader.uint32()); + break; + case 9: + message.eventTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 10: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -10132,121 +9756,251 @@ }; /** - * Decodes a CreateSourceRequest message from the specified reader or buffer, length delimited. + * Decodes a Finding message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.CreateSourceRequest + * @memberof google.cloud.securitycenter.v1beta1.Finding * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1beta1.CreateSourceRequest} CreateSourceRequest + * @returns {google.cloud.securitycenter.v1beta1.Finding} Finding * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateSourceRequest.decodeDelimited = function decodeDelimited(reader) { + Finding.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateSourceRequest message. + * Verifies a Finding message. * @function verify - * @memberof google.cloud.securitycenter.v1beta1.CreateSourceRequest + * @memberof google.cloud.securitycenter.v1beta1.Finding * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateSourceRequest.verify = function verify(message) { + Finding.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.source != null && message.hasOwnProperty("source")) { - var error = $root.google.cloud.securitycenter.v1beta1.Source.verify(message.source); + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + if (!$util.isString(message.resourceName)) + return "resourceName: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.category != null && message.hasOwnProperty("category")) + if (!$util.isString(message.category)) + return "category: string expected"; + if (message.externalUri != null && message.hasOwnProperty("externalUri")) + if (!$util.isString(message.externalUri)) + return "externalUri: string expected"; + if (message.sourceProperties != null && message.hasOwnProperty("sourceProperties")) { + if (!$util.isObject(message.sourceProperties)) + return "sourceProperties: object expected"; + var key = Object.keys(message.sourceProperties); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.sourceProperties[key[i]]); + if (error) + return "sourceProperties." + error; + } + } + if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) { + var error = $root.google.cloud.securitycenter.v1beta1.SecurityMarks.verify(message.securityMarks); if (error) - return "source." + error; + return "securityMarks." + error; + } + if (message.eventTime != null && message.hasOwnProperty("eventTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.eventTime); + if (error) + return "eventTime." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; } return null; }; /** - * Creates a CreateSourceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Finding message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1beta1.CreateSourceRequest + * @memberof google.cloud.securitycenter.v1beta1.Finding * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1beta1.CreateSourceRequest} CreateSourceRequest + * @returns {google.cloud.securitycenter.v1beta1.Finding} Finding */ - CreateSourceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1beta1.CreateSourceRequest) + Finding.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1beta1.Finding) return object; - var message = new $root.google.cloud.securitycenter.v1beta1.CreateSourceRequest(); + var message = new $root.google.cloud.securitycenter.v1beta1.Finding(); + if (object.name != null) + message.name = String(object.name); if (object.parent != null) message.parent = String(object.parent); - if (object.source != null) { - if (typeof object.source !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.CreateSourceRequest.source: object expected"); - message.source = $root.google.cloud.securitycenter.v1beta1.Source.fromObject(object.source); + if (object.resourceName != null) + message.resourceName = String(object.resourceName); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ACTIVE": + case 1: + message.state = 1; + break; + case "INACTIVE": + case 2: + message.state = 2; + break; + } + if (object.category != null) + message.category = String(object.category); + if (object.externalUri != null) + message.externalUri = String(object.externalUri); + if (object.sourceProperties) { + if (typeof object.sourceProperties !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.Finding.sourceProperties: object expected"); + message.sourceProperties = {}; + for (var keys = Object.keys(object.sourceProperties), i = 0; i < keys.length; ++i) { + if (typeof object.sourceProperties[keys[i]] !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.Finding.sourceProperties: object expected"); + message.sourceProperties[keys[i]] = $root.google.protobuf.Value.fromObject(object.sourceProperties[keys[i]]); + } + } + if (object.securityMarks != null) { + if (typeof object.securityMarks !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.Finding.securityMarks: object expected"); + message.securityMarks = $root.google.cloud.securitycenter.v1beta1.SecurityMarks.fromObject(object.securityMarks); + } + if (object.eventTime != null) { + if (typeof object.eventTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.Finding.eventTime: object expected"); + message.eventTime = $root.google.protobuf.Timestamp.fromObject(object.eventTime); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.Finding.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } return message; }; /** - * Creates a plain object from a CreateSourceRequest message. Also converts values to other types if specified. + * Creates a plain object from a Finding message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1beta1.CreateSourceRequest + * @memberof google.cloud.securitycenter.v1beta1.Finding * @static - * @param {google.cloud.securitycenter.v1beta1.CreateSourceRequest} message CreateSourceRequest + * @param {google.cloud.securitycenter.v1beta1.Finding} message Finding * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateSourceRequest.toObject = function toObject(message, options) { + Finding.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.sourceProperties = {}; if (options.defaults) { + object.name = ""; object.parent = ""; - object.source = null; + object.resourceName = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.category = ""; + object.externalUri = ""; + object.securityMarks = null; + object.eventTime = null; + object.createTime = null; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.source != null && message.hasOwnProperty("source")) - object.source = $root.google.cloud.securitycenter.v1beta1.Source.toObject(message.source, options); + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + object.resourceName = message.resourceName; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.securitycenter.v1beta1.Finding.State[message.state] : message.state; + if (message.category != null && message.hasOwnProperty("category")) + object.category = message.category; + if (message.externalUri != null && message.hasOwnProperty("externalUri")) + object.externalUri = message.externalUri; + var keys2; + if (message.sourceProperties && (keys2 = Object.keys(message.sourceProperties)).length) { + object.sourceProperties = {}; + for (var j = 0; j < keys2.length; ++j) + object.sourceProperties[keys2[j]] = $root.google.protobuf.Value.toObject(message.sourceProperties[keys2[j]], options); + } + if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) + object.securityMarks = $root.google.cloud.securitycenter.v1beta1.SecurityMarks.toObject(message.securityMarks, options); + if (message.eventTime != null && message.hasOwnProperty("eventTime")) + object.eventTime = $root.google.protobuf.Timestamp.toObject(message.eventTime, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); return object; }; /** - * Converts this CreateSourceRequest to JSON. + * Converts this Finding to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1beta1.CreateSourceRequest + * @memberof google.cloud.securitycenter.v1beta1.Finding * @instance * @returns {Object.} JSON object */ - CreateSourceRequest.prototype.toJSON = function toJSON() { + Finding.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateSourceRequest; + /** + * State enum. + * @name google.cloud.securitycenter.v1beta1.Finding.State + * @enum {string} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} INACTIVE=2 INACTIVE value + */ + Finding.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "INACTIVE"] = 2; + return values; + })(); + + return Finding; })(); - v1beta1.GetOrganizationSettingsRequest = (function() { + v1beta1.SecurityMarks = (function() { /** - * Properties of a GetOrganizationSettingsRequest. + * Properties of a SecurityMarks. * @memberof google.cloud.securitycenter.v1beta1 - * @interface IGetOrganizationSettingsRequest - * @property {string|null} [name] GetOrganizationSettingsRequest name + * @interface ISecurityMarks + * @property {string|null} [name] SecurityMarks name + * @property {Object.|null} [marks] SecurityMarks marks */ /** - * Constructs a new GetOrganizationSettingsRequest. + * Constructs a new SecurityMarks. * @memberof google.cloud.securitycenter.v1beta1 - * @classdesc Represents a GetOrganizationSettingsRequest. - * @implements IGetOrganizationSettingsRequest + * @classdesc Represents a SecurityMarks. + * @implements ISecurityMarks * @constructor - * @param {google.cloud.securitycenter.v1beta1.IGetOrganizationSettingsRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1beta1.ISecurityMarks=} [properties] Properties to set */ - function GetOrganizationSettingsRequest(properties) { + function SecurityMarks(properties) { + this.marks = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10254,186 +10008,234 @@ } /** - * GetOrganizationSettingsRequest name. + * SecurityMarks name. * @member {string} name - * @memberof google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1beta1.SecurityMarks * @instance */ - GetOrganizationSettingsRequest.prototype.name = ""; + SecurityMarks.prototype.name = ""; /** - * Creates a new GetOrganizationSettingsRequest instance using the specified properties. + * SecurityMarks marks. + * @member {Object.} marks + * @memberof google.cloud.securitycenter.v1beta1.SecurityMarks + * @instance + */ + SecurityMarks.prototype.marks = $util.emptyObject; + + /** + * Creates a new SecurityMarks instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1beta1.SecurityMarks * @static - * @param {google.cloud.securitycenter.v1beta1.IGetOrganizationSettingsRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest} GetOrganizationSettingsRequest instance + * @param {google.cloud.securitycenter.v1beta1.ISecurityMarks=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1beta1.SecurityMarks} SecurityMarks instance */ - GetOrganizationSettingsRequest.create = function create(properties) { - return new GetOrganizationSettingsRequest(properties); + SecurityMarks.create = function create(properties) { + return new SecurityMarks(properties); }; /** - * Encodes the specified GetOrganizationSettingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest.verify|verify} messages. + * Encodes the specified SecurityMarks message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.SecurityMarks.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1beta1.SecurityMarks * @static - * @param {google.cloud.securitycenter.v1beta1.IGetOrganizationSettingsRequest} message GetOrganizationSettingsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.ISecurityMarks} message SecurityMarks message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetOrganizationSettingsRequest.encode = function encode(message, writer) { + SecurityMarks.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.marks != null && message.hasOwnProperty("marks")) + for (var keys = Object.keys(message.marks), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.marks[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified GetOrganizationSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest.verify|verify} messages. + * Encodes the specified SecurityMarks message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.SecurityMarks.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1beta1.SecurityMarks * @static - * @param {google.cloud.securitycenter.v1beta1.IGetOrganizationSettingsRequest} message GetOrganizationSettingsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.ISecurityMarks} message SecurityMarks message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetOrganizationSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + SecurityMarks.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetOrganizationSettingsRequest message from the specified reader or buffer. + * Decodes a SecurityMarks message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1beta1.SecurityMarks * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest} GetOrganizationSettingsRequest + * @returns {google.cloud.securitycenter.v1beta1.SecurityMarks} SecurityMarks * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetOrganizationSettingsRequest.decode = function decode(reader, length) { + SecurityMarks.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.SecurityMarks(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; - default: - reader.skipType(tag & 7); - break; + case 2: + reader.skip().pos++; + if (message.marks === $util.emptyObject) + message.marks = {}; + key = reader.string(); + reader.pos++; + message.marks[key] = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }; /** - * Decodes a GetOrganizationSettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a SecurityMarks message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1beta1.SecurityMarks * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest} GetOrganizationSettingsRequest + * @returns {google.cloud.securitycenter.v1beta1.SecurityMarks} SecurityMarks * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetOrganizationSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + SecurityMarks.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetOrganizationSettingsRequest message. + * Verifies a SecurityMarks message. * @function verify - * @memberof google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1beta1.SecurityMarks * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetOrganizationSettingsRequest.verify = function verify(message) { + SecurityMarks.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; + if (message.marks != null && message.hasOwnProperty("marks")) { + if (!$util.isObject(message.marks)) + return "marks: object expected"; + var key = Object.keys(message.marks); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.marks[key[i]])) + return "marks: string{k:string} expected"; + } return null; }; /** - * Creates a GetOrganizationSettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SecurityMarks message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1beta1.SecurityMarks * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest} GetOrganizationSettingsRequest + * @returns {google.cloud.securitycenter.v1beta1.SecurityMarks} SecurityMarks */ - GetOrganizationSettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest) + SecurityMarks.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1beta1.SecurityMarks) return object; - var message = new $root.google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest(); + var message = new $root.google.cloud.securitycenter.v1beta1.SecurityMarks(); if (object.name != null) message.name = String(object.name); + if (object.marks) { + if (typeof object.marks !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.SecurityMarks.marks: object expected"); + message.marks = {}; + for (var keys = Object.keys(object.marks), i = 0; i < keys.length; ++i) + message.marks[keys[i]] = String(object.marks[keys[i]]); + } return message; }; /** - * Creates a plain object from a GetOrganizationSettingsRequest message. Also converts values to other types if specified. + * Creates a plain object from a SecurityMarks message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1beta1.SecurityMarks * @static - * @param {google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest} message GetOrganizationSettingsRequest + * @param {google.cloud.securitycenter.v1beta1.SecurityMarks} message SecurityMarks * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetOrganizationSettingsRequest.toObject = function toObject(message, options) { + SecurityMarks.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.marks = {}; if (options.defaults) object.name = ""; if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + var keys2; + if (message.marks && (keys2 = Object.keys(message.marks)).length) { + object.marks = {}; + for (var j = 0; j < keys2.length; ++j) + object.marks[keys2[j]] = message.marks[keys2[j]]; + } return object; }; /** - * Converts this GetOrganizationSettingsRequest to JSON. + * Converts this SecurityMarks to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1beta1.SecurityMarks * @instance * @returns {Object.} JSON object */ - GetOrganizationSettingsRequest.prototype.toJSON = function toJSON() { + SecurityMarks.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetOrganizationSettingsRequest; + return SecurityMarks; })(); - v1beta1.GetSourceRequest = (function() { + v1beta1.Asset = (function() { /** - * Properties of a GetSourceRequest. + * Properties of an Asset. * @memberof google.cloud.securitycenter.v1beta1 - * @interface IGetSourceRequest - * @property {string|null} [name] GetSourceRequest name + * @interface IAsset + * @property {string|null} [name] Asset name + * @property {google.cloud.securitycenter.v1beta1.Asset.ISecurityCenterProperties|null} [securityCenterProperties] Asset securityCenterProperties + * @property {Object.|null} [resourceProperties] Asset resourceProperties + * @property {google.cloud.securitycenter.v1beta1.ISecurityMarks|null} [securityMarks] Asset securityMarks + * @property {google.protobuf.ITimestamp|null} [createTime] Asset createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Asset updateTime */ /** - * Constructs a new GetSourceRequest. + * Constructs a new Asset. * @memberof google.cloud.securitycenter.v1beta1 - * @classdesc Represents a GetSourceRequest. - * @implements IGetSourceRequest + * @classdesc Represents an Asset. + * @implements IAsset * @constructor - * @param {google.cloud.securitycenter.v1beta1.IGetSourceRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1beta1.IAsset=} [properties] Properties to set */ - function GetSourceRequest(properties) { + function Asset(properties) { + this.resourceProperties = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10441,76 +10243,149 @@ } /** - * GetSourceRequest name. + * Asset name. * @member {string} name - * @memberof google.cloud.securitycenter.v1beta1.GetSourceRequest + * @memberof google.cloud.securitycenter.v1beta1.Asset * @instance */ - GetSourceRequest.prototype.name = ""; + Asset.prototype.name = ""; /** - * Creates a new GetSourceRequest instance using the specified properties. + * Asset securityCenterProperties. + * @member {google.cloud.securitycenter.v1beta1.Asset.ISecurityCenterProperties|null|undefined} securityCenterProperties + * @memberof google.cloud.securitycenter.v1beta1.Asset + * @instance + */ + Asset.prototype.securityCenterProperties = null; + + /** + * Asset resourceProperties. + * @member {Object.} resourceProperties + * @memberof google.cloud.securitycenter.v1beta1.Asset + * @instance + */ + Asset.prototype.resourceProperties = $util.emptyObject; + + /** + * Asset securityMarks. + * @member {google.cloud.securitycenter.v1beta1.ISecurityMarks|null|undefined} securityMarks + * @memberof google.cloud.securitycenter.v1beta1.Asset + * @instance + */ + Asset.prototype.securityMarks = null; + + /** + * Asset createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.securitycenter.v1beta1.Asset + * @instance + */ + Asset.prototype.createTime = null; + + /** + * Asset updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.securitycenter.v1beta1.Asset + * @instance + */ + Asset.prototype.updateTime = null; + + /** + * Creates a new Asset instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1beta1.GetSourceRequest + * @memberof google.cloud.securitycenter.v1beta1.Asset * @static - * @param {google.cloud.securitycenter.v1beta1.IGetSourceRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1beta1.GetSourceRequest} GetSourceRequest instance + * @param {google.cloud.securitycenter.v1beta1.IAsset=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1beta1.Asset} Asset instance */ - GetSourceRequest.create = function create(properties) { - return new GetSourceRequest(properties); + Asset.create = function create(properties) { + return new Asset(properties); }; /** - * Encodes the specified GetSourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GetSourceRequest.verify|verify} messages. + * Encodes the specified Asset message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.Asset.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1beta1.GetSourceRequest + * @memberof google.cloud.securitycenter.v1beta1.Asset * @static - * @param {google.cloud.securitycenter.v1beta1.IGetSourceRequest} message GetSourceRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.IAsset} message Asset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSourceRequest.encode = function encode(message, writer) { + Asset.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.securityCenterProperties != null && message.hasOwnProperty("securityCenterProperties")) + $root.google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties.encode(message.securityCenterProperties, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.resourceProperties != null && message.hasOwnProperty("resourceProperties")) + for (var keys = Object.keys(message.resourceProperties), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.protobuf.Value.encode(message.resourceProperties[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) + $root.google.cloud.securitycenter.v1beta1.SecurityMarks.encode(message.securityMarks, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.createTime != null && message.hasOwnProperty("createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetSourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GetSourceRequest.verify|verify} messages. + * Encodes the specified Asset message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.Asset.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.GetSourceRequest + * @memberof google.cloud.securitycenter.v1beta1.Asset * @static - * @param {google.cloud.securitycenter.v1beta1.IGetSourceRequest} message GetSourceRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.IAsset} message Asset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { + Asset.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSourceRequest message from the specified reader or buffer. + * Decodes an Asset message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1beta1.GetSourceRequest + * @memberof google.cloud.securitycenter.v1beta1.Asset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1beta1.GetSourceRequest} GetSourceRequest + * @returns {google.cloud.securitycenter.v1beta1.Asset} Asset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSourceRequest.decode = function decode(reader, length) { + Asset.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.GetSourceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.Asset(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; + case 2: + message.securityCenterProperties = $root.google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties.decode(reader, reader.uint32()); + break; + case 7: + reader.skip().pos++; + if (message.resourceProperties === $util.emptyObject) + message.resourceProperties = {}; + key = reader.string(); + reader.pos++; + message.resourceProperties[key] = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + case 8: + message.securityMarks = $root.google.cloud.securitycenter.v1beta1.SecurityMarks.decode(reader, reader.uint32()); + break; + case 9: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 10: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -10520,267 +10395,585 @@ }; /** - * Decodes a GetSourceRequest message from the specified reader or buffer, length delimited. + * Decodes an Asset message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.GetSourceRequest + * @memberof google.cloud.securitycenter.v1beta1.Asset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1beta1.GetSourceRequest} GetSourceRequest + * @returns {google.cloud.securitycenter.v1beta1.Asset} Asset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSourceRequest.decodeDelimited = function decodeDelimited(reader) { + Asset.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSourceRequest message. + * Verifies an Asset message. * @function verify - * @memberof google.cloud.securitycenter.v1beta1.GetSourceRequest + * @memberof google.cloud.securitycenter.v1beta1.Asset * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSourceRequest.verify = function verify(message) { + Asset.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - return null; - }; - - /** - * Creates a GetSourceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1beta1.GetSourceRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1beta1.GetSourceRequest} GetSourceRequest - */ - GetSourceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1beta1.GetSourceRequest) - return object; - var message = new $root.google.cloud.securitycenter.v1beta1.GetSourceRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetSourceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1beta1.GetSourceRequest - * @static - * @param {google.cloud.securitycenter.v1beta1.GetSourceRequest} message GetSourceRequest + if (message.securityCenterProperties != null && message.hasOwnProperty("securityCenterProperties")) { + var error = $root.google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties.verify(message.securityCenterProperties); + if (error) + return "securityCenterProperties." + error; + } + if (message.resourceProperties != null && message.hasOwnProperty("resourceProperties")) { + if (!$util.isObject(message.resourceProperties)) + return "resourceProperties: object expected"; + var key = Object.keys(message.resourceProperties); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.resourceProperties[key[i]]); + if (error) + return "resourceProperties." + error; + } + } + if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) { + var error = $root.google.cloud.securitycenter.v1beta1.SecurityMarks.verify(message.securityMarks); + if (error) + return "securityMarks." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; + + /** + * Creates an Asset message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1beta1.Asset + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1beta1.Asset} Asset + */ + Asset.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1beta1.Asset) + return object; + var message = new $root.google.cloud.securitycenter.v1beta1.Asset(); + if (object.name != null) + message.name = String(object.name); + if (object.securityCenterProperties != null) { + if (typeof object.securityCenterProperties !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.Asset.securityCenterProperties: object expected"); + message.securityCenterProperties = $root.google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties.fromObject(object.securityCenterProperties); + } + if (object.resourceProperties) { + if (typeof object.resourceProperties !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.Asset.resourceProperties: object expected"); + message.resourceProperties = {}; + for (var keys = Object.keys(object.resourceProperties), i = 0; i < keys.length; ++i) { + if (typeof object.resourceProperties[keys[i]] !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.Asset.resourceProperties: object expected"); + message.resourceProperties[keys[i]] = $root.google.protobuf.Value.fromObject(object.resourceProperties[keys[i]]); + } + } + if (object.securityMarks != null) { + if (typeof object.securityMarks !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.Asset.securityMarks: object expected"); + message.securityMarks = $root.google.cloud.securitycenter.v1beta1.SecurityMarks.fromObject(object.securityMarks); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.Asset.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.Asset.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from an Asset message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1beta1.Asset + * @static + * @param {google.cloud.securitycenter.v1beta1.Asset} message Asset * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSourceRequest.toObject = function toObject(message, options) { + Asset.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.objects || options.defaults) + object.resourceProperties = {}; + if (options.defaults) { object.name = ""; + object.securityCenterProperties = null; + object.securityMarks = null; + object.createTime = null; + object.updateTime = null; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.securityCenterProperties != null && message.hasOwnProperty("securityCenterProperties")) + object.securityCenterProperties = $root.google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties.toObject(message.securityCenterProperties, options); + var keys2; + if (message.resourceProperties && (keys2 = Object.keys(message.resourceProperties)).length) { + object.resourceProperties = {}; + for (var j = 0; j < keys2.length; ++j) + object.resourceProperties[keys2[j]] = $root.google.protobuf.Value.toObject(message.resourceProperties[keys2[j]], options); + } + if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) + object.securityMarks = $root.google.cloud.securitycenter.v1beta1.SecurityMarks.toObject(message.securityMarks, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); return object; }; /** - * Converts this GetSourceRequest to JSON. + * Converts this Asset to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1beta1.GetSourceRequest + * @memberof google.cloud.securitycenter.v1beta1.Asset * @instance * @returns {Object.} JSON object */ - GetSourceRequest.prototype.toJSON = function toJSON() { + Asset.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetSourceRequest; - })(); + Asset.SecurityCenterProperties = (function() { - v1beta1.GroupAssetsRequest = (function() { + /** + * Properties of a SecurityCenterProperties. + * @memberof google.cloud.securitycenter.v1beta1.Asset + * @interface ISecurityCenterProperties + * @property {string|null} [resourceName] SecurityCenterProperties resourceName + * @property {string|null} [resourceType] SecurityCenterProperties resourceType + * @property {string|null} [resourceParent] SecurityCenterProperties resourceParent + * @property {string|null} [resourceProject] SecurityCenterProperties resourceProject + * @property {Array.|null} [resourceOwners] SecurityCenterProperties resourceOwners + */ - /** - * Properties of a GroupAssetsRequest. - * @memberof google.cloud.securitycenter.v1beta1 - * @interface IGroupAssetsRequest - * @property {string|null} [parent] GroupAssetsRequest parent - * @property {string|null} [filter] GroupAssetsRequest filter - * @property {string|null} [groupBy] GroupAssetsRequest groupBy - * @property {google.protobuf.IDuration|null} [compareDuration] GroupAssetsRequest compareDuration - * @property {google.protobuf.ITimestamp|null} [readTime] GroupAssetsRequest readTime - * @property {string|null} [pageToken] GroupAssetsRequest pageToken - * @property {number|null} [pageSize] GroupAssetsRequest pageSize - */ + /** + * Constructs a new SecurityCenterProperties. + * @memberof google.cloud.securitycenter.v1beta1.Asset + * @classdesc Represents a SecurityCenterProperties. + * @implements ISecurityCenterProperties + * @constructor + * @param {google.cloud.securitycenter.v1beta1.Asset.ISecurityCenterProperties=} [properties] Properties to set + */ + function SecurityCenterProperties(properties) { + this.resourceOwners = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new GroupAssetsRequest. - * @memberof google.cloud.securitycenter.v1beta1 - * @classdesc Represents a GroupAssetsRequest. - * @implements IGroupAssetsRequest - * @constructor - * @param {google.cloud.securitycenter.v1beta1.IGroupAssetsRequest=} [properties] Properties to set - */ - function GroupAssetsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * SecurityCenterProperties resourceName. + * @member {string} resourceName + * @memberof google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties + * @instance + */ + SecurityCenterProperties.prototype.resourceName = ""; - /** - * GroupAssetsRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsRequest - * @instance - */ - GroupAssetsRequest.prototype.parent = ""; + /** + * SecurityCenterProperties resourceType. + * @member {string} resourceType + * @memberof google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties + * @instance + */ + SecurityCenterProperties.prototype.resourceType = ""; - /** - * GroupAssetsRequest filter. - * @member {string} filter - * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsRequest - * @instance - */ - GroupAssetsRequest.prototype.filter = ""; + /** + * SecurityCenterProperties resourceParent. + * @member {string} resourceParent + * @memberof google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties + * @instance + */ + SecurityCenterProperties.prototype.resourceParent = ""; - /** - * GroupAssetsRequest groupBy. - * @member {string} groupBy - * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsRequest - * @instance - */ - GroupAssetsRequest.prototype.groupBy = ""; + /** + * SecurityCenterProperties resourceProject. + * @member {string} resourceProject + * @memberof google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties + * @instance + */ + SecurityCenterProperties.prototype.resourceProject = ""; - /** - * GroupAssetsRequest compareDuration. - * @member {google.protobuf.IDuration|null|undefined} compareDuration - * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsRequest - * @instance - */ - GroupAssetsRequest.prototype.compareDuration = null; + /** + * SecurityCenterProperties resourceOwners. + * @member {Array.} resourceOwners + * @memberof google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties + * @instance + */ + SecurityCenterProperties.prototype.resourceOwners = $util.emptyArray; - /** - * GroupAssetsRequest readTime. - * @member {google.protobuf.ITimestamp|null|undefined} readTime - * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsRequest - * @instance - */ - GroupAssetsRequest.prototype.readTime = null; + /** + * Creates a new SecurityCenterProperties instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties + * @static + * @param {google.cloud.securitycenter.v1beta1.Asset.ISecurityCenterProperties=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties} SecurityCenterProperties instance + */ + SecurityCenterProperties.create = function create(properties) { + return new SecurityCenterProperties(properties); + }; - /** - * GroupAssetsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsRequest - * @instance - */ - GroupAssetsRequest.prototype.pageToken = ""; + /** + * Encodes the specified SecurityCenterProperties message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties + * @static + * @param {google.cloud.securitycenter.v1beta1.Asset.ISecurityCenterProperties} message SecurityCenterProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecurityCenterProperties.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceName); + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceType); + if (message.resourceParent != null && message.hasOwnProperty("resourceParent")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.resourceParent); + if (message.resourceProject != null && message.hasOwnProperty("resourceProject")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.resourceProject); + if (message.resourceOwners != null && message.resourceOwners.length) + for (var i = 0; i < message.resourceOwners.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.resourceOwners[i]); + return writer; + }; + + /** + * Encodes the specified SecurityCenterProperties message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties + * @static + * @param {google.cloud.securitycenter.v1beta1.Asset.ISecurityCenterProperties} message SecurityCenterProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecurityCenterProperties.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SecurityCenterProperties message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties} SecurityCenterProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecurityCenterProperties.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.resourceName = reader.string(); + break; + case 2: + message.resourceType = reader.string(); + break; + case 3: + message.resourceParent = reader.string(); + break; + case 4: + message.resourceProject = reader.string(); + break; + case 5: + if (!(message.resourceOwners && message.resourceOwners.length)) + message.resourceOwners = []; + message.resourceOwners.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SecurityCenterProperties message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties} SecurityCenterProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecurityCenterProperties.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SecurityCenterProperties message. + * @function verify + * @memberof google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SecurityCenterProperties.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + if (!$util.isString(message.resourceName)) + return "resourceName: string expected"; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + if (!$util.isString(message.resourceType)) + return "resourceType: string expected"; + if (message.resourceParent != null && message.hasOwnProperty("resourceParent")) + if (!$util.isString(message.resourceParent)) + return "resourceParent: string expected"; + if (message.resourceProject != null && message.hasOwnProperty("resourceProject")) + if (!$util.isString(message.resourceProject)) + return "resourceProject: string expected"; + if (message.resourceOwners != null && message.hasOwnProperty("resourceOwners")) { + if (!Array.isArray(message.resourceOwners)) + return "resourceOwners: array expected"; + for (var i = 0; i < message.resourceOwners.length; ++i) + if (!$util.isString(message.resourceOwners[i])) + return "resourceOwners: string[] expected"; + } + return null; + }; + + /** + * Creates a SecurityCenterProperties message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties} SecurityCenterProperties + */ + SecurityCenterProperties.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties) + return object; + var message = new $root.google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties(); + if (object.resourceName != null) + message.resourceName = String(object.resourceName); + if (object.resourceType != null) + message.resourceType = String(object.resourceType); + if (object.resourceParent != null) + message.resourceParent = String(object.resourceParent); + if (object.resourceProject != null) + message.resourceProject = String(object.resourceProject); + if (object.resourceOwners) { + if (!Array.isArray(object.resourceOwners)) + throw TypeError(".google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties.resourceOwners: array expected"); + message.resourceOwners = []; + for (var i = 0; i < object.resourceOwners.length; ++i) + message.resourceOwners[i] = String(object.resourceOwners[i]); + } + return message; + }; + + /** + * Creates a plain object from a SecurityCenterProperties message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties + * @static + * @param {google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties} message SecurityCenterProperties + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SecurityCenterProperties.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.resourceOwners = []; + if (options.defaults) { + object.resourceName = ""; + object.resourceType = ""; + object.resourceParent = ""; + object.resourceProject = ""; + } + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + object.resourceName = message.resourceName; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + object.resourceType = message.resourceType; + if (message.resourceParent != null && message.hasOwnProperty("resourceParent")) + object.resourceParent = message.resourceParent; + if (message.resourceProject != null && message.hasOwnProperty("resourceProject")) + object.resourceProject = message.resourceProject; + if (message.resourceOwners && message.resourceOwners.length) { + object.resourceOwners = []; + for (var j = 0; j < message.resourceOwners.length; ++j) + object.resourceOwners[j] = message.resourceOwners[j]; + } + return object; + }; + + /** + * Converts this SecurityCenterProperties to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties + * @instance + * @returns {Object.} JSON object + */ + SecurityCenterProperties.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SecurityCenterProperties; + })(); + + return Asset; + })(); + + v1beta1.Source = (function() { /** - * GroupAssetsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsRequest - * @instance + * Properties of a Source. + * @memberof google.cloud.securitycenter.v1beta1 + * @interface ISource + * @property {string|null} [name] Source name + * @property {string|null} [displayName] Source displayName + * @property {string|null} [description] Source description */ - GroupAssetsRequest.prototype.pageSize = 0; /** - * Creates a new GroupAssetsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsRequest - * @static - * @param {google.cloud.securitycenter.v1beta1.IGroupAssetsRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1beta1.GroupAssetsRequest} GroupAssetsRequest instance + * Constructs a new Source. + * @memberof google.cloud.securitycenter.v1beta1 + * @classdesc Represents a Source. + * @implements ISource + * @constructor + * @param {google.cloud.securitycenter.v1beta1.ISource=} [properties] Properties to set */ - GroupAssetsRequest.create = function create(properties) { - return new GroupAssetsRequest(properties); - }; + function Source(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Encodes the specified GroupAssetsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupAssetsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsRequest + * Source name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1beta1.Source + * @instance + */ + Source.prototype.name = ""; + + /** + * Source displayName. + * @member {string} displayName + * @memberof google.cloud.securitycenter.v1beta1.Source + * @instance + */ + Source.prototype.displayName = ""; + + /** + * Source description. + * @member {string} description + * @memberof google.cloud.securitycenter.v1beta1.Source + * @instance + */ + Source.prototype.description = ""; + + /** + * Creates a new Source instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1beta1.Source * @static - * @param {google.cloud.securitycenter.v1beta1.IGroupAssetsRequest} message GroupAssetsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.ISource=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1beta1.Source} Source instance + */ + Source.create = function create(properties) { + return new Source(properties); + }; + + /** + * Encodes the specified Source message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.Source.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1beta1.Source + * @static + * @param {google.cloud.securitycenter.v1beta1.ISource} message Source message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GroupAssetsRequest.encode = function encode(message, writer) { + Source.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.groupBy != null && message.hasOwnProperty("groupBy")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.groupBy); - if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) - $root.google.protobuf.Duration.encode(message.compareDuration, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.readTime != null && message.hasOwnProperty("readTime")) - $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.pageToken); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.pageSize); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); return writer; }; /** - * Encodes the specified GroupAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupAssetsRequest.verify|verify} messages. + * Encodes the specified Source message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.Source.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsRequest + * @memberof google.cloud.securitycenter.v1beta1.Source * @static - * @param {google.cloud.securitycenter.v1beta1.IGroupAssetsRequest} message GroupAssetsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.ISource} message Source message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GroupAssetsRequest.encodeDelimited = function encodeDelimited(message, writer) { + Source.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GroupAssetsRequest message from the specified reader or buffer. + * Decodes a Source message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsRequest + * @memberof google.cloud.securitycenter.v1beta1.Source * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1beta1.GroupAssetsRequest} GroupAssetsRequest + * @returns {google.cloud.securitycenter.v1beta1.Source} Source * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GroupAssetsRequest.decode = function decode(reader, length) { + Source.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.GroupAssetsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.Source(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.name = reader.string(); break; case 2: - message.filter = reader.string(); + message.displayName = reader.string(); break; case 3: - message.groupBy = reader.string(); - break; - case 4: - message.compareDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 5: - message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 7: - message.pageToken = reader.string(); - break; - case 8: - message.pageSize = reader.int32(); + message.description = reader.string(); break; default: reader.skipType(tag & 7); @@ -10791,169 +10984,125 @@ }; /** - * Decodes a GroupAssetsRequest message from the specified reader or buffer, length delimited. + * Decodes a Source message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsRequest + * @memberof google.cloud.securitycenter.v1beta1.Source * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1beta1.GroupAssetsRequest} GroupAssetsRequest + * @returns {google.cloud.securitycenter.v1beta1.Source} Source * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GroupAssetsRequest.decodeDelimited = function decodeDelimited(reader) { + Source.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GroupAssetsRequest message. + * Verifies a Source message. * @function verify - * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsRequest + * @memberof google.cloud.securitycenter.v1beta1.Source * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GroupAssetsRequest.verify = function verify(message) { + Source.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.groupBy != null && message.hasOwnProperty("groupBy")) - if (!$util.isString(message.groupBy)) - return "groupBy: string expected"; - if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) { - var error = $root.google.protobuf.Duration.verify(message.compareDuration); - if (error) - return "compareDuration." + error; - } - if (message.readTime != null && message.hasOwnProperty("readTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.readTime); - if (error) - return "readTime." + error; - } - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; return null; }; /** - * Creates a GroupAssetsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Source message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsRequest + * @memberof google.cloud.securitycenter.v1beta1.Source * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1beta1.GroupAssetsRequest} GroupAssetsRequest + * @returns {google.cloud.securitycenter.v1beta1.Source} Source */ - GroupAssetsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1beta1.GroupAssetsRequest) + Source.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1beta1.Source) return object; - var message = new $root.google.cloud.securitycenter.v1beta1.GroupAssetsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.filter != null) - message.filter = String(object.filter); - if (object.groupBy != null) - message.groupBy = String(object.groupBy); - if (object.compareDuration != null) { - if (typeof object.compareDuration !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.GroupAssetsRequest.compareDuration: object expected"); - message.compareDuration = $root.google.protobuf.Duration.fromObject(object.compareDuration); - } - if (object.readTime != null) { - if (typeof object.readTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.GroupAssetsRequest.readTime: object expected"); - message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); - } - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; + var message = new $root.google.cloud.securitycenter.v1beta1.Source(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); return message; }; /** - * Creates a plain object from a GroupAssetsRequest message. Also converts values to other types if specified. + * Creates a plain object from a Source message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsRequest + * @memberof google.cloud.securitycenter.v1beta1.Source * @static - * @param {google.cloud.securitycenter.v1beta1.GroupAssetsRequest} message GroupAssetsRequest + * @param {google.cloud.securitycenter.v1beta1.Source} message Source * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GroupAssetsRequest.toObject = function toObject(message, options) { + Source.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.filter = ""; - object.groupBy = ""; - object.compareDuration = null; - object.readTime = null; - object.pageToken = ""; - object.pageSize = 0; + object.name = ""; + object.displayName = ""; + object.description = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.groupBy != null && message.hasOwnProperty("groupBy")) - object.groupBy = message.groupBy; - if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) - object.compareDuration = $root.google.protobuf.Duration.toObject(message.compareDuration, options); - if (message.readTime != null && message.hasOwnProperty("readTime")) - object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; return object; }; /** - * Converts this GroupAssetsRequest to JSON. + * Converts this Source to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsRequest + * @memberof google.cloud.securitycenter.v1beta1.Source * @instance * @returns {Object.} JSON object */ - GroupAssetsRequest.prototype.toJSON = function toJSON() { + Source.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GroupAssetsRequest; + return Source; })(); - v1beta1.GroupAssetsResponse = (function() { + v1beta1.RunAssetDiscoveryResponse = (function() { /** - * Properties of a GroupAssetsResponse. + * Properties of a RunAssetDiscoveryResponse. * @memberof google.cloud.securitycenter.v1beta1 - * @interface IGroupAssetsResponse - * @property {Array.|null} [groupByResults] GroupAssetsResponse groupByResults - * @property {google.protobuf.ITimestamp|null} [readTime] GroupAssetsResponse readTime - * @property {string|null} [nextPageToken] GroupAssetsResponse nextPageToken + * @interface IRunAssetDiscoveryResponse + * @property {google.cloud.securitycenter.v1beta1.RunAssetDiscoveryResponse.State|null} [state] RunAssetDiscoveryResponse state + * @property {google.protobuf.IDuration|null} [duration] RunAssetDiscoveryResponse duration */ /** - * Constructs a new GroupAssetsResponse. + * Constructs a new RunAssetDiscoveryResponse. * @memberof google.cloud.securitycenter.v1beta1 - * @classdesc Represents a GroupAssetsResponse. - * @implements IGroupAssetsResponse + * @classdesc Represents a RunAssetDiscoveryResponse. + * @implements IRunAssetDiscoveryResponse * @constructor - * @param {google.cloud.securitycenter.v1beta1.IGroupAssetsResponse=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1beta1.IRunAssetDiscoveryResponse=} [properties] Properties to set */ - function GroupAssetsResponse(properties) { - this.groupByResults = []; + function RunAssetDiscoveryResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10961,104 +11110,88 @@ } /** - * GroupAssetsResponse groupByResults. - * @member {Array.} groupByResults - * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsResponse + * RunAssetDiscoveryResponse state. + * @member {google.cloud.securitycenter.v1beta1.RunAssetDiscoveryResponse.State} state + * @memberof google.cloud.securitycenter.v1beta1.RunAssetDiscoveryResponse * @instance */ - GroupAssetsResponse.prototype.groupByResults = $util.emptyArray; + RunAssetDiscoveryResponse.prototype.state = 0; /** - * GroupAssetsResponse readTime. - * @member {google.protobuf.ITimestamp|null|undefined} readTime - * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsResponse - * @instance - */ - GroupAssetsResponse.prototype.readTime = null; - - /** - * GroupAssetsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsResponse + * RunAssetDiscoveryResponse duration. + * @member {google.protobuf.IDuration|null|undefined} duration + * @memberof google.cloud.securitycenter.v1beta1.RunAssetDiscoveryResponse * @instance */ - GroupAssetsResponse.prototype.nextPageToken = ""; + RunAssetDiscoveryResponse.prototype.duration = null; /** - * Creates a new GroupAssetsResponse instance using the specified properties. + * Creates a new RunAssetDiscoveryResponse instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsResponse + * @memberof google.cloud.securitycenter.v1beta1.RunAssetDiscoveryResponse * @static - * @param {google.cloud.securitycenter.v1beta1.IGroupAssetsResponse=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1beta1.GroupAssetsResponse} GroupAssetsResponse instance + * @param {google.cloud.securitycenter.v1beta1.IRunAssetDiscoveryResponse=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1beta1.RunAssetDiscoveryResponse} RunAssetDiscoveryResponse instance */ - GroupAssetsResponse.create = function create(properties) { - return new GroupAssetsResponse(properties); + RunAssetDiscoveryResponse.create = function create(properties) { + return new RunAssetDiscoveryResponse(properties); }; /** - * Encodes the specified GroupAssetsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupAssetsResponse.verify|verify} messages. + * Encodes the specified RunAssetDiscoveryResponse message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.RunAssetDiscoveryResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsResponse + * @memberof google.cloud.securitycenter.v1beta1.RunAssetDiscoveryResponse * @static - * @param {google.cloud.securitycenter.v1beta1.IGroupAssetsResponse} message GroupAssetsResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.IRunAssetDiscoveryResponse} message RunAssetDiscoveryResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GroupAssetsResponse.encode = function encode(message, writer) { + RunAssetDiscoveryResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.groupByResults != null && message.groupByResults.length) - for (var i = 0; i < message.groupByResults.length; ++i) - $root.google.cloud.securitycenter.v1beta1.GroupResult.encode(message.groupByResults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.readTime != null && message.hasOwnProperty("readTime")) - $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nextPageToken); + if (message.state != null && message.hasOwnProperty("state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.duration != null && message.hasOwnProperty("duration")) + $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified GroupAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupAssetsResponse.verify|verify} messages. + * Encodes the specified RunAssetDiscoveryResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.RunAssetDiscoveryResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsResponse + * @memberof google.cloud.securitycenter.v1beta1.RunAssetDiscoveryResponse * @static - * @param {google.cloud.securitycenter.v1beta1.IGroupAssetsResponse} message GroupAssetsResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.IRunAssetDiscoveryResponse} message RunAssetDiscoveryResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GroupAssetsResponse.encodeDelimited = function encodeDelimited(message, writer) { + RunAssetDiscoveryResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GroupAssetsResponse message from the specified reader or buffer. + * Decodes a RunAssetDiscoveryResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsResponse + * @memberof google.cloud.securitycenter.v1beta1.RunAssetDiscoveryResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1beta1.GroupAssetsResponse} GroupAssetsResponse + * @returns {google.cloud.securitycenter.v1beta1.RunAssetDiscoveryResponse} RunAssetDiscoveryResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GroupAssetsResponse.decode = function decode(reader, length) { + RunAssetDiscoveryResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.GroupAssetsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.RunAssetDiscoveryResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.groupByResults && message.groupByResults.length)) - message.groupByResults = []; - message.groupByResults.push($root.google.cloud.securitycenter.v1beta1.GroupResult.decode(reader, reader.uint32())); + message.state = reader.int32(); break; case 2: - message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 3: - message.nextPageToken = reader.string(); + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -11069,152 +11202,164 @@ }; /** - * Decodes a GroupAssetsResponse message from the specified reader or buffer, length delimited. + * Decodes a RunAssetDiscoveryResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsResponse + * @memberof google.cloud.securitycenter.v1beta1.RunAssetDiscoveryResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1beta1.GroupAssetsResponse} GroupAssetsResponse + * @returns {google.cloud.securitycenter.v1beta1.RunAssetDiscoveryResponse} RunAssetDiscoveryResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GroupAssetsResponse.decodeDelimited = function decodeDelimited(reader) { + RunAssetDiscoveryResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GroupAssetsResponse message. + * Verifies a RunAssetDiscoveryResponse message. * @function verify - * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsResponse + * @memberof google.cloud.securitycenter.v1beta1.RunAssetDiscoveryResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GroupAssetsResponse.verify = function verify(message) { + RunAssetDiscoveryResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.groupByResults != null && message.hasOwnProperty("groupByResults")) { - if (!Array.isArray(message.groupByResults)) - return "groupByResults: array expected"; - for (var i = 0; i < message.groupByResults.length; ++i) { - var error = $root.google.cloud.securitycenter.v1beta1.GroupResult.verify(message.groupByResults[i]); - if (error) - return "groupByResults." + error; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; } - } - if (message.readTime != null && message.hasOwnProperty("readTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.readTime); + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.google.protobuf.Duration.verify(message.duration); if (error) - return "readTime." + error; + return "duration." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a GroupAssetsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a RunAssetDiscoveryResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsResponse + * @memberof google.cloud.securitycenter.v1beta1.RunAssetDiscoveryResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1beta1.GroupAssetsResponse} GroupAssetsResponse + * @returns {google.cloud.securitycenter.v1beta1.RunAssetDiscoveryResponse} RunAssetDiscoveryResponse */ - GroupAssetsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1beta1.GroupAssetsResponse) + RunAssetDiscoveryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1beta1.RunAssetDiscoveryResponse) return object; - var message = new $root.google.cloud.securitycenter.v1beta1.GroupAssetsResponse(); - if (object.groupByResults) { - if (!Array.isArray(object.groupByResults)) - throw TypeError(".google.cloud.securitycenter.v1beta1.GroupAssetsResponse.groupByResults: array expected"); - message.groupByResults = []; - for (var i = 0; i < object.groupByResults.length; ++i) { - if (typeof object.groupByResults[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.GroupAssetsResponse.groupByResults: object expected"); - message.groupByResults[i] = $root.google.cloud.securitycenter.v1beta1.GroupResult.fromObject(object.groupByResults[i]); - } + var message = new $root.google.cloud.securitycenter.v1beta1.RunAssetDiscoveryResponse(); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "COMPLETED": + case 1: + message.state = 1; + break; + case "SUPERSEDED": + case 2: + message.state = 2; + break; + case "TERMINATED": + case 3: + message.state = 3; + break; } - if (object.readTime != null) { - if (typeof object.readTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.GroupAssetsResponse.readTime: object expected"); - message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.RunAssetDiscoveryResponse.duration: object expected"); + message.duration = $root.google.protobuf.Duration.fromObject(object.duration); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a GroupAssetsResponse message. Also converts values to other types if specified. + * Creates a plain object from a RunAssetDiscoveryResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsResponse + * @memberof google.cloud.securitycenter.v1beta1.RunAssetDiscoveryResponse * @static - * @param {google.cloud.securitycenter.v1beta1.GroupAssetsResponse} message GroupAssetsResponse + * @param {google.cloud.securitycenter.v1beta1.RunAssetDiscoveryResponse} message RunAssetDiscoveryResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GroupAssetsResponse.toObject = function toObject(message, options) { + RunAssetDiscoveryResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.groupByResults = []; if (options.defaults) { - object.readTime = null; - object.nextPageToken = ""; - } - if (message.groupByResults && message.groupByResults.length) { - object.groupByResults = []; - for (var j = 0; j < message.groupByResults.length; ++j) - object.groupByResults[j] = $root.google.cloud.securitycenter.v1beta1.GroupResult.toObject(message.groupByResults[j], options); + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.duration = null; } - if (message.readTime != null && message.hasOwnProperty("readTime")) - object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.securitycenter.v1beta1.RunAssetDiscoveryResponse.State[message.state] : message.state; + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); return object; }; /** - * Converts this GroupAssetsResponse to JSON. + * Converts this RunAssetDiscoveryResponse to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsResponse + * @memberof google.cloud.securitycenter.v1beta1.RunAssetDiscoveryResponse * @instance * @returns {Object.} JSON object */ - GroupAssetsResponse.prototype.toJSON = function toJSON() { + RunAssetDiscoveryResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GroupAssetsResponse; + /** + * State enum. + * @name google.cloud.securitycenter.v1beta1.RunAssetDiscoveryResponse.State + * @enum {string} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} COMPLETED=1 COMPLETED value + * @property {number} SUPERSEDED=2 SUPERSEDED value + * @property {number} TERMINATED=3 TERMINATED value + */ + RunAssetDiscoveryResponse.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "COMPLETED"] = 1; + values[valuesById[2] = "SUPERSEDED"] = 2; + values[valuesById[3] = "TERMINATED"] = 3; + return values; + })(); + + return RunAssetDiscoveryResponse; })(); - v1beta1.GroupFindingsRequest = (function() { + v1beta1.OrganizationSettings = (function() { /** - * Properties of a GroupFindingsRequest. + * Properties of an OrganizationSettings. * @memberof google.cloud.securitycenter.v1beta1 - * @interface IGroupFindingsRequest - * @property {string|null} [parent] GroupFindingsRequest parent - * @property {string|null} [filter] GroupFindingsRequest filter - * @property {string|null} [groupBy] GroupFindingsRequest groupBy - * @property {google.protobuf.ITimestamp|null} [readTime] GroupFindingsRequest readTime - * @property {string|null} [pageToken] GroupFindingsRequest pageToken - * @property {number|null} [pageSize] GroupFindingsRequest pageSize + * @interface IOrganizationSettings + * @property {string|null} [name] OrganizationSettings name + * @property {boolean|null} [enableAssetDiscovery] OrganizationSettings enableAssetDiscovery + * @property {google.cloud.securitycenter.v1beta1.OrganizationSettings.IAssetDiscoveryConfig|null} [assetDiscoveryConfig] OrganizationSettings assetDiscoveryConfig */ /** - * Constructs a new GroupFindingsRequest. + * Constructs a new OrganizationSettings. * @memberof google.cloud.securitycenter.v1beta1 - * @classdesc Represents a GroupFindingsRequest. - * @implements IGroupFindingsRequest + * @classdesc Represents an OrganizationSettings. + * @implements IOrganizationSettings * @constructor - * @param {google.cloud.securitycenter.v1beta1.IGroupFindingsRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1beta1.IOrganizationSettings=} [properties] Properties to set */ - function GroupFindingsRequest(properties) { + function OrganizationSettings(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11222,140 +11367,101 @@ } /** - * GroupFindingsRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsRequest + * OrganizationSettings name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings * @instance */ - GroupFindingsRequest.prototype.parent = ""; + OrganizationSettings.prototype.name = ""; /** - * GroupFindingsRequest filter. - * @member {string} filter - * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsRequest + * OrganizationSettings enableAssetDiscovery. + * @member {boolean} enableAssetDiscovery + * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings * @instance */ - GroupFindingsRequest.prototype.filter = ""; + OrganizationSettings.prototype.enableAssetDiscovery = false; /** - * GroupFindingsRequest groupBy. - * @member {string} groupBy - * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsRequest + * OrganizationSettings assetDiscoveryConfig. + * @member {google.cloud.securitycenter.v1beta1.OrganizationSettings.IAssetDiscoveryConfig|null|undefined} assetDiscoveryConfig + * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings * @instance */ - GroupFindingsRequest.prototype.groupBy = ""; + OrganizationSettings.prototype.assetDiscoveryConfig = null; /** - * GroupFindingsRequest readTime. - * @member {google.protobuf.ITimestamp|null|undefined} readTime - * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsRequest - * @instance + * Creates a new OrganizationSettings instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings + * @static + * @param {google.cloud.securitycenter.v1beta1.IOrganizationSettings=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1beta1.OrganizationSettings} OrganizationSettings instance */ - GroupFindingsRequest.prototype.readTime = null; + OrganizationSettings.create = function create(properties) { + return new OrganizationSettings(properties); + }; /** - * GroupFindingsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsRequest - * @instance - */ - GroupFindingsRequest.prototype.pageToken = ""; - - /** - * GroupFindingsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsRequest - * @instance - */ - GroupFindingsRequest.prototype.pageSize = 0; - - /** - * Creates a new GroupFindingsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsRequest - * @static - * @param {google.cloud.securitycenter.v1beta1.IGroupFindingsRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1beta1.GroupFindingsRequest} GroupFindingsRequest instance - */ - GroupFindingsRequest.create = function create(properties) { - return new GroupFindingsRequest(properties); - }; - - /** - * Encodes the specified GroupFindingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupFindingsRequest.verify|verify} messages. + * Encodes the specified OrganizationSettings message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.OrganizationSettings.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsRequest + * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings * @static - * @param {google.cloud.securitycenter.v1beta1.IGroupFindingsRequest} message GroupFindingsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.IOrganizationSettings} message OrganizationSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GroupFindingsRequest.encode = function encode(message, writer) { + OrganizationSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.groupBy != null && message.hasOwnProperty("groupBy")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.groupBy); - if (message.readTime != null && message.hasOwnProperty("readTime")) - $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.pageToken); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.pageSize); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.enableAssetDiscovery != null && message.hasOwnProperty("enableAssetDiscovery")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enableAssetDiscovery); + if (message.assetDiscoveryConfig != null && message.hasOwnProperty("assetDiscoveryConfig")) + $root.google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig.encode(message.assetDiscoveryConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified GroupFindingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupFindingsRequest.verify|verify} messages. + * Encodes the specified OrganizationSettings message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.OrganizationSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsRequest + * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings * @static - * @param {google.cloud.securitycenter.v1beta1.IGroupFindingsRequest} message GroupFindingsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.IOrganizationSettings} message OrganizationSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GroupFindingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + OrganizationSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GroupFindingsRequest message from the specified reader or buffer. + * Decodes an OrganizationSettings message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsRequest + * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1beta1.GroupFindingsRequest} GroupFindingsRequest + * @returns {google.cloud.securitycenter.v1beta1.OrganizationSettings} OrganizationSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GroupFindingsRequest.decode = function decode(reader, length) { + OrganizationSettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.GroupFindingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.OrganizationSettings(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.name = reader.string(); break; case 2: - message.filter = reader.string(); + message.enableAssetDiscovery = reader.bool(); break; case 3: - message.groupBy = reader.string(); - break; - case 4: - message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.pageToken = reader.string(); - break; - case 6: - message.pageSize = reader.int32(); + message.assetDiscoveryConfig = $root.google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -11366,1275 +11472,1111 @@ }; /** - * Decodes a GroupFindingsRequest message from the specified reader or buffer, length delimited. + * Decodes an OrganizationSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsRequest + * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1beta1.GroupFindingsRequest} GroupFindingsRequest + * @returns {google.cloud.securitycenter.v1beta1.OrganizationSettings} OrganizationSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GroupFindingsRequest.decodeDelimited = function decodeDelimited(reader) { + OrganizationSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GroupFindingsRequest message. + * Verifies an OrganizationSettings message. * @function verify - * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsRequest + * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GroupFindingsRequest.verify = function verify(message) { + OrganizationSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.groupBy != null && message.hasOwnProperty("groupBy")) - if (!$util.isString(message.groupBy)) - return "groupBy: string expected"; - if (message.readTime != null && message.hasOwnProperty("readTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.readTime); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.enableAssetDiscovery != null && message.hasOwnProperty("enableAssetDiscovery")) + if (typeof message.enableAssetDiscovery !== "boolean") + return "enableAssetDiscovery: boolean expected"; + if (message.assetDiscoveryConfig != null && message.hasOwnProperty("assetDiscoveryConfig")) { + var error = $root.google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig.verify(message.assetDiscoveryConfig); if (error) - return "readTime." + error; + return "assetDiscoveryConfig." + error; } - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; return null; }; /** - * Creates a GroupFindingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an OrganizationSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsRequest + * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1beta1.GroupFindingsRequest} GroupFindingsRequest + * @returns {google.cloud.securitycenter.v1beta1.OrganizationSettings} OrganizationSettings */ - GroupFindingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1beta1.GroupFindingsRequest) + OrganizationSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1beta1.OrganizationSettings) return object; - var message = new $root.google.cloud.securitycenter.v1beta1.GroupFindingsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.filter != null) - message.filter = String(object.filter); - if (object.groupBy != null) - message.groupBy = String(object.groupBy); - if (object.readTime != null) { - if (typeof object.readTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.GroupFindingsRequest.readTime: object expected"); - message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); + var message = new $root.google.cloud.securitycenter.v1beta1.OrganizationSettings(); + if (object.name != null) + message.name = String(object.name); + if (object.enableAssetDiscovery != null) + message.enableAssetDiscovery = Boolean(object.enableAssetDiscovery); + if (object.assetDiscoveryConfig != null) { + if (typeof object.assetDiscoveryConfig !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.OrganizationSettings.assetDiscoveryConfig: object expected"); + message.assetDiscoveryConfig = $root.google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig.fromObject(object.assetDiscoveryConfig); } - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; return message; }; /** - * Creates a plain object from a GroupFindingsRequest message. Also converts values to other types if specified. + * Creates a plain object from an OrganizationSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsRequest + * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings * @static - * @param {google.cloud.securitycenter.v1beta1.GroupFindingsRequest} message GroupFindingsRequest + * @param {google.cloud.securitycenter.v1beta1.OrganizationSettings} message OrganizationSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GroupFindingsRequest.toObject = function toObject(message, options) { + OrganizationSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.filter = ""; - object.groupBy = ""; - object.readTime = null; - object.pageToken = ""; - object.pageSize = 0; + object.name = ""; + object.enableAssetDiscovery = false; + object.assetDiscoveryConfig = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.groupBy != null && message.hasOwnProperty("groupBy")) - object.groupBy = message.groupBy; - if (message.readTime != null && message.hasOwnProperty("readTime")) - object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.enableAssetDiscovery != null && message.hasOwnProperty("enableAssetDiscovery")) + object.enableAssetDiscovery = message.enableAssetDiscovery; + if (message.assetDiscoveryConfig != null && message.hasOwnProperty("assetDiscoveryConfig")) + object.assetDiscoveryConfig = $root.google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig.toObject(message.assetDiscoveryConfig, options); return object; }; /** - * Converts this GroupFindingsRequest to JSON. + * Converts this OrganizationSettings to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsRequest + * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings * @instance * @returns {Object.} JSON object */ - GroupFindingsRequest.prototype.toJSON = function toJSON() { + OrganizationSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GroupFindingsRequest; - })(); + OrganizationSettings.AssetDiscoveryConfig = (function() { - v1beta1.GroupFindingsResponse = (function() { + /** + * Properties of an AssetDiscoveryConfig. + * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings + * @interface IAssetDiscoveryConfig + * @property {Array.|null} [projectIds] AssetDiscoveryConfig projectIds + * @property {google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode|null} [inclusionMode] AssetDiscoveryConfig inclusionMode + */ - /** - * Properties of a GroupFindingsResponse. - * @memberof google.cloud.securitycenter.v1beta1 - * @interface IGroupFindingsResponse - * @property {Array.|null} [groupByResults] GroupFindingsResponse groupByResults - * @property {google.protobuf.ITimestamp|null} [readTime] GroupFindingsResponse readTime - * @property {string|null} [nextPageToken] GroupFindingsResponse nextPageToken - */ + /** + * Constructs a new AssetDiscoveryConfig. + * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings + * @classdesc Represents an AssetDiscoveryConfig. + * @implements IAssetDiscoveryConfig + * @constructor + * @param {google.cloud.securitycenter.v1beta1.OrganizationSettings.IAssetDiscoveryConfig=} [properties] Properties to set + */ + function AssetDiscoveryConfig(properties) { + this.projectIds = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new GroupFindingsResponse. - * @memberof google.cloud.securitycenter.v1beta1 - * @classdesc Represents a GroupFindingsResponse. - * @implements IGroupFindingsResponse - * @constructor - * @param {google.cloud.securitycenter.v1beta1.IGroupFindingsResponse=} [properties] Properties to set - */ - function GroupFindingsResponse(properties) { - this.groupByResults = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * AssetDiscoveryConfig projectIds. + * @member {Array.} projectIds + * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig + * @instance + */ + AssetDiscoveryConfig.prototype.projectIds = $util.emptyArray; - /** - * GroupFindingsResponse groupByResults. - * @member {Array.} groupByResults - * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsResponse - * @instance - */ - GroupFindingsResponse.prototype.groupByResults = $util.emptyArray; + /** + * AssetDiscoveryConfig inclusionMode. + * @member {google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode} inclusionMode + * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig + * @instance + */ + AssetDiscoveryConfig.prototype.inclusionMode = 0; - /** - * GroupFindingsResponse readTime. - * @member {google.protobuf.ITimestamp|null|undefined} readTime - * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsResponse - * @instance - */ - GroupFindingsResponse.prototype.readTime = null; + /** + * Creates a new AssetDiscoveryConfig instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig + * @static + * @param {google.cloud.securitycenter.v1beta1.OrganizationSettings.IAssetDiscoveryConfig=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig} AssetDiscoveryConfig instance + */ + AssetDiscoveryConfig.create = function create(properties) { + return new AssetDiscoveryConfig(properties); + }; - /** - * GroupFindingsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsResponse - * @instance - */ - GroupFindingsResponse.prototype.nextPageToken = ""; + /** + * Encodes the specified AssetDiscoveryConfig message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig + * @static + * @param {google.cloud.securitycenter.v1beta1.OrganizationSettings.IAssetDiscoveryConfig} message AssetDiscoveryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AssetDiscoveryConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectIds != null && message.projectIds.length) + for (var i = 0; i < message.projectIds.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectIds[i]); + if (message.inclusionMode != null && message.hasOwnProperty("inclusionMode")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.inclusionMode); + return writer; + }; - /** - * Creates a new GroupFindingsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsResponse - * @static - * @param {google.cloud.securitycenter.v1beta1.IGroupFindingsResponse=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1beta1.GroupFindingsResponse} GroupFindingsResponse instance - */ - GroupFindingsResponse.create = function create(properties) { - return new GroupFindingsResponse(properties); - }; + /** + * Encodes the specified AssetDiscoveryConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig + * @static + * @param {google.cloud.securitycenter.v1beta1.OrganizationSettings.IAssetDiscoveryConfig} message AssetDiscoveryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AssetDiscoveryConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified GroupFindingsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupFindingsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsResponse - * @static - * @param {google.cloud.securitycenter.v1beta1.IGroupFindingsResponse} message GroupFindingsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GroupFindingsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.groupByResults != null && message.groupByResults.length) - for (var i = 0; i < message.groupByResults.length; ++i) - $root.google.cloud.securitycenter.v1beta1.GroupResult.encode(message.groupByResults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.readTime != null && message.hasOwnProperty("readTime")) - $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nextPageToken); - return writer; - }; + /** + * Decodes an AssetDiscoveryConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig} AssetDiscoveryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AssetDiscoveryConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.projectIds && message.projectIds.length)) + message.projectIds = []; + message.projectIds.push(reader.string()); + break; + case 2: + message.inclusionMode = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified GroupFindingsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupFindingsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsResponse - * @static - * @param {google.cloud.securitycenter.v1beta1.IGroupFindingsResponse} message GroupFindingsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GroupFindingsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes an AssetDiscoveryConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig} AssetDiscoveryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AssetDiscoveryConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes a GroupFindingsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1beta1.GroupFindingsResponse} GroupFindingsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GroupFindingsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.GroupFindingsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + /** + * Verifies an AssetDiscoveryConfig message. + * @function verify + * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AssetDiscoveryConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectIds != null && message.hasOwnProperty("projectIds")) { + if (!Array.isArray(message.projectIds)) + return "projectIds: array expected"; + for (var i = 0; i < message.projectIds.length; ++i) + if (!$util.isString(message.projectIds[i])) + return "projectIds: string[] expected"; + } + if (message.inclusionMode != null && message.hasOwnProperty("inclusionMode")) + switch (message.inclusionMode) { + default: + return "inclusionMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an AssetDiscoveryConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig} AssetDiscoveryConfig + */ + AssetDiscoveryConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig) + return object; + var message = new $root.google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig(); + if (object.projectIds) { + if (!Array.isArray(object.projectIds)) + throw TypeError(".google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig.projectIds: array expected"); + message.projectIds = []; + for (var i = 0; i < object.projectIds.length; ++i) + message.projectIds[i] = String(object.projectIds[i]); + } + switch (object.inclusionMode) { + case "INCLUSION_MODE_UNSPECIFIED": + case 0: + message.inclusionMode = 0; + break; + case "INCLUDE_ONLY": case 1: - if (!(message.groupByResults && message.groupByResults.length)) - message.groupByResults = []; - message.groupByResults.push($root.google.cloud.securitycenter.v1beta1.GroupResult.decode(reader, reader.uint32())); + message.inclusionMode = 1; break; + case "EXCLUDE": case 2: - message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 3: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); + message.inclusionMode = 2; break; } - } - return message; - }; + return message; + }; - /** - * Decodes a GroupFindingsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1beta1.GroupFindingsResponse} GroupFindingsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GroupFindingsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a plain object from an AssetDiscoveryConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig + * @static + * @param {google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig} message AssetDiscoveryConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AssetDiscoveryConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.projectIds = []; + if (options.defaults) + object.inclusionMode = options.enums === String ? "INCLUSION_MODE_UNSPECIFIED" : 0; + if (message.projectIds && message.projectIds.length) { + object.projectIds = []; + for (var j = 0; j < message.projectIds.length; ++j) + object.projectIds[j] = message.projectIds[j]; + } + if (message.inclusionMode != null && message.hasOwnProperty("inclusionMode")) + object.inclusionMode = options.enums === String ? $root.google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode[message.inclusionMode] : message.inclusionMode; + return object; + }; + + /** + * Converts this AssetDiscoveryConfig to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig + * @instance + * @returns {Object.} JSON object + */ + AssetDiscoveryConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * InclusionMode enum. + * @name google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode + * @enum {string} + * @property {number} INCLUSION_MODE_UNSPECIFIED=0 INCLUSION_MODE_UNSPECIFIED value + * @property {number} INCLUDE_ONLY=1 INCLUDE_ONLY value + * @property {number} EXCLUDE=2 EXCLUDE value + */ + AssetDiscoveryConfig.InclusionMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INCLUSION_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INCLUDE_ONLY"] = 1; + values[valuesById[2] = "EXCLUDE"] = 2; + return values; + })(); + + return AssetDiscoveryConfig; + })(); + + return OrganizationSettings; + })(); + + v1beta1.SecurityCenter = (function() { /** - * Verifies a GroupFindingsResponse message. - * @function verify - * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Constructs a new SecurityCenter service. + * @memberof google.cloud.securitycenter.v1beta1 + * @classdesc Represents a SecurityCenter + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ - GroupFindingsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.groupByResults != null && message.hasOwnProperty("groupByResults")) { - if (!Array.isArray(message.groupByResults)) - return "groupByResults: array expected"; - for (var i = 0; i < message.groupByResults.length; ++i) { - var error = $root.google.cloud.securitycenter.v1beta1.GroupResult.verify(message.groupByResults[i]); - if (error) - return "groupByResults." + error; - } - } - if (message.readTime != null && message.hasOwnProperty("readTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.readTime); - if (error) - return "readTime." + error; - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + function SecurityCenter(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (SecurityCenter.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = SecurityCenter; /** - * Creates a GroupFindingsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsResponse + * Creates new SecurityCenter service using the specified rpc implementation. + * @function create + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1beta1.GroupFindingsResponse} GroupFindingsResponse + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {SecurityCenter} RPC service. Useful where requests and/or responses are streamed. */ - GroupFindingsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1beta1.GroupFindingsResponse) - return object; - var message = new $root.google.cloud.securitycenter.v1beta1.GroupFindingsResponse(); - if (object.groupByResults) { - if (!Array.isArray(object.groupByResults)) - throw TypeError(".google.cloud.securitycenter.v1beta1.GroupFindingsResponse.groupByResults: array expected"); - message.groupByResults = []; - for (var i = 0; i < object.groupByResults.length; ++i) { - if (typeof object.groupByResults[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.GroupFindingsResponse.groupByResults: object expected"); - message.groupByResults[i] = $root.google.cloud.securitycenter.v1beta1.GroupResult.fromObject(object.groupByResults[i]); - } - } - if (object.readTime != null) { - if (typeof object.readTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.GroupFindingsResponse.readTime: object expected"); - message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; + SecurityCenter.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); }; /** - * Creates a plain object from a GroupFindingsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsResponse - * @static - * @param {google.cloud.securitycenter.v1beta1.GroupFindingsResponse} message GroupFindingsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#createSource}. + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @typedef CreateSourceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1beta1.Source} [response] Source */ - GroupFindingsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.groupByResults = []; - if (options.defaults) { - object.readTime = null; - object.nextPageToken = ""; - } - if (message.groupByResults && message.groupByResults.length) { - object.groupByResults = []; - for (var j = 0; j < message.groupByResults.length; ++j) - object.groupByResults[j] = $root.google.cloud.securitycenter.v1beta1.GroupResult.toObject(message.groupByResults[j], options); - } - if (message.readTime != null && message.hasOwnProperty("readTime")) - object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; /** - * Converts this GroupFindingsResponse to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsResponse + * Calls CreateSource. + * @function createSource + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter * @instance - * @returns {Object.} JSON object + * @param {google.cloud.securitycenter.v1beta1.ICreateSourceRequest} request CreateSourceRequest message or plain object + * @param {google.cloud.securitycenter.v1beta1.SecurityCenter.CreateSourceCallback} callback Node-style callback called with the error, if any, and Source + * @returns {undefined} + * @variation 1 */ - GroupFindingsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GroupFindingsResponse; - })(); - - v1beta1.GroupResult = (function() { + Object.defineProperty(SecurityCenter.prototype.createSource = function createSource(request, callback) { + return this.rpcCall(createSource, $root.google.cloud.securitycenter.v1beta1.CreateSourceRequest, $root.google.cloud.securitycenter.v1beta1.Source, request, callback); + }, "name", { value: "CreateSource" }); /** - * Properties of a GroupResult. - * @memberof google.cloud.securitycenter.v1beta1 - * @interface IGroupResult - * @property {Object.|null} [properties] GroupResult properties - * @property {number|Long|null} [count] GroupResult count + * Calls CreateSource. + * @function createSource + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1beta1.ICreateSourceRequest} request CreateSourceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new GroupResult. - * @memberof google.cloud.securitycenter.v1beta1 - * @classdesc Represents a GroupResult. - * @implements IGroupResult - * @constructor - * @param {google.cloud.securitycenter.v1beta1.IGroupResult=} [properties] Properties to set + * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#createFinding}. + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @typedef CreateFindingCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1beta1.Finding} [response] Finding */ - function GroupResult(properties) { - this.properties = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } /** - * GroupResult properties. - * @member {Object.} properties - * @memberof google.cloud.securitycenter.v1beta1.GroupResult + * Calls CreateFinding. + * @function createFinding + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter * @instance + * @param {google.cloud.securitycenter.v1beta1.ICreateFindingRequest} request CreateFindingRequest message or plain object + * @param {google.cloud.securitycenter.v1beta1.SecurityCenter.CreateFindingCallback} callback Node-style callback called with the error, if any, and Finding + * @returns {undefined} + * @variation 1 */ - GroupResult.prototype.properties = $util.emptyObject; + Object.defineProperty(SecurityCenter.prototype.createFinding = function createFinding(request, callback) { + return this.rpcCall(createFinding, $root.google.cloud.securitycenter.v1beta1.CreateFindingRequest, $root.google.cloud.securitycenter.v1beta1.Finding, request, callback); + }, "name", { value: "CreateFinding" }); /** - * GroupResult count. - * @member {number|Long} count - * @memberof google.cloud.securitycenter.v1beta1.GroupResult + * Calls CreateFinding. + * @function createFinding + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter * @instance + * @param {google.cloud.securitycenter.v1beta1.ICreateFindingRequest} request CreateFindingRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GroupResult.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new GroupResult instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1beta1.GroupResult - * @static - * @param {google.cloud.securitycenter.v1beta1.IGroupResult=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1beta1.GroupResult} GroupResult instance + * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#getIamPolicy}. + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @typedef GetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy */ - GroupResult.create = function create(properties) { - return new GroupResult(properties); - }; /** - * Encodes the specified GroupResult message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1beta1.GroupResult - * @static - * @param {google.cloud.securitycenter.v1beta1.IGroupResult} message GroupResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @param {google.cloud.securitycenter.v1beta1.SecurityCenter.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 */ - GroupResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.properties != null && message.hasOwnProperty("properties")) - for (var keys = Object.keys(message.properties), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.protobuf.Value.encode(message.properties[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.count != null && message.hasOwnProperty("count")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.count); - return writer; - }; + Object.defineProperty(SecurityCenter.prototype.getIamPolicy = function getIamPolicy(request, callback) { + return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "GetIamPolicy" }); /** - * Encodes the specified GroupResult message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.GroupResult - * @static - * @param {google.cloud.securitycenter.v1beta1.IGroupResult} message GroupResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GroupResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a GroupResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1beta1.GroupResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1beta1.GroupResult} GroupResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#getOrganizationSettings}. + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @typedef GetOrganizationSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1beta1.OrganizationSettings} [response] OrganizationSettings */ - GroupResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.GroupResult(), key; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - reader.skip().pos++; - if (message.properties === $util.emptyObject) - message.properties = {}; - key = reader.string(); - reader.pos++; - message.properties[key] = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - case 2: - message.count = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a GroupResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.GroupResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1beta1.GroupResult} GroupResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetOrganizationSettings. + * @function getOrganizationSettings + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1beta1.IGetOrganizationSettingsRequest} request GetOrganizationSettingsRequest message or plain object + * @param {google.cloud.securitycenter.v1beta1.SecurityCenter.GetOrganizationSettingsCallback} callback Node-style callback called with the error, if any, and OrganizationSettings + * @returns {undefined} + * @variation 1 */ - GroupResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(SecurityCenter.prototype.getOrganizationSettings = function getOrganizationSettings(request, callback) { + return this.rpcCall(getOrganizationSettings, $root.google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest, $root.google.cloud.securitycenter.v1beta1.OrganizationSettings, request, callback); + }, "name", { value: "GetOrganizationSettings" }); /** - * Verifies a GroupResult message. - * @function verify - * @memberof google.cloud.securitycenter.v1beta1.GroupResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls GetOrganizationSettings. + * @function getOrganizationSettings + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1beta1.IGetOrganizationSettingsRequest} request GetOrganizationSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GroupResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.properties != null && message.hasOwnProperty("properties")) { - if (!$util.isObject(message.properties)) - return "properties: object expected"; - var key = Object.keys(message.properties); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.properties[key[i]]); - if (error) - return "properties." + error; - } - } - if (message.count != null && message.hasOwnProperty("count")) - if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) - return "count: integer|Long expected"; - return null; - }; /** - * Creates a GroupResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1beta1.GroupResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1beta1.GroupResult} GroupResult + * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#getSource}. + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @typedef GetSourceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1beta1.Source} [response] Source */ - GroupResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1beta1.GroupResult) - return object; - var message = new $root.google.cloud.securitycenter.v1beta1.GroupResult(); - if (object.properties) { - if (typeof object.properties !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.GroupResult.properties: object expected"); - message.properties = {}; - for (var keys = Object.keys(object.properties), i = 0; i < keys.length; ++i) { - if (typeof object.properties[keys[i]] !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.GroupResult.properties: object expected"); - message.properties[keys[i]] = $root.google.protobuf.Value.fromObject(object.properties[keys[i]]); - } - } - if (object.count != null) - if ($util.Long) - (message.count = $util.Long.fromValue(object.count)).unsigned = false; - else if (typeof object.count === "string") - message.count = parseInt(object.count, 10); - else if (typeof object.count === "number") - message.count = object.count; - else if (typeof object.count === "object") - message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); - return message; - }; /** - * Creates a plain object from a GroupResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1beta1.GroupResult - * @static - * @param {google.cloud.securitycenter.v1beta1.GroupResult} message GroupResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls GetSource. + * @function getSource + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1beta1.IGetSourceRequest} request GetSourceRequest message or plain object + * @param {google.cloud.securitycenter.v1beta1.SecurityCenter.GetSourceCallback} callback Node-style callback called with the error, if any, and Source + * @returns {undefined} + * @variation 1 */ - GroupResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.properties = {}; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.count = options.longs === String ? "0" : 0; - var keys2; - if (message.properties && (keys2 = Object.keys(message.properties)).length) { - object.properties = {}; - for (var j = 0; j < keys2.length; ++j) - object.properties[keys2[j]] = $root.google.protobuf.Value.toObject(message.properties[keys2[j]], options); - } - if (message.count != null && message.hasOwnProperty("count")) - if (typeof message.count === "number") - object.count = options.longs === String ? String(message.count) : message.count; - else - object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; - return object; - }; + Object.defineProperty(SecurityCenter.prototype.getSource = function getSource(request, callback) { + return this.rpcCall(getSource, $root.google.cloud.securitycenter.v1beta1.GetSourceRequest, $root.google.cloud.securitycenter.v1beta1.Source, request, callback); + }, "name", { value: "GetSource" }); /** - * Converts this GroupResult to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1beta1.GroupResult + * Calls GetSource. + * @function getSource + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter * @instance - * @returns {Object.} JSON object + * @param {google.cloud.securitycenter.v1beta1.IGetSourceRequest} request GetSourceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GroupResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GroupResult; - })(); - - v1beta1.ListSourcesRequest = (function() { /** - * Properties of a ListSourcesRequest. - * @memberof google.cloud.securitycenter.v1beta1 - * @interface IListSourcesRequest - * @property {string|null} [parent] ListSourcesRequest parent - * @property {string|null} [pageToken] ListSourcesRequest pageToken - * @property {number|null} [pageSize] ListSourcesRequest pageSize + * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#groupAssets}. + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @typedef GroupAssetsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1beta1.GroupAssetsResponse} [response] GroupAssetsResponse */ /** - * Constructs a new ListSourcesRequest. - * @memberof google.cloud.securitycenter.v1beta1 - * @classdesc Represents a ListSourcesRequest. - * @implements IListSourcesRequest - * @constructor - * @param {google.cloud.securitycenter.v1beta1.IListSourcesRequest=} [properties] Properties to set + * Calls GroupAssets. + * @function groupAssets + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1beta1.IGroupAssetsRequest} request GroupAssetsRequest message or plain object + * @param {google.cloud.securitycenter.v1beta1.SecurityCenter.GroupAssetsCallback} callback Node-style callback called with the error, if any, and GroupAssetsResponse + * @returns {undefined} + * @variation 1 */ - function ListSourcesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Object.defineProperty(SecurityCenter.prototype.groupAssets = function groupAssets(request, callback) { + return this.rpcCall(groupAssets, $root.google.cloud.securitycenter.v1beta1.GroupAssetsRequest, $root.google.cloud.securitycenter.v1beta1.GroupAssetsResponse, request, callback); + }, "name", { value: "GroupAssets" }); /** - * ListSourcesRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycenter.v1beta1.ListSourcesRequest + * Calls GroupAssets. + * @function groupAssets + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter * @instance + * @param {google.cloud.securitycenter.v1beta1.IGroupAssetsRequest} request GroupAssetsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListSourcesRequest.prototype.parent = ""; /** - * ListSourcesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.securitycenter.v1beta1.ListSourcesRequest + * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#groupFindings}. + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @typedef GroupFindingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1beta1.GroupFindingsResponse} [response] GroupFindingsResponse + */ + + /** + * Calls GroupFindings. + * @function groupFindings + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter * @instance + * @param {google.cloud.securitycenter.v1beta1.IGroupFindingsRequest} request GroupFindingsRequest message or plain object + * @param {google.cloud.securitycenter.v1beta1.SecurityCenter.GroupFindingsCallback} callback Node-style callback called with the error, if any, and GroupFindingsResponse + * @returns {undefined} + * @variation 1 */ - ListSourcesRequest.prototype.pageToken = ""; + Object.defineProperty(SecurityCenter.prototype.groupFindings = function groupFindings(request, callback) { + return this.rpcCall(groupFindings, $root.google.cloud.securitycenter.v1beta1.GroupFindingsRequest, $root.google.cloud.securitycenter.v1beta1.GroupFindingsResponse, request, callback); + }, "name", { value: "GroupFindings" }); /** - * ListSourcesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.securitycenter.v1beta1.ListSourcesRequest + * Calls GroupFindings. + * @function groupFindings + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter * @instance + * @param {google.cloud.securitycenter.v1beta1.IGroupFindingsRequest} request GroupFindingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListSourcesRequest.prototype.pageSize = 0; /** - * Creates a new ListSourcesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1beta1.ListSourcesRequest - * @static - * @param {google.cloud.securitycenter.v1beta1.IListSourcesRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1beta1.ListSourcesRequest} ListSourcesRequest instance + * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#listAssets}. + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @typedef ListAssetsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1beta1.ListAssetsResponse} [response] ListAssetsResponse */ - ListSourcesRequest.create = function create(properties) { - return new ListSourcesRequest(properties); - }; /** - * Encodes the specified ListSourcesRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListSourcesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1beta1.ListSourcesRequest - * @static - * @param {google.cloud.securitycenter.v1beta1.IListSourcesRequest} message ListSourcesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ListAssets. + * @function listAssets + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1beta1.IListAssetsRequest} request ListAssetsRequest message or plain object + * @param {google.cloud.securitycenter.v1beta1.SecurityCenter.ListAssetsCallback} callback Node-style callback called with the error, if any, and ListAssetsResponse + * @returns {undefined} + * @variation 1 */ - ListSourcesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.pageSize); - return writer; - }; + Object.defineProperty(SecurityCenter.prototype.listAssets = function listAssets(request, callback) { + return this.rpcCall(listAssets, $root.google.cloud.securitycenter.v1beta1.ListAssetsRequest, $root.google.cloud.securitycenter.v1beta1.ListAssetsResponse, request, callback); + }, "name", { value: "ListAssets" }); /** - * Encodes the specified ListSourcesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListSourcesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.ListSourcesRequest - * @static - * @param {google.cloud.securitycenter.v1beta1.IListSourcesRequest} message ListSourcesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ListAssets. + * @function listAssets + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1beta1.IListAssetsRequest} request ListAssetsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListSourcesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a ListSourcesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1beta1.ListSourcesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1beta1.ListSourcesRequest} ListSourcesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#listFindings}. + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @typedef ListFindingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1beta1.ListFindingsResponse} [response] ListFindingsResponse */ - ListSourcesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.ListSourcesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageToken = reader.string(); - break; - case 7: - message.pageSize = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a ListSourcesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.ListSourcesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1beta1.ListSourcesRequest} ListSourcesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListFindings. + * @function listFindings + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1beta1.IListFindingsRequest} request ListFindingsRequest message or plain object + * @param {google.cloud.securitycenter.v1beta1.SecurityCenter.ListFindingsCallback} callback Node-style callback called with the error, if any, and ListFindingsResponse + * @returns {undefined} + * @variation 1 */ - ListSourcesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(SecurityCenter.prototype.listFindings = function listFindings(request, callback) { + return this.rpcCall(listFindings, $root.google.cloud.securitycenter.v1beta1.ListFindingsRequest, $root.google.cloud.securitycenter.v1beta1.ListFindingsResponse, request, callback); + }, "name", { value: "ListFindings" }); /** - * Verifies a ListSourcesRequest message. - * @function verify - * @memberof google.cloud.securitycenter.v1beta1.ListSourcesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls ListFindings. + * @function listFindings + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1beta1.IListFindingsRequest} request ListFindingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListSourcesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - return null; - }; /** - * Creates a ListSourcesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1beta1.ListSourcesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1beta1.ListSourcesRequest} ListSourcesRequest + * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#listSources}. + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @typedef ListSourcesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1beta1.ListSourcesResponse} [response] ListSourcesResponse */ - ListSourcesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1beta1.ListSourcesRequest) - return object; - var message = new $root.google.cloud.securitycenter.v1beta1.ListSourcesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - return message; - }; /** - * Creates a plain object from a ListSourcesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1beta1.ListSourcesRequest - * @static - * @param {google.cloud.securitycenter.v1beta1.ListSourcesRequest} message ListSourcesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls ListSources. + * @function listSources + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1beta1.IListSourcesRequest} request ListSourcesRequest message or plain object + * @param {google.cloud.securitycenter.v1beta1.SecurityCenter.ListSourcesCallback} callback Node-style callback called with the error, if any, and ListSourcesResponse + * @returns {undefined} + * @variation 1 */ - ListSourcesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageToken = ""; - object.pageSize = 0; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - return object; - }; + Object.defineProperty(SecurityCenter.prototype.listSources = function listSources(request, callback) { + return this.rpcCall(listSources, $root.google.cloud.securitycenter.v1beta1.ListSourcesRequest, $root.google.cloud.securitycenter.v1beta1.ListSourcesResponse, request, callback); + }, "name", { value: "ListSources" }); /** - * Converts this ListSourcesRequest to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1beta1.ListSourcesRequest + * Calls ListSources. + * @function listSources + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter * @instance - * @returns {Object.} JSON object + * @param {google.cloud.securitycenter.v1beta1.IListSourcesRequest} request ListSourcesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListSourcesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - return ListSourcesRequest; - })(); + /** + * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#runAssetDiscovery}. + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @typedef RunAssetDiscoveryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - v1beta1.ListSourcesResponse = (function() { + /** + * Calls RunAssetDiscovery. + * @function runAssetDiscovery + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1beta1.IRunAssetDiscoveryRequest} request RunAssetDiscoveryRequest message or plain object + * @param {google.cloud.securitycenter.v1beta1.SecurityCenter.RunAssetDiscoveryCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.runAssetDiscovery = function runAssetDiscovery(request, callback) { + return this.rpcCall(runAssetDiscovery, $root.google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "RunAssetDiscovery" }); /** - * Properties of a ListSourcesResponse. - * @memberof google.cloud.securitycenter.v1beta1 - * @interface IListSourcesResponse - * @property {Array.|null} [sources] ListSourcesResponse sources - * @property {string|null} [nextPageToken] ListSourcesResponse nextPageToken + * Calls RunAssetDiscovery. + * @function runAssetDiscovery + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1beta1.IRunAssetDiscoveryRequest} request RunAssetDiscoveryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new ListSourcesResponse. - * @memberof google.cloud.securitycenter.v1beta1 - * @classdesc Represents a ListSourcesResponse. - * @implements IListSourcesResponse - * @constructor - * @param {google.cloud.securitycenter.v1beta1.IListSourcesResponse=} [properties] Properties to set + * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#setFindingState}. + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @typedef SetFindingStateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1beta1.Finding} [response] Finding */ - function ListSourcesResponse(properties) { - this.sources = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } /** - * ListSourcesResponse sources. - * @member {Array.} sources - * @memberof google.cloud.securitycenter.v1beta1.ListSourcesResponse + * Calls SetFindingState. + * @function setFindingState + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter * @instance + * @param {google.cloud.securitycenter.v1beta1.ISetFindingStateRequest} request SetFindingStateRequest message or plain object + * @param {google.cloud.securitycenter.v1beta1.SecurityCenter.SetFindingStateCallback} callback Node-style callback called with the error, if any, and Finding + * @returns {undefined} + * @variation 1 */ - ListSourcesResponse.prototype.sources = $util.emptyArray; + Object.defineProperty(SecurityCenter.prototype.setFindingState = function setFindingState(request, callback) { + return this.rpcCall(setFindingState, $root.google.cloud.securitycenter.v1beta1.SetFindingStateRequest, $root.google.cloud.securitycenter.v1beta1.Finding, request, callback); + }, "name", { value: "SetFindingState" }); /** - * ListSourcesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.securitycenter.v1beta1.ListSourcesResponse + * Calls SetFindingState. + * @function setFindingState + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter * @instance + * @param {google.cloud.securitycenter.v1beta1.ISetFindingStateRequest} request SetFindingStateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListSourcesResponse.prototype.nextPageToken = ""; /** - * Creates a new ListSourcesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1beta1.ListSourcesResponse - * @static - * @param {google.cloud.securitycenter.v1beta1.IListSourcesResponse=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1beta1.ListSourcesResponse} ListSourcesResponse instance + * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#setIamPolicy}. + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @typedef SetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy */ - ListSourcesResponse.create = function create(properties) { - return new ListSourcesResponse(properties); - }; /** - * Encodes the specified ListSourcesResponse message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListSourcesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1beta1.ListSourcesResponse - * @static - * @param {google.cloud.securitycenter.v1beta1.IListSourcesResponse} message ListSourcesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @param {google.cloud.securitycenter.v1beta1.SecurityCenter.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 */ - ListSourcesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sources != null && message.sources.length) - for (var i = 0; i < message.sources.length; ++i) - $root.google.cloud.securitycenter.v1beta1.Source.encode(message.sources[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; + Object.defineProperty(SecurityCenter.prototype.setIamPolicy = function setIamPolicy(request, callback) { + return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "SetIamPolicy" }); /** - * Encodes the specified ListSourcesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListSourcesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.ListSourcesResponse - * @static - * @param {google.cloud.securitycenter.v1beta1.IListSourcesResponse} message ListSourcesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListSourcesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a ListSourcesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1beta1.ListSourcesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1beta1.ListSourcesResponse} ListSourcesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#testIamPermissions}. + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @typedef TestIamPermissionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse */ - ListSourcesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.ListSourcesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.sources && message.sources.length)) - message.sources = []; - message.sources.push($root.google.cloud.securitycenter.v1beta1.Source.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a ListSourcesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.ListSourcesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1beta1.ListSourcesResponse} ListSourcesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @param {google.cloud.securitycenter.v1beta1.SecurityCenter.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + * @returns {undefined} + * @variation 1 */ - ListSourcesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(SecurityCenter.prototype.testIamPermissions = function testIamPermissions(request, callback) { + return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); + }, "name", { value: "TestIamPermissions" }); /** - * Verifies a ListSourcesResponse message. - * @function verify - * @memberof google.cloud.securitycenter.v1beta1.ListSourcesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListSourcesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sources != null && message.hasOwnProperty("sources")) { - if (!Array.isArray(message.sources)) - return "sources: array expected"; - for (var i = 0; i < message.sources.length; ++i) { - var error = $root.google.cloud.securitycenter.v1beta1.Source.verify(message.sources[i]); - if (error) - return "sources." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListSourcesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1beta1.ListSourcesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1beta1.ListSourcesResponse} ListSourcesResponse + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListSourcesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1beta1.ListSourcesResponse) - return object; - var message = new $root.google.cloud.securitycenter.v1beta1.ListSourcesResponse(); - if (object.sources) { - if (!Array.isArray(object.sources)) - throw TypeError(".google.cloud.securitycenter.v1beta1.ListSourcesResponse.sources: array expected"); - message.sources = []; - for (var i = 0; i < object.sources.length; ++i) { - if (typeof object.sources[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.ListSourcesResponse.sources: object expected"); - message.sources[i] = $root.google.cloud.securitycenter.v1beta1.Source.fromObject(object.sources[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; /** - * Creates a plain object from a ListSourcesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1beta1.ListSourcesResponse - * @static - * @param {google.cloud.securitycenter.v1beta1.ListSourcesResponse} message ListSourcesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#updateFinding}. + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @typedef UpdateFindingCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1beta1.Finding} [response] Finding */ - ListSourcesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.sources = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.sources && message.sources.length) { - object.sources = []; - for (var j = 0; j < message.sources.length; ++j) - object.sources[j] = $root.google.cloud.securitycenter.v1beta1.Source.toObject(message.sources[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; /** - * Converts this ListSourcesResponse to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1beta1.ListSourcesResponse + * Calls UpdateFinding. + * @function updateFinding + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter * @instance - * @returns {Object.} JSON object + * @param {google.cloud.securitycenter.v1beta1.IUpdateFindingRequest} request UpdateFindingRequest message or plain object + * @param {google.cloud.securitycenter.v1beta1.SecurityCenter.UpdateFindingCallback} callback Node-style callback called with the error, if any, and Finding + * @returns {undefined} + * @variation 1 */ - ListSourcesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ListSourcesResponse; - })(); - - v1beta1.ListAssetsRequest = (function() { + Object.defineProperty(SecurityCenter.prototype.updateFinding = function updateFinding(request, callback) { + return this.rpcCall(updateFinding, $root.google.cloud.securitycenter.v1beta1.UpdateFindingRequest, $root.google.cloud.securitycenter.v1beta1.Finding, request, callback); + }, "name", { value: "UpdateFinding" }); /** - * Properties of a ListAssetsRequest. - * @memberof google.cloud.securitycenter.v1beta1 - * @interface IListAssetsRequest - * @property {string|null} [parent] ListAssetsRequest parent - * @property {string|null} [filter] ListAssetsRequest filter - * @property {string|null} [orderBy] ListAssetsRequest orderBy - * @property {google.protobuf.ITimestamp|null} [readTime] ListAssetsRequest readTime - * @property {google.protobuf.IDuration|null} [compareDuration] ListAssetsRequest compareDuration - * @property {google.protobuf.IFieldMask|null} [fieldMask] ListAssetsRequest fieldMask - * @property {string|null} [pageToken] ListAssetsRequest pageToken - * @property {number|null} [pageSize] ListAssetsRequest pageSize + * Calls UpdateFinding. + * @function updateFinding + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1beta1.IUpdateFindingRequest} request UpdateFindingRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new ListAssetsRequest. - * @memberof google.cloud.securitycenter.v1beta1 - * @classdesc Represents a ListAssetsRequest. - * @implements IListAssetsRequest - * @constructor - * @param {google.cloud.securitycenter.v1beta1.IListAssetsRequest=} [properties] Properties to set + * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#updateOrganizationSettings}. + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @typedef UpdateOrganizationSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1beta1.OrganizationSettings} [response] OrganizationSettings */ - function ListAssetsRequest(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]]; - } /** - * ListAssetsRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsRequest + * Calls UpdateOrganizationSettings. + * @function updateOrganizationSettings + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter * @instance + * @param {google.cloud.securitycenter.v1beta1.IUpdateOrganizationSettingsRequest} request UpdateOrganizationSettingsRequest message or plain object + * @param {google.cloud.securitycenter.v1beta1.SecurityCenter.UpdateOrganizationSettingsCallback} callback Node-style callback called with the error, if any, and OrganizationSettings + * @returns {undefined} + * @variation 1 */ - ListAssetsRequest.prototype.parent = ""; + Object.defineProperty(SecurityCenter.prototype.updateOrganizationSettings = function updateOrganizationSettings(request, callback) { + return this.rpcCall(updateOrganizationSettings, $root.google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest, $root.google.cloud.securitycenter.v1beta1.OrganizationSettings, request, callback); + }, "name", { value: "UpdateOrganizationSettings" }); /** - * ListAssetsRequest filter. - * @member {string} filter - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsRequest + * Calls UpdateOrganizationSettings. + * @function updateOrganizationSettings + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter * @instance + * @param {google.cloud.securitycenter.v1beta1.IUpdateOrganizationSettingsRequest} request UpdateOrganizationSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListAssetsRequest.prototype.filter = ""; /** - * ListAssetsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsRequest - * @instance + * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#updateSource}. + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @typedef UpdateSourceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1beta1.Source} [response] Source */ - ListAssetsRequest.prototype.orderBy = ""; /** - * ListAssetsRequest readTime. - * @member {google.protobuf.ITimestamp|null|undefined} readTime - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsRequest + * Calls UpdateSource. + * @function updateSource + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter * @instance + * @param {google.cloud.securitycenter.v1beta1.IUpdateSourceRequest} request UpdateSourceRequest message or plain object + * @param {google.cloud.securitycenter.v1beta1.SecurityCenter.UpdateSourceCallback} callback Node-style callback called with the error, if any, and Source + * @returns {undefined} + * @variation 1 */ - ListAssetsRequest.prototype.readTime = null; + Object.defineProperty(SecurityCenter.prototype.updateSource = function updateSource(request, callback) { + return this.rpcCall(updateSource, $root.google.cloud.securitycenter.v1beta1.UpdateSourceRequest, $root.google.cloud.securitycenter.v1beta1.Source, request, callback); + }, "name", { value: "UpdateSource" }); /** - * ListAssetsRequest compareDuration. - * @member {google.protobuf.IDuration|null|undefined} compareDuration - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsRequest + * Calls UpdateSource. + * @function updateSource + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter * @instance + * @param {google.cloud.securitycenter.v1beta1.IUpdateSourceRequest} request UpdateSourceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListAssetsRequest.prototype.compareDuration = null; /** - * ListAssetsRequest fieldMask. - * @member {google.protobuf.IFieldMask|null|undefined} fieldMask - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsRequest - * @instance + * Callback as used by {@link google.cloud.securitycenter.v1beta1.SecurityCenter#updateSecurityMarks}. + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter + * @typedef UpdateSecurityMarksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1beta1.SecurityMarks} [response] SecurityMarks */ - ListAssetsRequest.prototype.fieldMask = null; /** - * ListAssetsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsRequest + * Calls UpdateSecurityMarks. + * @function updateSecurityMarks + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter * @instance + * @param {google.cloud.securitycenter.v1beta1.IUpdateSecurityMarksRequest} request UpdateSecurityMarksRequest message or plain object + * @param {google.cloud.securitycenter.v1beta1.SecurityCenter.UpdateSecurityMarksCallback} callback Node-style callback called with the error, if any, and SecurityMarks + * @returns {undefined} + * @variation 1 */ - ListAssetsRequest.prototype.pageToken = ""; + Object.defineProperty(SecurityCenter.prototype.updateSecurityMarks = function updateSecurityMarks(request, callback) { + return this.rpcCall(updateSecurityMarks, $root.google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest, $root.google.cloud.securitycenter.v1beta1.SecurityMarks, request, callback); + }, "name", { value: "UpdateSecurityMarks" }); /** - * ListAssetsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsRequest + * Calls UpdateSecurityMarks. + * @function updateSecurityMarks + * @memberof google.cloud.securitycenter.v1beta1.SecurityCenter * @instance + * @param {google.cloud.securitycenter.v1beta1.IUpdateSecurityMarksRequest} request UpdateSecurityMarksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListAssetsRequest.prototype.pageSize = 0; + + return SecurityCenter; + })(); + + v1beta1.CreateFindingRequest = (function() { /** - * Creates a new ListAssetsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsRequest - * @static - * @param {google.cloud.securitycenter.v1beta1.IListAssetsRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1beta1.ListAssetsRequest} ListAssetsRequest instance + * Properties of a CreateFindingRequest. + * @memberof google.cloud.securitycenter.v1beta1 + * @interface ICreateFindingRequest + * @property {string|null} [parent] CreateFindingRequest parent + * @property {string|null} [findingId] CreateFindingRequest findingId + * @property {google.cloud.securitycenter.v1beta1.IFinding|null} [finding] CreateFindingRequest finding */ - ListAssetsRequest.create = function create(properties) { - return new ListAssetsRequest(properties); - }; /** - * Encodes the specified ListAssetsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListAssetsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsRequest - * @static - * @param {google.cloud.securitycenter.v1beta1.IListAssetsRequest} message ListAssetsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * Constructs a new CreateFindingRequest. + * @memberof google.cloud.securitycenter.v1beta1 + * @classdesc Represents a CreateFindingRequest. + * @implements ICreateFindingRequest + * @constructor + * @param {google.cloud.securitycenter.v1beta1.ICreateFindingRequest=} [properties] Properties to set + */ + function CreateFindingRequest(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]]; + } + + /** + * CreateFindingRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1beta1.CreateFindingRequest + * @instance + */ + CreateFindingRequest.prototype.parent = ""; + + /** + * CreateFindingRequest findingId. + * @member {string} findingId + * @memberof google.cloud.securitycenter.v1beta1.CreateFindingRequest + * @instance + */ + CreateFindingRequest.prototype.findingId = ""; + + /** + * CreateFindingRequest finding. + * @member {google.cloud.securitycenter.v1beta1.IFinding|null|undefined} finding + * @memberof google.cloud.securitycenter.v1beta1.CreateFindingRequest + * @instance + */ + CreateFindingRequest.prototype.finding = null; + + /** + * Creates a new CreateFindingRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1beta1.CreateFindingRequest + * @static + * @param {google.cloud.securitycenter.v1beta1.ICreateFindingRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1beta1.CreateFindingRequest} CreateFindingRequest instance + */ + CreateFindingRequest.create = function create(properties) { + return new CreateFindingRequest(properties); + }; + + /** + * Encodes the specified CreateFindingRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.CreateFindingRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1beta1.CreateFindingRequest + * @static + * @param {google.cloud.securitycenter.v1beta1.ICreateFindingRequest} message CreateFindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAssetsRequest.encode = function encode(message, writer) { + CreateFindingRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && message.hasOwnProperty("parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.orderBy); - if (message.readTime != null && message.hasOwnProperty("readTime")) - $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) - $root.google.protobuf.Duration.encode(message.compareDuration, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) - $root.google.protobuf.FieldMask.encode(message.fieldMask, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.pageToken); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.pageSize); + if (message.findingId != null && message.hasOwnProperty("findingId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.findingId); + if (message.finding != null && message.hasOwnProperty("finding")) + $root.google.cloud.securitycenter.v1beta1.Finding.encode(message.finding, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListAssetsRequest.verify|verify} messages. + * Encodes the specified CreateFindingRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.CreateFindingRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsRequest + * @memberof google.cloud.securitycenter.v1beta1.CreateFindingRequest * @static - * @param {google.cloud.securitycenter.v1beta1.IListAssetsRequest} message ListAssetsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.ICreateFindingRequest} message CreateFindingRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAssetsRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateFindingRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListAssetsRequest message from the specified reader or buffer. + * Decodes a CreateFindingRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsRequest + * @memberof google.cloud.securitycenter.v1beta1.CreateFindingRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1beta1.ListAssetsRequest} ListAssetsRequest + * @returns {google.cloud.securitycenter.v1beta1.CreateFindingRequest} CreateFindingRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAssetsRequest.decode = function decode(reader, length) { + CreateFindingRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.ListAssetsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.CreateFindingRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -12642,25 +12584,10 @@ message.parent = reader.string(); break; case 2: - message.filter = reader.string(); + message.findingId = reader.string(); break; case 3: - message.orderBy = reader.string(); - break; - case 4: - message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.compareDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 7: - message.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 8: - message.pageToken = reader.string(); - break; - case 9: - message.pageSize = reader.int32(); + message.finding = $root.google.cloud.securitycenter.v1beta1.Finding.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -12671,183 +12598,130 @@ }; /** - * Decodes a ListAssetsRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateFindingRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsRequest + * @memberof google.cloud.securitycenter.v1beta1.CreateFindingRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1beta1.ListAssetsRequest} ListAssetsRequest + * @returns {google.cloud.securitycenter.v1beta1.CreateFindingRequest} CreateFindingRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAssetsRequest.decodeDelimited = function decodeDelimited(reader) { + CreateFindingRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListAssetsRequest message. + * Verifies a CreateFindingRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsRequest + * @memberof google.cloud.securitycenter.v1beta1.CreateFindingRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListAssetsRequest.verify = function verify(message) { + CreateFindingRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - if (message.readTime != null && message.hasOwnProperty("readTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.readTime); - if (error) - return "readTime." + error; - } - if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) { - var error = $root.google.protobuf.Duration.verify(message.compareDuration); - if (error) - return "compareDuration." + error; - } - if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.fieldMask); + if (message.findingId != null && message.hasOwnProperty("findingId")) + if (!$util.isString(message.findingId)) + return "findingId: string expected"; + if (message.finding != null && message.hasOwnProperty("finding")) { + var error = $root.google.cloud.securitycenter.v1beta1.Finding.verify(message.finding); if (error) - return "fieldMask." + error; + return "finding." + error; } - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; return null; }; /** - * Creates a ListAssetsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateFindingRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsRequest + * @memberof google.cloud.securitycenter.v1beta1.CreateFindingRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1beta1.ListAssetsRequest} ListAssetsRequest + * @returns {google.cloud.securitycenter.v1beta1.CreateFindingRequest} CreateFindingRequest */ - ListAssetsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1beta1.ListAssetsRequest) + CreateFindingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1beta1.CreateFindingRequest) return object; - var message = new $root.google.cloud.securitycenter.v1beta1.ListAssetsRequest(); + var message = new $root.google.cloud.securitycenter.v1beta1.CreateFindingRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - if (object.readTime != null) { - if (typeof object.readTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.ListAssetsRequest.readTime: object expected"); - message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); - } - if (object.compareDuration != null) { - if (typeof object.compareDuration !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.ListAssetsRequest.compareDuration: object expected"); - message.compareDuration = $root.google.protobuf.Duration.fromObject(object.compareDuration); - } - if (object.fieldMask != null) { - if (typeof object.fieldMask !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.ListAssetsRequest.fieldMask: object expected"); - message.fieldMask = $root.google.protobuf.FieldMask.fromObject(object.fieldMask); + if (object.findingId != null) + message.findingId = String(object.findingId); + if (object.finding != null) { + if (typeof object.finding !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.CreateFindingRequest.finding: object expected"); + message.finding = $root.google.cloud.securitycenter.v1beta1.Finding.fromObject(object.finding); } - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; return message; }; /** - * Creates a plain object from a ListAssetsRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateFindingRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsRequest + * @memberof google.cloud.securitycenter.v1beta1.CreateFindingRequest * @static - * @param {google.cloud.securitycenter.v1beta1.ListAssetsRequest} message ListAssetsRequest + * @param {google.cloud.securitycenter.v1beta1.CreateFindingRequest} message CreateFindingRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListAssetsRequest.toObject = function toObject(message, options) { + CreateFindingRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.filter = ""; - object.orderBy = ""; - object.readTime = null; - object.compareDuration = null; - object.fieldMask = null; - object.pageToken = ""; - object.pageSize = 0; + object.findingId = ""; + object.finding = null; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.readTime != null && message.hasOwnProperty("readTime")) - object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); - if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) - object.compareDuration = $root.google.protobuf.Duration.toObject(message.compareDuration, options); - if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) - object.fieldMask = $root.google.protobuf.FieldMask.toObject(message.fieldMask, options); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; + if (message.findingId != null && message.hasOwnProperty("findingId")) + object.findingId = message.findingId; + if (message.finding != null && message.hasOwnProperty("finding")) + object.finding = $root.google.cloud.securitycenter.v1beta1.Finding.toObject(message.finding, options); return object; }; /** - * Converts this ListAssetsRequest to JSON. + * Converts this CreateFindingRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsRequest + * @memberof google.cloud.securitycenter.v1beta1.CreateFindingRequest * @instance * @returns {Object.} JSON object */ - ListAssetsRequest.prototype.toJSON = function toJSON() { + CreateFindingRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListAssetsRequest; + return CreateFindingRequest; })(); - v1beta1.ListAssetsResponse = (function() { + v1beta1.CreateSourceRequest = (function() { /** - * Properties of a ListAssetsResponse. + * Properties of a CreateSourceRequest. * @memberof google.cloud.securitycenter.v1beta1 - * @interface IListAssetsResponse - * @property {Array.|null} [listAssetsResults] ListAssetsResponse listAssetsResults - * @property {google.protobuf.ITimestamp|null} [readTime] ListAssetsResponse readTime - * @property {string|null} [nextPageToken] ListAssetsResponse nextPageToken - * @property {number|null} [totalSize] ListAssetsResponse totalSize + * @interface ICreateSourceRequest + * @property {string|null} [parent] CreateSourceRequest parent + * @property {google.cloud.securitycenter.v1beta1.ISource|null} [source] CreateSourceRequest source */ /** - * Constructs a new ListAssetsResponse. + * Constructs a new CreateSourceRequest. * @memberof google.cloud.securitycenter.v1beta1 - * @classdesc Represents a ListAssetsResponse. - * @implements IListAssetsResponse + * @classdesc Represents a CreateSourceRequest. + * @implements ICreateSourceRequest * @constructor - * @param {google.cloud.securitycenter.v1beta1.IListAssetsResponse=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1beta1.ICreateSourceRequest=} [properties] Properties to set */ - function ListAssetsResponse(properties) { - this.listAssetsResults = []; + function CreateSourceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12855,117 +12729,88 @@ } /** - * ListAssetsResponse listAssetsResults. - * @member {Array.} listAssetsResults - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse - * @instance - */ - ListAssetsResponse.prototype.listAssetsResults = $util.emptyArray; - - /** - * ListAssetsResponse readTime. - * @member {google.protobuf.ITimestamp|null|undefined} readTime - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse - * @instance - */ - ListAssetsResponse.prototype.readTime = null; - - /** - * ListAssetsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse + * CreateSourceRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1beta1.CreateSourceRequest * @instance */ - ListAssetsResponse.prototype.nextPageToken = ""; + CreateSourceRequest.prototype.parent = ""; /** - * ListAssetsResponse totalSize. - * @member {number} totalSize - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse + * CreateSourceRequest source. + * @member {google.cloud.securitycenter.v1beta1.ISource|null|undefined} source + * @memberof google.cloud.securitycenter.v1beta1.CreateSourceRequest * @instance */ - ListAssetsResponse.prototype.totalSize = 0; + CreateSourceRequest.prototype.source = null; /** - * Creates a new ListAssetsResponse instance using the specified properties. + * Creates a new CreateSourceRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse + * @memberof google.cloud.securitycenter.v1beta1.CreateSourceRequest * @static - * @param {google.cloud.securitycenter.v1beta1.IListAssetsResponse=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1beta1.ListAssetsResponse} ListAssetsResponse instance + * @param {google.cloud.securitycenter.v1beta1.ICreateSourceRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1beta1.CreateSourceRequest} CreateSourceRequest instance */ - ListAssetsResponse.create = function create(properties) { - return new ListAssetsResponse(properties); + CreateSourceRequest.create = function create(properties) { + return new CreateSourceRequest(properties); }; /** - * Encodes the specified ListAssetsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListAssetsResponse.verify|verify} messages. + * Encodes the specified CreateSourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.CreateSourceRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse + * @memberof google.cloud.securitycenter.v1beta1.CreateSourceRequest * @static - * @param {google.cloud.securitycenter.v1beta1.IListAssetsResponse} message ListAssetsResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.ICreateSourceRequest} message CreateSourceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAssetsResponse.encode = function encode(message, writer) { + CreateSourceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.listAssetsResults != null && message.listAssetsResults.length) - for (var i = 0; i < message.listAssetsResults.length; ++i) - $root.google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult.encode(message.listAssetsResults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.readTime != null && message.hasOwnProperty("readTime")) - $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nextPageToken); - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.totalSize); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.source != null && message.hasOwnProperty("source")) + $root.google.cloud.securitycenter.v1beta1.Source.encode(message.source, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListAssetsResponse.verify|verify} messages. + * Encodes the specified CreateSourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.CreateSourceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse + * @memberof google.cloud.securitycenter.v1beta1.CreateSourceRequest * @static - * @param {google.cloud.securitycenter.v1beta1.IListAssetsResponse} message ListAssetsResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.ICreateSourceRequest} message CreateSourceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAssetsResponse.encodeDelimited = function encodeDelimited(message, writer) { + CreateSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListAssetsResponse message from the specified reader or buffer. + * Decodes a CreateSourceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse + * @memberof google.cloud.securitycenter.v1beta1.CreateSourceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1beta1.ListAssetsResponse} ListAssetsResponse + * @returns {google.cloud.securitycenter.v1beta1.CreateSourceRequest} CreateSourceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAssetsResponse.decode = function decode(reader, length) { + CreateSourceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.ListAssetsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.CreateSourceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.listAssetsResults && message.listAssetsResults.length)) - message.listAssetsResults = []; - message.listAssetsResults.push($root.google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult.decode(reader, reader.uint32())); + message.parent = reader.string(); break; case 2: - message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 3: - message.nextPageToken = reader.string(); - break; - case 4: - message.totalSize = reader.int32(); + message.source = $root.google.cloud.securitycenter.v1beta1.Source.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -12976,424 +12821,121 @@ }; /** - * Decodes a ListAssetsResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateSourceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse + * @memberof google.cloud.securitycenter.v1beta1.CreateSourceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1beta1.ListAssetsResponse} ListAssetsResponse + * @returns {google.cloud.securitycenter.v1beta1.CreateSourceRequest} CreateSourceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAssetsResponse.decodeDelimited = function decodeDelimited(reader) { + CreateSourceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListAssetsResponse message. + * Verifies a CreateSourceRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse + * @memberof google.cloud.securitycenter.v1beta1.CreateSourceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListAssetsResponse.verify = function verify(message) { + CreateSourceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.listAssetsResults != null && message.hasOwnProperty("listAssetsResults")) { - if (!Array.isArray(message.listAssetsResults)) - return "listAssetsResults: array expected"; - for (var i = 0; i < message.listAssetsResults.length; ++i) { - var error = $root.google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult.verify(message.listAssetsResults[i]); - if (error) - return "listAssetsResults." + error; - } - } - if (message.readTime != null && message.hasOwnProperty("readTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.readTime); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.source != null && message.hasOwnProperty("source")) { + var error = $root.google.cloud.securitycenter.v1beta1.Source.verify(message.source); if (error) - return "readTime." + error; + return "source." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - if (!$util.isInteger(message.totalSize)) - return "totalSize: integer expected"; return null; }; /** - * Creates a ListAssetsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateSourceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse + * @memberof google.cloud.securitycenter.v1beta1.CreateSourceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1beta1.ListAssetsResponse} ListAssetsResponse + * @returns {google.cloud.securitycenter.v1beta1.CreateSourceRequest} CreateSourceRequest */ - ListAssetsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1beta1.ListAssetsResponse) + CreateSourceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1beta1.CreateSourceRequest) return object; - var message = new $root.google.cloud.securitycenter.v1beta1.ListAssetsResponse(); - if (object.listAssetsResults) { - if (!Array.isArray(object.listAssetsResults)) - throw TypeError(".google.cloud.securitycenter.v1beta1.ListAssetsResponse.listAssetsResults: array expected"); - message.listAssetsResults = []; - for (var i = 0; i < object.listAssetsResults.length; ++i) { - if (typeof object.listAssetsResults[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.ListAssetsResponse.listAssetsResults: object expected"); - message.listAssetsResults[i] = $root.google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult.fromObject(object.listAssetsResults[i]); - } - } - if (object.readTime != null) { - if (typeof object.readTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.ListAssetsResponse.readTime: object expected"); - message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); + var message = new $root.google.cloud.securitycenter.v1beta1.CreateSourceRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.source != null) { + if (typeof object.source !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.CreateSourceRequest.source: object expected"); + message.source = $root.google.cloud.securitycenter.v1beta1.Source.fromObject(object.source); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.totalSize != null) - message.totalSize = object.totalSize | 0; return message; }; /** - * Creates a plain object from a ListAssetsResponse message. Also converts values to other types if specified. + * Creates a plain object from a CreateSourceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse + * @memberof google.cloud.securitycenter.v1beta1.CreateSourceRequest * @static - * @param {google.cloud.securitycenter.v1beta1.ListAssetsResponse} message ListAssetsResponse + * @param {google.cloud.securitycenter.v1beta1.CreateSourceRequest} message CreateSourceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListAssetsResponse.toObject = function toObject(message, options) { + CreateSourceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.listAssetsResults = []; if (options.defaults) { - object.readTime = null; - object.nextPageToken = ""; - object.totalSize = 0; - } - if (message.listAssetsResults && message.listAssetsResults.length) { - object.listAssetsResults = []; - for (var j = 0; j < message.listAssetsResults.length; ++j) - object.listAssetsResults[j] = $root.google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult.toObject(message.listAssetsResults[j], options); + object.parent = ""; + object.source = null; } - if (message.readTime != null && message.hasOwnProperty("readTime")) - object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - object.totalSize = message.totalSize; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.source != null && message.hasOwnProperty("source")) + object.source = $root.google.cloud.securitycenter.v1beta1.Source.toObject(message.source, options); return object; }; /** - * Converts this ListAssetsResponse to JSON. + * Converts this CreateSourceRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse + * @memberof google.cloud.securitycenter.v1beta1.CreateSourceRequest * @instance * @returns {Object.} JSON object */ - ListAssetsResponse.prototype.toJSON = function toJSON() { + CreateSourceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - ListAssetsResponse.ListAssetsResult = (function() { - - /** - * Properties of a ListAssetsResult. - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse - * @interface IListAssetsResult - * @property {google.cloud.securitycenter.v1beta1.IAsset|null} [asset] ListAssetsResult asset - * @property {google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult.State|null} [state] ListAssetsResult state - */ + return CreateSourceRequest; + })(); - /** - * Constructs a new ListAssetsResult. - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse - * @classdesc Represents a ListAssetsResult. - * @implements IListAssetsResult - * @constructor - * @param {google.cloud.securitycenter.v1beta1.ListAssetsResponse.IListAssetsResult=} [properties] Properties to set - */ - function ListAssetsResult(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + v1beta1.GetOrganizationSettingsRequest = (function() { - /** - * ListAssetsResult asset. - * @member {google.cloud.securitycenter.v1beta1.IAsset|null|undefined} asset - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult - * @instance - */ - ListAssetsResult.prototype.asset = null; - - /** - * ListAssetsResult state. - * @member {google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult.State} state - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult - * @instance - */ - ListAssetsResult.prototype.state = 0; - - /** - * Creates a new ListAssetsResult instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult - * @static - * @param {google.cloud.securitycenter.v1beta1.ListAssetsResponse.IListAssetsResult=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult} ListAssetsResult instance - */ - ListAssetsResult.create = function create(properties) { - return new ListAssetsResult(properties); - }; - - /** - * Encodes the specified ListAssetsResult message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult - * @static - * @param {google.cloud.securitycenter.v1beta1.ListAssetsResponse.IListAssetsResult} message ListAssetsResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAssetsResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.asset != null && message.hasOwnProperty("asset")) - $root.google.cloud.securitycenter.v1beta1.Asset.encode(message.asset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.state != null && message.hasOwnProperty("state")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); - return writer; - }; - - /** - * Encodes the specified ListAssetsResult message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult - * @static - * @param {google.cloud.securitycenter.v1beta1.ListAssetsResponse.IListAssetsResult} message ListAssetsResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAssetsResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListAssetsResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult} ListAssetsResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAssetsResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.asset = $root.google.cloud.securitycenter.v1beta1.Asset.decode(reader, reader.uint32()); - break; - case 2: - message.state = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListAssetsResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult} ListAssetsResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAssetsResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListAssetsResult message. - * @function verify - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListAssetsResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.asset != null && message.hasOwnProperty("asset")) { - var error = $root.google.cloud.securitycenter.v1beta1.Asset.verify(message.asset); - if (error) - return "asset." + error; - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - return null; - }; - - /** - * Creates a ListAssetsResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult} ListAssetsResult - */ - ListAssetsResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult) - return object; - var message = new $root.google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult(); - if (object.asset != null) { - if (typeof object.asset !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult.asset: object expected"); - message.asset = $root.google.cloud.securitycenter.v1beta1.Asset.fromObject(object.asset); - } - switch (object.state) { - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "UNUSED": - case 1: - message.state = 1; - break; - case "ADDED": - case 2: - message.state = 2; - break; - case "REMOVED": - case 3: - message.state = 3; - break; - case "ACTIVE": - case 4: - message.state = 4; - break; - } - return message; - }; - - /** - * Creates a plain object from a ListAssetsResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult - * @static - * @param {google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult} message ListAssetsResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListAssetsResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.asset = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - } - if (message.asset != null && message.hasOwnProperty("asset")) - object.asset = $root.google.cloud.securitycenter.v1beta1.Asset.toObject(message.asset, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult.State[message.state] : message.state; - return object; - }; - - /** - * Converts this ListAssetsResult to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult - * @instance - * @returns {Object.} JSON object - */ - ListAssetsResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * State enum. - * @name google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult.State - * @enum {string} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} UNUSED=1 UNUSED value - * @property {number} ADDED=2 ADDED value - * @property {number} REMOVED=3 REMOVED value - * @property {number} ACTIVE=4 ACTIVE value - */ - ListAssetsResult.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "UNUSED"] = 1; - values[valuesById[2] = "ADDED"] = 2; - values[valuesById[3] = "REMOVED"] = 3; - values[valuesById[4] = "ACTIVE"] = 4; - return values; - })(); - - return ListAssetsResult; - })(); - - return ListAssetsResponse; - })(); - - v1beta1.ListFindingsRequest = (function() { - - /** - * Properties of a ListFindingsRequest. - * @memberof google.cloud.securitycenter.v1beta1 - * @interface IListFindingsRequest - * @property {string|null} [parent] ListFindingsRequest parent - * @property {string|null} [filter] ListFindingsRequest filter - * @property {string|null} [orderBy] ListFindingsRequest orderBy - * @property {google.protobuf.ITimestamp|null} [readTime] ListFindingsRequest readTime - * @property {google.protobuf.IFieldMask|null} [fieldMask] ListFindingsRequest fieldMask - * @property {string|null} [pageToken] ListFindingsRequest pageToken - * @property {number|null} [pageSize] ListFindingsRequest pageSize - */ + /** + * Properties of a GetOrganizationSettingsRequest. + * @memberof google.cloud.securitycenter.v1beta1 + * @interface IGetOrganizationSettingsRequest + * @property {string|null} [name] GetOrganizationSettingsRequest name + */ /** - * Constructs a new ListFindingsRequest. + * Constructs a new GetOrganizationSettingsRequest. * @memberof google.cloud.securitycenter.v1beta1 - * @classdesc Represents a ListFindingsRequest. - * @implements IListFindingsRequest + * @classdesc Represents a GetOrganizationSettingsRequest. + * @implements IGetOrganizationSettingsRequest * @constructor - * @param {google.cloud.securitycenter.v1beta1.IListFindingsRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1beta1.IGetOrganizationSettingsRequest=} [properties] Properties to set */ - function ListFindingsRequest(properties) { + function GetOrganizationSettingsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13401,153 +12943,75 @@ } /** - * ListFindingsRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycenter.v1beta1.ListFindingsRequest - * @instance - */ - ListFindingsRequest.prototype.parent = ""; - - /** - * ListFindingsRequest filter. - * @member {string} filter - * @memberof google.cloud.securitycenter.v1beta1.ListFindingsRequest - * @instance - */ - ListFindingsRequest.prototype.filter = ""; - - /** - * ListFindingsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.securitycenter.v1beta1.ListFindingsRequest - * @instance - */ - ListFindingsRequest.prototype.orderBy = ""; - - /** - * ListFindingsRequest readTime. - * @member {google.protobuf.ITimestamp|null|undefined} readTime - * @memberof google.cloud.securitycenter.v1beta1.ListFindingsRequest - * @instance - */ - ListFindingsRequest.prototype.readTime = null; - - /** - * ListFindingsRequest fieldMask. - * @member {google.protobuf.IFieldMask|null|undefined} fieldMask - * @memberof google.cloud.securitycenter.v1beta1.ListFindingsRequest - * @instance - */ - ListFindingsRequest.prototype.fieldMask = null; - - /** - * ListFindingsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.securitycenter.v1beta1.ListFindingsRequest - * @instance - */ - ListFindingsRequest.prototype.pageToken = ""; - - /** - * ListFindingsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.securitycenter.v1beta1.ListFindingsRequest + * GetOrganizationSettingsRequest name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest * @instance */ - ListFindingsRequest.prototype.pageSize = 0; + GetOrganizationSettingsRequest.prototype.name = ""; /** - * Creates a new ListFindingsRequest instance using the specified properties. + * Creates a new GetOrganizationSettingsRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1beta1.ListFindingsRequest + * @memberof google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest * @static - * @param {google.cloud.securitycenter.v1beta1.IListFindingsRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1beta1.ListFindingsRequest} ListFindingsRequest instance + * @param {google.cloud.securitycenter.v1beta1.IGetOrganizationSettingsRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest} GetOrganizationSettingsRequest instance */ - ListFindingsRequest.create = function create(properties) { - return new ListFindingsRequest(properties); + GetOrganizationSettingsRequest.create = function create(properties) { + return new GetOrganizationSettingsRequest(properties); }; /** - * Encodes the specified ListFindingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListFindingsRequest.verify|verify} messages. + * Encodes the specified GetOrganizationSettingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1beta1.ListFindingsRequest + * @memberof google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest * @static - * @param {google.cloud.securitycenter.v1beta1.IListFindingsRequest} message ListFindingsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.IGetOrganizationSettingsRequest} message GetOrganizationSettingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFindingsRequest.encode = function encode(message, writer) { + GetOrganizationSettingsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.orderBy); - if (message.readTime != null && message.hasOwnProperty("readTime")) - $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) - $root.google.protobuf.FieldMask.encode(message.fieldMask, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.pageToken); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.pageSize); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListFindingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListFindingsRequest.verify|verify} messages. + * Encodes the specified GetOrganizationSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.ListFindingsRequest + * @memberof google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest * @static - * @param {google.cloud.securitycenter.v1beta1.IListFindingsRequest} message ListFindingsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.IGetOrganizationSettingsRequest} message GetOrganizationSettingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFindingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetOrganizationSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListFindingsRequest message from the specified reader or buffer. + * Decodes a GetOrganizationSettingsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1beta1.ListFindingsRequest + * @memberof google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1beta1.ListFindingsRequest} ListFindingsRequest + * @returns {google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest} GetOrganizationSettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFindingsRequest.decode = function decode(reader, length) { + GetOrganizationSettingsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.ListFindingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); - break; - case 2: - message.filter = reader.string(); - break; - case 3: - message.orderBy = reader.string(); - break; - case 4: - message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 6: - message.pageToken = reader.string(); - break; - case 7: - message.pageSize = reader.int32(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -13558,170 +13022,107 @@ }; /** - * Decodes a ListFindingsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetOrganizationSettingsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.ListFindingsRequest + * @memberof google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1beta1.ListFindingsRequest} ListFindingsRequest + * @returns {google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest} GetOrganizationSettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFindingsRequest.decodeDelimited = function decodeDelimited(reader) { + GetOrganizationSettingsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListFindingsRequest message. + * Verifies a GetOrganizationSettingsRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1beta1.ListFindingsRequest + * @memberof google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListFindingsRequest.verify = function verify(message) { + GetOrganizationSettingsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - if (message.readTime != null && message.hasOwnProperty("readTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.readTime); - if (error) - return "readTime." + error; - } - if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.fieldMask); - if (error) - return "fieldMask." + error; - } - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListFindingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetOrganizationSettingsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1beta1.ListFindingsRequest + * @memberof google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1beta1.ListFindingsRequest} ListFindingsRequest + * @returns {google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest} GetOrganizationSettingsRequest */ - ListFindingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1beta1.ListFindingsRequest) + GetOrganizationSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest) return object; - var message = new $root.google.cloud.securitycenter.v1beta1.ListFindingsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - if (object.readTime != null) { - if (typeof object.readTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.ListFindingsRequest.readTime: object expected"); - message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); - } - if (object.fieldMask != null) { - if (typeof object.fieldMask !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.ListFindingsRequest.fieldMask: object expected"); - message.fieldMask = $root.google.protobuf.FieldMask.fromObject(object.fieldMask); - } - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; + var message = new $root.google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListFindingsRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetOrganizationSettingsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1beta1.ListFindingsRequest + * @memberof google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest * @static - * @param {google.cloud.securitycenter.v1beta1.ListFindingsRequest} message ListFindingsRequest + * @param {google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest} message GetOrganizationSettingsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListFindingsRequest.toObject = function toObject(message, options) { + GetOrganizationSettingsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.filter = ""; - object.orderBy = ""; - object.readTime = null; - object.fieldMask = null; - object.pageToken = ""; - object.pageSize = 0; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.readTime != null && message.hasOwnProperty("readTime")) - object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); - if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) - object.fieldMask = $root.google.protobuf.FieldMask.toObject(message.fieldMask, options); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListFindingsRequest to JSON. + * Converts this GetOrganizationSettingsRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1beta1.ListFindingsRequest + * @memberof google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest * @instance * @returns {Object.} JSON object */ - ListFindingsRequest.prototype.toJSON = function toJSON() { + GetOrganizationSettingsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListFindingsRequest; + return GetOrganizationSettingsRequest; })(); - v1beta1.ListFindingsResponse = (function() { + v1beta1.GetSourceRequest = (function() { /** - * Properties of a ListFindingsResponse. + * Properties of a GetSourceRequest. * @memberof google.cloud.securitycenter.v1beta1 - * @interface IListFindingsResponse - * @property {Array.|null} [findings] ListFindingsResponse findings - * @property {google.protobuf.ITimestamp|null} [readTime] ListFindingsResponse readTime - * @property {string|null} [nextPageToken] ListFindingsResponse nextPageToken - * @property {number|null} [totalSize] ListFindingsResponse totalSize + * @interface IGetSourceRequest + * @property {string|null} [name] GetSourceRequest name */ /** - * Constructs a new ListFindingsResponse. + * Constructs a new GetSourceRequest. * @memberof google.cloud.securitycenter.v1beta1 - * @classdesc Represents a ListFindingsResponse. - * @implements IListFindingsResponse + * @classdesc Represents a GetSourceRequest. + * @implements IGetSourceRequest * @constructor - * @param {google.cloud.securitycenter.v1beta1.IListFindingsResponse=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1beta1.IGetSourceRequest=} [properties] Properties to set */ - function ListFindingsResponse(properties) { - this.findings = []; + function GetSourceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13729,117 +13130,75 @@ } /** - * ListFindingsResponse findings. - * @member {Array.} findings - * @memberof google.cloud.securitycenter.v1beta1.ListFindingsResponse - * @instance - */ - ListFindingsResponse.prototype.findings = $util.emptyArray; - - /** - * ListFindingsResponse readTime. - * @member {google.protobuf.ITimestamp|null|undefined} readTime - * @memberof google.cloud.securitycenter.v1beta1.ListFindingsResponse - * @instance - */ - ListFindingsResponse.prototype.readTime = null; - - /** - * ListFindingsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.securitycenter.v1beta1.ListFindingsResponse - * @instance - */ - ListFindingsResponse.prototype.nextPageToken = ""; - - /** - * ListFindingsResponse totalSize. - * @member {number} totalSize - * @memberof google.cloud.securitycenter.v1beta1.ListFindingsResponse + * GetSourceRequest name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1beta1.GetSourceRequest * @instance */ - ListFindingsResponse.prototype.totalSize = 0; + GetSourceRequest.prototype.name = ""; /** - * Creates a new ListFindingsResponse instance using the specified properties. + * Creates a new GetSourceRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1beta1.ListFindingsResponse + * @memberof google.cloud.securitycenter.v1beta1.GetSourceRequest * @static - * @param {google.cloud.securitycenter.v1beta1.IListFindingsResponse=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1beta1.ListFindingsResponse} ListFindingsResponse instance + * @param {google.cloud.securitycenter.v1beta1.IGetSourceRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1beta1.GetSourceRequest} GetSourceRequest instance */ - ListFindingsResponse.create = function create(properties) { - return new ListFindingsResponse(properties); + GetSourceRequest.create = function create(properties) { + return new GetSourceRequest(properties); }; /** - * Encodes the specified ListFindingsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListFindingsResponse.verify|verify} messages. + * Encodes the specified GetSourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GetSourceRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1beta1.ListFindingsResponse + * @memberof google.cloud.securitycenter.v1beta1.GetSourceRequest * @static - * @param {google.cloud.securitycenter.v1beta1.IListFindingsResponse} message ListFindingsResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.IGetSourceRequest} message GetSourceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFindingsResponse.encode = function encode(message, writer) { + GetSourceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.findings != null && message.findings.length) - for (var i = 0; i < message.findings.length; ++i) - $root.google.cloud.securitycenter.v1beta1.Finding.encode(message.findings[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.readTime != null && message.hasOwnProperty("readTime")) - $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nextPageToken); - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.totalSize); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListFindingsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListFindingsResponse.verify|verify} messages. + * Encodes the specified GetSourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GetSourceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.ListFindingsResponse + * @memberof google.cloud.securitycenter.v1beta1.GetSourceRequest * @static - * @param {google.cloud.securitycenter.v1beta1.IListFindingsResponse} message ListFindingsResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.IGetSourceRequest} message GetSourceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFindingsResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListFindingsResponse message from the specified reader or buffer. + * Decodes a GetSourceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1beta1.ListFindingsResponse + * @memberof google.cloud.securitycenter.v1beta1.GetSourceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1beta1.ListFindingsResponse} ListFindingsResponse + * @returns {google.cloud.securitycenter.v1beta1.GetSourceRequest} GetSourceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFindingsResponse.decode = function decode(reader, length) { + GetSourceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.ListFindingsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.GetSourceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.findings && message.findings.length)) - message.findings = []; - message.findings.push($root.google.cloud.securitycenter.v1beta1.Finding.decode(reader, reader.uint32())); - break; - case 2: - message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 3: - message.nextPageToken = reader.string(); - break; - case 4: - message.totalSize = reader.int32(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -13850,157 +13209,113 @@ }; /** - * Decodes a ListFindingsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetSourceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.ListFindingsResponse + * @memberof google.cloud.securitycenter.v1beta1.GetSourceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1beta1.ListFindingsResponse} ListFindingsResponse + * @returns {google.cloud.securitycenter.v1beta1.GetSourceRequest} GetSourceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFindingsResponse.decodeDelimited = function decodeDelimited(reader) { + GetSourceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListFindingsResponse message. + * Verifies a GetSourceRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1beta1.ListFindingsResponse + * @memberof google.cloud.securitycenter.v1beta1.GetSourceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListFindingsResponse.verify = function verify(message) { + GetSourceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.findings != null && message.hasOwnProperty("findings")) { - if (!Array.isArray(message.findings)) - return "findings: array expected"; - for (var i = 0; i < message.findings.length; ++i) { - var error = $root.google.cloud.securitycenter.v1beta1.Finding.verify(message.findings[i]); - if (error) - return "findings." + error; - } - } - if (message.readTime != null && message.hasOwnProperty("readTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.readTime); - if (error) - return "readTime." + error; - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - if (!$util.isInteger(message.totalSize)) - return "totalSize: integer expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListFindingsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetSourceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1beta1.ListFindingsResponse + * @memberof google.cloud.securitycenter.v1beta1.GetSourceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1beta1.ListFindingsResponse} ListFindingsResponse + * @returns {google.cloud.securitycenter.v1beta1.GetSourceRequest} GetSourceRequest */ - ListFindingsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1beta1.ListFindingsResponse) + GetSourceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1beta1.GetSourceRequest) return object; - var message = new $root.google.cloud.securitycenter.v1beta1.ListFindingsResponse(); - if (object.findings) { - if (!Array.isArray(object.findings)) - throw TypeError(".google.cloud.securitycenter.v1beta1.ListFindingsResponse.findings: array expected"); - message.findings = []; - for (var i = 0; i < object.findings.length; ++i) { - if (typeof object.findings[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.ListFindingsResponse.findings: object expected"); - message.findings[i] = $root.google.cloud.securitycenter.v1beta1.Finding.fromObject(object.findings[i]); - } - } - if (object.readTime != null) { - if (typeof object.readTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.ListFindingsResponse.readTime: object expected"); - message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.totalSize != null) - message.totalSize = object.totalSize | 0; + var message = new $root.google.cloud.securitycenter.v1beta1.GetSourceRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListFindingsResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetSourceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1beta1.ListFindingsResponse + * @memberof google.cloud.securitycenter.v1beta1.GetSourceRequest * @static - * @param {google.cloud.securitycenter.v1beta1.ListFindingsResponse} message ListFindingsResponse + * @param {google.cloud.securitycenter.v1beta1.GetSourceRequest} message GetSourceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListFindingsResponse.toObject = function toObject(message, options) { + GetSourceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.findings = []; - if (options.defaults) { - object.readTime = null; - object.nextPageToken = ""; - object.totalSize = 0; - } - if (message.findings && message.findings.length) { - object.findings = []; - for (var j = 0; j < message.findings.length; ++j) - object.findings[j] = $root.google.cloud.securitycenter.v1beta1.Finding.toObject(message.findings[j], options); - } - if (message.readTime != null && message.hasOwnProperty("readTime")) - object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - object.totalSize = message.totalSize; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListFindingsResponse to JSON. + * Converts this GetSourceRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1beta1.ListFindingsResponse + * @memberof google.cloud.securitycenter.v1beta1.GetSourceRequest * @instance * @returns {Object.} JSON object */ - ListFindingsResponse.prototype.toJSON = function toJSON() { + GetSourceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListFindingsResponse; + return GetSourceRequest; })(); - v1beta1.SetFindingStateRequest = (function() { + v1beta1.GroupAssetsRequest = (function() { /** - * Properties of a SetFindingStateRequest. + * Properties of a GroupAssetsRequest. * @memberof google.cloud.securitycenter.v1beta1 - * @interface ISetFindingStateRequest - * @property {string|null} [name] SetFindingStateRequest name - * @property {google.cloud.securitycenter.v1beta1.Finding.State|null} [state] SetFindingStateRequest state - * @property {google.protobuf.ITimestamp|null} [startTime] SetFindingStateRequest startTime + * @interface IGroupAssetsRequest + * @property {string|null} [parent] GroupAssetsRequest parent + * @property {string|null} [filter] GroupAssetsRequest filter + * @property {string|null} [groupBy] GroupAssetsRequest groupBy + * @property {google.protobuf.IDuration|null} [compareDuration] GroupAssetsRequest compareDuration + * @property {google.protobuf.ITimestamp|null} [readTime] GroupAssetsRequest readTime + * @property {string|null} [pageToken] GroupAssetsRequest pageToken + * @property {number|null} [pageSize] GroupAssetsRequest pageSize */ /** - * Constructs a new SetFindingStateRequest. + * Constructs a new GroupAssetsRequest. * @memberof google.cloud.securitycenter.v1beta1 - * @classdesc Represents a SetFindingStateRequest. - * @implements ISetFindingStateRequest + * @classdesc Represents a GroupAssetsRequest. + * @implements IGroupAssetsRequest * @constructor - * @param {google.cloud.securitycenter.v1beta1.ISetFindingStateRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1beta1.IGroupAssetsRequest=} [properties] Properties to set */ - function SetFindingStateRequest(properties) { + function GroupAssetsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14008,101 +13323,153 @@ } /** - * SetFindingStateRequest name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1beta1.SetFindingStateRequest + * GroupAssetsRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsRequest * @instance */ - SetFindingStateRequest.prototype.name = ""; + GroupAssetsRequest.prototype.parent = ""; /** - * SetFindingStateRequest state. - * @member {google.cloud.securitycenter.v1beta1.Finding.State} state - * @memberof google.cloud.securitycenter.v1beta1.SetFindingStateRequest + * GroupAssetsRequest filter. + * @member {string} filter + * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsRequest * @instance */ - SetFindingStateRequest.prototype.state = 0; + GroupAssetsRequest.prototype.filter = ""; /** - * SetFindingStateRequest startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.securitycenter.v1beta1.SetFindingStateRequest + * GroupAssetsRequest groupBy. + * @member {string} groupBy + * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsRequest * @instance */ - SetFindingStateRequest.prototype.startTime = null; + GroupAssetsRequest.prototype.groupBy = ""; /** - * Creates a new SetFindingStateRequest instance using the specified properties. + * GroupAssetsRequest compareDuration. + * @member {google.protobuf.IDuration|null|undefined} compareDuration + * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsRequest + * @instance + */ + GroupAssetsRequest.prototype.compareDuration = null; + + /** + * GroupAssetsRequest readTime. + * @member {google.protobuf.ITimestamp|null|undefined} readTime + * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsRequest + * @instance + */ + GroupAssetsRequest.prototype.readTime = null; + + /** + * GroupAssetsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsRequest + * @instance + */ + GroupAssetsRequest.prototype.pageToken = ""; + + /** + * GroupAssetsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsRequest + * @instance + */ + GroupAssetsRequest.prototype.pageSize = 0; + + /** + * Creates a new GroupAssetsRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1beta1.SetFindingStateRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsRequest * @static - * @param {google.cloud.securitycenter.v1beta1.ISetFindingStateRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1beta1.SetFindingStateRequest} SetFindingStateRequest instance + * @param {google.cloud.securitycenter.v1beta1.IGroupAssetsRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1beta1.GroupAssetsRequest} GroupAssetsRequest instance */ - SetFindingStateRequest.create = function create(properties) { - return new SetFindingStateRequest(properties); + GroupAssetsRequest.create = function create(properties) { + return new GroupAssetsRequest(properties); }; /** - * Encodes the specified SetFindingStateRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.SetFindingStateRequest.verify|verify} messages. + * Encodes the specified GroupAssetsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupAssetsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1beta1.SetFindingStateRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsRequest * @static - * @param {google.cloud.securitycenter.v1beta1.ISetFindingStateRequest} message SetFindingStateRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.IGroupAssetsRequest} message GroupAssetsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetFindingStateRequest.encode = function encode(message, writer) { + GroupAssetsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.state != null && message.hasOwnProperty("state")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); - if (message.startTime != null && message.hasOwnProperty("startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.groupBy != null && message.hasOwnProperty("groupBy")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.groupBy); + if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) + $root.google.protobuf.Duration.encode(message.compareDuration, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.readTime != null && message.hasOwnProperty("readTime")) + $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.pageToken); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.pageSize); return writer; }; /** - * Encodes the specified SetFindingStateRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.SetFindingStateRequest.verify|verify} messages. + * Encodes the specified GroupAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupAssetsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.SetFindingStateRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsRequest * @static - * @param {google.cloud.securitycenter.v1beta1.ISetFindingStateRequest} message SetFindingStateRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.IGroupAssetsRequest} message GroupAssetsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetFindingStateRequest.encodeDelimited = function encodeDelimited(message, writer) { + GroupAssetsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SetFindingStateRequest message from the specified reader or buffer. + * Decodes a GroupAssetsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1beta1.SetFindingStateRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1beta1.SetFindingStateRequest} SetFindingStateRequest + * @returns {google.cloud.securitycenter.v1beta1.GroupAssetsRequest} GroupAssetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetFindingStateRequest.decode = function decode(reader, length) { + GroupAssetsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.SetFindingStateRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.GroupAssetsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.parent = reader.string(); break; case 2: - message.state = reader.int32(); + message.filter = reader.string(); break; case 3: - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.groupBy = reader.string(); + break; + case 4: + message.compareDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 5: + message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 7: + message.pageToken = reader.string(); + break; + case 8: + message.pageSize = reader.int32(); break; default: reader.skipType(tag & 7); @@ -14113,147 +13480,169 @@ }; /** - * Decodes a SetFindingStateRequest message from the specified reader or buffer, length delimited. + * Decodes a GroupAssetsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.SetFindingStateRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1beta1.SetFindingStateRequest} SetFindingStateRequest + * @returns {google.cloud.securitycenter.v1beta1.GroupAssetsRequest} GroupAssetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetFindingStateRequest.decodeDelimited = function decodeDelimited(reader) { + GroupAssetsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SetFindingStateRequest message. + * Verifies a GroupAssetsRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1beta1.SetFindingStateRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SetFindingStateRequest.verify = function verify(message) { + GroupAssetsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.groupBy != null && message.hasOwnProperty("groupBy")) + if (!$util.isString(message.groupBy)) + return "groupBy: string expected"; + if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) { + var error = $root.google.protobuf.Duration.verify(message.compareDuration); if (error) - return "startTime." + error; + return "compareDuration." + error; + } + if (message.readTime != null && message.hasOwnProperty("readTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.readTime); + if (error) + return "readTime." + error; } + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; return null; }; /** - * Creates a SetFindingStateRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GroupAssetsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1beta1.SetFindingStateRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1beta1.SetFindingStateRequest} SetFindingStateRequest + * @returns {google.cloud.securitycenter.v1beta1.GroupAssetsRequest} GroupAssetsRequest */ - SetFindingStateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1beta1.SetFindingStateRequest) + GroupAssetsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1beta1.GroupAssetsRequest) return object; - var message = new $root.google.cloud.securitycenter.v1beta1.SetFindingStateRequest(); - if (object.name != null) - message.name = String(object.name); - switch (object.state) { - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "ACTIVE": - case 1: - message.state = 1; - break; - case "INACTIVE": - case 2: - message.state = 2; - break; + var message = new $root.google.cloud.securitycenter.v1beta1.GroupAssetsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + if (object.groupBy != null) + message.groupBy = String(object.groupBy); + if (object.compareDuration != null) { + if (typeof object.compareDuration !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.GroupAssetsRequest.compareDuration: object expected"); + message.compareDuration = $root.google.protobuf.Duration.fromObject(object.compareDuration); } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.SetFindingStateRequest.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + if (object.readTime != null) { + if (typeof object.readTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.GroupAssetsRequest.readTime: object expected"); + message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); } + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; return message; }; /** - * Creates a plain object from a SetFindingStateRequest message. Also converts values to other types if specified. + * Creates a plain object from a GroupAssetsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1beta1.SetFindingStateRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsRequest * @static - * @param {google.cloud.securitycenter.v1beta1.SetFindingStateRequest} message SetFindingStateRequest + * @param {google.cloud.securitycenter.v1beta1.GroupAssetsRequest} message GroupAssetsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SetFindingStateRequest.toObject = function toObject(message, options) { + GroupAssetsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.startTime = null; + object.parent = ""; + object.filter = ""; + object.groupBy = ""; + object.compareDuration = null; + object.readTime = null; + object.pageToken = ""; + object.pageSize = 0; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.securitycenter.v1beta1.Finding.State[message.state] : message.state; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - return object; - }; - - /** - * Converts this SetFindingStateRequest to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1beta1.SetFindingStateRequest - * @instance - * @returns {Object.} JSON object - */ - SetFindingStateRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.groupBy != null && message.hasOwnProperty("groupBy")) + object.groupBy = message.groupBy; + if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) + object.compareDuration = $root.google.protobuf.Duration.toObject(message.compareDuration, options); + if (message.readTime != null && message.hasOwnProperty("readTime")) + object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + return object; + }; - return SetFindingStateRequest; + /** + * Converts this GroupAssetsRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsRequest + * @instance + * @returns {Object.} JSON object + */ + GroupAssetsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GroupAssetsRequest; })(); - v1beta1.RunAssetDiscoveryRequest = (function() { + v1beta1.GroupAssetsResponse = (function() { /** - * Properties of a RunAssetDiscoveryRequest. + * Properties of a GroupAssetsResponse. * @memberof google.cloud.securitycenter.v1beta1 - * @interface IRunAssetDiscoveryRequest - * @property {string|null} [parent] RunAssetDiscoveryRequest parent + * @interface IGroupAssetsResponse + * @property {Array.|null} [groupByResults] GroupAssetsResponse groupByResults + * @property {google.protobuf.ITimestamp|null} [readTime] GroupAssetsResponse readTime + * @property {string|null} [nextPageToken] GroupAssetsResponse nextPageToken */ /** - * Constructs a new RunAssetDiscoveryRequest. + * Constructs a new GroupAssetsResponse. * @memberof google.cloud.securitycenter.v1beta1 - * @classdesc Represents a RunAssetDiscoveryRequest. - * @implements IRunAssetDiscoveryRequest + * @classdesc Represents a GroupAssetsResponse. + * @implements IGroupAssetsResponse * @constructor - * @param {google.cloud.securitycenter.v1beta1.IRunAssetDiscoveryRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1beta1.IGroupAssetsResponse=} [properties] Properties to set */ - function RunAssetDiscoveryRequest(properties) { + function GroupAssetsResponse(properties) { + this.groupByResults = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14261,75 +13650,104 @@ } /** - * RunAssetDiscoveryRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest + * GroupAssetsResponse groupByResults. + * @member {Array.} groupByResults + * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsResponse * @instance */ - RunAssetDiscoveryRequest.prototype.parent = ""; + GroupAssetsResponse.prototype.groupByResults = $util.emptyArray; /** - * Creates a new RunAssetDiscoveryRequest instance using the specified properties. + * GroupAssetsResponse readTime. + * @member {google.protobuf.ITimestamp|null|undefined} readTime + * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsResponse + * @instance + */ + GroupAssetsResponse.prototype.readTime = null; + + /** + * GroupAssetsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsResponse + * @instance + */ + GroupAssetsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new GroupAssetsResponse instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsResponse * @static - * @param {google.cloud.securitycenter.v1beta1.IRunAssetDiscoveryRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest} RunAssetDiscoveryRequest instance + * @param {google.cloud.securitycenter.v1beta1.IGroupAssetsResponse=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1beta1.GroupAssetsResponse} GroupAssetsResponse instance */ - RunAssetDiscoveryRequest.create = function create(properties) { - return new RunAssetDiscoveryRequest(properties); + GroupAssetsResponse.create = function create(properties) { + return new GroupAssetsResponse(properties); }; /** - * Encodes the specified RunAssetDiscoveryRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest.verify|verify} messages. + * Encodes the specified GroupAssetsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupAssetsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsResponse * @static - * @param {google.cloud.securitycenter.v1beta1.IRunAssetDiscoveryRequest} message RunAssetDiscoveryRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.IGroupAssetsResponse} message GroupAssetsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunAssetDiscoveryRequest.encode = function encode(message, writer) { + GroupAssetsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.groupByResults != null && message.groupByResults.length) + for (var i = 0; i < message.groupByResults.length; ++i) + $root.google.cloud.securitycenter.v1beta1.GroupResult.encode(message.groupByResults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.readTime != null && message.hasOwnProperty("readTime")) + $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nextPageToken); return writer; }; /** - * Encodes the specified RunAssetDiscoveryRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest.verify|verify} messages. + * Encodes the specified GroupAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupAssetsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsResponse * @static - * @param {google.cloud.securitycenter.v1beta1.IRunAssetDiscoveryRequest} message RunAssetDiscoveryRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.IGroupAssetsResponse} message GroupAssetsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunAssetDiscoveryRequest.encodeDelimited = function encodeDelimited(message, writer) { + GroupAssetsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RunAssetDiscoveryRequest message from the specified reader or buffer. + * Decodes a GroupAssetsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest} RunAssetDiscoveryRequest + * @returns {google.cloud.securitycenter.v1beta1.GroupAssetsResponse} GroupAssetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RunAssetDiscoveryRequest.decode = function decode(reader, length) { + GroupAssetsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.GroupAssetsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + if (!(message.groupByResults && message.groupByResults.length)) + message.groupByResults = []; + message.groupByResults.push($root.google.cloud.securitycenter.v1beta1.GroupResult.decode(reader, reader.uint32())); + break; + case 2: + message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -14340,108 +13758,152 @@ }; /** - * Decodes a RunAssetDiscoveryRequest message from the specified reader or buffer, length delimited. + * Decodes a GroupAssetsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest} RunAssetDiscoveryRequest + * @returns {google.cloud.securitycenter.v1beta1.GroupAssetsResponse} GroupAssetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RunAssetDiscoveryRequest.decodeDelimited = function decodeDelimited(reader) { + GroupAssetsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RunAssetDiscoveryRequest message. + * Verifies a GroupAssetsResponse message. * @function verify - * @memberof google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RunAssetDiscoveryRequest.verify = function verify(message) { + GroupAssetsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; + if (message.groupByResults != null && message.hasOwnProperty("groupByResults")) { + if (!Array.isArray(message.groupByResults)) + return "groupByResults: array expected"; + for (var i = 0; i < message.groupByResults.length; ++i) { + var error = $root.google.cloud.securitycenter.v1beta1.GroupResult.verify(message.groupByResults[i]); + if (error) + return "groupByResults." + error; + } + } + if (message.readTime != null && message.hasOwnProperty("readTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.readTime); + if (error) + return "readTime." + error; + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a RunAssetDiscoveryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GroupAssetsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest} RunAssetDiscoveryRequest + * @returns {google.cloud.securitycenter.v1beta1.GroupAssetsResponse} GroupAssetsResponse */ - RunAssetDiscoveryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest) + GroupAssetsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1beta1.GroupAssetsResponse) return object; - var message = new $root.google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest(); - if (object.parent != null) - message.parent = String(object.parent); + var message = new $root.google.cloud.securitycenter.v1beta1.GroupAssetsResponse(); + if (object.groupByResults) { + if (!Array.isArray(object.groupByResults)) + throw TypeError(".google.cloud.securitycenter.v1beta1.GroupAssetsResponse.groupByResults: array expected"); + message.groupByResults = []; + for (var i = 0; i < object.groupByResults.length; ++i) { + if (typeof object.groupByResults[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.GroupAssetsResponse.groupByResults: object expected"); + message.groupByResults[i] = $root.google.cloud.securitycenter.v1beta1.GroupResult.fromObject(object.groupByResults[i]); + } + } + if (object.readTime != null) { + if (typeof object.readTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.GroupAssetsResponse.readTime: object expected"); + message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a RunAssetDiscoveryRequest message. Also converts values to other types if specified. + * Creates a plain object from a GroupAssetsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsResponse * @static - * @param {google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest} message RunAssetDiscoveryRequest + * @param {google.cloud.securitycenter.v1beta1.GroupAssetsResponse} message GroupAssetsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RunAssetDiscoveryRequest.toObject = function toObject(message, options) { + GroupAssetsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.parent = ""; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; + if (options.arrays || options.defaults) + object.groupByResults = []; + if (options.defaults) { + object.readTime = null; + object.nextPageToken = ""; + } + if (message.groupByResults && message.groupByResults.length) { + object.groupByResults = []; + for (var j = 0; j < message.groupByResults.length; ++j) + object.groupByResults[j] = $root.google.cloud.securitycenter.v1beta1.GroupResult.toObject(message.groupByResults[j], options); + } + if (message.readTime != null && message.hasOwnProperty("readTime")) + object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this RunAssetDiscoveryRequest to JSON. + * Converts this GroupAssetsResponse to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupAssetsResponse * @instance * @returns {Object.} JSON object */ - RunAssetDiscoveryRequest.prototype.toJSON = function toJSON() { + GroupAssetsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RunAssetDiscoveryRequest; + return GroupAssetsResponse; })(); - v1beta1.UpdateFindingRequest = (function() { + v1beta1.GroupFindingsRequest = (function() { /** - * Properties of an UpdateFindingRequest. + * Properties of a GroupFindingsRequest. * @memberof google.cloud.securitycenter.v1beta1 - * @interface IUpdateFindingRequest - * @property {google.cloud.securitycenter.v1beta1.IFinding|null} [finding] UpdateFindingRequest finding - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateFindingRequest updateMask + * @interface IGroupFindingsRequest + * @property {string|null} [parent] GroupFindingsRequest parent + * @property {string|null} [filter] GroupFindingsRequest filter + * @property {string|null} [groupBy] GroupFindingsRequest groupBy + * @property {google.protobuf.ITimestamp|null} [readTime] GroupFindingsRequest readTime + * @property {string|null} [pageToken] GroupFindingsRequest pageToken + * @property {number|null} [pageSize] GroupFindingsRequest pageSize */ /** - * Constructs a new UpdateFindingRequest. + * Constructs a new GroupFindingsRequest. * @memberof google.cloud.securitycenter.v1beta1 - * @classdesc Represents an UpdateFindingRequest. - * @implements IUpdateFindingRequest + * @classdesc Represents a GroupFindingsRequest. + * @implements IGroupFindingsRequest * @constructor - * @param {google.cloud.securitycenter.v1beta1.IUpdateFindingRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1beta1.IGroupFindingsRequest=} [properties] Properties to set */ - function UpdateFindingRequest(properties) { + function GroupFindingsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14449,88 +13911,140 @@ } /** - * UpdateFindingRequest finding. - * @member {google.cloud.securitycenter.v1beta1.IFinding|null|undefined} finding - * @memberof google.cloud.securitycenter.v1beta1.UpdateFindingRequest + * GroupFindingsRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsRequest * @instance */ - UpdateFindingRequest.prototype.finding = null; + GroupFindingsRequest.prototype.parent = ""; /** - * UpdateFindingRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.securitycenter.v1beta1.UpdateFindingRequest + * GroupFindingsRequest filter. + * @member {string} filter + * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsRequest * @instance */ - UpdateFindingRequest.prototype.updateMask = null; + GroupFindingsRequest.prototype.filter = ""; /** - * Creates a new UpdateFindingRequest instance using the specified properties. + * GroupFindingsRequest groupBy. + * @member {string} groupBy + * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsRequest + * @instance + */ + GroupFindingsRequest.prototype.groupBy = ""; + + /** + * GroupFindingsRequest readTime. + * @member {google.protobuf.ITimestamp|null|undefined} readTime + * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsRequest + * @instance + */ + GroupFindingsRequest.prototype.readTime = null; + + /** + * GroupFindingsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsRequest + * @instance + */ + GroupFindingsRequest.prototype.pageToken = ""; + + /** + * GroupFindingsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsRequest + * @instance + */ + GroupFindingsRequest.prototype.pageSize = 0; + + /** + * Creates a new GroupFindingsRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1beta1.UpdateFindingRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsRequest * @static - * @param {google.cloud.securitycenter.v1beta1.IUpdateFindingRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1beta1.UpdateFindingRequest} UpdateFindingRequest instance + * @param {google.cloud.securitycenter.v1beta1.IGroupFindingsRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1beta1.GroupFindingsRequest} GroupFindingsRequest instance */ - UpdateFindingRequest.create = function create(properties) { - return new UpdateFindingRequest(properties); + GroupFindingsRequest.create = function create(properties) { + return new GroupFindingsRequest(properties); }; /** - * Encodes the specified UpdateFindingRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.UpdateFindingRequest.verify|verify} messages. + * Encodes the specified GroupFindingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupFindingsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1beta1.UpdateFindingRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsRequest * @static - * @param {google.cloud.securitycenter.v1beta1.IUpdateFindingRequest} message UpdateFindingRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.IGroupFindingsRequest} message GroupFindingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateFindingRequest.encode = function encode(message, writer) { + GroupFindingsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.finding != null && message.hasOwnProperty("finding")) - $root.google.cloud.securitycenter.v1beta1.Finding.encode(message.finding, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.groupBy != null && message.hasOwnProperty("groupBy")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.groupBy); + if (message.readTime != null && message.hasOwnProperty("readTime")) + $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.pageToken); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.pageSize); return writer; }; /** - * Encodes the specified UpdateFindingRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.UpdateFindingRequest.verify|verify} messages. + * Encodes the specified GroupFindingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupFindingsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.UpdateFindingRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsRequest * @static - * @param {google.cloud.securitycenter.v1beta1.IUpdateFindingRequest} message UpdateFindingRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.IGroupFindingsRequest} message GroupFindingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateFindingRequest.encodeDelimited = function encodeDelimited(message, writer) { + GroupFindingsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateFindingRequest message from the specified reader or buffer. + * Decodes a GroupFindingsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1beta1.UpdateFindingRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1beta1.UpdateFindingRequest} UpdateFindingRequest + * @returns {google.cloud.securitycenter.v1beta1.GroupFindingsRequest} GroupFindingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateFindingRequest.decode = function decode(reader, length) { + GroupFindingsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.UpdateFindingRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.GroupFindingsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.finding = $root.google.cloud.securitycenter.v1beta1.Finding.decode(reader, reader.uint32()); + message.parent = reader.string(); break; case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.filter = reader.string(); + break; + case 3: + message.groupBy = reader.string(); + break; + case 4: + message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.pageToken = reader.string(); + break; + case 6: + message.pageSize = reader.int32(); break; default: reader.skipType(tag & 7); @@ -14541,127 +14055,156 @@ }; /** - * Decodes an UpdateFindingRequest message from the specified reader or buffer, length delimited. + * Decodes a GroupFindingsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.UpdateFindingRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1beta1.UpdateFindingRequest} UpdateFindingRequest + * @returns {google.cloud.securitycenter.v1beta1.GroupFindingsRequest} GroupFindingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateFindingRequest.decodeDelimited = function decodeDelimited(reader) { + GroupFindingsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateFindingRequest message. + * Verifies a GroupFindingsRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1beta1.UpdateFindingRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateFindingRequest.verify = function verify(message) { + GroupFindingsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.finding != null && message.hasOwnProperty("finding")) { - var error = $root.google.cloud.securitycenter.v1beta1.Finding.verify(message.finding); - if (error) - return "finding." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.groupBy != null && message.hasOwnProperty("groupBy")) + if (!$util.isString(message.groupBy)) + return "groupBy: string expected"; + if (message.readTime != null && message.hasOwnProperty("readTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.readTime); if (error) - return "updateMask." + error; + return "readTime." + error; } + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; return null; }; /** - * Creates an UpdateFindingRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GroupFindingsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1beta1.UpdateFindingRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1beta1.UpdateFindingRequest} UpdateFindingRequest + * @returns {google.cloud.securitycenter.v1beta1.GroupFindingsRequest} GroupFindingsRequest */ - UpdateFindingRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1beta1.UpdateFindingRequest) + GroupFindingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1beta1.GroupFindingsRequest) return object; - var message = new $root.google.cloud.securitycenter.v1beta1.UpdateFindingRequest(); - if (object.finding != null) { - if (typeof object.finding !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.UpdateFindingRequest.finding: object expected"); - message.finding = $root.google.cloud.securitycenter.v1beta1.Finding.fromObject(object.finding); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.UpdateFindingRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.securitycenter.v1beta1.GroupFindingsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + if (object.groupBy != null) + message.groupBy = String(object.groupBy); + if (object.readTime != null) { + if (typeof object.readTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.GroupFindingsRequest.readTime: object expected"); + message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); } + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; return message; }; /** - * Creates a plain object from an UpdateFindingRequest message. Also converts values to other types if specified. + * Creates a plain object from a GroupFindingsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1beta1.UpdateFindingRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsRequest * @static - * @param {google.cloud.securitycenter.v1beta1.UpdateFindingRequest} message UpdateFindingRequest + * @param {google.cloud.securitycenter.v1beta1.GroupFindingsRequest} message GroupFindingsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateFindingRequest.toObject = function toObject(message, options) { + GroupFindingsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.finding = null; - object.updateMask = null; + object.parent = ""; + object.filter = ""; + object.groupBy = ""; + object.readTime = null; + object.pageToken = ""; + object.pageSize = 0; } - if (message.finding != null && message.hasOwnProperty("finding")) - object.finding = $root.google.cloud.securitycenter.v1beta1.Finding.toObject(message.finding, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.groupBy != null && message.hasOwnProperty("groupBy")) + object.groupBy = message.groupBy; + if (message.readTime != null && message.hasOwnProperty("readTime")) + object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; return object; }; /** - * Converts this UpdateFindingRequest to JSON. + * Converts this GroupFindingsRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1beta1.UpdateFindingRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsRequest * @instance * @returns {Object.} JSON object */ - UpdateFindingRequest.prototype.toJSON = function toJSON() { + GroupFindingsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateFindingRequest; + return GroupFindingsRequest; })(); - v1beta1.UpdateOrganizationSettingsRequest = (function() { + v1beta1.GroupFindingsResponse = (function() { /** - * Properties of an UpdateOrganizationSettingsRequest. + * Properties of a GroupFindingsResponse. * @memberof google.cloud.securitycenter.v1beta1 - * @interface IUpdateOrganizationSettingsRequest - * @property {google.cloud.securitycenter.v1beta1.IOrganizationSettings|null} [organizationSettings] UpdateOrganizationSettingsRequest organizationSettings - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateOrganizationSettingsRequest updateMask + * @interface IGroupFindingsResponse + * @property {Array.|null} [groupByResults] GroupFindingsResponse groupByResults + * @property {google.protobuf.ITimestamp|null} [readTime] GroupFindingsResponse readTime + * @property {string|null} [nextPageToken] GroupFindingsResponse nextPageToken */ /** - * Constructs a new UpdateOrganizationSettingsRequest. + * Constructs a new GroupFindingsResponse. * @memberof google.cloud.securitycenter.v1beta1 - * @classdesc Represents an UpdateOrganizationSettingsRequest. - * @implements IUpdateOrganizationSettingsRequest + * @classdesc Represents a GroupFindingsResponse. + * @implements IGroupFindingsResponse * @constructor - * @param {google.cloud.securitycenter.v1beta1.IUpdateOrganizationSettingsRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1beta1.IGroupFindingsResponse=} [properties] Properties to set */ - function UpdateOrganizationSettingsRequest(properties) { + function GroupFindingsResponse(properties) { + this.groupByResults = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14669,88 +14212,104 @@ } /** - * UpdateOrganizationSettingsRequest organizationSettings. - * @member {google.cloud.securitycenter.v1beta1.IOrganizationSettings|null|undefined} organizationSettings - * @memberof google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest + * GroupFindingsResponse groupByResults. + * @member {Array.} groupByResults + * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsResponse * @instance */ - UpdateOrganizationSettingsRequest.prototype.organizationSettings = null; + GroupFindingsResponse.prototype.groupByResults = $util.emptyArray; /** - * UpdateOrganizationSettingsRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest + * GroupFindingsResponse readTime. + * @member {google.protobuf.ITimestamp|null|undefined} readTime + * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsResponse * @instance */ - UpdateOrganizationSettingsRequest.prototype.updateMask = null; + GroupFindingsResponse.prototype.readTime = null; /** - * Creates a new UpdateOrganizationSettingsRequest instance using the specified properties. + * GroupFindingsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsResponse + * @instance + */ + GroupFindingsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new GroupFindingsResponse instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsResponse * @static - * @param {google.cloud.securitycenter.v1beta1.IUpdateOrganizationSettingsRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest} UpdateOrganizationSettingsRequest instance + * @param {google.cloud.securitycenter.v1beta1.IGroupFindingsResponse=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1beta1.GroupFindingsResponse} GroupFindingsResponse instance */ - UpdateOrganizationSettingsRequest.create = function create(properties) { - return new UpdateOrganizationSettingsRequest(properties); + GroupFindingsResponse.create = function create(properties) { + return new GroupFindingsResponse(properties); }; /** - * Encodes the specified UpdateOrganizationSettingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest.verify|verify} messages. + * Encodes the specified GroupFindingsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupFindingsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsResponse * @static - * @param {google.cloud.securitycenter.v1beta1.IUpdateOrganizationSettingsRequest} message UpdateOrganizationSettingsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.IGroupFindingsResponse} message GroupFindingsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateOrganizationSettingsRequest.encode = function encode(message, writer) { + GroupFindingsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.organizationSettings != null && message.hasOwnProperty("organizationSettings")) - $root.google.cloud.securitycenter.v1beta1.OrganizationSettings.encode(message.organizationSettings, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.groupByResults != null && message.groupByResults.length) + for (var i = 0; i < message.groupByResults.length; ++i) + $root.google.cloud.securitycenter.v1beta1.GroupResult.encode(message.groupByResults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.readTime != null && message.hasOwnProperty("readTime")) + $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nextPageToken); return writer; }; /** - * Encodes the specified UpdateOrganizationSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest.verify|verify} messages. + * Encodes the specified GroupFindingsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupFindingsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsResponse * @static - * @param {google.cloud.securitycenter.v1beta1.IUpdateOrganizationSettingsRequest} message UpdateOrganizationSettingsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.IGroupFindingsResponse} message GroupFindingsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateOrganizationSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + GroupFindingsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateOrganizationSettingsRequest message from the specified reader or buffer. + * Decodes a GroupFindingsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest} UpdateOrganizationSettingsRequest + * @returns {google.cloud.securitycenter.v1beta1.GroupFindingsResponse} GroupFindingsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateOrganizationSettingsRequest.decode = function decode(reader, length) { + GroupFindingsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.GroupFindingsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.organizationSettings = $root.google.cloud.securitycenter.v1beta1.OrganizationSettings.decode(reader, reader.uint32()); + if (!(message.groupByResults && message.groupByResults.length)) + message.groupByResults = []; + message.groupByResults.push($root.google.cloud.securitycenter.v1beta1.GroupResult.decode(reader, reader.uint32())); break; case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -14761,127 +14320,149 @@ }; /** - * Decodes an UpdateOrganizationSettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a GroupFindingsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest} UpdateOrganizationSettingsRequest + * @returns {google.cloud.securitycenter.v1beta1.GroupFindingsResponse} GroupFindingsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateOrganizationSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + GroupFindingsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateOrganizationSettingsRequest message. + * Verifies a GroupFindingsResponse message. * @function verify - * @memberof google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateOrganizationSettingsRequest.verify = function verify(message) { + GroupFindingsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.organizationSettings != null && message.hasOwnProperty("organizationSettings")) { - var error = $root.google.cloud.securitycenter.v1beta1.OrganizationSettings.verify(message.organizationSettings); - if (error) - return "organizationSettings." + error; + if (message.groupByResults != null && message.hasOwnProperty("groupByResults")) { + if (!Array.isArray(message.groupByResults)) + return "groupByResults: array expected"; + for (var i = 0; i < message.groupByResults.length; ++i) { + var error = $root.google.cloud.securitycenter.v1beta1.GroupResult.verify(message.groupByResults[i]); + if (error) + return "groupByResults." + error; + } } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (message.readTime != null && message.hasOwnProperty("readTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.readTime); if (error) - return "updateMask." + error; + return "readTime." + error; } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates an UpdateOrganizationSettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GroupFindingsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest} UpdateOrganizationSettingsRequest + * @returns {google.cloud.securitycenter.v1beta1.GroupFindingsResponse} GroupFindingsResponse */ - UpdateOrganizationSettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest) + GroupFindingsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1beta1.GroupFindingsResponse) return object; - var message = new $root.google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest(); - if (object.organizationSettings != null) { - if (typeof object.organizationSettings !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest.organizationSettings: object expected"); - message.organizationSettings = $root.google.cloud.securitycenter.v1beta1.OrganizationSettings.fromObject(object.organizationSettings); + var message = new $root.google.cloud.securitycenter.v1beta1.GroupFindingsResponse(); + if (object.groupByResults) { + if (!Array.isArray(object.groupByResults)) + throw TypeError(".google.cloud.securitycenter.v1beta1.GroupFindingsResponse.groupByResults: array expected"); + message.groupByResults = []; + for (var i = 0; i < object.groupByResults.length; ++i) { + if (typeof object.groupByResults[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.GroupFindingsResponse.groupByResults: object expected"); + message.groupByResults[i] = $root.google.cloud.securitycenter.v1beta1.GroupResult.fromObject(object.groupByResults[i]); + } } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + if (object.readTime != null) { + if (typeof object.readTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.GroupFindingsResponse.readTime: object expected"); + message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from an UpdateOrganizationSettingsRequest message. Also converts values to other types if specified. + * Creates a plain object from a GroupFindingsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsResponse * @static - * @param {google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest} message UpdateOrganizationSettingsRequest + * @param {google.cloud.securitycenter.v1beta1.GroupFindingsResponse} message GroupFindingsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateOrganizationSettingsRequest.toObject = function toObject(message, options) { + GroupFindingsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.groupByResults = []; if (options.defaults) { - object.organizationSettings = null; - object.updateMask = null; + object.readTime = null; + object.nextPageToken = ""; } - if (message.organizationSettings != null && message.hasOwnProperty("organizationSettings")) - object.organizationSettings = $root.google.cloud.securitycenter.v1beta1.OrganizationSettings.toObject(message.organizationSettings, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.groupByResults && message.groupByResults.length) { + object.groupByResults = []; + for (var j = 0; j < message.groupByResults.length; ++j) + object.groupByResults[j] = $root.google.cloud.securitycenter.v1beta1.GroupResult.toObject(message.groupByResults[j], options); + } + if (message.readTime != null && message.hasOwnProperty("readTime")) + object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this UpdateOrganizationSettingsRequest to JSON. + * Converts this GroupFindingsResponse to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupFindingsResponse * @instance * @returns {Object.} JSON object */ - UpdateOrganizationSettingsRequest.prototype.toJSON = function toJSON() { + GroupFindingsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateOrganizationSettingsRequest; + return GroupFindingsResponse; })(); - v1beta1.UpdateSourceRequest = (function() { + v1beta1.GroupResult = (function() { /** - * Properties of an UpdateSourceRequest. + * Properties of a GroupResult. * @memberof google.cloud.securitycenter.v1beta1 - * @interface IUpdateSourceRequest - * @property {google.cloud.securitycenter.v1beta1.ISource|null} [source] UpdateSourceRequest source - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSourceRequest updateMask + * @interface IGroupResult + * @property {Object.|null} [properties] GroupResult properties + * @property {number|Long|null} [count] GroupResult count */ /** - * Constructs a new UpdateSourceRequest. + * Constructs a new GroupResult. * @memberof google.cloud.securitycenter.v1beta1 - * @classdesc Represents an UpdateSourceRequest. - * @implements IUpdateSourceRequest + * @classdesc Represents a GroupResult. + * @implements IGroupResult * @constructor - * @param {google.cloud.securitycenter.v1beta1.IUpdateSourceRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1beta1.IGroupResult=} [properties] Properties to set */ - function UpdateSourceRequest(properties) { + function GroupResult(properties) { + this.properties = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14889,88 +14470,96 @@ } /** - * UpdateSourceRequest source. - * @member {google.cloud.securitycenter.v1beta1.ISource|null|undefined} source - * @memberof google.cloud.securitycenter.v1beta1.UpdateSourceRequest + * GroupResult properties. + * @member {Object.} properties + * @memberof google.cloud.securitycenter.v1beta1.GroupResult * @instance */ - UpdateSourceRequest.prototype.source = null; + GroupResult.prototype.properties = $util.emptyObject; /** - * UpdateSourceRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.securitycenter.v1beta1.UpdateSourceRequest + * GroupResult count. + * @member {number|Long} count + * @memberof google.cloud.securitycenter.v1beta1.GroupResult * @instance */ - UpdateSourceRequest.prototype.updateMask = null; + GroupResult.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new UpdateSourceRequest instance using the specified properties. + * Creates a new GroupResult instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1beta1.UpdateSourceRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupResult * @static - * @param {google.cloud.securitycenter.v1beta1.IUpdateSourceRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1beta1.UpdateSourceRequest} UpdateSourceRequest instance + * @param {google.cloud.securitycenter.v1beta1.IGroupResult=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1beta1.GroupResult} GroupResult instance */ - UpdateSourceRequest.create = function create(properties) { - return new UpdateSourceRequest(properties); + GroupResult.create = function create(properties) { + return new GroupResult(properties); }; /** - * Encodes the specified UpdateSourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.UpdateSourceRequest.verify|verify} messages. + * Encodes the specified GroupResult message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupResult.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1beta1.UpdateSourceRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupResult * @static - * @param {google.cloud.securitycenter.v1beta1.IUpdateSourceRequest} message UpdateSourceRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.IGroupResult} message GroupResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSourceRequest.encode = function encode(message, writer) { + GroupResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.source != null && message.hasOwnProperty("source")) - $root.google.cloud.securitycenter.v1beta1.Source.encode(message.source, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.properties != null && message.hasOwnProperty("properties")) + for (var keys = Object.keys(message.properties), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.protobuf.Value.encode(message.properties[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.count != null && message.hasOwnProperty("count")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.count); return writer; }; /** - * Encodes the specified UpdateSourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.UpdateSourceRequest.verify|verify} messages. + * Encodes the specified GroupResult message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.GroupResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.UpdateSourceRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupResult * @static - * @param {google.cloud.securitycenter.v1beta1.IUpdateSourceRequest} message UpdateSourceRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.IGroupResult} message GroupResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { + GroupResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateSourceRequest message from the specified reader or buffer. + * Decodes a GroupResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1beta1.UpdateSourceRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1beta1.UpdateSourceRequest} UpdateSourceRequest + * @returns {google.cloud.securitycenter.v1beta1.GroupResult} GroupResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSourceRequest.decode = function decode(reader, length) { + GroupResult.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.UpdateSourceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.GroupResult(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.source = $root.google.cloud.securitycenter.v1beta1.Source.decode(reader, reader.uint32()); + reader.skip().pos++; + if (message.properties === $util.emptyObject) + message.properties = {}; + key = reader.string(); + reader.pos++; + message.properties[key] = $root.google.protobuf.Value.decode(reader, reader.uint32()); break; case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.count = reader.int64(); break; default: reader.skipType(tag & 7); @@ -14981,128 +14570,151 @@ }; /** - * Decodes an UpdateSourceRequest message from the specified reader or buffer, length delimited. + * Decodes a GroupResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.UpdateSourceRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1beta1.UpdateSourceRequest} UpdateSourceRequest + * @returns {google.cloud.securitycenter.v1beta1.GroupResult} GroupResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSourceRequest.decodeDelimited = function decodeDelimited(reader) { + GroupResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateSourceRequest message. + * Verifies a GroupResult message. * @function verify - * @memberof google.cloud.securitycenter.v1beta1.UpdateSourceRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateSourceRequest.verify = function verify(message) { + GroupResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.source != null && message.hasOwnProperty("source")) { - var error = $root.google.cloud.securitycenter.v1beta1.Source.verify(message.source); - if (error) - return "source." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (message.properties != null && message.hasOwnProperty("properties")) { + if (!$util.isObject(message.properties)) + return "properties: object expected"; + var key = Object.keys(message.properties); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.properties[key[i]]); + if (error) + return "properties." + error; + } } + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; return null; }; /** - * Creates an UpdateSourceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GroupResult message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1beta1.UpdateSourceRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1beta1.UpdateSourceRequest} UpdateSourceRequest + * @returns {google.cloud.securitycenter.v1beta1.GroupResult} GroupResult */ - UpdateSourceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1beta1.UpdateSourceRequest) + GroupResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1beta1.GroupResult) return object; - var message = new $root.google.cloud.securitycenter.v1beta1.UpdateSourceRequest(); - if (object.source != null) { - if (typeof object.source !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.UpdateSourceRequest.source: object expected"); - message.source = $root.google.cloud.securitycenter.v1beta1.Source.fromObject(object.source); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.UpdateSourceRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.securitycenter.v1beta1.GroupResult(); + if (object.properties) { + if (typeof object.properties !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.GroupResult.properties: object expected"); + message.properties = {}; + for (var keys = Object.keys(object.properties), i = 0; i < keys.length; ++i) { + if (typeof object.properties[keys[i]] !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.GroupResult.properties: object expected"); + message.properties[keys[i]] = $root.google.protobuf.Value.fromObject(object.properties[keys[i]]); + } } + if (object.count != null) + if ($util.Long) + (message.count = $util.Long.fromValue(object.count)).unsigned = false; + else if (typeof object.count === "string") + message.count = parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from an UpdateSourceRequest message. Also converts values to other types if specified. + * Creates a plain object from a GroupResult message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1beta1.UpdateSourceRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupResult * @static - * @param {google.cloud.securitycenter.v1beta1.UpdateSourceRequest} message UpdateSourceRequest + * @param {google.cloud.securitycenter.v1beta1.GroupResult} message GroupResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateSourceRequest.toObject = function toObject(message, options) { + GroupResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.source = null; - object.updateMask = null; + if (options.objects || options.defaults) + object.properties = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.count = options.longs === String ? "0" : 0; + var keys2; + if (message.properties && (keys2 = Object.keys(message.properties)).length) { + object.properties = {}; + for (var j = 0; j < keys2.length; ++j) + object.properties[keys2[j]] = $root.google.protobuf.Value.toObject(message.properties[keys2[j]], options); } - if (message.source != null && message.hasOwnProperty("source")) - object.source = $root.google.cloud.securitycenter.v1beta1.Source.toObject(message.source, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.count != null && message.hasOwnProperty("count")) + if (typeof message.count === "number") + object.count = options.longs === String ? String(message.count) : message.count; + else + object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; return object; }; /** - * Converts this UpdateSourceRequest to JSON. + * Converts this GroupResult to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1beta1.UpdateSourceRequest + * @memberof google.cloud.securitycenter.v1beta1.GroupResult * @instance * @returns {Object.} JSON object */ - UpdateSourceRequest.prototype.toJSON = function toJSON() { + GroupResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateSourceRequest; + return GroupResult; })(); - v1beta1.UpdateSecurityMarksRequest = (function() { + v1beta1.ListSourcesRequest = (function() { /** - * Properties of an UpdateSecurityMarksRequest. + * Properties of a ListSourcesRequest. * @memberof google.cloud.securitycenter.v1beta1 - * @interface IUpdateSecurityMarksRequest - * @property {google.cloud.securitycenter.v1beta1.ISecurityMarks|null} [securityMarks] UpdateSecurityMarksRequest securityMarks - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSecurityMarksRequest updateMask - * @property {google.protobuf.ITimestamp|null} [startTime] UpdateSecurityMarksRequest startTime + * @interface IListSourcesRequest + * @property {string|null} [parent] ListSourcesRequest parent + * @property {string|null} [pageToken] ListSourcesRequest pageToken + * @property {number|null} [pageSize] ListSourcesRequest pageSize */ /** - * Constructs a new UpdateSecurityMarksRequest. + * Constructs a new ListSourcesRequest. * @memberof google.cloud.securitycenter.v1beta1 - * @classdesc Represents an UpdateSecurityMarksRequest. - * @implements IUpdateSecurityMarksRequest + * @classdesc Represents a ListSourcesRequest. + * @implements IListSourcesRequest * @constructor - * @param {google.cloud.securitycenter.v1beta1.IUpdateSecurityMarksRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1beta1.IListSourcesRequest=} [properties] Properties to set */ - function UpdateSecurityMarksRequest(properties) { + function ListSourcesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15110,101 +14722,101 @@ } /** - * UpdateSecurityMarksRequest securityMarks. - * @member {google.cloud.securitycenter.v1beta1.ISecurityMarks|null|undefined} securityMarks - * @memberof google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest + * ListSourcesRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1beta1.ListSourcesRequest * @instance */ - UpdateSecurityMarksRequest.prototype.securityMarks = null; + ListSourcesRequest.prototype.parent = ""; /** - * UpdateSecurityMarksRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest + * ListSourcesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.securitycenter.v1beta1.ListSourcesRequest * @instance */ - UpdateSecurityMarksRequest.prototype.updateMask = null; + ListSourcesRequest.prototype.pageToken = ""; /** - * UpdateSecurityMarksRequest startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest + * ListSourcesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.securitycenter.v1beta1.ListSourcesRequest * @instance */ - UpdateSecurityMarksRequest.prototype.startTime = null; + ListSourcesRequest.prototype.pageSize = 0; /** - * Creates a new UpdateSecurityMarksRequest instance using the specified properties. + * Creates a new ListSourcesRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest + * @memberof google.cloud.securitycenter.v1beta1.ListSourcesRequest * @static - * @param {google.cloud.securitycenter.v1beta1.IUpdateSecurityMarksRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest} UpdateSecurityMarksRequest instance + * @param {google.cloud.securitycenter.v1beta1.IListSourcesRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1beta1.ListSourcesRequest} ListSourcesRequest instance */ - UpdateSecurityMarksRequest.create = function create(properties) { - return new UpdateSecurityMarksRequest(properties); + ListSourcesRequest.create = function create(properties) { + return new ListSourcesRequest(properties); }; /** - * Encodes the specified UpdateSecurityMarksRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest.verify|verify} messages. + * Encodes the specified ListSourcesRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListSourcesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest + * @memberof google.cloud.securitycenter.v1beta1.ListSourcesRequest * @static - * @param {google.cloud.securitycenter.v1beta1.IUpdateSecurityMarksRequest} message UpdateSecurityMarksRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.IListSourcesRequest} message ListSourcesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSecurityMarksRequest.encode = function encode(message, writer) { + ListSourcesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) - $root.google.cloud.securitycenter.v1beta1.SecurityMarks.encode(message.securityMarks, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.startTime != null && message.hasOwnProperty("startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.pageSize); return writer; }; /** - * Encodes the specified UpdateSecurityMarksRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest.verify|verify} messages. + * Encodes the specified ListSourcesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListSourcesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest + * @memberof google.cloud.securitycenter.v1beta1.ListSourcesRequest * @static - * @param {google.cloud.securitycenter.v1beta1.IUpdateSecurityMarksRequest} message UpdateSecurityMarksRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.IListSourcesRequest} message ListSourcesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSecurityMarksRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListSourcesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateSecurityMarksRequest message from the specified reader or buffer. + * Decodes a ListSourcesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest + * @memberof google.cloud.securitycenter.v1beta1.ListSourcesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest} UpdateSecurityMarksRequest + * @returns {google.cloud.securitycenter.v1beta1.ListSourcesRequest} ListSourcesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSecurityMarksRequest.decode = function decode(reader, length) { + ListSourcesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.ListSourcesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.securityMarks = $root.google.cloud.securitycenter.v1beta1.SecurityMarks.decode(reader, reader.uint32()); + message.parent = reader.string(); break; case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.pageToken = reader.string(); break; - case 3: - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 7: + message.pageSize = reader.int32(); break; default: reader.skipType(tag & 7); @@ -15215,145 +14827,126 @@ }; /** - * Decodes an UpdateSecurityMarksRequest message from the specified reader or buffer, length delimited. + * Decodes a ListSourcesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest + * @memberof google.cloud.securitycenter.v1beta1.ListSourcesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest} UpdateSecurityMarksRequest + * @returns {google.cloud.securitycenter.v1beta1.ListSourcesRequest} ListSourcesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSecurityMarksRequest.decodeDelimited = function decodeDelimited(reader) { + ListSourcesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateSecurityMarksRequest message. + * Verifies a ListSourcesRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest + * @memberof google.cloud.securitycenter.v1beta1.ListSourcesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateSecurityMarksRequest.verify = function verify(message) { + ListSourcesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) { - var error = $root.google.cloud.securitycenter.v1beta1.SecurityMarks.verify(message.securityMarks); - if (error) - return "securityMarks." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; return null; }; /** - * Creates an UpdateSecurityMarksRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListSourcesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest + * @memberof google.cloud.securitycenter.v1beta1.ListSourcesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest} UpdateSecurityMarksRequest + * @returns {google.cloud.securitycenter.v1beta1.ListSourcesRequest} ListSourcesRequest */ - UpdateSecurityMarksRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest) + ListSourcesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1beta1.ListSourcesRequest) return object; - var message = new $root.google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest(); - if (object.securityMarks != null) { - if (typeof object.securityMarks !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest.securityMarks: object expected"); - message.securityMarks = $root.google.cloud.securitycenter.v1beta1.SecurityMarks.fromObject(object.securityMarks); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } + var message = new $root.google.cloud.securitycenter.v1beta1.ListSourcesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; return message; }; /** - * Creates a plain object from an UpdateSecurityMarksRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListSourcesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest + * @memberof google.cloud.securitycenter.v1beta1.ListSourcesRequest * @static - * @param {google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest} message UpdateSecurityMarksRequest + * @param {google.cloud.securitycenter.v1beta1.ListSourcesRequest} message ListSourcesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateSecurityMarksRequest.toObject = function toObject(message, options) { + ListSourcesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.securityMarks = null; - object.updateMask = null; - object.startTime = null; + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; } - if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) - object.securityMarks = $root.google.cloud.securitycenter.v1beta1.SecurityMarks.toObject(message.securityMarks, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; return object; }; /** - * Converts this UpdateSecurityMarksRequest to JSON. + * Converts this ListSourcesRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest + * @memberof google.cloud.securitycenter.v1beta1.ListSourcesRequest * @instance * @returns {Object.} JSON object */ - UpdateSecurityMarksRequest.prototype.toJSON = function toJSON() { + ListSourcesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateSecurityMarksRequest; + return ListSourcesRequest; })(); - v1beta1.Asset = (function() { + v1beta1.ListSourcesResponse = (function() { /** - * Properties of an Asset. + * Properties of a ListSourcesResponse. * @memberof google.cloud.securitycenter.v1beta1 - * @interface IAsset - * @property {string|null} [name] Asset name - * @property {google.cloud.securitycenter.v1beta1.Asset.ISecurityCenterProperties|null} [securityCenterProperties] Asset securityCenterProperties - * @property {Object.|null} [resourceProperties] Asset resourceProperties - * @property {google.cloud.securitycenter.v1beta1.ISecurityMarks|null} [securityMarks] Asset securityMarks - * @property {google.protobuf.ITimestamp|null} [createTime] Asset createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Asset updateTime + * @interface IListSourcesResponse + * @property {Array.|null} [sources] ListSourcesResponse sources + * @property {string|null} [nextPageToken] ListSourcesResponse nextPageToken */ /** - * Constructs a new Asset. + * Constructs a new ListSourcesResponse. * @memberof google.cloud.securitycenter.v1beta1 - * @classdesc Represents an Asset. - * @implements IAsset + * @classdesc Represents a ListSourcesResponse. + * @implements IListSourcesResponse * @constructor - * @param {google.cloud.securitycenter.v1beta1.IAsset=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1beta1.IListSourcesResponse=} [properties] Properties to set */ - function Asset(properties) { - this.resourceProperties = {}; + function ListSourcesResponse(properties) { + this.sources = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15361,148 +14954,91 @@ } /** - * Asset name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1beta1.Asset - * @instance - */ - Asset.prototype.name = ""; - - /** - * Asset securityCenterProperties. - * @member {google.cloud.securitycenter.v1beta1.Asset.ISecurityCenterProperties|null|undefined} securityCenterProperties - * @memberof google.cloud.securitycenter.v1beta1.Asset - * @instance - */ - Asset.prototype.securityCenterProperties = null; - - /** - * Asset resourceProperties. - * @member {Object.} resourceProperties - * @memberof google.cloud.securitycenter.v1beta1.Asset - * @instance - */ - Asset.prototype.resourceProperties = $util.emptyObject; - - /** - * Asset securityMarks. - * @member {google.cloud.securitycenter.v1beta1.ISecurityMarks|null|undefined} securityMarks - * @memberof google.cloud.securitycenter.v1beta1.Asset - * @instance - */ - Asset.prototype.securityMarks = null; - - /** - * Asset createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.securitycenter.v1beta1.Asset + * ListSourcesResponse sources. + * @member {Array.} sources + * @memberof google.cloud.securitycenter.v1beta1.ListSourcesResponse * @instance */ - Asset.prototype.createTime = null; + ListSourcesResponse.prototype.sources = $util.emptyArray; /** - * Asset updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.securitycenter.v1beta1.Asset + * ListSourcesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.securitycenter.v1beta1.ListSourcesResponse * @instance */ - Asset.prototype.updateTime = null; + ListSourcesResponse.prototype.nextPageToken = ""; /** - * Creates a new Asset instance using the specified properties. + * Creates a new ListSourcesResponse instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1beta1.Asset + * @memberof google.cloud.securitycenter.v1beta1.ListSourcesResponse * @static - * @param {google.cloud.securitycenter.v1beta1.IAsset=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1beta1.Asset} Asset instance + * @param {google.cloud.securitycenter.v1beta1.IListSourcesResponse=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1beta1.ListSourcesResponse} ListSourcesResponse instance */ - Asset.create = function create(properties) { - return new Asset(properties); + ListSourcesResponse.create = function create(properties) { + return new ListSourcesResponse(properties); }; /** - * Encodes the specified Asset message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.Asset.verify|verify} messages. + * Encodes the specified ListSourcesResponse message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListSourcesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1beta1.Asset + * @memberof google.cloud.securitycenter.v1beta1.ListSourcesResponse * @static - * @param {google.cloud.securitycenter.v1beta1.IAsset} message Asset message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.IListSourcesResponse} message ListSourcesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Asset.encode = function encode(message, writer) { + ListSourcesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.securityCenterProperties != null && message.hasOwnProperty("securityCenterProperties")) - $root.google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties.encode(message.securityCenterProperties, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.resourceProperties != null && message.hasOwnProperty("resourceProperties")) - for (var keys = Object.keys(message.resourceProperties), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.protobuf.Value.encode(message.resourceProperties[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) - $root.google.cloud.securitycenter.v1beta1.SecurityMarks.encode(message.securityMarks, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.createTime != null && message.hasOwnProperty("createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.sources != null && message.sources.length) + for (var i = 0; i < message.sources.length; ++i) + $root.google.cloud.securitycenter.v1beta1.Source.encode(message.sources[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified Asset message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.Asset.verify|verify} messages. + * Encodes the specified ListSourcesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListSourcesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.Asset + * @memberof google.cloud.securitycenter.v1beta1.ListSourcesResponse * @static - * @param {google.cloud.securitycenter.v1beta1.IAsset} message Asset message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.IListSourcesResponse} message ListSourcesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Asset.encodeDelimited = function encodeDelimited(message, writer) { + ListSourcesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Asset message from the specified reader or buffer. + * Decodes a ListSourcesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1beta1.Asset + * @memberof google.cloud.securitycenter.v1beta1.ListSourcesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1beta1.Asset} Asset + * @returns {google.cloud.securitycenter.v1beta1.ListSourcesResponse} ListSourcesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Asset.decode = function decode(reader, length) { + ListSourcesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.Asset(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.ListSourcesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + if (!(message.sources && message.sources.length)) + message.sources = []; + message.sources.push($root.google.cloud.securitycenter.v1beta1.Source.decode(reader, reader.uint32())); break; case 2: - message.securityCenterProperties = $root.google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties.decode(reader, reader.uint32()); - break; - case 7: - reader.skip().pos++; - if (message.resourceProperties === $util.emptyObject) - message.resourceProperties = {}; - key = reader.string(); - reader.pos++; - message.resourceProperties[key] = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - case 8: - message.securityMarks = $root.google.cloud.securitycenter.v1beta1.SecurityMarks.decode(reader, reader.uint32()); - break; - case 9: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 10: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -15513,578 +15049,307 @@ }; /** - * Decodes an Asset message from the specified reader or buffer, length delimited. + * Decodes a ListSourcesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.Asset + * @memberof google.cloud.securitycenter.v1beta1.ListSourcesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1beta1.Asset} Asset + * @returns {google.cloud.securitycenter.v1beta1.ListSourcesResponse} ListSourcesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Asset.decodeDelimited = function decodeDelimited(reader) { + ListSourcesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Asset message. + * Verifies a ListSourcesResponse message. * @function verify - * @memberof google.cloud.securitycenter.v1beta1.Asset + * @memberof google.cloud.securitycenter.v1beta1.ListSourcesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Asset.verify = function verify(message) { + ListSourcesResponse.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.securityCenterProperties != null && message.hasOwnProperty("securityCenterProperties")) { - var error = $root.google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties.verify(message.securityCenterProperties); - if (error) - return "securityCenterProperties." + error; - } - if (message.resourceProperties != null && message.hasOwnProperty("resourceProperties")) { - if (!$util.isObject(message.resourceProperties)) - return "resourceProperties: object expected"; - var key = Object.keys(message.resourceProperties); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.resourceProperties[key[i]]); + if (message.sources != null && message.hasOwnProperty("sources")) { + if (!Array.isArray(message.sources)) + return "sources: array expected"; + for (var i = 0; i < message.sources.length; ++i) { + var error = $root.google.cloud.securitycenter.v1beta1.Source.verify(message.sources[i]); if (error) - return "resourceProperties." + error; + return "sources." + error; } } - if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) { - var error = $root.google.cloud.securitycenter.v1beta1.SecurityMarks.verify(message.securityMarks); - if (error) - return "securityMarks." + error; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates an Asset message from a plain object. Also converts values to their respective internal types. + * Creates a ListSourcesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1beta1.Asset + * @memberof google.cloud.securitycenter.v1beta1.ListSourcesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1beta1.Asset} Asset + * @returns {google.cloud.securitycenter.v1beta1.ListSourcesResponse} ListSourcesResponse */ - Asset.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1beta1.Asset) + ListSourcesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1beta1.ListSourcesResponse) return object; - var message = new $root.google.cloud.securitycenter.v1beta1.Asset(); - if (object.name != null) - message.name = String(object.name); - if (object.securityCenterProperties != null) { - if (typeof object.securityCenterProperties !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.Asset.securityCenterProperties: object expected"); - message.securityCenterProperties = $root.google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties.fromObject(object.securityCenterProperties); - } - if (object.resourceProperties) { - if (typeof object.resourceProperties !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.Asset.resourceProperties: object expected"); - message.resourceProperties = {}; - for (var keys = Object.keys(object.resourceProperties), i = 0; i < keys.length; ++i) { - if (typeof object.resourceProperties[keys[i]] !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.Asset.resourceProperties: object expected"); - message.resourceProperties[keys[i]] = $root.google.protobuf.Value.fromObject(object.resourceProperties[keys[i]]); + var message = new $root.google.cloud.securitycenter.v1beta1.ListSourcesResponse(); + if (object.sources) { + if (!Array.isArray(object.sources)) + throw TypeError(".google.cloud.securitycenter.v1beta1.ListSourcesResponse.sources: array expected"); + message.sources = []; + for (var i = 0; i < object.sources.length; ++i) { + if (typeof object.sources[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.ListSourcesResponse.sources: object expected"); + message.sources[i] = $root.google.cloud.securitycenter.v1beta1.Source.fromObject(object.sources[i]); } } - if (object.securityMarks != null) { - if (typeof object.securityMarks !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.Asset.securityMarks: object expected"); - message.securityMarks = $root.google.cloud.securitycenter.v1beta1.SecurityMarks.fromObject(object.securityMarks); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.Asset.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.Asset.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from an Asset message. Also converts values to other types if specified. + * Creates a plain object from a ListSourcesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1beta1.Asset + * @memberof google.cloud.securitycenter.v1beta1.ListSourcesResponse * @static - * @param {google.cloud.securitycenter.v1beta1.Asset} message Asset + * @param {google.cloud.securitycenter.v1beta1.ListSourcesResponse} message ListSourcesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Asset.toObject = function toObject(message, options) { + ListSourcesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.resourceProperties = {}; - if (options.defaults) { - object.name = ""; - object.securityCenterProperties = null; - object.securityMarks = null; - object.createTime = null; - object.updateTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.securityCenterProperties != null && message.hasOwnProperty("securityCenterProperties")) - object.securityCenterProperties = $root.google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties.toObject(message.securityCenterProperties, options); - var keys2; - if (message.resourceProperties && (keys2 = Object.keys(message.resourceProperties)).length) { - object.resourceProperties = {}; - for (var j = 0; j < keys2.length; ++j) - object.resourceProperties[keys2[j]] = $root.google.protobuf.Value.toObject(message.resourceProperties[keys2[j]], options); + if (options.arrays || options.defaults) + object.sources = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.sources && message.sources.length) { + object.sources = []; + for (var j = 0; j < message.sources.length; ++j) + object.sources[j] = $root.google.cloud.securitycenter.v1beta1.Source.toObject(message.sources[j], options); } - if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) - object.securityMarks = $root.google.cloud.securitycenter.v1beta1.SecurityMarks.toObject(message.securityMarks, options); - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this Asset to JSON. + * Converts this ListSourcesResponse to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1beta1.Asset + * @memberof google.cloud.securitycenter.v1beta1.ListSourcesResponse * @instance * @returns {Object.} JSON object */ - Asset.prototype.toJSON = function toJSON() { + ListSourcesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - Asset.SecurityCenterProperties = (function() { + return ListSourcesResponse; + })(); - /** - * Properties of a SecurityCenterProperties. - * @memberof google.cloud.securitycenter.v1beta1.Asset - * @interface ISecurityCenterProperties - * @property {string|null} [resourceName] SecurityCenterProperties resourceName - * @property {string|null} [resourceType] SecurityCenterProperties resourceType - * @property {string|null} [resourceParent] SecurityCenterProperties resourceParent - * @property {string|null} [resourceProject] SecurityCenterProperties resourceProject - * @property {Array.|null} [resourceOwners] SecurityCenterProperties resourceOwners - */ + v1beta1.ListAssetsRequest = (function() { - /** - * Constructs a new SecurityCenterProperties. - * @memberof google.cloud.securitycenter.v1beta1.Asset - * @classdesc Represents a SecurityCenterProperties. - * @implements ISecurityCenterProperties - * @constructor - * @param {google.cloud.securitycenter.v1beta1.Asset.ISecurityCenterProperties=} [properties] Properties to set - */ - function SecurityCenterProperties(properties) { - this.resourceOwners = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a ListAssetsRequest. + * @memberof google.cloud.securitycenter.v1beta1 + * @interface IListAssetsRequest + * @property {string|null} [parent] ListAssetsRequest parent + * @property {string|null} [filter] ListAssetsRequest filter + * @property {string|null} [orderBy] ListAssetsRequest orderBy + * @property {google.protobuf.ITimestamp|null} [readTime] ListAssetsRequest readTime + * @property {google.protobuf.IDuration|null} [compareDuration] ListAssetsRequest compareDuration + * @property {google.protobuf.IFieldMask|null} [fieldMask] ListAssetsRequest fieldMask + * @property {string|null} [pageToken] ListAssetsRequest pageToken + * @property {number|null} [pageSize] ListAssetsRequest pageSize + */ - /** - * SecurityCenterProperties resourceName. - * @member {string} resourceName - * @memberof google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties - * @instance - */ - SecurityCenterProperties.prototype.resourceName = ""; + /** + * Constructs a new ListAssetsRequest. + * @memberof google.cloud.securitycenter.v1beta1 + * @classdesc Represents a ListAssetsRequest. + * @implements IListAssetsRequest + * @constructor + * @param {google.cloud.securitycenter.v1beta1.IListAssetsRequest=} [properties] Properties to set + */ + function ListAssetsRequest(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]]; + } - /** - * SecurityCenterProperties resourceType. - * @member {string} resourceType - * @memberof google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties - * @instance - */ - SecurityCenterProperties.prototype.resourceType = ""; + /** + * ListAssetsRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.parent = ""; - /** - * SecurityCenterProperties resourceParent. - * @member {string} resourceParent - * @memberof google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties - * @instance - */ - SecurityCenterProperties.prototype.resourceParent = ""; + /** + * ListAssetsRequest filter. + * @member {string} filter + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.filter = ""; - /** - * SecurityCenterProperties resourceProject. - * @member {string} resourceProject - * @memberof google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties - * @instance - */ - SecurityCenterProperties.prototype.resourceProject = ""; + /** + * ListAssetsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.orderBy = ""; - /** - * SecurityCenterProperties resourceOwners. - * @member {Array.} resourceOwners - * @memberof google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties - * @instance - */ - SecurityCenterProperties.prototype.resourceOwners = $util.emptyArray; + /** + * ListAssetsRequest readTime. + * @member {google.protobuf.ITimestamp|null|undefined} readTime + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.readTime = null; - /** - * Creates a new SecurityCenterProperties instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties - * @static - * @param {google.cloud.securitycenter.v1beta1.Asset.ISecurityCenterProperties=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties} SecurityCenterProperties instance - */ - SecurityCenterProperties.create = function create(properties) { - return new SecurityCenterProperties(properties); - }; + /** + * ListAssetsRequest compareDuration. + * @member {google.protobuf.IDuration|null|undefined} compareDuration + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.compareDuration = null; - /** - * Encodes the specified SecurityCenterProperties message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties - * @static - * @param {google.cloud.securitycenter.v1beta1.Asset.ISecurityCenterProperties} message SecurityCenterProperties message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SecurityCenterProperties.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resourceName != null && message.hasOwnProperty("resourceName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceName); - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceType); - if (message.resourceParent != null && message.hasOwnProperty("resourceParent")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.resourceParent); - if (message.resourceProject != null && message.hasOwnProperty("resourceProject")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.resourceProject); - if (message.resourceOwners != null && message.resourceOwners.length) - for (var i = 0; i < message.resourceOwners.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.resourceOwners[i]); - return writer; - }; + /** + * ListAssetsRequest fieldMask. + * @member {google.protobuf.IFieldMask|null|undefined} fieldMask + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.fieldMask = null; - /** - * Encodes the specified SecurityCenterProperties message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties - * @static - * @param {google.cloud.securitycenter.v1beta1.Asset.ISecurityCenterProperties} message SecurityCenterProperties message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SecurityCenterProperties.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * ListAssetsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.pageToken = ""; - /** - * Decodes a SecurityCenterProperties message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties} SecurityCenterProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SecurityCenterProperties.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.resourceName = reader.string(); - break; - case 2: - message.resourceType = reader.string(); - break; - case 3: - message.resourceParent = reader.string(); - break; - case 4: - message.resourceProject = reader.string(); - break; - case 5: - if (!(message.resourceOwners && message.resourceOwners.length)) - message.resourceOwners = []; - message.resourceOwners.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * ListAssetsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.pageSize = 0; - /** - * Decodes a SecurityCenterProperties message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties} SecurityCenterProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SecurityCenterProperties.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new ListAssetsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsRequest + * @static + * @param {google.cloud.securitycenter.v1beta1.IListAssetsRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1beta1.ListAssetsRequest} ListAssetsRequest instance + */ + ListAssetsRequest.create = function create(properties) { + return new ListAssetsRequest(properties); + }; - /** - * Verifies a SecurityCenterProperties message. - * @function verify - * @memberof google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SecurityCenterProperties.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resourceName != null && message.hasOwnProperty("resourceName")) - if (!$util.isString(message.resourceName)) - return "resourceName: string expected"; - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - if (!$util.isString(message.resourceType)) - return "resourceType: string expected"; - if (message.resourceParent != null && message.hasOwnProperty("resourceParent")) - if (!$util.isString(message.resourceParent)) - return "resourceParent: string expected"; - if (message.resourceProject != null && message.hasOwnProperty("resourceProject")) - if (!$util.isString(message.resourceProject)) - return "resourceProject: string expected"; - if (message.resourceOwners != null && message.hasOwnProperty("resourceOwners")) { - if (!Array.isArray(message.resourceOwners)) - return "resourceOwners: array expected"; - for (var i = 0; i < message.resourceOwners.length; ++i) - if (!$util.isString(message.resourceOwners[i])) - return "resourceOwners: string[] expected"; - } - return null; - }; + /** + * Encodes the specified ListAssetsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListAssetsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsRequest + * @static + * @param {google.cloud.securitycenter.v1beta1.IListAssetsRequest} message ListAssetsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAssetsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.orderBy); + if (message.readTime != null && message.hasOwnProperty("readTime")) + $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) + $root.google.protobuf.Duration.encode(message.compareDuration, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) + $root.google.protobuf.FieldMask.encode(message.fieldMask, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.pageToken); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.pageSize); + return writer; + }; - /** - * Creates a SecurityCenterProperties message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties} SecurityCenterProperties - */ - SecurityCenterProperties.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties) - return object; - var message = new $root.google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties(); - if (object.resourceName != null) - message.resourceName = String(object.resourceName); - if (object.resourceType != null) - message.resourceType = String(object.resourceType); - if (object.resourceParent != null) - message.resourceParent = String(object.resourceParent); - if (object.resourceProject != null) - message.resourceProject = String(object.resourceProject); - if (object.resourceOwners) { - if (!Array.isArray(object.resourceOwners)) - throw TypeError(".google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties.resourceOwners: array expected"); - message.resourceOwners = []; - for (var i = 0; i < object.resourceOwners.length; ++i) - message.resourceOwners[i] = String(object.resourceOwners[i]); - } - return message; - }; - - /** - * Creates a plain object from a SecurityCenterProperties message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties - * @static - * @param {google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties} message SecurityCenterProperties - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SecurityCenterProperties.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.resourceOwners = []; - if (options.defaults) { - object.resourceName = ""; - object.resourceType = ""; - object.resourceParent = ""; - object.resourceProject = ""; - } - if (message.resourceName != null && message.hasOwnProperty("resourceName")) - object.resourceName = message.resourceName; - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - object.resourceType = message.resourceType; - if (message.resourceParent != null && message.hasOwnProperty("resourceParent")) - object.resourceParent = message.resourceParent; - if (message.resourceProject != null && message.hasOwnProperty("resourceProject")) - object.resourceProject = message.resourceProject; - if (message.resourceOwners && message.resourceOwners.length) { - object.resourceOwners = []; - for (var j = 0; j < message.resourceOwners.length; ++j) - object.resourceOwners[j] = message.resourceOwners[j]; - } - return object; - }; - - /** - * Converts this SecurityCenterProperties to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1beta1.Asset.SecurityCenterProperties - * @instance - * @returns {Object.} JSON object - */ - SecurityCenterProperties.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SecurityCenterProperties; - })(); - - return Asset; - })(); - - v1beta1.SecurityMarks = (function() { - - /** - * Properties of a SecurityMarks. - * @memberof google.cloud.securitycenter.v1beta1 - * @interface ISecurityMarks - * @property {string|null} [name] SecurityMarks name - * @property {Object.|null} [marks] SecurityMarks marks - */ - - /** - * Constructs a new SecurityMarks. - * @memberof google.cloud.securitycenter.v1beta1 - * @classdesc Represents a SecurityMarks. - * @implements ISecurityMarks - * @constructor - * @param {google.cloud.securitycenter.v1beta1.ISecurityMarks=} [properties] Properties to set - */ - function SecurityMarks(properties) { - this.marks = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SecurityMarks name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1beta1.SecurityMarks - * @instance - */ - SecurityMarks.prototype.name = ""; - - /** - * SecurityMarks marks. - * @member {Object.} marks - * @memberof google.cloud.securitycenter.v1beta1.SecurityMarks - * @instance - */ - SecurityMarks.prototype.marks = $util.emptyObject; - - /** - * Creates a new SecurityMarks instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1beta1.SecurityMarks - * @static - * @param {google.cloud.securitycenter.v1beta1.ISecurityMarks=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1beta1.SecurityMarks} SecurityMarks instance - */ - SecurityMarks.create = function create(properties) { - return new SecurityMarks(properties); - }; - - /** - * Encodes the specified SecurityMarks message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.SecurityMarks.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1beta1.SecurityMarks - * @static - * @param {google.cloud.securitycenter.v1beta1.ISecurityMarks} message SecurityMarks message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SecurityMarks.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.marks != null && message.hasOwnProperty("marks")) - for (var keys = Object.keys(message.marks), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.marks[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified SecurityMarks message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.SecurityMarks.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.SecurityMarks - * @static - * @param {google.cloud.securitycenter.v1beta1.ISecurityMarks} message SecurityMarks message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SecurityMarks.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ListAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListAssetsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsRequest + * @static + * @param {google.cloud.securitycenter.v1beta1.IListAssetsRequest} message ListAssetsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAssetsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Decodes a SecurityMarks message from the specified reader or buffer. + * Decodes a ListAssetsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1beta1.SecurityMarks + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1beta1.SecurityMarks} SecurityMarks + * @returns {google.cloud.securitycenter.v1beta1.ListAssetsRequest} ListAssetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SecurityMarks.decode = function decode(reader, length) { + ListAssetsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.SecurityMarks(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.ListAssetsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.parent = reader.string(); break; case 2: - reader.skip().pos++; - if (message.marks === $util.emptyObject) - message.marks = {}; - key = reader.string(); - reader.pos++; - message.marks[key] = reader.string(); + message.filter = reader.string(); + break; + case 3: + message.orderBy = reader.string(); + break; + case 4: + message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.compareDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 7: + message.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 8: + message.pageToken = reader.string(); + break; + case 9: + message.pageSize = reader.int32(); break; default: reader.skipType(tag & 7); @@ -16095,140 +15360,183 @@ }; /** - * Decodes a SecurityMarks message from the specified reader or buffer, length delimited. + * Decodes a ListAssetsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.SecurityMarks + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1beta1.SecurityMarks} SecurityMarks + * @returns {google.cloud.securitycenter.v1beta1.ListAssetsRequest} ListAssetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SecurityMarks.decodeDelimited = function decodeDelimited(reader) { + ListAssetsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SecurityMarks message. + * Verifies a ListAssetsRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1beta1.SecurityMarks + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SecurityMarks.verify = function verify(message) { + ListAssetsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.marks != null && message.hasOwnProperty("marks")) { - if (!$util.isObject(message.marks)) - return "marks: object expected"; - var key = Object.keys(message.marks); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.marks[key[i]])) - return "marks: string{k:string} expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.readTime != null && message.hasOwnProperty("readTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.readTime); + if (error) + return "readTime." + error; + } + if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) { + var error = $root.google.protobuf.Duration.verify(message.compareDuration); + if (error) + return "compareDuration." + error; + } + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.fieldMask); + if (error) + return "fieldMask." + error; } + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; return null; }; /** - * Creates a SecurityMarks message from a plain object. Also converts values to their respective internal types. + * Creates a ListAssetsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1beta1.SecurityMarks + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1beta1.SecurityMarks} SecurityMarks + * @returns {google.cloud.securitycenter.v1beta1.ListAssetsRequest} ListAssetsRequest */ - SecurityMarks.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1beta1.SecurityMarks) + ListAssetsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1beta1.ListAssetsRequest) return object; - var message = new $root.google.cloud.securitycenter.v1beta1.SecurityMarks(); - if (object.name != null) - message.name = String(object.name); - if (object.marks) { - if (typeof object.marks !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.SecurityMarks.marks: object expected"); - message.marks = {}; - for (var keys = Object.keys(object.marks), i = 0; i < keys.length; ++i) - message.marks[keys[i]] = String(object.marks[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from a SecurityMarks message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1beta1.SecurityMarks + var message = new $root.google.cloud.securitycenter.v1beta1.ListAssetsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.readTime != null) { + if (typeof object.readTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.ListAssetsRequest.readTime: object expected"); + message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); + } + if (object.compareDuration != null) { + if (typeof object.compareDuration !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.ListAssetsRequest.compareDuration: object expected"); + message.compareDuration = $root.google.protobuf.Duration.fromObject(object.compareDuration); + } + if (object.fieldMask != null) { + if (typeof object.fieldMask !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.ListAssetsRequest.fieldMask: object expected"); + message.fieldMask = $root.google.protobuf.FieldMask.fromObject(object.fieldMask); + } + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + return message; + }; + + /** + * Creates a plain object from a ListAssetsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsRequest * @static - * @param {google.cloud.securitycenter.v1beta1.SecurityMarks} message SecurityMarks + * @param {google.cloud.securitycenter.v1beta1.ListAssetsRequest} message ListAssetsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SecurityMarks.toObject = function toObject(message, options) { + ListAssetsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.marks = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - var keys2; - if (message.marks && (keys2 = Object.keys(message.marks)).length) { - object.marks = {}; - for (var j = 0; j < keys2.length; ++j) - object.marks[keys2[j]] = message.marks[keys2[j]]; + if (options.defaults) { + object.parent = ""; + object.filter = ""; + object.orderBy = ""; + object.readTime = null; + object.compareDuration = null; + object.fieldMask = null; + object.pageToken = ""; + object.pageSize = 0; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.readTime != null && message.hasOwnProperty("readTime")) + object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); + if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) + object.compareDuration = $root.google.protobuf.Duration.toObject(message.compareDuration, options); + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) + object.fieldMask = $root.google.protobuf.FieldMask.toObject(message.fieldMask, options); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; return object; }; /** - * Converts this SecurityMarks to JSON. + * Converts this ListAssetsRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1beta1.SecurityMarks + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsRequest * @instance * @returns {Object.} JSON object */ - SecurityMarks.prototype.toJSON = function toJSON() { + ListAssetsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SecurityMarks; + return ListAssetsRequest; })(); - v1beta1.Finding = (function() { + v1beta1.ListAssetsResponse = (function() { /** - * Properties of a Finding. + * Properties of a ListAssetsResponse. * @memberof google.cloud.securitycenter.v1beta1 - * @interface IFinding - * @property {string|null} [name] Finding name - * @property {string|null} [parent] Finding parent - * @property {string|null} [resourceName] Finding resourceName - * @property {google.cloud.securitycenter.v1beta1.Finding.State|null} [state] Finding state - * @property {string|null} [category] Finding category - * @property {string|null} [externalUri] Finding externalUri - * @property {Object.|null} [sourceProperties] Finding sourceProperties - * @property {google.cloud.securitycenter.v1beta1.ISecurityMarks|null} [securityMarks] Finding securityMarks - * @property {google.protobuf.ITimestamp|null} [eventTime] Finding eventTime - * @property {google.protobuf.ITimestamp|null} [createTime] Finding createTime + * @interface IListAssetsResponse + * @property {Array.|null} [listAssetsResults] ListAssetsResponse listAssetsResults + * @property {google.protobuf.ITimestamp|null} [readTime] ListAssetsResponse readTime + * @property {string|null} [nextPageToken] ListAssetsResponse nextPageToken + * @property {number|null} [totalSize] ListAssetsResponse totalSize */ /** - * Constructs a new Finding. + * Constructs a new ListAssetsResponse. * @memberof google.cloud.securitycenter.v1beta1 - * @classdesc Represents a Finding. - * @implements IFinding + * @classdesc Represents a ListAssetsResponse. + * @implements IListAssetsResponse * @constructor - * @param {google.cloud.securitycenter.v1beta1.IFinding=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1beta1.IListAssetsResponse=} [properties] Properties to set */ - function Finding(properties) { - this.sourceProperties = {}; + function ListAssetsResponse(properties) { + this.listAssetsResults = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16236,200 +15544,117 @@ } /** - * Finding name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1beta1.Finding - * @instance - */ - Finding.prototype.name = ""; - - /** - * Finding parent. - * @member {string} parent - * @memberof google.cloud.securitycenter.v1beta1.Finding - * @instance - */ - Finding.prototype.parent = ""; - - /** - * Finding resourceName. - * @member {string} resourceName - * @memberof google.cloud.securitycenter.v1beta1.Finding - * @instance - */ - Finding.prototype.resourceName = ""; - - /** - * Finding state. - * @member {google.cloud.securitycenter.v1beta1.Finding.State} state - * @memberof google.cloud.securitycenter.v1beta1.Finding - * @instance - */ - Finding.prototype.state = 0; - - /** - * Finding category. - * @member {string} category - * @memberof google.cloud.securitycenter.v1beta1.Finding - * @instance - */ - Finding.prototype.category = ""; - - /** - * Finding externalUri. - * @member {string} externalUri - * @memberof google.cloud.securitycenter.v1beta1.Finding - * @instance - */ - Finding.prototype.externalUri = ""; - - /** - * Finding sourceProperties. - * @member {Object.} sourceProperties - * @memberof google.cloud.securitycenter.v1beta1.Finding + * ListAssetsResponse listAssetsResults. + * @member {Array.} listAssetsResults + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse * @instance */ - Finding.prototype.sourceProperties = $util.emptyObject; + ListAssetsResponse.prototype.listAssetsResults = $util.emptyArray; /** - * Finding securityMarks. - * @member {google.cloud.securitycenter.v1beta1.ISecurityMarks|null|undefined} securityMarks - * @memberof google.cloud.securitycenter.v1beta1.Finding + * ListAssetsResponse readTime. + * @member {google.protobuf.ITimestamp|null|undefined} readTime + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse * @instance */ - Finding.prototype.securityMarks = null; + ListAssetsResponse.prototype.readTime = null; /** - * Finding eventTime. - * @member {google.protobuf.ITimestamp|null|undefined} eventTime - * @memberof google.cloud.securitycenter.v1beta1.Finding + * ListAssetsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse * @instance */ - Finding.prototype.eventTime = null; + ListAssetsResponse.prototype.nextPageToken = ""; /** - * Finding createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.securitycenter.v1beta1.Finding + * ListAssetsResponse totalSize. + * @member {number} totalSize + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse * @instance */ - Finding.prototype.createTime = null; + ListAssetsResponse.prototype.totalSize = 0; /** - * Creates a new Finding instance using the specified properties. + * Creates a new ListAssetsResponse instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1beta1.Finding + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse * @static - * @param {google.cloud.securitycenter.v1beta1.IFinding=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1beta1.Finding} Finding instance + * @param {google.cloud.securitycenter.v1beta1.IListAssetsResponse=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1beta1.ListAssetsResponse} ListAssetsResponse instance */ - Finding.create = function create(properties) { - return new Finding(properties); + ListAssetsResponse.create = function create(properties) { + return new ListAssetsResponse(properties); }; /** - * Encodes the specified Finding message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.Finding.verify|verify} messages. + * Encodes the specified ListAssetsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListAssetsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1beta1.Finding + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse * @static - * @param {google.cloud.securitycenter.v1beta1.IFinding} message Finding message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.IListAssetsResponse} message ListAssetsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Finding.encode = function encode(message, writer) { + ListAssetsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.parent); - if (message.resourceName != null && message.hasOwnProperty("resourceName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.resourceName); - if (message.state != null && message.hasOwnProperty("state")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); - if (message.category != null && message.hasOwnProperty("category")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.category); - if (message.externalUri != null && message.hasOwnProperty("externalUri")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.externalUri); - if (message.sourceProperties != null && message.hasOwnProperty("sourceProperties")) - for (var keys = Object.keys(message.sourceProperties), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.protobuf.Value.encode(message.sourceProperties[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) - $root.google.cloud.securitycenter.v1beta1.SecurityMarks.encode(message.securityMarks, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.eventTime != null && message.hasOwnProperty("eventTime")) - $root.google.protobuf.Timestamp.encode(message.eventTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.createTime != null && message.hasOwnProperty("createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.listAssetsResults != null && message.listAssetsResults.length) + for (var i = 0; i < message.listAssetsResults.length; ++i) + $root.google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult.encode(message.listAssetsResults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.readTime != null && message.hasOwnProperty("readTime")) + $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nextPageToken); + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.totalSize); return writer; }; /** - * Encodes the specified Finding message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.Finding.verify|verify} messages. + * Encodes the specified ListAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListAssetsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.Finding + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse * @static - * @param {google.cloud.securitycenter.v1beta1.IFinding} message Finding message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.IListAssetsResponse} message ListAssetsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Finding.encodeDelimited = function encodeDelimited(message, writer) { + ListAssetsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Finding message from the specified reader or buffer. + * Decodes a ListAssetsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1beta1.Finding + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1beta1.Finding} Finding + * @returns {google.cloud.securitycenter.v1beta1.ListAssetsResponse} ListAssetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Finding.decode = function decode(reader, length) { + ListAssetsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.Finding(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.ListAssetsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + if (!(message.listAssetsResults && message.listAssetsResults.length)) + message.listAssetsResults = []; + message.listAssetsResults.push($root.google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult.decode(reader, reader.uint32())); break; case 2: - message.parent = reader.string(); + message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; case 3: - message.resourceName = reader.string(); + message.nextPageToken = reader.string(); break; case 4: - message.state = reader.int32(); - break; - case 5: - message.category = reader.string(); - break; - case 6: - message.externalUri = reader.string(); - break; - case 7: - reader.skip().pos++; - if (message.sourceProperties === $util.emptyObject) - message.sourceProperties = {}; - key = reader.string(); - reader.pos++; - message.sourceProperties[key] = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - case 8: - message.securityMarks = $root.google.cloud.securitycenter.v1beta1.SecurityMarks.decode(reader, reader.uint32()); - break; - case 9: - message.eventTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 10: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.totalSize = reader.int32(); break; default: reader.skipType(tag & 7); @@ -16440,748 +15665,2133 @@ }; /** - * Decodes a Finding message from the specified reader or buffer, length delimited. + * Decodes a ListAssetsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.Finding + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1beta1.Finding} Finding + * @returns {google.cloud.securitycenter.v1beta1.ListAssetsResponse} ListAssetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Finding.decodeDelimited = function decodeDelimited(reader) { + ListAssetsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Finding message. + * Verifies a ListAssetsResponse message. * @function verify - * @memberof google.cloud.securitycenter.v1beta1.Finding + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Finding.verify = function verify(message) { + ListAssetsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.resourceName != null && message.hasOwnProperty("resourceName")) - if (!$util.isString(message.resourceName)) - return "resourceName: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.category != null && message.hasOwnProperty("category")) - if (!$util.isString(message.category)) - return "category: string expected"; - if (message.externalUri != null && message.hasOwnProperty("externalUri")) - if (!$util.isString(message.externalUri)) - return "externalUri: string expected"; - if (message.sourceProperties != null && message.hasOwnProperty("sourceProperties")) { - if (!$util.isObject(message.sourceProperties)) - return "sourceProperties: object expected"; - var key = Object.keys(message.sourceProperties); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.sourceProperties[key[i]]); + if (message.listAssetsResults != null && message.hasOwnProperty("listAssetsResults")) { + if (!Array.isArray(message.listAssetsResults)) + return "listAssetsResults: array expected"; + for (var i = 0; i < message.listAssetsResults.length; ++i) { + var error = $root.google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult.verify(message.listAssetsResults[i]); if (error) - return "sourceProperties." + error; + return "listAssetsResults." + error; } } - if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) { - var error = $root.google.cloud.securitycenter.v1beta1.SecurityMarks.verify(message.securityMarks); - if (error) - return "securityMarks." + error; - } - if (message.eventTime != null && message.hasOwnProperty("eventTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.eventTime); - if (error) - return "eventTime." + error; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (message.readTime != null && message.hasOwnProperty("readTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.readTime); if (error) - return "createTime." + error; + return "readTime." + error; } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; return null; }; /** - * Creates a Finding message from a plain object. Also converts values to their respective internal types. + * Creates a ListAssetsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1beta1.Finding + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1beta1.Finding} Finding + * @returns {google.cloud.securitycenter.v1beta1.ListAssetsResponse} ListAssetsResponse */ - Finding.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1beta1.Finding) + ListAssetsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1beta1.ListAssetsResponse) return object; - var message = new $root.google.cloud.securitycenter.v1beta1.Finding(); - if (object.name != null) - message.name = String(object.name); - if (object.parent != null) - message.parent = String(object.parent); - if (object.resourceName != null) - message.resourceName = String(object.resourceName); - switch (object.state) { - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "ACTIVE": - case 1: - message.state = 1; - break; - case "INACTIVE": - case 2: - message.state = 2; - break; - } - if (object.category != null) - message.category = String(object.category); - if (object.externalUri != null) - message.externalUri = String(object.externalUri); - if (object.sourceProperties) { - if (typeof object.sourceProperties !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.Finding.sourceProperties: object expected"); - message.sourceProperties = {}; - for (var keys = Object.keys(object.sourceProperties), i = 0; i < keys.length; ++i) { - if (typeof object.sourceProperties[keys[i]] !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.Finding.sourceProperties: object expected"); - message.sourceProperties[keys[i]] = $root.google.protobuf.Value.fromObject(object.sourceProperties[keys[i]]); + var message = new $root.google.cloud.securitycenter.v1beta1.ListAssetsResponse(); + if (object.listAssetsResults) { + if (!Array.isArray(object.listAssetsResults)) + throw TypeError(".google.cloud.securitycenter.v1beta1.ListAssetsResponse.listAssetsResults: array expected"); + message.listAssetsResults = []; + for (var i = 0; i < object.listAssetsResults.length; ++i) { + if (typeof object.listAssetsResults[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.ListAssetsResponse.listAssetsResults: object expected"); + message.listAssetsResults[i] = $root.google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult.fromObject(object.listAssetsResults[i]); } } - if (object.securityMarks != null) { - if (typeof object.securityMarks !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.Finding.securityMarks: object expected"); - message.securityMarks = $root.google.cloud.securitycenter.v1beta1.SecurityMarks.fromObject(object.securityMarks); - } - if (object.eventTime != null) { - if (typeof object.eventTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.Finding.eventTime: object expected"); - message.eventTime = $root.google.protobuf.Timestamp.fromObject(object.eventTime); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.Finding.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + if (object.readTime != null) { + if (typeof object.readTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.ListAssetsResponse.readTime: object expected"); + message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; return message; }; /** - * Creates a plain object from a Finding message. Also converts values to other types if specified. + * Creates a plain object from a ListAssetsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1beta1.Finding + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse * @static - * @param {google.cloud.securitycenter.v1beta1.Finding} message Finding + * @param {google.cloud.securitycenter.v1beta1.ListAssetsResponse} message ListAssetsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Finding.toObject = function toObject(message, options) { + ListAssetsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.sourceProperties = {}; + if (options.arrays || options.defaults) + object.listAssetsResults = []; if (options.defaults) { - object.name = ""; - object.parent = ""; - object.resourceName = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.category = ""; - object.externalUri = ""; - object.securityMarks = null; - object.eventTime = null; - object.createTime = null; + object.readTime = null; + object.nextPageToken = ""; + object.totalSize = 0; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.resourceName != null && message.hasOwnProperty("resourceName")) - object.resourceName = message.resourceName; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.securitycenter.v1beta1.Finding.State[message.state] : message.state; - if (message.category != null && message.hasOwnProperty("category")) - object.category = message.category; - if (message.externalUri != null && message.hasOwnProperty("externalUri")) - object.externalUri = message.externalUri; - var keys2; - if (message.sourceProperties && (keys2 = Object.keys(message.sourceProperties)).length) { - object.sourceProperties = {}; - for (var j = 0; j < keys2.length; ++j) - object.sourceProperties[keys2[j]] = $root.google.protobuf.Value.toObject(message.sourceProperties[keys2[j]], options); + if (message.listAssetsResults && message.listAssetsResults.length) { + object.listAssetsResults = []; + for (var j = 0; j < message.listAssetsResults.length; ++j) + object.listAssetsResults[j] = $root.google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult.toObject(message.listAssetsResults[j], options); } - if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) - object.securityMarks = $root.google.cloud.securitycenter.v1beta1.SecurityMarks.toObject(message.securityMarks, options); - if (message.eventTime != null && message.hasOwnProperty("eventTime")) - object.eventTime = $root.google.protobuf.Timestamp.toObject(message.eventTime, options); - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.readTime != null && message.hasOwnProperty("readTime")) + object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; return object; }; /** - * Converts this Finding to JSON. + * Converts this ListAssetsResponse to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1beta1.Finding + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse * @instance * @returns {Object.} JSON object */ - Finding.prototype.toJSON = function toJSON() { + ListAssetsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * State enum. - * @name google.cloud.securitycenter.v1beta1.Finding.State - * @enum {string} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} INACTIVE=2 INACTIVE value - */ - Finding.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "INACTIVE"] = 2; - return values; - })(); + ListAssetsResponse.ListAssetsResult = (function() { - return Finding; - })(); + /** + * Properties of a ListAssetsResult. + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse + * @interface IListAssetsResult + * @property {google.cloud.securitycenter.v1beta1.IAsset|null} [asset] ListAssetsResult asset + * @property {google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult.State|null} [state] ListAssetsResult state + */ - v1beta1.OrganizationSettings = (function() { + /** + * Constructs a new ListAssetsResult. + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse + * @classdesc Represents a ListAssetsResult. + * @implements IListAssetsResult + * @constructor + * @param {google.cloud.securitycenter.v1beta1.ListAssetsResponse.IListAssetsResult=} [properties] Properties to set + */ + function ListAssetsResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Properties of an OrganizationSettings. - * @memberof google.cloud.securitycenter.v1beta1 - * @interface IOrganizationSettings - * @property {string|null} [name] OrganizationSettings name - * @property {boolean|null} [enableAssetDiscovery] OrganizationSettings enableAssetDiscovery - * @property {google.cloud.securitycenter.v1beta1.OrganizationSettings.IAssetDiscoveryConfig|null} [assetDiscoveryConfig] OrganizationSettings assetDiscoveryConfig - */ + /** + * ListAssetsResult asset. + * @member {google.cloud.securitycenter.v1beta1.IAsset|null|undefined} asset + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult + * @instance + */ + ListAssetsResult.prototype.asset = null; - /** - * Constructs a new OrganizationSettings. - * @memberof google.cloud.securitycenter.v1beta1 - * @classdesc Represents an OrganizationSettings. - * @implements IOrganizationSettings - * @constructor - * @param {google.cloud.securitycenter.v1beta1.IOrganizationSettings=} [properties] Properties to set - */ - function OrganizationSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * ListAssetsResult state. + * @member {google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult.State} state + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult + * @instance + */ + ListAssetsResult.prototype.state = 0; - /** - * OrganizationSettings name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings - * @instance - */ - OrganizationSettings.prototype.name = ""; + /** + * Creates a new ListAssetsResult instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult + * @static + * @param {google.cloud.securitycenter.v1beta1.ListAssetsResponse.IListAssetsResult=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult} ListAssetsResult instance + */ + ListAssetsResult.create = function create(properties) { + return new ListAssetsResult(properties); + }; - /** - * OrganizationSettings enableAssetDiscovery. - * @member {boolean} enableAssetDiscovery - * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings - * @instance - */ - OrganizationSettings.prototype.enableAssetDiscovery = false; + /** + * Encodes the specified ListAssetsResult message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult + * @static + * @param {google.cloud.securitycenter.v1beta1.ListAssetsResponse.IListAssetsResult} message ListAssetsResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAssetsResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.asset != null && message.hasOwnProperty("asset")) + $root.google.cloud.securitycenter.v1beta1.Asset.encode(message.asset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.state != null && message.hasOwnProperty("state")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); + return writer; + }; - /** - * OrganizationSettings assetDiscoveryConfig. - * @member {google.cloud.securitycenter.v1beta1.OrganizationSettings.IAssetDiscoveryConfig|null|undefined} assetDiscoveryConfig - * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings - * @instance - */ - OrganizationSettings.prototype.assetDiscoveryConfig = null; + /** + * Encodes the specified ListAssetsResult message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult + * @static + * @param {google.cloud.securitycenter.v1beta1.ListAssetsResponse.IListAssetsResult} message ListAssetsResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAssetsResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a new OrganizationSettings instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings - * @static - * @param {google.cloud.securitycenter.v1beta1.IOrganizationSettings=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1beta1.OrganizationSettings} OrganizationSettings instance - */ - OrganizationSettings.create = function create(properties) { - return new OrganizationSettings(properties); - }; + /** + * Decodes a ListAssetsResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult} ListAssetsResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAssetsResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.asset = $root.google.cloud.securitycenter.v1beta1.Asset.decode(reader, reader.uint32()); + break; + case 2: + message.state = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified OrganizationSettings message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.OrganizationSettings.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings - * @static - * @param {google.cloud.securitycenter.v1beta1.IOrganizationSettings} message OrganizationSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OrganizationSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.enableAssetDiscovery != null && message.hasOwnProperty("enableAssetDiscovery")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enableAssetDiscovery); - if (message.assetDiscoveryConfig != null && message.hasOwnProperty("assetDiscoveryConfig")) - $root.google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig.encode(message.assetDiscoveryConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + /** + * Decodes a ListAssetsResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult} ListAssetsResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAssetsResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified OrganizationSettings message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.OrganizationSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings - * @static - * @param {google.cloud.securitycenter.v1beta1.IOrganizationSettings} message OrganizationSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OrganizationSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Verifies a ListAssetsResult message. + * @function verify + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAssetsResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.asset != null && message.hasOwnProperty("asset")) { + var error = $root.google.cloud.securitycenter.v1beta1.Asset.verify(message.asset); + if (error) + return "asset." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; - /** - * Decodes an OrganizationSettings message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1beta1.OrganizationSettings} OrganizationSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OrganizationSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.OrganizationSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + /** + * Creates a ListAssetsResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult} ListAssetsResult + */ + ListAssetsResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult) + return object; + var message = new $root.google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult(); + if (object.asset != null) { + if (typeof object.asset !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult.asset: object expected"); + message.asset = $root.google.cloud.securitycenter.v1beta1.Asset.fromObject(object.asset); + } + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "UNUSED": case 1: - message.name = reader.string(); + message.state = 1; break; + case "ADDED": case 2: - message.enableAssetDiscovery = reader.bool(); + message.state = 2; break; + case "REMOVED": case 3: - message.assetDiscoveryConfig = $root.google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig.decode(reader, reader.uint32()); + message.state = 3; break; - default: - reader.skipType(tag & 7); + case "ACTIVE": + case 4: + message.state = 4; break; } - } - return message; - }; + return message; + }; + + /** + * Creates a plain object from a ListAssetsResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult + * @static + * @param {google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult} message ListAssetsResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAssetsResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.asset = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + } + if (message.asset != null && message.hasOwnProperty("asset")) + object.asset = $root.google.cloud.securitycenter.v1beta1.Asset.toObject(message.asset, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult.State[message.state] : message.state; + return object; + }; + + /** + * Converts this ListAssetsResult to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult + * @instance + * @returns {Object.} JSON object + */ + ListAssetsResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * State enum. + * @name google.cloud.securitycenter.v1beta1.ListAssetsResponse.ListAssetsResult.State + * @enum {string} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} UNUSED=1 UNUSED value + * @property {number} ADDED=2 ADDED value + * @property {number} REMOVED=3 REMOVED value + * @property {number} ACTIVE=4 ACTIVE value + */ + ListAssetsResult.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "UNUSED"] = 1; + values[valuesById[2] = "ADDED"] = 2; + values[valuesById[3] = "REMOVED"] = 3; + values[valuesById[4] = "ACTIVE"] = 4; + return values; + })(); + + return ListAssetsResult; + })(); + + return ListAssetsResponse; + })(); + + v1beta1.ListFindingsRequest = (function() { /** - * Decodes an OrganizationSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1beta1.OrganizationSettings} OrganizationSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Properties of a ListFindingsRequest. + * @memberof google.cloud.securitycenter.v1beta1 + * @interface IListFindingsRequest + * @property {string|null} [parent] ListFindingsRequest parent + * @property {string|null} [filter] ListFindingsRequest filter + * @property {string|null} [orderBy] ListFindingsRequest orderBy + * @property {google.protobuf.ITimestamp|null} [readTime] ListFindingsRequest readTime + * @property {google.protobuf.IFieldMask|null} [fieldMask] ListFindingsRequest fieldMask + * @property {string|null} [pageToken] ListFindingsRequest pageToken + * @property {number|null} [pageSize] ListFindingsRequest pageSize */ - OrganizationSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies an OrganizationSettings message. - * @function verify - * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Constructs a new ListFindingsRequest. + * @memberof google.cloud.securitycenter.v1beta1 + * @classdesc Represents a ListFindingsRequest. + * @implements IListFindingsRequest + * @constructor + * @param {google.cloud.securitycenter.v1beta1.IListFindingsRequest=} [properties] Properties to set */ - OrganizationSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.enableAssetDiscovery != null && message.hasOwnProperty("enableAssetDiscovery")) - if (typeof message.enableAssetDiscovery !== "boolean") - return "enableAssetDiscovery: boolean expected"; - if (message.assetDiscoveryConfig != null && message.hasOwnProperty("assetDiscoveryConfig")) { - var error = $root.google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig.verify(message.assetDiscoveryConfig); - if (error) - return "assetDiscoveryConfig." + error; - } - return null; - }; + function ListFindingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Creates an OrganizationSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1beta1.OrganizationSettings} OrganizationSettings + * ListFindingsRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1beta1.ListFindingsRequest + * @instance */ - OrganizationSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1beta1.OrganizationSettings) - return object; - var message = new $root.google.cloud.securitycenter.v1beta1.OrganizationSettings(); - if (object.name != null) - message.name = String(object.name); - if (object.enableAssetDiscovery != null) - message.enableAssetDiscovery = Boolean(object.enableAssetDiscovery); - if (object.assetDiscoveryConfig != null) { - if (typeof object.assetDiscoveryConfig !== "object") - throw TypeError(".google.cloud.securitycenter.v1beta1.OrganizationSettings.assetDiscoveryConfig: object expected"); - message.assetDiscoveryConfig = $root.google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig.fromObject(object.assetDiscoveryConfig); - } - return message; - }; + ListFindingsRequest.prototype.parent = ""; /** - * Creates a plain object from an OrganizationSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings - * @static - * @param {google.cloud.securitycenter.v1beta1.OrganizationSettings} message OrganizationSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * ListFindingsRequest filter. + * @member {string} filter + * @memberof google.cloud.securitycenter.v1beta1.ListFindingsRequest + * @instance */ - OrganizationSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.enableAssetDiscovery = false; - object.assetDiscoveryConfig = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.enableAssetDiscovery != null && message.hasOwnProperty("enableAssetDiscovery")) - object.enableAssetDiscovery = message.enableAssetDiscovery; - if (message.assetDiscoveryConfig != null && message.hasOwnProperty("assetDiscoveryConfig")) - object.assetDiscoveryConfig = $root.google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig.toObject(message.assetDiscoveryConfig, options); - return object; - }; + ListFindingsRequest.prototype.filter = ""; /** - * Converts this OrganizationSettings to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings + * ListFindingsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.securitycenter.v1beta1.ListFindingsRequest * @instance - * @returns {Object.} JSON object */ - OrganizationSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - OrganizationSettings.AssetDiscoveryConfig = (function() { + ListFindingsRequest.prototype.orderBy = ""; - /** - * Properties of an AssetDiscoveryConfig. - * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings - * @interface IAssetDiscoveryConfig - * @property {Array.|null} [projectIds] AssetDiscoveryConfig projectIds - * @property {google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode|null} [inclusionMode] AssetDiscoveryConfig inclusionMode - */ + /** + * ListFindingsRequest readTime. + * @member {google.protobuf.ITimestamp|null|undefined} readTime + * @memberof google.cloud.securitycenter.v1beta1.ListFindingsRequest + * @instance + */ + ListFindingsRequest.prototype.readTime = null; - /** - * Constructs a new AssetDiscoveryConfig. - * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings - * @classdesc Represents an AssetDiscoveryConfig. - * @implements IAssetDiscoveryConfig - * @constructor - * @param {google.cloud.securitycenter.v1beta1.OrganizationSettings.IAssetDiscoveryConfig=} [properties] Properties to set - */ - function AssetDiscoveryConfig(properties) { - this.projectIds = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * ListFindingsRequest fieldMask. + * @member {google.protobuf.IFieldMask|null|undefined} fieldMask + * @memberof google.cloud.securitycenter.v1beta1.ListFindingsRequest + * @instance + */ + ListFindingsRequest.prototype.fieldMask = null; - /** - * AssetDiscoveryConfig projectIds. - * @member {Array.} projectIds - * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig - * @instance - */ - AssetDiscoveryConfig.prototype.projectIds = $util.emptyArray; + /** + * ListFindingsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.securitycenter.v1beta1.ListFindingsRequest + * @instance + */ + ListFindingsRequest.prototype.pageToken = ""; - /** - * AssetDiscoveryConfig inclusionMode. - * @member {google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode} inclusionMode - * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig - * @instance - */ - AssetDiscoveryConfig.prototype.inclusionMode = 0; + /** + * ListFindingsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.securitycenter.v1beta1.ListFindingsRequest + * @instance + */ + ListFindingsRequest.prototype.pageSize = 0; - /** - * Creates a new AssetDiscoveryConfig instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig - * @static - * @param {google.cloud.securitycenter.v1beta1.OrganizationSettings.IAssetDiscoveryConfig=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig} AssetDiscoveryConfig instance - */ - AssetDiscoveryConfig.create = function create(properties) { - return new AssetDiscoveryConfig(properties); - }; + /** + * Creates a new ListFindingsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1beta1.ListFindingsRequest + * @static + * @param {google.cloud.securitycenter.v1beta1.IListFindingsRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1beta1.ListFindingsRequest} ListFindingsRequest instance + */ + ListFindingsRequest.create = function create(properties) { + return new ListFindingsRequest(properties); + }; - /** - * Encodes the specified AssetDiscoveryConfig message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig - * @static - * @param {google.cloud.securitycenter.v1beta1.OrganizationSettings.IAssetDiscoveryConfig} message AssetDiscoveryConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AssetDiscoveryConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectIds != null && message.projectIds.length) - for (var i = 0; i < message.projectIds.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectIds[i]); - if (message.inclusionMode != null && message.hasOwnProperty("inclusionMode")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.inclusionMode); - return writer; - }; + /** + * Encodes the specified ListFindingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListFindingsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1beta1.ListFindingsRequest + * @static + * @param {google.cloud.securitycenter.v1beta1.IListFindingsRequest} message ListFindingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFindingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.orderBy); + if (message.readTime != null && message.hasOwnProperty("readTime")) + $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) + $root.google.protobuf.FieldMask.encode(message.fieldMask, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.pageToken); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.pageSize); + return writer; + }; - /** - * Encodes the specified AssetDiscoveryConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig - * @static - * @param {google.cloud.securitycenter.v1beta1.OrganizationSettings.IAssetDiscoveryConfig} message AssetDiscoveryConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AssetDiscoveryConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ListFindingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListFindingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1beta1.ListFindingsRequest + * @static + * @param {google.cloud.securitycenter.v1beta1.IListFindingsRequest} message ListFindingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFindingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes an AssetDiscoveryConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig} AssetDiscoveryConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AssetDiscoveryConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.projectIds && message.projectIds.length)) - message.projectIds = []; - message.projectIds.push(reader.string()); - break; - case 2: - message.inclusionMode = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Decodes a ListFindingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1beta1.ListFindingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1beta1.ListFindingsRequest} ListFindingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFindingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.ListFindingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.filter = reader.string(); + break; + case 3: + message.orderBy = reader.string(); + break; + case 4: + message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 6: + message.pageToken = reader.string(); + break; + case 7: + message.pageSize = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Decodes an AssetDiscoveryConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig} AssetDiscoveryConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AssetDiscoveryConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a ListFindingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1beta1.ListFindingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1beta1.ListFindingsRequest} ListFindingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFindingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an AssetDiscoveryConfig message. - * @function verify - * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AssetDiscoveryConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectIds != null && message.hasOwnProperty("projectIds")) { - if (!Array.isArray(message.projectIds)) - return "projectIds: array expected"; - for (var i = 0; i < message.projectIds.length; ++i) - if (!$util.isString(message.projectIds[i])) - return "projectIds: string[] expected"; + /** + * Verifies a ListFindingsRequest message. + * @function verify + * @memberof google.cloud.securitycenter.v1beta1.ListFindingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListFindingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.readTime != null && message.hasOwnProperty("readTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.readTime); + if (error) + return "readTime." + error; + } + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.fieldMask); + if (error) + return "fieldMask." + error; + } + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + return null; + }; + + /** + * Creates a ListFindingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1beta1.ListFindingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1beta1.ListFindingsRequest} ListFindingsRequest + */ + ListFindingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1beta1.ListFindingsRequest) + return object; + var message = new $root.google.cloud.securitycenter.v1beta1.ListFindingsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.readTime != null) { + if (typeof object.readTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.ListFindingsRequest.readTime: object expected"); + message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); + } + if (object.fieldMask != null) { + if (typeof object.fieldMask !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.ListFindingsRequest.fieldMask: object expected"); + message.fieldMask = $root.google.protobuf.FieldMask.fromObject(object.fieldMask); + } + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + return message; + }; + + /** + * Creates a plain object from a ListFindingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1beta1.ListFindingsRequest + * @static + * @param {google.cloud.securitycenter.v1beta1.ListFindingsRequest} message ListFindingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListFindingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.filter = ""; + object.orderBy = ""; + object.readTime = null; + object.fieldMask = null; + object.pageToken = ""; + object.pageSize = 0; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.readTime != null && message.hasOwnProperty("readTime")) + object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) + object.fieldMask = $root.google.protobuf.FieldMask.toObject(message.fieldMask, options); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + return object; + }; + + /** + * Converts this ListFindingsRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1beta1.ListFindingsRequest + * @instance + * @returns {Object.} JSON object + */ + ListFindingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListFindingsRequest; + })(); + + v1beta1.ListFindingsResponse = (function() { + + /** + * Properties of a ListFindingsResponse. + * @memberof google.cloud.securitycenter.v1beta1 + * @interface IListFindingsResponse + * @property {Array.|null} [findings] ListFindingsResponse findings + * @property {google.protobuf.ITimestamp|null} [readTime] ListFindingsResponse readTime + * @property {string|null} [nextPageToken] ListFindingsResponse nextPageToken + * @property {number|null} [totalSize] ListFindingsResponse totalSize + */ + + /** + * Constructs a new ListFindingsResponse. + * @memberof google.cloud.securitycenter.v1beta1 + * @classdesc Represents a ListFindingsResponse. + * @implements IListFindingsResponse + * @constructor + * @param {google.cloud.securitycenter.v1beta1.IListFindingsResponse=} [properties] Properties to set + */ + function ListFindingsResponse(properties) { + this.findings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListFindingsResponse findings. + * @member {Array.} findings + * @memberof google.cloud.securitycenter.v1beta1.ListFindingsResponse + * @instance + */ + ListFindingsResponse.prototype.findings = $util.emptyArray; + + /** + * ListFindingsResponse readTime. + * @member {google.protobuf.ITimestamp|null|undefined} readTime + * @memberof google.cloud.securitycenter.v1beta1.ListFindingsResponse + * @instance + */ + ListFindingsResponse.prototype.readTime = null; + + /** + * ListFindingsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.securitycenter.v1beta1.ListFindingsResponse + * @instance + */ + ListFindingsResponse.prototype.nextPageToken = ""; + + /** + * ListFindingsResponse totalSize. + * @member {number} totalSize + * @memberof google.cloud.securitycenter.v1beta1.ListFindingsResponse + * @instance + */ + ListFindingsResponse.prototype.totalSize = 0; + + /** + * Creates a new ListFindingsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1beta1.ListFindingsResponse + * @static + * @param {google.cloud.securitycenter.v1beta1.IListFindingsResponse=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1beta1.ListFindingsResponse} ListFindingsResponse instance + */ + ListFindingsResponse.create = function create(properties) { + return new ListFindingsResponse(properties); + }; + + /** + * Encodes the specified ListFindingsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListFindingsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1beta1.ListFindingsResponse + * @static + * @param {google.cloud.securitycenter.v1beta1.IListFindingsResponse} message ListFindingsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFindingsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.findings != null && message.findings.length) + for (var i = 0; i < message.findings.length; ++i) + $root.google.cloud.securitycenter.v1beta1.Finding.encode(message.findings[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.readTime != null && message.hasOwnProperty("readTime")) + $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nextPageToken); + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.totalSize); + return writer; + }; + + /** + * Encodes the specified ListFindingsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.ListFindingsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1beta1.ListFindingsResponse + * @static + * @param {google.cloud.securitycenter.v1beta1.IListFindingsResponse} message ListFindingsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFindingsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListFindingsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1beta1.ListFindingsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1beta1.ListFindingsResponse} ListFindingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFindingsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.ListFindingsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.findings && message.findings.length)) + message.findings = []; + message.findings.push($root.google.cloud.securitycenter.v1beta1.Finding.decode(reader, reader.uint32())); + break; + case 2: + message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.nextPageToken = reader.string(); + break; + case 4: + message.totalSize = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListFindingsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1beta1.ListFindingsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1beta1.ListFindingsResponse} ListFindingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFindingsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListFindingsResponse message. + * @function verify + * @memberof google.cloud.securitycenter.v1beta1.ListFindingsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListFindingsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.findings != null && message.hasOwnProperty("findings")) { + if (!Array.isArray(message.findings)) + return "findings: array expected"; + for (var i = 0; i < message.findings.length; ++i) { + var error = $root.google.cloud.securitycenter.v1beta1.Finding.verify(message.findings[i]); + if (error) + return "findings." + error; + } + } + if (message.readTime != null && message.hasOwnProperty("readTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.readTime); + if (error) + return "readTime." + error; + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; + return null; + }; + + /** + * Creates a ListFindingsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1beta1.ListFindingsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1beta1.ListFindingsResponse} ListFindingsResponse + */ + ListFindingsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1beta1.ListFindingsResponse) + return object; + var message = new $root.google.cloud.securitycenter.v1beta1.ListFindingsResponse(); + if (object.findings) { + if (!Array.isArray(object.findings)) + throw TypeError(".google.cloud.securitycenter.v1beta1.ListFindingsResponse.findings: array expected"); + message.findings = []; + for (var i = 0; i < object.findings.length; ++i) { + if (typeof object.findings[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.ListFindingsResponse.findings: object expected"); + message.findings[i] = $root.google.cloud.securitycenter.v1beta1.Finding.fromObject(object.findings[i]); + } + } + if (object.readTime != null) { + if (typeof object.readTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.ListFindingsResponse.readTime: object expected"); + message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; + return message; + }; + + /** + * Creates a plain object from a ListFindingsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1beta1.ListFindingsResponse + * @static + * @param {google.cloud.securitycenter.v1beta1.ListFindingsResponse} message ListFindingsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListFindingsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.findings = []; + if (options.defaults) { + object.readTime = null; + object.nextPageToken = ""; + object.totalSize = 0; + } + if (message.findings && message.findings.length) { + object.findings = []; + for (var j = 0; j < message.findings.length; ++j) + object.findings[j] = $root.google.cloud.securitycenter.v1beta1.Finding.toObject(message.findings[j], options); + } + if (message.readTime != null && message.hasOwnProperty("readTime")) + object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; + return object; + }; + + /** + * Converts this ListFindingsResponse to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1beta1.ListFindingsResponse + * @instance + * @returns {Object.} JSON object + */ + ListFindingsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListFindingsResponse; + })(); + + v1beta1.SetFindingStateRequest = (function() { + + /** + * Properties of a SetFindingStateRequest. + * @memberof google.cloud.securitycenter.v1beta1 + * @interface ISetFindingStateRequest + * @property {string|null} [name] SetFindingStateRequest name + * @property {google.cloud.securitycenter.v1beta1.Finding.State|null} [state] SetFindingStateRequest state + * @property {google.protobuf.ITimestamp|null} [startTime] SetFindingStateRequest startTime + */ + + /** + * Constructs a new SetFindingStateRequest. + * @memberof google.cloud.securitycenter.v1beta1 + * @classdesc Represents a SetFindingStateRequest. + * @implements ISetFindingStateRequest + * @constructor + * @param {google.cloud.securitycenter.v1beta1.ISetFindingStateRequest=} [properties] Properties to set + */ + function SetFindingStateRequest(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]]; + } + + /** + * SetFindingStateRequest name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1beta1.SetFindingStateRequest + * @instance + */ + SetFindingStateRequest.prototype.name = ""; + + /** + * SetFindingStateRequest state. + * @member {google.cloud.securitycenter.v1beta1.Finding.State} state + * @memberof google.cloud.securitycenter.v1beta1.SetFindingStateRequest + * @instance + */ + SetFindingStateRequest.prototype.state = 0; + + /** + * SetFindingStateRequest startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.securitycenter.v1beta1.SetFindingStateRequest + * @instance + */ + SetFindingStateRequest.prototype.startTime = null; + + /** + * Creates a new SetFindingStateRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1beta1.SetFindingStateRequest + * @static + * @param {google.cloud.securitycenter.v1beta1.ISetFindingStateRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1beta1.SetFindingStateRequest} SetFindingStateRequest instance + */ + SetFindingStateRequest.create = function create(properties) { + return new SetFindingStateRequest(properties); + }; + + /** + * Encodes the specified SetFindingStateRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.SetFindingStateRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1beta1.SetFindingStateRequest + * @static + * @param {google.cloud.securitycenter.v1beta1.ISetFindingStateRequest} message SetFindingStateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetFindingStateRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.state != null && message.hasOwnProperty("state")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); + if (message.startTime != null && message.hasOwnProperty("startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SetFindingStateRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.SetFindingStateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1beta1.SetFindingStateRequest + * @static + * @param {google.cloud.securitycenter.v1beta1.ISetFindingStateRequest} message SetFindingStateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetFindingStateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetFindingStateRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1beta1.SetFindingStateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1beta1.SetFindingStateRequest} SetFindingStateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetFindingStateRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.SetFindingStateRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.state = reader.int32(); + break; + case 3: + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetFindingStateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1beta1.SetFindingStateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1beta1.SetFindingStateRequest} SetFindingStateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetFindingStateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetFindingStateRequest message. + * @function verify + * @memberof google.cloud.securitycenter.v1beta1.SetFindingStateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetFindingStateRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + return null; + }; + + /** + * Creates a SetFindingStateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1beta1.SetFindingStateRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1beta1.SetFindingStateRequest} SetFindingStateRequest + */ + SetFindingStateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1beta1.SetFindingStateRequest) + return object; + var message = new $root.google.cloud.securitycenter.v1beta1.SetFindingStateRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ACTIVE": + case 1: + message.state = 1; + break; + case "INACTIVE": + case 2: + message.state = 2; + break; + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.SetFindingStateRequest.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + return message; + }; + + /** + * Creates a plain object from a SetFindingStateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1beta1.SetFindingStateRequest + * @static + * @param {google.cloud.securitycenter.v1beta1.SetFindingStateRequest} message SetFindingStateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetFindingStateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.startTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.securitycenter.v1beta1.Finding.State[message.state] : message.state; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + return object; + }; + + /** + * Converts this SetFindingStateRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1beta1.SetFindingStateRequest + * @instance + * @returns {Object.} JSON object + */ + SetFindingStateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SetFindingStateRequest; + })(); + + v1beta1.RunAssetDiscoveryRequest = (function() { + + /** + * Properties of a RunAssetDiscoveryRequest. + * @memberof google.cloud.securitycenter.v1beta1 + * @interface IRunAssetDiscoveryRequest + * @property {string|null} [parent] RunAssetDiscoveryRequest parent + */ + + /** + * Constructs a new RunAssetDiscoveryRequest. + * @memberof google.cloud.securitycenter.v1beta1 + * @classdesc Represents a RunAssetDiscoveryRequest. + * @implements IRunAssetDiscoveryRequest + * @constructor + * @param {google.cloud.securitycenter.v1beta1.IRunAssetDiscoveryRequest=} [properties] Properties to set + */ + function RunAssetDiscoveryRequest(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]]; + } + + /** + * RunAssetDiscoveryRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest + * @instance + */ + RunAssetDiscoveryRequest.prototype.parent = ""; + + /** + * Creates a new RunAssetDiscoveryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest + * @static + * @param {google.cloud.securitycenter.v1beta1.IRunAssetDiscoveryRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest} RunAssetDiscoveryRequest instance + */ + RunAssetDiscoveryRequest.create = function create(properties) { + return new RunAssetDiscoveryRequest(properties); + }; + + /** + * Encodes the specified RunAssetDiscoveryRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest + * @static + * @param {google.cloud.securitycenter.v1beta1.IRunAssetDiscoveryRequest} message RunAssetDiscoveryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunAssetDiscoveryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + return writer; + }; + + /** + * Encodes the specified RunAssetDiscoveryRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest + * @static + * @param {google.cloud.securitycenter.v1beta1.IRunAssetDiscoveryRequest} message RunAssetDiscoveryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunAssetDiscoveryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunAssetDiscoveryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest} RunAssetDiscoveryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunAssetDiscoveryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } - if (message.inclusionMode != null && message.hasOwnProperty("inclusionMode")) - switch (message.inclusionMode) { - default: - return "inclusionMode: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; + } + return message; + }; + + /** + * Decodes a RunAssetDiscoveryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest} RunAssetDiscoveryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunAssetDiscoveryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunAssetDiscoveryRequest message. + * @function verify + * @memberof google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunAssetDiscoveryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + return null; + }; + + /** + * Creates a RunAssetDiscoveryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest} RunAssetDiscoveryRequest + */ + RunAssetDiscoveryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest) + return object; + var message = new $root.google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest(); + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from a RunAssetDiscoveryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest + * @static + * @param {google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest} message RunAssetDiscoveryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunAssetDiscoveryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + return object; + }; + + /** + * Converts this RunAssetDiscoveryRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest + * @instance + * @returns {Object.} JSON object + */ + RunAssetDiscoveryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RunAssetDiscoveryRequest; + })(); + + v1beta1.UpdateFindingRequest = (function() { + + /** + * Properties of an UpdateFindingRequest. + * @memberof google.cloud.securitycenter.v1beta1 + * @interface IUpdateFindingRequest + * @property {google.cloud.securitycenter.v1beta1.IFinding|null} [finding] UpdateFindingRequest finding + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateFindingRequest updateMask + */ + + /** + * Constructs a new UpdateFindingRequest. + * @memberof google.cloud.securitycenter.v1beta1 + * @classdesc Represents an UpdateFindingRequest. + * @implements IUpdateFindingRequest + * @constructor + * @param {google.cloud.securitycenter.v1beta1.IUpdateFindingRequest=} [properties] Properties to set + */ + function UpdateFindingRequest(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]]; + } + + /** + * UpdateFindingRequest finding. + * @member {google.cloud.securitycenter.v1beta1.IFinding|null|undefined} finding + * @memberof google.cloud.securitycenter.v1beta1.UpdateFindingRequest + * @instance + */ + UpdateFindingRequest.prototype.finding = null; + + /** + * UpdateFindingRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.securitycenter.v1beta1.UpdateFindingRequest + * @instance + */ + UpdateFindingRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateFindingRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1beta1.UpdateFindingRequest + * @static + * @param {google.cloud.securitycenter.v1beta1.IUpdateFindingRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1beta1.UpdateFindingRequest} UpdateFindingRequest instance + */ + UpdateFindingRequest.create = function create(properties) { + return new UpdateFindingRequest(properties); + }; + + /** + * Encodes the specified UpdateFindingRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.UpdateFindingRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1beta1.UpdateFindingRequest + * @static + * @param {google.cloud.securitycenter.v1beta1.IUpdateFindingRequest} message UpdateFindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateFindingRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.finding != null && message.hasOwnProperty("finding")) + $root.google.cloud.securitycenter.v1beta1.Finding.encode(message.finding, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Creates an AssetDiscoveryConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig} AssetDiscoveryConfig - */ - AssetDiscoveryConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig) - return object; - var message = new $root.google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig(); - if (object.projectIds) { - if (!Array.isArray(object.projectIds)) - throw TypeError(".google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig.projectIds: array expected"); - message.projectIds = []; - for (var i = 0; i < object.projectIds.length; ++i) - message.projectIds[i] = String(object.projectIds[i]); - } - switch (object.inclusionMode) { - case "INCLUSION_MODE_UNSPECIFIED": - case 0: - message.inclusionMode = 0; + /** + * Encodes the specified UpdateFindingRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.UpdateFindingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1beta1.UpdateFindingRequest + * @static + * @param {google.cloud.securitycenter.v1beta1.IUpdateFindingRequest} message UpdateFindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateFindingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateFindingRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1beta1.UpdateFindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1beta1.UpdateFindingRequest} UpdateFindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateFindingRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.UpdateFindingRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.finding = $root.google.cloud.securitycenter.v1beta1.Finding.decode(reader, reader.uint32()); break; - case "INCLUDE_ONLY": + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateFindingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1beta1.UpdateFindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1beta1.UpdateFindingRequest} UpdateFindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateFindingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateFindingRequest message. + * @function verify + * @memberof google.cloud.securitycenter.v1beta1.UpdateFindingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateFindingRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.finding != null && message.hasOwnProperty("finding")) { + var error = $root.google.cloud.securitycenter.v1beta1.Finding.verify(message.finding); + if (error) + return "finding." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateFindingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1beta1.UpdateFindingRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1beta1.UpdateFindingRequest} UpdateFindingRequest + */ + UpdateFindingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1beta1.UpdateFindingRequest) + return object; + var message = new $root.google.cloud.securitycenter.v1beta1.UpdateFindingRequest(); + if (object.finding != null) { + if (typeof object.finding !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.UpdateFindingRequest.finding: object expected"); + message.finding = $root.google.cloud.securitycenter.v1beta1.Finding.fromObject(object.finding); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.UpdateFindingRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateFindingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1beta1.UpdateFindingRequest + * @static + * @param {google.cloud.securitycenter.v1beta1.UpdateFindingRequest} message UpdateFindingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateFindingRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.finding = null; + object.updateMask = null; + } + if (message.finding != null && message.hasOwnProperty("finding")) + object.finding = $root.google.cloud.securitycenter.v1beta1.Finding.toObject(message.finding, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateFindingRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1beta1.UpdateFindingRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateFindingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateFindingRequest; + })(); + + v1beta1.UpdateOrganizationSettingsRequest = (function() { + + /** + * Properties of an UpdateOrganizationSettingsRequest. + * @memberof google.cloud.securitycenter.v1beta1 + * @interface IUpdateOrganizationSettingsRequest + * @property {google.cloud.securitycenter.v1beta1.IOrganizationSettings|null} [organizationSettings] UpdateOrganizationSettingsRequest organizationSettings + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateOrganizationSettingsRequest updateMask + */ + + /** + * Constructs a new UpdateOrganizationSettingsRequest. + * @memberof google.cloud.securitycenter.v1beta1 + * @classdesc Represents an UpdateOrganizationSettingsRequest. + * @implements IUpdateOrganizationSettingsRequest + * @constructor + * @param {google.cloud.securitycenter.v1beta1.IUpdateOrganizationSettingsRequest=} [properties] Properties to set + */ + function UpdateOrganizationSettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateOrganizationSettingsRequest organizationSettings. + * @member {google.cloud.securitycenter.v1beta1.IOrganizationSettings|null|undefined} organizationSettings + * @memberof google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest + * @instance + */ + UpdateOrganizationSettingsRequest.prototype.organizationSettings = null; + + /** + * UpdateOrganizationSettingsRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest + * @instance + */ + UpdateOrganizationSettingsRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateOrganizationSettingsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest + * @static + * @param {google.cloud.securitycenter.v1beta1.IUpdateOrganizationSettingsRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest} UpdateOrganizationSettingsRequest instance + */ + UpdateOrganizationSettingsRequest.create = function create(properties) { + return new UpdateOrganizationSettingsRequest(properties); + }; + + /** + * Encodes the specified UpdateOrganizationSettingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest + * @static + * @param {google.cloud.securitycenter.v1beta1.IUpdateOrganizationSettingsRequest} message UpdateOrganizationSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateOrganizationSettingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.organizationSettings != null && message.hasOwnProperty("organizationSettings")) + $root.google.cloud.securitycenter.v1beta1.OrganizationSettings.encode(message.organizationSettings, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateOrganizationSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest + * @static + * @param {google.cloud.securitycenter.v1beta1.IUpdateOrganizationSettingsRequest} message UpdateOrganizationSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateOrganizationSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateOrganizationSettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest} UpdateOrganizationSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateOrganizationSettingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { case 1: - message.inclusionMode = 1; + message.organizationSettings = $root.google.cloud.securitycenter.v1beta1.OrganizationSettings.decode(reader, reader.uint32()); break; - case "EXCLUDE": case 2: - message.inclusionMode = 2; + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); break; } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from an AssetDiscoveryConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig - * @static - * @param {google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig} message AssetDiscoveryConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AssetDiscoveryConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.projectIds = []; - if (options.defaults) - object.inclusionMode = options.enums === String ? "INCLUSION_MODE_UNSPECIFIED" : 0; - if (message.projectIds && message.projectIds.length) { - object.projectIds = []; - for (var j = 0; j < message.projectIds.length; ++j) - object.projectIds[j] = message.projectIds[j]; + /** + * Decodes an UpdateOrganizationSettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest} UpdateOrganizationSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateOrganizationSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateOrganizationSettingsRequest message. + * @function verify + * @memberof google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateOrganizationSettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.organizationSettings != null && message.hasOwnProperty("organizationSettings")) { + var error = $root.google.cloud.securitycenter.v1beta1.OrganizationSettings.verify(message.organizationSettings); + if (error) + return "organizationSettings." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateOrganizationSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest} UpdateOrganizationSettingsRequest + */ + UpdateOrganizationSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest) + return object; + var message = new $root.google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest(); + if (object.organizationSettings != null) { + if (typeof object.organizationSettings !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest.organizationSettings: object expected"); + message.organizationSettings = $root.google.cloud.securitycenter.v1beta1.OrganizationSettings.fromObject(object.organizationSettings); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateOrganizationSettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest + * @static + * @param {google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest} message UpdateOrganizationSettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateOrganizationSettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.organizationSettings = null; + object.updateMask = null; + } + if (message.organizationSettings != null && message.hasOwnProperty("organizationSettings")) + object.organizationSettings = $root.google.cloud.securitycenter.v1beta1.OrganizationSettings.toObject(message.organizationSettings, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateOrganizationSettingsRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateOrganizationSettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateOrganizationSettingsRequest; + })(); + + v1beta1.UpdateSourceRequest = (function() { + + /** + * Properties of an UpdateSourceRequest. + * @memberof google.cloud.securitycenter.v1beta1 + * @interface IUpdateSourceRequest + * @property {google.cloud.securitycenter.v1beta1.ISource|null} [source] UpdateSourceRequest source + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSourceRequest updateMask + */ + + /** + * Constructs a new UpdateSourceRequest. + * @memberof google.cloud.securitycenter.v1beta1 + * @classdesc Represents an UpdateSourceRequest. + * @implements IUpdateSourceRequest + * @constructor + * @param {google.cloud.securitycenter.v1beta1.IUpdateSourceRequest=} [properties] Properties to set + */ + function UpdateSourceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateSourceRequest source. + * @member {google.cloud.securitycenter.v1beta1.ISource|null|undefined} source + * @memberof google.cloud.securitycenter.v1beta1.UpdateSourceRequest + * @instance + */ + UpdateSourceRequest.prototype.source = null; + + /** + * UpdateSourceRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.securitycenter.v1beta1.UpdateSourceRequest + * @instance + */ + UpdateSourceRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateSourceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1beta1.UpdateSourceRequest + * @static + * @param {google.cloud.securitycenter.v1beta1.IUpdateSourceRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1beta1.UpdateSourceRequest} UpdateSourceRequest instance + */ + UpdateSourceRequest.create = function create(properties) { + return new UpdateSourceRequest(properties); + }; + + /** + * Encodes the specified UpdateSourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.UpdateSourceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1beta1.UpdateSourceRequest + * @static + * @param {google.cloud.securitycenter.v1beta1.IUpdateSourceRequest} message UpdateSourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSourceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.source != null && message.hasOwnProperty("source")) + $root.google.cloud.securitycenter.v1beta1.Source.encode(message.source, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateSourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.UpdateSourceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1beta1.UpdateSourceRequest + * @static + * @param {google.cloud.securitycenter.v1beta1.IUpdateSourceRequest} message UpdateSourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateSourceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1beta1.UpdateSourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1beta1.UpdateSourceRequest} UpdateSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSourceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.UpdateSourceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.source = $root.google.cloud.securitycenter.v1beta1.Source.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } - if (message.inclusionMode != null && message.hasOwnProperty("inclusionMode")) - object.inclusionMode = options.enums === String ? $root.google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode[message.inclusionMode] : message.inclusionMode; - return object; - }; + } + return message; + }; - /** - * Converts this AssetDiscoveryConfig to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig - * @instance - * @returns {Object.} JSON object - */ - AssetDiscoveryConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes an UpdateSourceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1beta1.UpdateSourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1beta1.UpdateSourceRequest} UpdateSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSourceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * InclusionMode enum. - * @name google.cloud.securitycenter.v1beta1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode - * @enum {string} - * @property {number} INCLUSION_MODE_UNSPECIFIED=0 INCLUSION_MODE_UNSPECIFIED value - * @property {number} INCLUDE_ONLY=1 INCLUDE_ONLY value - * @property {number} EXCLUDE=2 EXCLUDE value - */ - AssetDiscoveryConfig.InclusionMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INCLUSION_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INCLUDE_ONLY"] = 1; - values[valuesById[2] = "EXCLUDE"] = 2; - return values; - })(); + /** + * Verifies an UpdateSourceRequest message. + * @function verify + * @memberof google.cloud.securitycenter.v1beta1.UpdateSourceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateSourceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.source != null && message.hasOwnProperty("source")) { + var error = $root.google.cloud.securitycenter.v1beta1.Source.verify(message.source); + if (error) + return "source." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; - return AssetDiscoveryConfig; - })(); + /** + * Creates an UpdateSourceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1beta1.UpdateSourceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1beta1.UpdateSourceRequest} UpdateSourceRequest + */ + UpdateSourceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1beta1.UpdateSourceRequest) + return object; + var message = new $root.google.cloud.securitycenter.v1beta1.UpdateSourceRequest(); + if (object.source != null) { + if (typeof object.source !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.UpdateSourceRequest.source: object expected"); + message.source = $root.google.cloud.securitycenter.v1beta1.Source.fromObject(object.source); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.UpdateSourceRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; - return OrganizationSettings; + /** + * Creates a plain object from an UpdateSourceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1beta1.UpdateSourceRequest + * @static + * @param {google.cloud.securitycenter.v1beta1.UpdateSourceRequest} message UpdateSourceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateSourceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.source = null; + object.updateMask = null; + } + if (message.source != null && message.hasOwnProperty("source")) + object.source = $root.google.cloud.securitycenter.v1beta1.Source.toObject(message.source, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateSourceRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1beta1.UpdateSourceRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateSourceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateSourceRequest; })(); - v1beta1.Source = (function() { + v1beta1.UpdateSecurityMarksRequest = (function() { /** - * Properties of a Source. + * Properties of an UpdateSecurityMarksRequest. * @memberof google.cloud.securitycenter.v1beta1 - * @interface ISource - * @property {string|null} [name] Source name - * @property {string|null} [displayName] Source displayName - * @property {string|null} [description] Source description + * @interface IUpdateSecurityMarksRequest + * @property {google.cloud.securitycenter.v1beta1.ISecurityMarks|null} [securityMarks] UpdateSecurityMarksRequest securityMarks + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSecurityMarksRequest updateMask + * @property {google.protobuf.ITimestamp|null} [startTime] UpdateSecurityMarksRequest startTime */ /** - * Constructs a new Source. + * Constructs a new UpdateSecurityMarksRequest. * @memberof google.cloud.securitycenter.v1beta1 - * @classdesc Represents a Source. - * @implements ISource + * @classdesc Represents an UpdateSecurityMarksRequest. + * @implements IUpdateSecurityMarksRequest * @constructor - * @param {google.cloud.securitycenter.v1beta1.ISource=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1beta1.IUpdateSecurityMarksRequest=} [properties] Properties to set */ - function Source(properties) { + function UpdateSecurityMarksRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17189,101 +17799,101 @@ } /** - * Source name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1beta1.Source + * UpdateSecurityMarksRequest securityMarks. + * @member {google.cloud.securitycenter.v1beta1.ISecurityMarks|null|undefined} securityMarks + * @memberof google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest * @instance */ - Source.prototype.name = ""; + UpdateSecurityMarksRequest.prototype.securityMarks = null; /** - * Source displayName. - * @member {string} displayName - * @memberof google.cloud.securitycenter.v1beta1.Source + * UpdateSecurityMarksRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest * @instance */ - Source.prototype.displayName = ""; + UpdateSecurityMarksRequest.prototype.updateMask = null; /** - * Source description. - * @member {string} description - * @memberof google.cloud.securitycenter.v1beta1.Source + * UpdateSecurityMarksRequest startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest * @instance */ - Source.prototype.description = ""; + UpdateSecurityMarksRequest.prototype.startTime = null; /** - * Creates a new Source instance using the specified properties. + * Creates a new UpdateSecurityMarksRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1beta1.Source + * @memberof google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest * @static - * @param {google.cloud.securitycenter.v1beta1.ISource=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1beta1.Source} Source instance + * @param {google.cloud.securitycenter.v1beta1.IUpdateSecurityMarksRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest} UpdateSecurityMarksRequest instance */ - Source.create = function create(properties) { - return new Source(properties); + UpdateSecurityMarksRequest.create = function create(properties) { + return new UpdateSecurityMarksRequest(properties); }; /** - * Encodes the specified Source message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.Source.verify|verify} messages. + * Encodes the specified UpdateSecurityMarksRequest message. Does not implicitly {@link google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1beta1.Source + * @memberof google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest * @static - * @param {google.cloud.securitycenter.v1beta1.ISource} message Source message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.IUpdateSecurityMarksRequest} message UpdateSecurityMarksRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Source.encode = function encode(message, writer) { + UpdateSecurityMarksRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && message.hasOwnProperty("displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.description != null && message.hasOwnProperty("description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) + $root.google.cloud.securitycenter.v1beta1.SecurityMarks.encode(message.securityMarks, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.startTime != null && message.hasOwnProperty("startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified Source message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.Source.verify|verify} messages. + * Encodes the specified UpdateSecurityMarksRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.Source + * @memberof google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest * @static - * @param {google.cloud.securitycenter.v1beta1.ISource} message Source message or plain object to encode + * @param {google.cloud.securitycenter.v1beta1.IUpdateSecurityMarksRequest} message UpdateSecurityMarksRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Source.encodeDelimited = function encodeDelimited(message, writer) { + UpdateSecurityMarksRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Source message from the specified reader or buffer. + * Decodes an UpdateSecurityMarksRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1beta1.Source + * @memberof google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1beta1.Source} Source + * @returns {google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest} UpdateSecurityMarksRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Source.decode = function decode(reader, length) { + UpdateSecurityMarksRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.Source(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.securityMarks = $root.google.cloud.securitycenter.v1beta1.SecurityMarks.decode(reader, reader.uint32()); break; case 2: - message.displayName = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; case 3: - message.description = reader.string(); + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -17294,104 +17904,119 @@ }; /** - * Decodes a Source message from the specified reader or buffer, length delimited. + * Decodes an UpdateSecurityMarksRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1beta1.Source + * @memberof google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1beta1.Source} Source + * @returns {google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest} UpdateSecurityMarksRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Source.decodeDelimited = function decodeDelimited(reader) { + UpdateSecurityMarksRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Source message. + * Verifies an UpdateSecurityMarksRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1beta1.Source + * @memberof google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Source.verify = function verify(message) { + UpdateSecurityMarksRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; + if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) { + var error = $root.google.cloud.securitycenter.v1beta1.SecurityMarks.verify(message.securityMarks); + if (error) + return "securityMarks." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } return null; }; /** - * Creates a Source message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateSecurityMarksRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1beta1.Source + * @memberof google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1beta1.Source} Source + * @returns {google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest} UpdateSecurityMarksRequest */ - Source.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1beta1.Source) + UpdateSecurityMarksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest) return object; - var message = new $root.google.cloud.securitycenter.v1beta1.Source(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); + var message = new $root.google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest(); + if (object.securityMarks != null) { + if (typeof object.securityMarks !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest.securityMarks: object expected"); + message.securityMarks = $root.google.cloud.securitycenter.v1beta1.SecurityMarks.fromObject(object.securityMarks); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } return message; }; /** - * Creates a plain object from a Source message. Also converts values to other types if specified. + * Creates a plain object from an UpdateSecurityMarksRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1beta1.Source + * @memberof google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest * @static - * @param {google.cloud.securitycenter.v1beta1.Source} message Source + * @param {google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest} message UpdateSecurityMarksRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Source.toObject = function toObject(message, options) { + UpdateSecurityMarksRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.description = ""; + object.securityMarks = null; + object.updateMask = null; + object.startTime = null; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; + if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) + object.securityMarks = $root.google.cloud.securitycenter.v1beta1.SecurityMarks.toObject(message.securityMarks, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); return object; }; /** - * Converts this Source to JSON. + * Converts this UpdateSecurityMarksRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1beta1.Source + * @memberof google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest * @instance * @returns {Object.} JSON object */ - Source.prototype.toJSON = function toJSON() { + UpdateSecurityMarksRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Source; + return UpdateSecurityMarksRequest; })(); return v1beta1; @@ -17412,26 +18037,52 @@ */ var api = {}; - api.Http = (function() { + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {string} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + return values; + })(); + + api.ResourceDescriptor = (function() { /** - * Properties of a Http. + * Properties of a ResourceDescriptor. * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular */ /** - * Constructs a new Http. + * Constructs a new ResourceDescriptor. * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor * @constructor - * @param {google.api.IHttp=} [properties] Properties to set + * @param {google.api.IResourceDescriptor=} [properties] Properties to set */ - function Http(properties) { - this.rules = []; + function ResourceDescriptor(properties) { + this.pattern = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17439,91 +18090,143 @@ } /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor * @instance */ - Http.prototype.rules = $util.emptyArray; + ResourceDescriptor.prototype.type = ""; /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor * @instance */ - Http.prototype.fullyDecodeReservedExpansion = false; + ResourceDescriptor.prototype.pattern = $util.emptyArray; /** - * Creates a new Http instance using the specified properties. + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. * @function create - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance */ - Http.create = function create(properties) { - return new Http(properties); + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); }; /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encode - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encode = function encode(message, writer) { + ResourceDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && message.hasOwnProperty("nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && message.hasOwnProperty("history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && message.hasOwnProperty("plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && message.hasOwnProperty("singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); return writer; }; /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encodeDelimited = function encodeDelimited(message, writer) { + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Http message from the specified reader or buffer. + * Decodes a ResourceDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http + * @returns {google.api.ResourceDescriptor} ResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Http.decode = function decode(reader, length) { + ResourceDescriptor.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + message.type = reader.string(); + break; + case 2: + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); + case 3: + message.nameField = reader.string(); + break; + case 4: + message.history = reader.int32(); + break; + case 5: + message.plural = reader.string(); + break; + case 6: + message.singular = reader.string(); break; default: reader.skipType(tag & 7); @@ -17534,597 +18237,407 @@ }; /** - * Decodes a Http message from the specified reader or buffer, length delimited. + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http + * @returns {google.api.ResourceDescriptor} ResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Http.decodeDelimited = function decodeDelimited(reader) { + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Http message. + * Verifies a ResourceDescriptor message. * @function verify - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Http.verify = function verify(message) { + ResourceDescriptor.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean expected"; + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; return null; }; /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static * @param {Object.} object Plain object - * @returns {google.api.Http} Http + * @returns {google.api.ResourceDescriptor} ResourceDescriptor */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); return message; }; /** - * Creates a plain object from a Http message. Also converts values to other types if specified. + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.Http} message Http + * @param {google.api.ResourceDescriptor} message ResourceDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Http.toObject = function toObject(message, options) { + ResourceDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + object.pattern = []; + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; return object; }; /** - * Converts this Http to JSON. + * Converts this ResourceDescriptor to JSON. * @function toJSON - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @instance * @returns {Object.} JSON object */ - Http.prototype.toJSON = function toJSON() { + ResourceDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Http; - })(); - - api.HttpRule = (function() { - - /** - * Properties of a HttpRule. - * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [responseBody] HttpRule responseBody - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings - */ - - /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule - * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set - */ - function HttpRule(properties) { - this.additionalBindings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule get. - * @member {string} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = ""; - - /** - * HttpRule put. - * @member {string} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = ""; - - /** - * HttpRule post. - * @member {string} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = ""; - - /** - * HttpRule delete. - * @member {string} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = ""; - - /** - * HttpRule patch. - * @member {string} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = ""; - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {string} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value */ - HttpRule.prototype.custom = null; + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType */ - HttpRule.prototype.body = ""; /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule - * @instance + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set */ - HttpRule.prototype.responseBody = ""; + function ResourceReference(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]]; + } /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference * @instance */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ResourceReference.prototype.type = ""; /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference * @instance */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); + ResourceReference.prototype.childType = ""; /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new ResourceReference instance using the specified properties. * @function create - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); }; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. * @function encode - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encode = function encode(message, writer) { + ResourceReference.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.selector != null && message.hasOwnProperty("selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && message.hasOwnProperty("get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && message.hasOwnProperty("put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && message.hasOwnProperty("post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && message.hasOwnProperty("delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && message.hasOwnProperty("patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && message.hasOwnProperty("body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && message.hasOwnProperty("custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && message.hasOwnProperty("childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); return writer; }; /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes a ResourceReference message from the specified reader or buffer. * @function decode - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message["delete"] = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.ResourceReference} ResourceReference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HttpRule message. - * @function verify - * @memberof google.api.HttpRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HttpRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } - } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - if (!$util.isString(message.responseBody)) - return "responseBody: string expected"; - if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { - if (!Array.isArray(message.additionalBindings)) - return "additionalBindings: array expected"; - for (var i = 0; i < message.additionalBindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); - if (error) - return "additionalBindings." + error; + ResourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + message.childType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; return null; }; /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.ResourceReference} ResourceReference */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.body != null) - message.body = String(object.body); - if (object.responseBody != null) - message.responseBody = String(object.responseBody); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); - } - } + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); return message; }; /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static - * @param {google.api.HttpRule} message HttpRule + * @param {google.api.ResourceReference} message ResourceReference * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HttpRule.toObject = function toObject(message, options) { + ResourceReference.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.additionalBindings = []; if (options.defaults) { - object.selector = ""; - object.body = ""; - object.responseBody = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + object.type = ""; + object.childType = ""; } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; return object; }; /** - * Converts this HttpRule to JSON. + * Converts this ResourceReference to JSON. * @function toJSON - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @instance * @returns {Object.} JSON object */ - HttpRule.prototype.toJSON = function toJSON() { + ResourceReference.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return HttpRule; + return ResourceReference; })(); - api.CustomHttpPattern = (function() { + api.Http = (function() { /** - * Properties of a CustomHttpPattern. + * Properties of a Http. * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion */ /** - * Constructs a new CustomHttpPattern. + * Constructs a new Http. * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern + * @classdesc Represents a Http. + * @implements IHttp * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @param {google.api.IHttp=} [properties] Properties to set */ - function CustomHttpPattern(properties) { + function Http(properties) { + this.rules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18132,88 +18645,91 @@ } /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http * @instance */ - CustomHttpPattern.prototype.kind = ""; + Http.prototype.rules = $util.emptyArray; /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http * @instance */ - CustomHttpPattern.prototype.path = ""; + Http.prototype.fullyDecodeReservedExpansion = false; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * Creates a new Http instance using the specified properties. * @function create - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); + Http.create = function create(properties) { + return new Http(properties); }; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encode - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encode = function encode(message, writer) { + Http.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kind != null && message.hasOwnProperty("kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && message.hasOwnProperty("path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); return writer; }; /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + Http.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes a Http message from the specified reader or buffer. * @function decode - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.Http} Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomHttpPattern.decode = function decode(reader, length) { + Http.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.kind = reader.string(); + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); break; case 2: - message.path = reader.string(); + message.fullyDecodeReservedExpansion = reader.bool(); break; default: reader.skipType(tag & 7); @@ -18224,144 +18740,143 @@ }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a Http message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.Http} Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + Http.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomHttpPattern message. + * Verifies a Http message. * @function verify - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomHttpPattern.verify = function verify(message) { + Http.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; return null; }; /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a Http message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.Http} Http */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); return message; }; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * Creates a plain object from a Http message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {google.api.Http} message Http * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomHttpPattern.toObject = function toObject(message, options) { + Http.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; return object; }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this Http to JSON. * @function toJSON - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @instance * @returns {Object.} JSON object */ - CustomHttpPattern.prototype.toJSON = function toJSON() { + Http.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CustomHttpPattern; - })(); - - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {string} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - return values; + return Http; })(); - api.ResourceDescriptor = (function() { + api.HttpRule = (function() { /** - * Properties of a ResourceDescriptor. + * Properties of a HttpRule. * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings */ /** - * Constructs a new ResourceDescriptor. + * Constructs a new HttpRule. * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor + * @classdesc Represents a HttpRule. + * @implements IHttpRule * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @param {google.api.IHttpRule=} [properties] Properties to set */ - function ResourceDescriptor(properties) { - this.pattern = []; + function HttpRule(properties) { + this.additionalBindings = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18369,143 +18884,209 @@ } /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.type = ""; + HttpRule.prototype.selector = ""; /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor + * HttpRule get. + * @member {string} get + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; + HttpRule.prototype.get = ""; /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor + * HttpRule put. + * @member {string} put + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.nameField = ""; + HttpRule.prototype.put = ""; /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor + * HttpRule post. + * @member {string} post + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.history = 0; + HttpRule.prototype.post = ""; /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor + * HttpRule delete. + * @member {string} delete + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.plural = ""; + HttpRule.prototype["delete"] = ""; /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor + * HttpRule patch. + * @member {string} patch + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.singular = ""; + HttpRule.prototype.patch = ""; /** - * Creates a new ResourceDescriptor instance using the specified properties. + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. * @function create - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); + HttpRule.create = function create(properties) { + return new HttpRule(properties); }; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encode - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encode = function encode(message, writer) { + HttpRule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && message.hasOwnProperty("type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && message.hasOwnProperty("nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && message.hasOwnProperty("history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && message.hasOwnProperty("plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && message.hasOwnProperty("singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.selector != null && message.hasOwnProperty("selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && message.hasOwnProperty("get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && message.hasOwnProperty("put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && message.hasOwnProperty("post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && message.hasOwnProperty("delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && message.hasOwnProperty("patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && message.hasOwnProperty("body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && message.hasOwnProperty("custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); return writer; }; /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * Decodes a HttpRule message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.HttpRule} HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceDescriptor.decode = function decode(reader, length) { + HttpRule.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.string(); + message.selector = reader.string(); break; case 2: - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); + message.get = reader.string(); break; case 3: - message.nameField = reader.string(); + message.put = reader.string(); break; case 4: - message.history = reader.int32(); + message.post = reader.string(); break; case 5: - message.plural = reader.string(); + message["delete"] = reader.string(); break; case 6: - message.singular = reader.string(); + message.patch = reader.string(); + break; + case 8: + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + case 7: + message.body = reader.string(); + break; + case 12: + message.responseBody = reader.string(); + break; + case 11: + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -18516,196 +19097,240 @@ }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a HttpRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.HttpRule} HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + HttpRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceDescriptor message. + * Verifies a HttpRule message. * @function verify - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResourceDescriptor.verify = function verify(message) { + HttpRule.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.pattern != null && message.hasOwnProperty("pattern")) { - if (!Array.isArray(message.pattern)) - return "pattern: array expected"; - for (var i = 0; i < message.pattern.length; ++i) - if (!$util.isString(message.pattern[i])) - return "pattern: string[] expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; } - if (message.nameField != null && message.hasOwnProperty("nameField")) - if (!$util.isString(message.nameField)) - return "nameField: string expected"; - if (message.history != null && message.hasOwnProperty("history")) - switch (message.history) { - default: - return "history: enum value expected"; - case 0: - case 1: - case 2: - break; + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; } - if (message.plural != null && message.hasOwnProperty("plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } return null; }; /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.HttpRule} HttpRule */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) return object; - var message = new $root.google.api.ResourceDescriptor(); - if (object.type != null) - message.type = String(object.type); - if (object.pattern) { - if (!Array.isArray(object.pattern)) - throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); - message.pattern = []; - for (var i = 0; i < object.pattern.length; ++i) - message.pattern[i] = String(object.pattern[i]); + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); } - if (object.nameField != null) - message.nameField = String(object.nameField); - switch (object.history) { - case "HISTORY_UNSPECIFIED": - case 0: - message.history = 0; - break; - case "ORIGINALLY_SINGLE_PATTERN": - case 1: - message.history = 1; - break; - case "FUTURE_MULTI_PATTERN": - case 2: - message.history = 2; - break; + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } } - if (object.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); return message; }; /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {google.api.HttpRule} message HttpRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceDescriptor.toObject = function toObject(message, options) { + HttpRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.pattern = []; + object.additionalBindings = []; if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; + object.selector = ""; + object.body = ""; + object.responseBody = ""; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.pattern && message.pattern.length) { - object.pattern = []; - for (var j = 0; j < message.pattern.length; ++j) - object.pattern[j] = message.pattern[j]; + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; } - if (message.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - object.singular = message.singular; + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; return object; }; /** - * Converts this ResourceDescriptor to JSON. + * Converts this HttpRule to JSON. * @function toJSON - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @instance * @returns {Object.} JSON object */ - ResourceDescriptor.prototype.toJSON = function toJSON() { + HttpRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * History enum. - * @name google.api.ResourceDescriptor.History - * @enum {string} - * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value - * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value - * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value - */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; - return values; - })(); - - return ResourceDescriptor; + return HttpRule; })(); - api.ResourceReference = (function() { + api.CustomHttpPattern = (function() { /** - * Properties of a ResourceReference. + * Properties of a CustomHttpPattern. * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path */ /** - * Constructs a new ResourceReference. + * Constructs a new CustomHttpPattern. * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set */ - function ResourceReference(properties) { + function CustomHttpPattern(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18713,88 +19338,88 @@ } /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern * @instance */ - ResourceReference.prototype.type = ""; + CustomHttpPattern.prototype.kind = ""; /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern * @instance */ - ResourceReference.prototype.childType = ""; + CustomHttpPattern.prototype.path = ""; /** - * Creates a new ResourceReference instance using the specified properties. + * Creates a new CustomHttpPattern instance using the specified properties. * @function create - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); }; /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encode - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encode = function encode(message, writer) { + CustomHttpPattern.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && message.hasOwnProperty("type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && message.hasOwnProperty("childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + if (message.kind != null && message.hasOwnProperty("kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && message.hasOwnProperty("path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); return writer; }; /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceReference message from the specified reader or buffer. + * Decodes a CustomHttpPattern message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.CustomHttpPattern} CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceReference.decode = function decode(reader, length) { + CustomHttpPattern.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.string(); + message.kind = reader.string(); break; case 2: - message.childType = reader.string(); + message.path = reader.string(); break; default: reader.skipType(tag & 7); @@ -18805,96 +19430,96 @@ }; /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.CustomHttpPattern} CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceReference message. + * Verifies a CustomHttpPattern message. * @function verify - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResourceReference.verify = function verify(message) { + CustomHttpPattern.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; return null; }; /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.CustomHttpPattern} CustomHttpPattern */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); return message; }; /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.ResourceReference} message ResourceReference + * @param {google.api.CustomHttpPattern} message CustomHttpPattern * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceReference.toObject = function toObject(message, options) { + CustomHttpPattern.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.type = ""; - object.childType = ""; + object.kind = ""; + object.path = ""; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; return object; }; /** - * Converts this ResourceReference to JSON. + * Converts this CustomHttpPattern to JSON. * @function toJSON - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @instance * @returns {Object.} JSON object */ - ResourceReference.prototype.toJSON = function toJSON() { + CustomHttpPattern.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ResourceReference; + return CustomHttpPattern; })(); return api; diff --git a/packages/google-cloud-securitycenter/protos/protos.json b/packages/google-cloud-securitycenter/protos/protos.json index 99c331d5af8..da9b155d045 100644 --- a/packages/google-cloud-securitycenter/protos/protos.json +++ b/packages/google-cloud-securitycenter/protos/protos.json @@ -16,6 +16,254 @@ "ruby_package": "Google::Cloud::SecurityCenter::V1" }, "nested": { + "Finding": { + "options": { + "(google.api.resource).type": "securitycenter.googleapis.com/Finding", + "(google.api.resource).pattern": "organizations/{organization}/sources/{source}/findings/{finding}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "parent": { + "type": "string", + "id": 2 + }, + "resourceName": { + "type": "string", + "id": 3 + }, + "state": { + "type": "State", + "id": 4 + }, + "category": { + "type": "string", + "id": 5 + }, + "externalUri": { + "type": "string", + "id": 6 + }, + "sourceProperties": { + "keyType": "string", + "type": "google.protobuf.Value", + "id": 7 + }, + "securityMarks": { + "type": "SecurityMarks", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "eventTime": { + "type": "google.protobuf.Timestamp", + "id": 9 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 10 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "ACTIVE": 1, + "INACTIVE": 2 + } + } + } + }, + "SecurityMarks": { + "options": { + "(google.api.resource).type": "securitycenter.googleapis.com/SecurityMarks", + "(google.api.resource).pattern": "organizations/{organization}/sources/{source}/findings/{finding}/securityMarks" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "marks": { + "keyType": "string", + "type": "string", + "id": 2 + } + } + }, + "Asset": { + "options": { + "(google.api.resource).type": "securitycenter.googleapis.com/Asset", + "(google.api.resource).pattern": "organizations/{organization}/assets/{asset}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "securityCenterProperties": { + "type": "SecurityCenterProperties", + "id": 2 + }, + "resourceProperties": { + "keyType": "string", + "type": "google.protobuf.Value", + "id": 7 + }, + "securityMarks": { + "type": "SecurityMarks", + "id": 8 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 9 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 10 + }, + "iamPolicy": { + "type": "IamPolicy", + "id": 11 + } + }, + "nested": { + "SecurityCenterProperties": { + "fields": { + "resourceName": { + "type": "string", + "id": 1 + }, + "resourceType": { + "type": "string", + "id": 2 + }, + "resourceParent": { + "type": "string", + "id": 3 + }, + "resourceProject": { + "type": "string", + "id": 4 + }, + "resourceOwners": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "resourceDisplayName": { + "type": "string", + "id": 6 + }, + "resourceParentDisplayName": { + "type": "string", + "id": 7 + }, + "resourceProjectDisplayName": { + "type": "string", + "id": 8 + } + } + }, + "IamPolicy": { + "fields": { + "policyBlob": { + "type": "string", + "id": 1 + } + } + } + } + }, + "Source": { + "options": { + "(google.api.resource).type": "securitycenter.googleapis.com/Source", + "(google.api.resource).pattern": "organizations/{organization}/sources/{source}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + } + } + }, + "RunAssetDiscoveryResponse": { + "fields": { + "state": { + "type": "State", + "id": 1 + }, + "duration": { + "type": "google.protobuf.Duration", + "id": 2 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "COMPLETED": 1, + "SUPERSEDED": 2, + "TERMINATED": 3 + } + } + } + }, + "OrganizationSettings": { + "options": { + "(google.api.resource).type": "securitycenter.googleapis.com/OrganizationSettings", + "(google.api.resource).pattern": "organizations/{organization}/organizationSettings" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "enableAssetDiscovery": { + "type": "bool", + "id": 2 + }, + "assetDiscoveryConfig": { + "type": "AssetDiscoveryConfig", + "id": 3 + } + }, + "nested": { + "AssetDiscoveryConfig": { + "fields": { + "projectIds": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "inclusionMode": { + "type": "InclusionMode", + "id": 2 + } + }, + "nested": { + "InclusionMode": { + "values": { + "INCLUSION_MODE_UNSPECIFIED": 0, + "INCLUDE_ONLY": 1, + "EXCLUDE": 2 + } + } + } + } + } + }, "SecurityCenter": { "options": { "(google.api.default_host)": "securitycenter.googleapis.com", @@ -578,9 +826,37 @@ "stateChange": { "type": "StateChange", "id": 2 + }, + "resource": { + "type": "Resource", + "id": 3 } }, "nested": { + "Resource": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "projectName": { + "type": "string", + "id": 2 + }, + "projectDisplayName": { + "type": "string", + "id": 3 + }, + "parentName": { + "type": "string", + "id": 4 + }, + "parentDisplayName": { + "type": "string", + "id": 5 + } + } + }, "StateChange": { "values": { "UNUSED": 0, @@ -695,16 +971,102 @@ "id": 3 } } - }, - "Asset": { - "options": { - "(google.api.resource).type": "securitycenter.googleapis.com/Asset", - "(google.api.resource).pattern": "organizations/{organization}/assets/{asset}" - }, - "fields": { - "name": { - "type": "string", - "id": 1 + } + } + }, + "v1beta1": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/cloud/securitycenter/v1beta1;securitycenter", + "java_multiple_files": true, + "java_package": "com.google.cloud.securitycenter.v1beta1" + }, + "nested": { + "Finding": { + "options": { + "(google.api.resource).type": "securitycenter.googleapis.com/Finding", + "(google.api.resource).pattern": "organizations/{organization}/sources/{source}/findings/{finding}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "parent": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "resourceName": { + "type": "string", + "id": 3 + }, + "state": { + "type": "State", + "id": 4 + }, + "category": { + "type": "string", + "id": 5 + }, + "externalUri": { + "type": "string", + "id": 6 + }, + "sourceProperties": { + "keyType": "string", + "type": "google.protobuf.Value", + "id": 7 + }, + "securityMarks": { + "type": "SecurityMarks", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "eventTime": { + "type": "google.protobuf.Timestamp", + "id": 9 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 10 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "ACTIVE": 1, + "INACTIVE": 2 + } + } + } + }, + "SecurityMarks": { + "options": { + "(google.api.resource).type": "securitycenter.googleapis.com/SecurityMarks", + "(google.api.resource).pattern": "organizations/{organization}/sources/{source}/findings/{finding}/securityMarks" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "marks": { + "keyType": "string", + "type": "string", + "id": 2 + } + } + }, + "Asset": { + "fields": { + "name": { + "type": "string", + "id": 1 }, "securityCenterProperties": { "type": "SecurityCenterProperties", @@ -726,10 +1088,6 @@ "updateTime": { "type": "google.protobuf.Timestamp", "id": 10 - }, - "iamPolicy": { - "type": "IamPolicy", - "id": 11 } }, "nested": { @@ -737,7 +1095,10 @@ "fields": { "resourceName": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } }, "resourceType": { "type": "string", @@ -757,91 +1118,47 @@ "id": 5 } } - }, - "IamPolicy": { - "fields": { - "policyBlob": { - "type": "string", - "id": 1 - } - } } } }, - "SecurityMarks": { + "Source": { "options": { - "(google.api.resource).type": "securitycenter.googleapis.com/SecurityMarks", - "(google.api.resource).pattern": "organizations/{organization}/sources/{source}/findings/{finding}/securityMarks" + "(google.api.resource).type": "securitycenter.googleapis.com/Source", + "(google.api.resource).pattern": "organizations/{organization}/sources/{source}" }, "fields": { "name": { "type": "string", "id": 1 }, - "marks": { - "keyType": "string", + "displayName": { "type": "string", "id": 2 + }, + "description": { + "type": "string", + "id": 3 } } }, - "Finding": { - "options": { - "(google.api.resource).type": "securitycenter.googleapis.com/Finding", - "(google.api.resource).pattern": "organizations/{organization}/sources/{source}/findings/{finding}" - }, + "RunAssetDiscoveryResponse": { "fields": { - "name": { - "type": "string", - "id": 1 - }, - "parent": { - "type": "string", - "id": 2 - }, - "resourceName": { - "type": "string", - "id": 3 - }, "state": { "type": "State", - "id": 4 - }, - "category": { - "type": "string", - "id": 5 - }, - "externalUri": { - "type": "string", - "id": 6 - }, - "sourceProperties": { - "keyType": "string", - "type": "google.protobuf.Value", - "id": 7 - }, - "securityMarks": { - "type": "SecurityMarks", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "eventTime": { - "type": "google.protobuf.Timestamp", - "id": 9 + "id": 1 }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 10 + "duration": { + "type": "google.protobuf.Duration", + "id": 2 } }, "nested": { "State": { "values": { "STATE_UNSPECIFIED": 0, - "ACTIVE": 1, - "INACTIVE": 2 + "COMPLETED": 1, + "SUPERSEDED": 2, + "TERMINATED": 3 } } } @@ -890,65 +1207,19 @@ } } }, - "RunAssetDiscoveryResponse": { - "fields": { - "state": { - "type": "State", - "id": 1 - }, - "duration": { - "type": "google.protobuf.Duration", - "id": 2 - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "COMPLETED": 1, - "SUPERSEDED": 2, - "TERMINATED": 3 - } - } - } - }, - "Source": { + "SecurityCenter": { "options": { - "(google.api.resource).type": "securitycenter.googleapis.com/Source", - "(google.api.resource).pattern": "organizations/{organization}/sources/{source}" + "(google.api.default_host)": "securitycenter.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "displayName": { - "type": "string", - "id": 2 - }, - "description": { - "type": "string", - "id": 3 - } - } - } - } - }, - "v1beta1": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/cloud/securitycenter/v1beta1;securitycenter", - "java_multiple_files": true, - "java_package": "com.google.cloud.securitycenter.v1beta1" - }, - "nested": { - "SecurityCenter": { "methods": { "CreateSource": { "requestType": "CreateSourceRequest", "responseType": "Source", "options": { "(google.api.http).post": "/v1beta1/{parent=organizations/*}/sources", - "(google.api.http).body": "source" + "(google.api.http).body": "source", + "(google.api.method_signature)": "parent,source" } }, "CreateFinding": { @@ -956,7 +1227,8 @@ "responseType": "Finding", "options": { "(google.api.http).post": "/v1beta1/{parent=organizations/*/sources/*}/findings", - "(google.api.http).body": "finding" + "(google.api.http).body": "finding", + "(google.api.method_signature)": "parent,finding_id,finding" } }, "GetIamPolicy": { @@ -964,21 +1236,24 @@ "responseType": "google.iam.v1.Policy", "options": { "(google.api.http).post": "/v1beta1/{resource=organizations/*/sources/*}:getIamPolicy", - "(google.api.http).body": "*" + "(google.api.http).body": "*", + "(google.api.method_signature)": "resource" } }, "GetOrganizationSettings": { "requestType": "GetOrganizationSettingsRequest", "responseType": "OrganizationSettings", "options": { - "(google.api.http).get": "/v1beta1/{name=organizations/*/organizationSettings}" + "(google.api.http).get": "/v1beta1/{name=organizations/*/organizationSettings}", + "(google.api.method_signature)": "name" } }, "GetSource": { "requestType": "GetSourceRequest", "responseType": "Source", "options": { - "(google.api.http).get": "/v1beta1/{name=organizations/*/sources/*}" + "(google.api.http).get": "/v1beta1/{name=organizations/*/sources/*}", + "(google.api.method_signature)": "name" } }, "GroupAssets": { @@ -994,7 +1269,8 @@ "responseType": "GroupFindingsResponse", "options": { "(google.api.http).post": "/v1beta1/{parent=organizations/*/sources/*}/findings:group", - "(google.api.http).body": "*" + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,group_by" } }, "ListAssets": { @@ -1015,7 +1291,8 @@ "requestType": "ListSourcesRequest", "responseType": "ListSourcesResponse", "options": { - "(google.api.http).get": "/v1beta1/{parent=organizations/*}/sources" + "(google.api.http).get": "/v1beta1/{parent=organizations/*}/sources", + "(google.api.method_signature)": "parent" } }, "RunAssetDiscovery": { @@ -1023,7 +1300,10 @@ "responseType": "google.longrunning.Operation", "options": { "(google.api.http).post": "/v1beta1/{parent=organizations/*}/assets:runDiscovery", - "(google.api.http).body": "*" + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "google.protobuf.Empty" } }, "SetFindingState": { @@ -1031,7 +1311,8 @@ "responseType": "Finding", "options": { "(google.api.http).post": "/v1beta1/{name=organizations/*/sources/*/findings/*}:setState", - "(google.api.http).body": "*" + "(google.api.http).body": "*", + "(google.api.method_signature)": "name,state,start_time" } }, "SetIamPolicy": { @@ -1039,7 +1320,8 @@ "responseType": "google.iam.v1.Policy", "options": { "(google.api.http).post": "/v1beta1/{resource=organizations/*/sources/*}:setIamPolicy", - "(google.api.http).body": "*" + "(google.api.http).body": "*", + "(google.api.method_signature)": "resource,policy" } }, "TestIamPermissions": { @@ -1047,7 +1329,8 @@ "responseType": "google.iam.v1.TestIamPermissionsResponse", "options": { "(google.api.http).post": "/v1beta1/{resource=organizations/*/sources/*}:testIamPermissions", - "(google.api.http).body": "*" + "(google.api.http).body": "*", + "(google.api.method_signature)": "resource,permissions" } }, "UpdateFinding": { @@ -1055,7 +1338,8 @@ "responseType": "Finding", "options": { "(google.api.http).patch": "/v1beta1/{finding.name=organizations/*/sources/*/findings/*}", - "(google.api.http).body": "finding" + "(google.api.http).body": "finding", + "(google.api.method_signature)": "finding" } }, "UpdateOrganizationSettings": { @@ -1063,7 +1347,8 @@ "responseType": "OrganizationSettings", "options": { "(google.api.http).patch": "/v1beta1/{organization_settings.name=organizations/*/organizationSettings}", - "(google.api.http).body": "organization_settings" + "(google.api.http).body": "organization_settings", + "(google.api.method_signature)": "organization_settings" } }, "UpdateSource": { @@ -1071,7 +1356,8 @@ "responseType": "Source", "options": { "(google.api.http).patch": "/v1beta1/{source.name=organizations/*/sources/*}", - "(google.api.http).body": "source" + "(google.api.http).body": "source", + "(google.api.method_signature)": "source" } }, "UpdateSecurityMarks": { @@ -1081,7 +1367,8 @@ "(google.api.http).patch": "/v1beta1/{security_marks.name=organizations/*/assets/*/securityMarks}", "(google.api.http).body": "security_marks", "(google.api.http).additional_bindings.patch": "/v1beta1/{security_marks.name=organizations/*/sources/*/findings/*/securityMarks}", - "(google.api.http).additional_bindings.body": "security_marks" + "(google.api.http).additional_bindings.body": "security_marks", + "(google.api.method_signature)": "security_marks" } } } @@ -1090,15 +1377,25 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "securitycenter.googleapis.com/Source" + } }, "findingId": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "finding": { "type": "Finding", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, @@ -1106,11 +1403,18 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Organization" + } }, "source": { "type": "Source", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, @@ -1118,7 +1422,11 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "securitycenter.googleapis.com/OrganizationSettings" + } } } }, @@ -1126,7 +1434,11 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "securitycenter.googleapis.com/Source" + } } } }, @@ -1134,7 +1446,11 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Organization" + } }, "filter": { "type": "string", @@ -1142,7 +1458,10 @@ }, "groupBy": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "compareDuration": { "type": "google.protobuf.Duration", @@ -1183,7 +1502,11 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "securitycenter.googleapis.com/Source" + } }, "filter": { "type": "string", @@ -1191,7 +1514,10 @@ }, "groupBy": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "readTime": { "type": "google.protobuf.Timestamp", @@ -1241,7 +1567,11 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Organization" + } }, "pageToken": { "type": "string", @@ -1270,7 +1600,11 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Organization" + } }, "filter": { "type": "string", @@ -1290,7 +1624,10 @@ }, "fieldMask": { "type": "google.protobuf.FieldMask", - "id": 7 + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "pageToken": { "type": "string", @@ -1352,7 +1689,11 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "securitycenter.googleapis.com/Source" + } }, "filter": { "type": "string", @@ -1368,7 +1709,10 @@ }, "fieldMask": { "type": "google.protobuf.FieldMask", - "id": 5 + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "pageToken": { "type": "string", @@ -1405,15 +1749,25 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "securitycenter.googleapis.com/Finding" + } }, "state": { "type": "Finding.State", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "startTime": { "type": "google.protobuf.Timestamp", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, @@ -1421,7 +1775,11 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Organization" + } } } }, @@ -1429,7 +1787,10 @@ "fields": { "finding": { "type": "Finding", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "updateMask": { "type": "google.protobuf.FieldMask", @@ -1441,7 +1802,10 @@ "fields": { "organizationSettings": { "type": "OrganizationSettings", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "updateMask": { "type": "google.protobuf.FieldMask", @@ -1453,7 +1817,10 @@ "fields": { "source": { "type": "Source", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "updateMask": { "type": "google.protobuf.FieldMask", @@ -1465,7 +1832,10 @@ "fields": { "securityMarks": { "type": "SecurityMarks", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "updateMask": { "type": "google.protobuf.FieldMask", @@ -1476,185 +1846,6 @@ "id": 3 } } - }, - "Asset": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "securityCenterProperties": { - "type": "SecurityCenterProperties", - "id": 2 - }, - "resourceProperties": { - "keyType": "string", - "type": "google.protobuf.Value", - "id": 7 - }, - "securityMarks": { - "type": "SecurityMarks", - "id": 8 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 9 - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 10 - } - }, - "nested": { - "SecurityCenterProperties": { - "fields": { - "resourceName": { - "type": "string", - "id": 1 - }, - "resourceType": { - "type": "string", - "id": 2 - }, - "resourceParent": { - "type": "string", - "id": 3 - }, - "resourceProject": { - "type": "string", - "id": 4 - }, - "resourceOwners": { - "rule": "repeated", - "type": "string", - "id": 5 - } - } - } - } - }, - "SecurityMarks": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "marks": { - "keyType": "string", - "type": "string", - "id": 2 - } - } - }, - "Finding": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "parent": { - "type": "string", - "id": 2 - }, - "resourceName": { - "type": "string", - "id": 3 - }, - "state": { - "type": "State", - "id": 4 - }, - "category": { - "type": "string", - "id": 5 - }, - "externalUri": { - "type": "string", - "id": 6 - }, - "sourceProperties": { - "keyType": "string", - "type": "google.protobuf.Value", - "id": 7 - }, - "securityMarks": { - "type": "SecurityMarks", - "id": 8 - }, - "eventTime": { - "type": "google.protobuf.Timestamp", - "id": 9 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 10 - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "ACTIVE": 1, - "INACTIVE": 2 - } - } - } - }, - "OrganizationSettings": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "enableAssetDiscovery": { - "type": "bool", - "id": 2 - }, - "assetDiscoveryConfig": { - "type": "AssetDiscoveryConfig", - "id": 3 - } - }, - "nested": { - "AssetDiscoveryConfig": { - "fields": { - "projectIds": { - "rule": "repeated", - "type": "string", - "id": 1 - }, - "inclusionMode": { - "type": "InclusionMode", - "id": 2 - } - }, - "nested": { - "InclusionMode": { - "values": { - "INCLUSION_MODE_UNSPECIFIED": 0, - "INCLUDE_ONLY": 1, - "EXCLUDE": 2 - } - } - } - } - } - }, - "Source": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "displayName": { - "type": "string", - "id": 2 - }, - "description": { - "type": "string", - "id": 3 - } - } } } } @@ -1666,12 +1857,94 @@ "options": { "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", "java_multiple_files": true, - "java_outer_classname": "ResourceProto", + "java_outer_classname": "ClientProto", "java_package": "com.google.api", "objc_class_prefix": "GAPI", "cc_enable_arenas": true }, "nested": { + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + }, "http": { "type": "HttpRule", "id": 72295728, @@ -1774,88 +2047,6 @@ "type": "string", "id": 1050, "extend": "google.protobuf.ServiceOptions" - }, - "fieldBehavior": { - "rule": "repeated", - "type": "google.api.FieldBehavior", - "id": 1052, - "extend": "google.protobuf.FieldOptions" - }, - "FieldBehavior": { - "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5 - } - }, - "resourceReference": { - "type": "google.api.ResourceReference", - "id": 1055, - "extend": "google.protobuf.FieldOptions" - }, - "resourceDefinition": { - "rule": "repeated", - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.FileOptions" - }, - "resource": { - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.MessageOptions" - }, - "ResourceDescriptor": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "pattern": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "nameField": { - "type": "string", - "id": 3 - }, - "history": { - "type": "History", - "id": 4 - }, - "plural": { - "type": "string", - "id": 5 - }, - "singular": { - "type": "string", - "id": 6 - } - }, - "nested": { - "History": { - "values": { - "HISTORY_UNSPECIFIED": 0, - "ORIGINALLY_SINGLE_PATTERN": 1, - "FUTURE_MULTI_PATTERN": 2 - } - } - } - }, - "ResourceReference": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "childType": { - "type": "string", - "id": 2 - } - } } } }, diff --git a/packages/google-cloud-securitycenter/src/extra_proto_list.json b/packages/google-cloud-securitycenter/src/extra_proto_list.json new file mode 100644 index 00000000000..e7ad9a63718 --- /dev/null +++ b/packages/google-cloud-securitycenter/src/extra_proto_list.json @@ -0,0 +1,14 @@ +[ + "../../protos/google/cloud/securitycenter/v1/finding.proto", + "../../protos/google/cloud/securitycenter/v1/asset.proto", + "../../protos/google/cloud/securitycenter/v1/source.proto", + "../../protos/google/cloud/securitycenter/v1/security_marks.proto", + "../../protos/google/cloud/securitycenter/v1/run_asset_discovery_response.proto", + "../../protos/google/cloud/securitycenter/v1/organization_settings.proto", + "../../protos/google/cloud/securitycenter/v1beta1/finding.proto", + "../../protos/google/cloud/securitycenter/v1beta1/asset.proto", + "../../protos/google/cloud/securitycenter/v1beta1/source.proto", + "../../protos/google/cloud/securitycenter/v1beta1/security_marks.proto", + "../../protos/google/cloud/securitycenter/v1beta1/run_asset_discovery_response.proto", + "../../protos/google/cloud/securitycenter/v1beta1/organization_settings.proto" +] diff --git a/packages/google-cloud-securitycenter/src/v1/doc/google/cloud/securitycenter/v1/doc_asset.js b/packages/google-cloud-securitycenter/src/v1/doc/google/cloud/securitycenter/v1/doc_asset.js index 285508ee5da..95e09a50615 100644 --- a/packages/google-cloud-securitycenter/src/v1/doc/google/cloud/securitycenter/v1/doc_asset.js +++ b/packages/google-cloud-securitycenter/src/v1/doc/google/cloud/securitycenter/v1/doc_asset.js @@ -96,6 +96,15 @@ const Asset = { * @property {string[]} resourceOwners * Owners of the Google Cloud resource. * + * @property {string} resourceDisplayName + * The user defined display name for this resource. + * + * @property {string} resourceParentDisplayName + * The user defined display name for the parent of this resource. + * + * @property {string} resourceProjectDisplayName + * The user defined display name for the project of this resource. + * * @typedef SecurityCenterProperties * @memberof google.cloud.securitycenter.v1 * @see [google.cloud.securitycenter.v1.Asset.SecurityCenterProperties definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/securitycenter/v1/asset.proto} diff --git a/packages/google-cloud-securitycenter/src/v1/doc/google/cloud/securitycenter/v1/doc_securitycenter_service.js b/packages/google-cloud-securitycenter/src/v1/doc/google/cloud/securitycenter/v1/doc_securitycenter_service.js index 304ab23f148..46407c877b2 100644 --- a/packages/google-cloud-securitycenter/src/v1/doc/google/cloud/securitycenter/v1/doc_securitycenter_service.js +++ b/packages/google-cloud-securitycenter/src/v1/doc/google/cloud/securitycenter/v1/doc_securitycenter_service.js @@ -147,9 +147,12 @@ const GetSourceRequest = { * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` * * security_marks.marks: `=`, `:` * * security_center_properties.resource_name: `=`, `:` + * * security_center_properties.resource_display_name: `=`, `:` * * security_center_properties.resource_type: `=`, `:` * * security_center_properties.resource_parent: `=`, `:` + * * security_center_properties.resource_parent_display_name: `=`, `:` * * security_center_properties.resource_project: `=`, `:` + * * security_center_properties.resource_project_display_name: `=`, `:` * * security_center_properties.resource_owners: `=`, `:` * * For example, `resource_properties.size = 100` is a valid filter string. @@ -163,12 +166,16 @@ const GetSourceRequest = { * The following fields are supported when compare_duration is not set: * * * security_center_properties.resource_project + * * security_center_properties.resource_project_display_name * * security_center_properties.resource_type * * security_center_properties.resource_parent + * * security_center_properties.resource_parent_display_name * * The following fields are supported when compare_duration is set: * * * security_center_properties.resource_type + * * security_center_properties.resource_project_display_name + * * security_center_properties.resource_parent_display_name * * @property {Object} compareDuration * When compare_duration is set, the GroupResult's "state_change" property is @@ -527,9 +534,12 @@ const ListSourcesResponse = { * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` * * security_marks.marks: `=`, `:` * * security_center_properties.resource_name: `=`, `:` + * * security_center_properties.resource_display_name: `=`, `:` * * security_center_properties.resource_type: `=`, `:` * * security_center_properties.resource_parent: `=`, `:` + * * security_center_properties.resource_parent_display_name: `=`, `:` * * security_center_properties.resource_project: `=`, `:` + * * security_center_properties.resource_project_display_name: `=`, `:` * * security_center_properties.resource_owners: `=`, `:` * * For example, `resource_properties.size = 100` is a valid filter string. @@ -550,8 +560,11 @@ const ListSourcesResponse = { * resource_properties * security_marks.marks * security_center_properties.resource_name + * security_center_properties.resource_display_name * security_center_properties.resource_parent + * security_center_properties.resource_parent_display_name * security_center_properties.resource_project + * security_center_properties.resource_project_display_name * security_center_properties.resource_type * * @property {Object} readTime @@ -870,6 +883,11 @@ const ListFindingsResponse = { * * The number should be among the values of [StateChange]{@link google.cloud.securitycenter.v1.StateChange} * + * @property {Object} resource + * Output only. Resource that is associated with this finding. + * + * This object should have the same structure as [Resource]{@link google.cloud.securitycenter.v1.Resource} + * * @typedef ListFindingsResult * @memberof google.cloud.securitycenter.v1 * @see [google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/securitycenter/v1/securitycenter_service.proto} @@ -877,6 +895,34 @@ const ListFindingsResponse = { ListFindingsResult: { // This is for documentation. Actual contents will be loaded by gRPC. + /** + * Information related to the Google Cloud Platform (GCP) resource that is + * associated with this finding. + * + * @property {string} name + * The full resource name of the resource. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * @property {string} projectName + * The full resource name of project that the resource belongs to. + * + * @property {string} projectDisplayName + * The human readable name of project that the resource belongs to. + * + * @property {string} parentName + * The full resource name of resource's parent. + * + * @property {string} parentDisplayName + * The human readable name of resource's parent. + * + * @typedef Resource + * @memberof google.cloud.securitycenter.v1 + * @see [google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/securitycenter/v1/securitycenter_service.proto} + */ + Resource: { + // This is for documentation. Actual contents will be loaded by gRPC. + }, + /** * The change in state of the finding. * diff --git a/packages/google-cloud-securitycenter/src/v1/security_center_client.js b/packages/google-cloud-securitycenter/src/v1/security_center_client.js index a26bd809107..8e33ae2a58e 100644 --- a/packages/google-cloud-securitycenter/src/v1/security_center_client.js +++ b/packages/google-cloud-securitycenter/src/v1/security_center_client.js @@ -643,12 +643,16 @@ class SecurityCenterClient { * The following fields are supported when compare_duration is not set: * * * security_center_properties.resource_project + * * security_center_properties.resource_project_display_name * * security_center_properties.resource_type * * security_center_properties.resource_parent + * * security_center_properties.resource_parent_display_name * * The following fields are supported when compare_duration is set: * * * security_center_properties.resource_type + * * security_center_properties.resource_project_display_name + * * security_center_properties.resource_parent_display_name * @param {string} [request.filter] * Expression that defines the filter to apply across assets. * The expression is a list of zero or more restrictions combined via logical @@ -697,9 +701,12 @@ class SecurityCenterClient { * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` * * security_marks.marks: `=`, `:` * * security_center_properties.resource_name: `=`, `:` + * * security_center_properties.resource_display_name: `=`, `:` * * security_center_properties.resource_type: `=`, `:` * * security_center_properties.resource_parent: `=`, `:` + * * security_center_properties.resource_parent_display_name: `=`, `:` * * security_center_properties.resource_project: `=`, `:` + * * security_center_properties.resource_project_display_name: `=`, `:` * * security_center_properties.resource_owners: `=`, `:` * * For example, `resource_properties.size = 100` is a valid filter string. @@ -872,12 +879,16 @@ class SecurityCenterClient { * The following fields are supported when compare_duration is not set: * * * security_center_properties.resource_project + * * security_center_properties.resource_project_display_name * * security_center_properties.resource_type * * security_center_properties.resource_parent + * * security_center_properties.resource_parent_display_name * * The following fields are supported when compare_duration is set: * * * security_center_properties.resource_type + * * security_center_properties.resource_project_display_name + * * security_center_properties.resource_parent_display_name * @param {string} [request.filter] * Expression that defines the filter to apply across assets. * The expression is a list of zero or more restrictions combined via logical @@ -926,9 +937,12 @@ class SecurityCenterClient { * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` * * security_marks.marks: `=`, `:` * * security_center_properties.resource_name: `=`, `:` + * * security_center_properties.resource_display_name: `=`, `:` * * security_center_properties.resource_type: `=`, `:` * * security_center_properties.resource_parent: `=`, `:` + * * security_center_properties.resource_parent_display_name: `=`, `:` * * security_center_properties.resource_project: `=`, `:` + * * security_center_properties.resource_project_display_name: `=`, `:` * * security_center_properties.resource_owners: `=`, `:` * * For example, `resource_properties.size = 100` is a valid filter string. @@ -1440,9 +1454,12 @@ class SecurityCenterClient { * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` * * security_marks.marks: `=`, `:` * * security_center_properties.resource_name: `=`, `:` + * * security_center_properties.resource_display_name: `=`, `:` * * security_center_properties.resource_type: `=`, `:` * * security_center_properties.resource_parent: `=`, `:` + * * security_center_properties.resource_parent_display_name: `=`, `:` * * security_center_properties.resource_project: `=`, `:` + * * security_center_properties.resource_project_display_name: `=`, `:` * * security_center_properties.resource_owners: `=`, `:` * * For example, `resource_properties.size = 100` is a valid filter string. @@ -1462,8 +1479,11 @@ class SecurityCenterClient { * resource_properties * security_marks.marks * security_center_properties.resource_name + * security_center_properties.resource_display_name * security_center_properties.resource_parent + * security_center_properties.resource_parent_display_name * security_center_properties.resource_project + * security_center_properties.resource_project_display_name * security_center_properties.resource_type * @param {Object} [request.readTime] * Time used as a reference point when filtering assets. The filter is limited @@ -1666,9 +1686,12 @@ class SecurityCenterClient { * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` * * security_marks.marks: `=`, `:` * * security_center_properties.resource_name: `=`, `:` + * * security_center_properties.resource_display_name: `=`, `:` * * security_center_properties.resource_type: `=`, `:` * * security_center_properties.resource_parent: `=`, `:` + * * security_center_properties.resource_parent_display_name: `=`, `:` * * security_center_properties.resource_project: `=`, `:` + * * security_center_properties.resource_project_display_name: `=`, `:` * * security_center_properties.resource_owners: `=`, `:` * * For example, `resource_properties.size = 100` is a valid filter string. @@ -1688,8 +1711,11 @@ class SecurityCenterClient { * resource_properties * security_marks.marks * security_center_properties.resource_name + * security_center_properties.resource_display_name * security_center_properties.resource_parent + * security_center_properties.resource_parent_display_name * security_center_properties.resource_project + * security_center_properties.resource_project_display_name * security_center_properties.resource_type * @param {Object} [request.readTime] * Time used as a reference point when filtering assets. The filter is limited diff --git a/packages/google-cloud-securitycenter/src/v1/security_center_client_config.json b/packages/google-cloud-securitycenter/src/v1/security_center_client_config.json index 3ca6c2cd104..d2419f146a7 100644 --- a/packages/google-cloud-securitycenter/src/v1/security_center_client_config.json +++ b/packages/google-cloud-securitycenter/src/v1/security_center_client_config.json @@ -13,9 +13,9 @@ "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, + "initial_rpc_timeout_millis": 480000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, + "max_rpc_timeout_millis": 480000, "total_timeout_millis": 600000 } }, diff --git a/packages/google-cloud-securitycenter/src/v1beta1/doc/google/cloud/securitycenter/v1beta1/doc_asset.js b/packages/google-cloud-securitycenter/src/v1beta1/doc/google/cloud/securitycenter/v1beta1/doc_asset.js index 5167b5ddcf8..2c0206e3abe 100644 --- a/packages/google-cloud-securitycenter/src/v1beta1/doc/google/cloud/securitycenter/v1beta1/doc_asset.js +++ b/packages/google-cloud-securitycenter/src/v1beta1/doc/google/cloud/securitycenter/v1beta1/doc_asset.js @@ -27,7 +27,7 @@ * The relative resource name of this asset. See: * https://cloud.google.com/apis/design/resource_names#relative_resource_name * Example: - * "organizations/123/assets/456". + * "organizations/{organization_id}/assets/{asset_id}". * * @property {Object} securityCenterProperties * Cloud SCC managed properties. These properties are managed by @@ -68,7 +68,7 @@ const Asset = { * cannot be modified by the user. * * @property {string} resourceName - * The full resource name of the GCP resource this asset + * Immutable. The full resource name of the GCP resource this asset * represents. This field is immutable after create time. See: * https://cloud.google.com/apis/design/resource_names#full_resource_name * diff --git a/packages/google-cloud-securitycenter/src/v1beta1/doc/google/cloud/securitycenter/v1beta1/doc_finding.js b/packages/google-cloud-securitycenter/src/v1beta1/doc/google/cloud/securitycenter/v1beta1/doc_finding.js index 72dd6e7ef75..ded888d50ee 100644 --- a/packages/google-cloud-securitycenter/src/v1beta1/doc/google/cloud/securitycenter/v1beta1/doc_finding.js +++ b/packages/google-cloud-securitycenter/src/v1beta1/doc/google/cloud/securitycenter/v1beta1/doc_finding.js @@ -27,19 +27,21 @@ * The relative resource name of this finding. See: * https://cloud.google.com/apis/design/resource_names#relative_resource_name * Example: - * "organizations/123/sources/456/findings/789" + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}" * * @property {string} parent - * The relative resource name of the source the finding belongs to. See: + * Immutable. The relative resource name of the source the finding belongs to. See: * https://cloud.google.com/apis/design/resource_names#relative_resource_name * This field is immutable after creation time. * For example: - * "organizations/123/sources/456" + * "organizations/{organization_id}/sources/{source_id}" * * @property {string} resourceName - * The full resource name of the Google Cloud Platform (GCP) resource this - * finding is for. See: + * For findings on Google Cloud Platform (GCP) resources, the full resource + * name of the GCP 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. * * @property {number} state @@ -72,8 +74,8 @@ * * @property {Object} eventTime * The time at which the event took place. For example, if the finding - * represents an open firewall it would capture the time the open firewall was - * detected. + * represents an open firewall it would capture the time the detector believes + * the firewall became open. The accuracy is determined by the detector. * * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} * diff --git a/packages/google-cloud-securitycenter/src/v1beta1/doc/google/cloud/securitycenter/v1beta1/doc_organization_settings.js b/packages/google-cloud-securitycenter/src/v1beta1/doc/google/cloud/securitycenter/v1beta1/doc_organization_settings.js index b4a159eda7e..a9da730be6c 100644 --- a/packages/google-cloud-securitycenter/src/v1beta1/doc/google/cloud/securitycenter/v1beta1/doc_organization_settings.js +++ b/packages/google-cloud-securitycenter/src/v1beta1/doc/google/cloud/securitycenter/v1beta1/doc_organization_settings.js @@ -23,7 +23,7 @@ * The relative resource name of the settings. See: * https://cloud.google.com/apis/design/resource_names#relative_resource_name * Example: - * "organizations/123/organizationSettings". + * "organizations/{organization_id}/organizationSettings". * * @property {boolean} enableAssetDiscovery * A flag that indicates if Asset Discovery should be enabled. If the flag is diff --git a/packages/google-cloud-securitycenter/src/v1beta1/doc/google/cloud/securitycenter/v1beta1/doc_security_marks.js b/packages/google-cloud-securitycenter/src/v1beta1/doc/google/cloud/securitycenter/v1beta1/doc_security_marks.js index 9e7cf544ab0..4975a2e35a2 100644 --- a/packages/google-cloud-securitycenter/src/v1beta1/doc/google/cloud/securitycenter/v1beta1/doc_security_marks.js +++ b/packages/google-cloud-securitycenter/src/v1beta1/doc/google/cloud/securitycenter/v1beta1/doc_security_marks.js @@ -25,15 +25,17 @@ * The relative resource name of the SecurityMarks. See: * https://cloud.google.com/apis/design/resource_names#relative_resource_name * Examples: - * "organizations/123/assets/456/securityMarks" - * "organizations/123/sources/456/findings/789/securityMarks". + * "organizations/{organization_id}/assets/{asset_id}/securityMarks" + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks". * * @property {Object.} marks * Mutable user specified security marks belonging to the parent resource. * Constraints are as follows: - * - Keys and values are treated as case insensitive - * - Keys must be alphanumeric and between 1 - 256 characters (inclusive) - * - Values have leading and trailing whitespace trimmed, remaining + * + * * Keys and values are treated as case insensitive + * * Keys must be between 1 - 256 characters (inclusive) + * * Keys must be letters, numbers, underscores, or dashes + * * Values have leading and trailing whitespace trimmed, remaining * characters must be between 1 - 4096 characters (inclusive) * * @typedef SecurityMarks diff --git a/packages/google-cloud-securitycenter/src/v1beta1/doc/google/cloud/securitycenter/v1beta1/doc_securitycenter_service.js b/packages/google-cloud-securitycenter/src/v1beta1/doc/google/cloud/securitycenter/v1beta1/doc_securitycenter_service.js index c29342073b4..4d63259e480 100644 --- a/packages/google-cloud-securitycenter/src/v1beta1/doc/google/cloud/securitycenter/v1beta1/doc_securitycenter_service.js +++ b/packages/google-cloud-securitycenter/src/v1beta1/doc/google/cloud/securitycenter/v1beta1/doc_securitycenter_service.js @@ -19,16 +19,16 @@ * Request message for creating a finding. * * @property {string} parent - * Resource name of the new finding's parent. Its format should be + * Required. Resource name of the new finding's parent. Its format should be * "organizations/[organization_id]/sources/[source_id]". * * @property {string} findingId - * Unique identifier provided by the client within the parent scope. + * Required. Unique identifier provided by the client within the parent scope. * It must be alphanumeric and less than or equal to 32 characters and * greater than 0 characters in length. * * @property {Object} finding - * The Finding being created. The name and security_marks will be ignored as + * Required. The Finding being created. The name and security_marks will be ignored as * they are both output only fields on this resource. * * This object should have the same structure as [Finding]{@link google.cloud.securitycenter.v1beta1.Finding} @@ -45,11 +45,11 @@ const CreateFindingRequest = { * Request message for creating a source. * * @property {string} parent - * Resource name of the new source's parent. Its format should be + * Required. Resource name of the new source's parent. Its format should be * "organizations/[organization_id]". * * @property {Object} source - * The Source being created, only the display_name and description will be + * Required. The Source being created, only the display_name and description will be * used. All other fields will be ignored. * * This object should have the same structure as [Source]{@link google.cloud.securitycenter.v1beta1.Source} @@ -66,7 +66,7 @@ const CreateSourceRequest = { * Request message for getting organization settings. * * @property {string} name - * Name of the organization to get organization settings for. Its format is + * Required. Name of the organization to get organization settings for. Its format is * "organizations/[organization_id]/organizationSettings". * * @typedef GetOrganizationSettingsRequest @@ -81,7 +81,7 @@ const GetOrganizationSettingsRequest = { * Request message for getting a source. * * @property {string} name - * Relative resource name of the source. Its format is + * Required. Relative resource name of the source. Its format is * "organizations/[organization_id]/source/[source_id]". * * @typedef GetSourceRequest @@ -96,7 +96,7 @@ const GetSourceRequest = { * Request message for grouping by assets. * * @property {string} parent - * Name of the organization to groupBy. Its format is + * Required. Name of the organization to groupBy. Its format is * "organizations/[organization_id]". * * @property {string} filter @@ -129,7 +129,7 @@ const GetSourceRequest = { * For example, `resource_properties.size = 100` is a valid filter string. * * @property {string} groupBy - * Expression that defines what assets fields to use for grouping. The string + * Required. Expression that defines what assets fields to use for grouping. The string * value should follow SQL syntax: comma separated list of fields. For * example: * "security_center_properties.resource_project,security_center_properties.project". @@ -225,10 +225,10 @@ const GroupAssetsResponse = { * Request message for grouping by findings. * * @property {string} parent - * Name of the source to groupBy. Its format is + * Required. Name of the source to groupBy. Its format is * "organizations/[organization_id]/sources/[source_id]". To groupBy across * all sources provide a source_id of `-`. For example: - * organizations/123/sources/- + * organizations/{organization_id}/sources/- * * @property {string} filter * Expression that defines the filter to apply across findings. @@ -258,7 +258,7 @@ const GroupAssetsResponse = { * For example, `source_properties.size = 100` is a valid filter string. * * @property {string} groupBy - * Expression that defines what assets fields to use for grouping (including + * Required. Expression that defines what assets fields to use for grouping (including * `state`). The string value should follow SQL syntax: comma separated list * of fields. For example: * "parent,resource_name". @@ -343,7 +343,7 @@ const GroupResult = { * Request message for listing sources. * * @property {string} parent - * Resource name of the parent of sources to list. Its format should be + * Required. Resource name of the parent of sources to list. Its format should be * "organizations/[organization_id]". * * @property {string} pageToken @@ -387,7 +387,7 @@ const ListSourcesResponse = { * Request message for listing assets. * * @property {string} parent - * Name of the organization assets should belong to. Its format is + * Required. Name of the organization assets should belong to. Its format is * "organizations/[organization_id]". * * @property {string} filter @@ -465,9 +465,7 @@ const ListSourcesResponse = { * This object should have the same structure as [Duration]{@link google.protobuf.Duration} * * @property {Object} fieldMask - * Optional. - * - * A field mask to specify the ListAssetsResult fields to be listed in the + * Optional. A field mask to specify the ListAssetsResult fields to be listed in the * response. * An empty field mask will list all fields. * @@ -582,10 +580,10 @@ const ListAssetsResponse = { * Request message for listing findings. * * @property {string} parent - * Name of the source the findings belong to. Its format is + * Required. Name of the source the findings belong to. Its format is * "organizations/[organization_id]/sources/[source_id]". To list across all * sources provide a source_id of `-`. For example: - * organizations/123/sources/- + * organizations/{organization_id}/sources/- * * @property {string} filter * Expression that defines the filter to apply across findings. @@ -633,9 +631,7 @@ const ListAssetsResponse = { * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} * * @property {Object} fieldMask - * Optional. - * - * A field mask to specify the Finding fields to be listed in the response. + * Optional. A field mask to specify the Finding fields to be listed in the response. * An empty field mask will list all fields. * * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} @@ -689,18 +685,18 @@ const ListFindingsResponse = { * Request message for updating a finding's state. * * @property {string} name - * The relative resource name of the finding. See: + * Required. The relative resource name of the finding. See: * https://cloud.google.com/apis/design/resource_names#relative_resource_name * Example: - * "organizations/123/sources/456/finding/789". + * "organizations/{organization_id}/sources/{source_id}/finding/{finding_id}". * * @property {number} state - * The desired State of the finding. + * Required. The desired State of the finding. * * The number should be among the values of [State]{@link google.cloud.securitycenter.v1beta1.State} * * @property {Object} startTime - * The time at which the updated state takes effect. + * Required. The time at which the updated state takes effect. * * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} * @@ -716,7 +712,7 @@ const SetFindingStateRequest = { * Request message for running asset discovery for an organization. * * @property {string} parent - * Name of the organization to run asset discovery for. Its format is + * Required. Name of the organization to run asset discovery for. Its format is * "organizations/[organization_id]". * * @typedef RunAssetDiscoveryRequest @@ -731,7 +727,7 @@ const RunAssetDiscoveryRequest = { * Request message for updating or creating a finding. * * @property {Object} finding - * The finding resource to update or create if it does not already exist. + * Required. The finding resource to update or create if it does not already exist. * parent, security_marks, and update_time will be ignored. * * In the case of creation, the finding id portion of the name must @@ -758,7 +754,7 @@ const UpdateFindingRequest = { * Request message for updating an organization's settings. * * @property {Object} organizationSettings - * The organization settings resource to update. + * Required. The organization settings resource to update. * * This object should have the same structure as [OrganizationSettings]{@link google.cloud.securitycenter.v1beta1.OrganizationSettings} * @@ -779,7 +775,7 @@ const UpdateOrganizationSettingsRequest = { * Request message for updating a source. * * @property {Object} source - * The source resource to update. + * Required. The source resource to update. * * This object should have the same structure as [Source]{@link google.cloud.securitycenter.v1beta1.Source} * @@ -800,7 +796,7 @@ const UpdateSourceRequest = { * Request message for updating a SecurityMarks resource. * * @property {Object} securityMarks - * The security marks resource to update. + * Required. The security marks resource to update. * * This object should have the same structure as [SecurityMarks]{@link google.cloud.securitycenter.v1beta1.SecurityMarks} * diff --git a/packages/google-cloud-securitycenter/src/v1beta1/doc/google/cloud/securitycenter/v1beta1/doc_source.js b/packages/google-cloud-securitycenter/src/v1beta1/doc/google/cloud/securitycenter/v1beta1/doc_source.js index 676e8bd25f2..9e7cbb4e0fa 100644 --- a/packages/google-cloud-securitycenter/src/v1beta1/doc/google/cloud/securitycenter/v1beta1/doc_source.js +++ b/packages/google-cloud-securitycenter/src/v1beta1/doc/google/cloud/securitycenter/v1beta1/doc_source.js @@ -24,16 +24,14 @@ * The relative resource name of this source. See: * https://cloud.google.com/apis/design/resource_names#relative_resource_name * Example: - * "organizations/123/sources/456" + * "organizations/{organization_id}/sources/{source_id}" * * @property {string} displayName * The source's display name. * A source's display name must be unique amongst its siblings, for example, * two sources with the same parent can't share the same display name. - * The display name must start and end with a letter or digit, may contain - * letters, digits, spaces, hyphens, and underscores, and can be no longer - * than 32 characters. This is captured by the regular expression: - * `\[\p{L}\p{N}]({\p{L}\p{N}_- ]{0,30}[\p{L}\p{N}])?`. + * The display name must have a length between 1 and 64 characters + * (inclusive). * * @property {string} description * The description of the source (max of 1024 characters). diff --git a/packages/google-cloud-securitycenter/src/v1beta1/security_center_client.js b/packages/google-cloud-securitycenter/src/v1beta1/security_center_client.js index 596fa7a2d85..4402a128dbe 100644 --- a/packages/google-cloud-securitycenter/src/v1beta1/security_center_client.js +++ b/packages/google-cloud-securitycenter/src/v1beta1/security_center_client.js @@ -316,10 +316,10 @@ class SecurityCenterClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Resource name of the new source's parent. Its format should be + * Required. Resource name of the new source's parent. Its format should be * "organizations/[organization_id]". * @param {Object} request.source - * The Source being created, only the display_name and description will be + * Required. The Source being created, only the display_name and description will be * used. All other fields will be ignored. * * This object should have the same structure as [Source]{@link google.cloud.securitycenter.v1beta1.Source} @@ -382,14 +382,14 @@ class SecurityCenterClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Resource name of the new finding's parent. Its format should be + * Required. Resource name of the new finding's parent. Its format should be * "organizations/[organization_id]/sources/[source_id]". * @param {string} request.findingId - * Unique identifier provided by the client within the parent scope. + * Required. Unique identifier provided by the client within the parent scope. * It must be alphanumeric and less than or equal to 32 characters and * greater than 0 characters in length. * @param {Object} request.finding - * The Finding being created. The name and security_marks will be ignored as + * Required. The Finding being created. The name and security_marks will be ignored as * they are both output only fields on this resource. * * This object should have the same structure as [Finding]{@link google.cloud.securitycenter.v1beta1.Finding} @@ -513,7 +513,7 @@ class SecurityCenterClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Name of the organization to get organization settings for. Its format is + * Required. Name of the organization to get organization settings for. Its format is * "organizations/[organization_id]/organizationSettings". * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, @@ -572,7 +572,7 @@ class SecurityCenterClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Relative resource name of the source. Its format is + * Required. Relative resource name of the source. Its format is * "organizations/[organization_id]/source/[source_id]". * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, @@ -628,10 +628,10 @@ class SecurityCenterClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Name of the organization to groupBy. Its format is + * Required. Name of the organization to groupBy. Its format is * "organizations/[organization_id]". * @param {string} request.groupBy - * Expression that defines what assets fields to use for grouping. The string + * Required. Expression that defines what assets fields to use for grouping. The string * value should follow SQL syntax: comma separated list of fields. For * example: * "security_center_properties.resource_project,security_center_properties.project". @@ -825,10 +825,10 @@ class SecurityCenterClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Name of the organization to groupBy. Its format is + * Required. Name of the organization to groupBy. Its format is * "organizations/[organization_id]". * @param {string} request.groupBy - * Expression that defines what assets fields to use for grouping. The string + * Required. Expression that defines what assets fields to use for grouping. The string * value should follow SQL syntax: comma separated list of fields. For * example: * "security_center_properties.resource_project,security_center_properties.project". @@ -949,17 +949,17 @@ class SecurityCenterClient { * specified properties. * * To group across all sources provide a `-` as the source id. - * Example: /v1beta1/organizations/123/sources/-/findings + * Example: /v1beta1/organizations/{organization_id}/sources/-/findings * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Name of the source to groupBy. Its format is + * Required. Name of the source to groupBy. Its format is * "organizations/[organization_id]/sources/[source_id]". To groupBy across * all sources provide a source_id of `-`. For example: - * organizations/123/sources/- + * organizations/{organization_id}/sources/- * @param {string} request.groupBy - * Expression that defines what assets fields to use for grouping (including + * Required. Expression that defines what assets fields to use for grouping (including * `state`). The string value should follow SQL syntax: comma separated list * of fields. For example: * "parent,resource_name". @@ -1124,12 +1124,12 @@ class SecurityCenterClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Name of the source to groupBy. Its format is + * Required. Name of the source to groupBy. Its format is * "organizations/[organization_id]/sources/[source_id]". To groupBy across * all sources provide a source_id of `-`. For example: - * organizations/123/sources/- + * organizations/{organization_id}/sources/- * @param {string} request.groupBy - * Expression that defines what assets fields to use for grouping (including + * Required. Expression that defines what assets fields to use for grouping (including * `state`). The string value should follow SQL syntax: comma separated list * of fields. For example: * "parent,resource_name". @@ -1222,7 +1222,7 @@ class SecurityCenterClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Name of the organization assets should belong to. Its format is + * Required. Name of the organization assets should belong to. Its format is * "organizations/[organization_id]". * @param {string} [request.filter] * Expression that defines the filter to apply across assets. @@ -1295,9 +1295,7 @@ class SecurityCenterClient { * * This object should have the same structure as [Duration]{@link google.protobuf.Duration} * @param {Object} [request.fieldMask] - * Optional. - * - * A field mask to specify the ListAssetsResult fields to be listed in the + * Optional. A field mask to specify the ListAssetsResult fields to be listed in the * response. * An empty field mask will list all fields. * @@ -1413,7 +1411,7 @@ class SecurityCenterClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Name of the organization assets should belong to. Its format is + * Required. Name of the organization assets should belong to. Its format is * "organizations/[organization_id]". * @param {string} [request.filter] * Expression that defines the filter to apply across assets. @@ -1486,9 +1484,7 @@ class SecurityCenterClient { * * This object should have the same structure as [Duration]{@link google.protobuf.Duration} * @param {Object} [request.fieldMask] - * Optional. - * - * A field mask to specify the ListAssetsResult fields to be listed in the + * Optional. A field mask to specify the ListAssetsResult fields to be listed in the * response. * An empty field mask will list all fields. * @@ -1535,15 +1531,15 @@ class SecurityCenterClient { * Lists an organization or source's findings. * * To list across all sources provide a `-` as the source id. - * Example: /v1beta1/organizations/123/sources/-/findings + * Example: /v1beta1/organizations/{organization_id}/sources/-/findings * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Name of the source the findings belong to. Its format is + * Required. Name of the source the findings belong to. Its format is * "organizations/[organization_id]/sources/[source_id]". To list across all * sources provide a source_id of `-`. For example: - * organizations/123/sources/- + * organizations/{organization_id}/sources/- * @param {string} [request.filter] * Expression that defines the filter to apply across findings. * The expression is a list of one or more restrictions combined via logical @@ -1587,9 +1583,7 @@ class SecurityCenterClient { * * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} * @param {Object} [request.fieldMask] - * Optional. - * - * A field mask to specify the Finding fields to be listed in the response. + * Optional. A field mask to specify the Finding fields to be listed in the response. * An empty field mask will list all fields. * * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} @@ -1704,10 +1698,10 @@ class SecurityCenterClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Name of the source the findings belong to. Its format is + * Required. Name of the source the findings belong to. Its format is * "organizations/[organization_id]/sources/[source_id]". To list across all * sources provide a source_id of `-`. For example: - * organizations/123/sources/- + * organizations/{organization_id}/sources/- * @param {string} [request.filter] * Expression that defines the filter to apply across findings. * The expression is a list of one or more restrictions combined via logical @@ -1751,9 +1745,7 @@ class SecurityCenterClient { * * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} * @param {Object} [request.fieldMask] - * Optional. - * - * A field mask to specify the Finding fields to be listed in the response. + * Optional. A field mask to specify the Finding fields to be listed in the response. * An empty field mask will list all fields. * * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} @@ -1801,7 +1793,7 @@ class SecurityCenterClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Resource name of the parent of sources to list. Its format should be + * Required. Resource name of the parent of sources to list. Its format should be * "organizations/[organization_id]". * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API @@ -1914,7 +1906,7 @@ class SecurityCenterClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Resource name of the parent of sources to list. Its format should be + * Required. Resource name of the parent of sources to list. Its format should be * "organizations/[organization_id]". * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API @@ -1965,7 +1957,7 @@ class SecurityCenterClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Name of the organization to run asset discovery for. Its format is + * Required. Name of the organization to run asset discovery for. Its format is * "organizations/[organization_id]". * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, @@ -2064,16 +2056,16 @@ class SecurityCenterClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The relative resource name of the finding. See: + * Required. The relative resource name of the finding. See: * https://cloud.google.com/apis/design/resource_names#relative_resource_name * Example: - * "organizations/123/sources/456/finding/789". + * "organizations/{organization_id}/sources/{source_id}/finding/{finding_id}". * @param {number} request.state - * The desired State of the finding. + * Required. The desired State of the finding. * * The number should be among the values of [State]{@link google.cloud.securitycenter.v1beta1.State} * @param {Object} request.startTime - * The time at which the updated state takes effect. + * Required. The time at which the updated state takes effect. * * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} * @param {Object} [options] @@ -2269,7 +2261,7 @@ class SecurityCenterClient { * @param {Object} request * The request object that will be sent. * @param {Object} request.finding - * The finding resource to update or create if it does not already exist. + * Required. The finding resource to update or create if it does not already exist. * parent, security_marks, and update_time will be ignored. * * In the case of creation, the finding id portion of the name must @@ -2335,7 +2327,7 @@ class SecurityCenterClient { * @param {Object} request * The request object that will be sent. * @param {Object} request.organizationSettings - * The organization settings resource to update. + * Required. The organization settings resource to update. * * This object should have the same structure as [OrganizationSettings]{@link google.cloud.securitycenter.v1beta1.OrganizationSettings} * @param {Object} [request.updateMask] @@ -2399,7 +2391,7 @@ class SecurityCenterClient { * @param {Object} request * The request object that will be sent. * @param {Object} request.source - * The source resource to update. + * Required. The source resource to update. * * This object should have the same structure as [Source]{@link google.cloud.securitycenter.v1beta1.Source} * @param {Object} [request.updateMask] @@ -2459,7 +2451,7 @@ class SecurityCenterClient { * @param {Object} request * The request object that will be sent. * @param {Object} request.securityMarks - * The security marks resource to update. + * Required. The security marks resource to update. * * This object should have the same structure as [SecurityMarks]{@link google.cloud.securitycenter.v1beta1.SecurityMarks} * @param {Object} [request.updateMask] diff --git a/packages/google-cloud-securitycenter/synth.metadata b/packages/google-cloud-securitycenter/synth.metadata index db8fd3cfa40..12fa18facde 100644 --- a/packages/google-cloud-securitycenter/synth.metadata +++ b/packages/google-cloud-securitycenter/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-12-10T12:23:11.737877Z", + "updateTime": "2019-12-19T12:23:08.028182Z", "sources": [ { "generator": { "name": "artman", - "version": "0.42.1", - "dockerImage": "googleapis/artman@sha256:c773192618c608a7a0415dd95282f841f8e6bcdef7dd760a988c93b77a64bd57" + "version": "0.42.3", + "dockerImage": "googleapis/artman@sha256:feed210b5723c6f524b52ef6d7740a030f2d1a8f7c29a71c5e5b4481ceaad7f5" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "6cc9499e225a4f6a5e34fe07e390f67055d7991c", - "internalRef": "284643689" + "sha": "d400cb8d45df5b2ae796b909f098a215b2275c1d", + "internalRef": "286312673" } }, { @@ -45,5 +45,2482 @@ "config": "google/cloud/securitycenter/artman_securitycenter_v1.yaml" } } + ], + "newFiles": [ + { + "path": "renovate.json" + }, + { + "path": ".prettierrc" + }, + { + "path": ".nycrc" + }, + { + "path": "webpack.config.js" + }, + { + "path": "README.md" + }, + { + "path": "synth.py" + }, + { + "path": ".eslintignore" + }, + { + "path": ".gitignore" + }, + { + "path": "LICENSE" + }, + { + "path": ".repo-metadata.json" + }, + { + "path": "CONTRIBUTING.md" + }, + { + "path": "synth.metadata" + }, + { + "path": "CODE_OF_CONDUCT.md" + }, + { + "path": "CHANGELOG.md" + }, + { + "path": ".prettierignore" + }, + { + "path": "linkinator.config.json" + }, + { + "path": "package.json" + }, + { + "path": "package-lock.json" + }, + { + "path": "codecov.yaml" + }, + { + "path": ".eslintrc.yml" + }, + { + "path": ".jsdoc.js" + }, + { + "path": ".readme-partials.yaml" + }, + { + "path": "protos/protos.d.ts" + }, + { + "path": "protos/protos.js" + }, + { + "path": "protos/protos.json" + }, + { + "path": "protos/google/cloud/securitycenter/v1beta1/finding.proto" + }, + { + "path": "protos/google/cloud/securitycenter/v1beta1/run_asset_discovery_response.proto" + }, + { + "path": "protos/google/cloud/securitycenter/v1beta1/security_marks.proto" + }, + { + "path": "protos/google/cloud/securitycenter/v1beta1/securitycenter_service.proto" + }, + { + "path": "protos/google/cloud/securitycenter/v1beta1/organization_settings.proto" + }, + { + "path": "protos/google/cloud/securitycenter/v1beta1/source.proto" + }, + { + "path": "protos/google/cloud/securitycenter/v1beta1/asset.proto" + }, + { + "path": "protos/google/cloud/securitycenter/v1/finding.proto" + }, + { + "path": "protos/google/cloud/securitycenter/v1/run_asset_discovery_response.proto" + }, + { + "path": "protos/google/cloud/securitycenter/v1/security_marks.proto" + }, + { + "path": "protos/google/cloud/securitycenter/v1/securitycenter_service.proto" + }, + { + "path": "protos/google/cloud/securitycenter/v1/organization_settings.proto" + }, + { + "path": "protos/google/cloud/securitycenter/v1/source.proto" + }, + { + "path": "protos/google/cloud/securitycenter/v1/asset.proto" + }, + { + "path": ".git/config" + }, + { + "path": ".git/index" + }, + { + "path": ".git/shallow" + }, + { + "path": ".git/HEAD" + }, + { + "path": ".git/packed-refs" + }, + { + "path": ".git/refs/tags/v2.3.0" + }, + { + "path": ".git/refs/remotes/origin/HEAD" + }, + { + "path": ".git/refs/heads/autosynth" + }, + { + "path": ".git/refs/heads/master" + }, + { + "path": ".git/objects/pack/pack-37ef62494e0563d925a784c196add9f1586b4dfb.idx" + }, + { + "path": ".git/objects/pack/pack-37ef62494e0563d925a784c196add9f1586b4dfb.pack" + }, + { + "path": ".git/logs/HEAD" + }, + { + "path": ".git/logs/refs/remotes/origin/HEAD" + }, + { + "path": ".git/logs/refs/heads/autosynth" + }, + { + "path": ".git/logs/refs/heads/master" + }, + { + "path": "samples/README.md" + }, + { + "path": "samples/quickstart.js" + }, + { + "path": "samples/package.json" + }, + { + "path": "samples/.eslintrc.yml" + }, + { + "path": "samples/system-test/quickstart.test.js" + }, + { + "path": "samples/system-test/.eslintrc.yml" + }, + { + "path": "samples/system-test/v1/listAssetsAndChanges.test.js" + }, + { + "path": "samples/system-test/v1/listFilteredAssets.test.js" + }, + { + "path": "samples/system-test/v1/listAllAssets.test.js" + }, + { + "path": "samples/system-test/v1/findings.test.js" + }, + { + "path": "samples/system-test/v1/listAssetsAtTime.test.js" + }, + { + "path": "samples/system-test/v1/orgSettings.test.js" + }, + { + "path": "samples/system-test/v1/assetSecurityMarks.test.js" + }, + { + "path": "samples/v1/setSourceIam.js" + }, + { + "path": "samples/v1/updateSource.js" + }, + { + "path": "samples/v1/getSource.js" + }, + { + "path": "samples/v1/listFilteredAssets.js" + }, + { + "path": "samples/v1/enableAssetDiscovery.js" + }, + { + "path": "samples/v1/listFindingsAtTime.js" + }, + { + "path": "samples/v1/getSourceIam.js" + }, + { + "path": "samples/v1/listAllFindings.js" + }, + { + "path": "samples/v1/deleteSecurityMarks.js" + }, + { + "path": "samples/v1/getOrganizationSettings.js" + }, + { + "path": "samples/v1/addDeleteSecurityMarks.js" + }, + { + "path": "samples/v1/listAllSources.js" + }, + { + "path": "samples/v1/createSource.js" + }, + { + "path": "samples/v1/listAssetsWithSecurityMarks.js" + }, + { + "path": "samples/v1/listAssetsAndChanges.js" + }, + { + "path": "samples/v1/addSecurityMarks.js" + }, + { + "path": "samples/v1/setFindingState.js" + }, + { + "path": "samples/v1/createFinding.js" + }, + { + "path": "samples/v1/listAllAssets.js" + }, + { + "path": "samples/v1/createFindingSourceProperties.js" + }, + { + "path": "samples/v1/listAssetsAtTime.js" + }, + { + "path": "samples/v1/listFilteredFindings.js" + }, + { + "path": "samples/v1/addFindingSecurityMarks.js" + }, + { + "path": "samples/v1/testIam.js" + }, + { + "path": "samples/v1/listFindingsWithSecurityMarks.js" + }, + { + "path": "samples/v1/updateFindingSourceProperties.js" + }, + { + "path": "__pycache__/synth.cpython-36.pyc" + }, + { + "path": "node_modules/shebang-command/package.json" + }, + { + "path": "node_modules/range-parser/package.json" + }, + { + "path": "node_modules/esprima/package.json" + }, + { + "path": "node_modules/empower-assert/package.json" + }, + { + "path": "node_modules/widest-line/package.json" + }, + { + "path": "node_modules/widest-line/node_modules/ansi-regex/package.json" + }, + { + "path": "node_modules/widest-line/node_modules/strip-ansi/package.json" + }, + { + "path": "node_modules/widest-line/node_modules/is-fullwidth-code-point/package.json" + }, + { + "path": "node_modules/widest-line/node_modules/string-width/package.json" + }, + { + "path": "node_modules/is-obj/package.json" + }, + { + "path": "node_modules/is-arrayish/package.json" + }, + { + "path": "node_modules/ansi-align/package.json" + }, + { + "path": "node_modules/ansi-align/node_modules/is-fullwidth-code-point/package.json" + }, + { + "path": "node_modules/ansi-align/node_modules/string-width/package.json" + }, + { + "path": "node_modules/ansi-align/node_modules/emoji-regex/package.json" + }, + { + "path": "node_modules/css-what/package.json" + }, + { + "path": "node_modules/spdx-expression-parse/package.json" + }, + { + "path": "node_modules/graceful-fs/package.json" + }, + { + "path": "node_modules/istanbul-reports/package.json" + }, + { + "path": "node_modules/y18n/package.json" + }, + { + "path": "node_modules/eventemitter3/package.json" + }, + { + "path": "node_modules/minimatch/package.json" + }, + { + "path": "node_modules/object.assign/package.json" + }, + { + "path": "node_modules/gtoken/package.json" + }, + { + "path": "node_modules/chalk/package.json" + }, + { + "path": "node_modules/gcp-metadata/package.json" + }, + { + "path": "node_modules/prelude-ls/package.json" + }, + { + "path": "node_modules/fast-json-stable-stringify/package.json" + }, + { + "path": "node_modules/espower-loader/package.json" + }, + { + "path": "node_modules/is-url/package.json" + }, + { + "path": "node_modules/responselike/package.json" + }, + { + "path": "node_modules/got/package.json" + }, + { + "path": "node_modules/got/node_modules/get-stream/package.json" + }, + { + "path": "node_modules/growl/package.json" + }, + { + "path": "node_modules/hasha/package.json" + }, + { + "path": "node_modules/hasha/node_modules/is-stream/package.json" + }, + { + "path": "node_modules/he/package.json" + }, + { + "path": "node_modules/end-of-stream/package.json" + }, + { + "path": "node_modules/isexe/package.json" + }, + { + "path": "node_modules/source-map/package.json" + }, + { + "path": "node_modules/escope/package.json" + }, + { + "path": "node_modules/meow/package.json" + }, + { + "path": "node_modules/has-flag/package.json" + }, + { + "path": "node_modules/encodeurl/package.json" + }, + { + "path": "node_modules/multi-stage-sourcemap/package.json" + }, + { + "path": "node_modules/multi-stage-sourcemap/node_modules/source-map/package.json" + }, + { + "path": "node_modules/jwa/package.json" + }, + { + "path": "node_modules/parent-module/package.json" + }, + { + "path": "node_modules/server-destroy/package.json" + }, + { + "path": "node_modules/p-queue/package.json" + }, + { + "path": "node_modules/esutils/package.json" + }, + { + "path": "node_modules/espurify/package.json" + }, + { + "path": "node_modules/write-file-atomic/package.json" + }, + { + "path": "node_modules/es6-set/package.json" + }, + { + "path": "node_modules/es6-set/node_modules/es6-symbol/package.json" + }, + { + "path": "node_modules/path-parse/package.json" + }, + { + "path": "node_modules/iconv-lite/package.json" + }, + { + "path": "node_modules/ecdsa-sig-formatter/package.json" + }, + { + "path": "node_modules/yargs/package.json" + }, + { + "path": "node_modules/yargs/node_modules/p-limit/package.json" + }, + { + "path": "node_modules/yargs/node_modules/locate-path/package.json" + }, + { + "path": "node_modules/yargs/node_modules/find-up/package.json" + }, + { + "path": "node_modules/yargs/node_modules/is-fullwidth-code-point/package.json" + }, + { + "path": "node_modules/yargs/node_modules/string-width/package.json" + }, + { + "path": "node_modules/yargs/node_modules/yargs-parser/package.json" + }, + { + "path": "node_modules/yargs/node_modules/p-try/package.json" + }, + { + "path": "node_modules/yargs/node_modules/p-locate/package.json" + }, + { + "path": "node_modules/yargs/node_modules/camelcase/package.json" + }, + { + "path": "node_modules/yargs/node_modules/emoji-regex/package.json" + }, + { + "path": "node_modules/external-editor/package.json" + }, + { + "path": "node_modules/string.prototype.trimright/package.json" + }, + { + "path": "node_modules/is-installed-globally/package.json" + }, + { + "path": "node_modules/fast-deep-equal/package.json" + }, + { + "path": "node_modules/css-select/package.json" + }, + { + "path": "node_modules/core-util-is/package.json" + }, + { + "path": "node_modules/empower/package.json" + }, + { + "path": "node_modules/path-type/package.json" + }, + { + "path": "node_modules/define-properties/package.json" + }, + { + "path": "node_modules/resolve/package.json" + }, + { + "path": "node_modules/object-keys/package.json" + }, + { + "path": "node_modules/parseurl/package.json" + }, + { + "path": "node_modules/statuses/package.json" + }, + { + "path": "node_modules/p-limit/package.json" + }, + { + "path": "node_modules/destroy/package.json" + }, + { + "path": "node_modules/read-pkg-up/package.json" + }, + { + "path": "node_modules/path-is-absolute/package.json" + }, + { + "path": "node_modules/punycode/package.json" + }, + { + "path": "node_modules/error-ex/package.json" + }, + { + "path": "node_modules/boolbase/package.json" + }, + { + "path": "node_modules/@sindresorhus/is/package.json" + }, + { + "path": "node_modules/mimic-response/package.json" + }, + { + "path": "node_modules/indent-string/package.json" + }, + { + "path": "node_modules/append-transform/package.json" + }, + { + "path": "node_modules/neo-async/package.json" + }, + { + "path": "node_modules/diff-match-patch/package.json" + }, + { + "path": "node_modules/jsesc/package.json" + }, + { + "path": "node_modules/power-assert-context-formatter/package.json" + }, + { + "path": "node_modules/is-symbol/package.json" + }, + { + "path": "node_modules/through/package.json" + }, + { + "path": "node_modules/http-cache-semantics/package.json" + }, + { + "path": "node_modules/ms/package.json" + }, + { + "path": "node_modules/nice-try/package.json" + }, + { + "path": "node_modules/js2xmlparser/package.json" + }, + { + "path": "node_modules/mimic-fn/package.json" + }, + { + "path": "node_modules/which-module/package.json" + }, + { + "path": "node_modules/debug/package.json" + }, + { + "path": "node_modules/path-key/package.json" + }, + { + "path": "node_modules/imurmurhash/package.json" + }, + { + "path": "node_modules/catharsis/package.json" + }, + { + "path": "node_modules/node-environment-flags/package.json" + }, + { + "path": "node_modules/node-environment-flags/node_modules/semver/package.json" + }, + { + "path": "node_modules/require-directory/package.json" + }, + { + "path": "node_modules/merge-estraverse-visitors/package.json" + }, + { + "path": "node_modules/js-yaml/package.json" + }, + { + "path": "node_modules/p-finally/package.json" + }, + { + "path": "node_modules/next-tick/package.json" + }, + { + "path": "node_modules/mime/package.json" + }, + { + "path": "node_modules/es-to-primitive/package.json" + }, + { + "path": "node_modules/callsites/package.json" + }, + { + "path": "node_modules/parse5/package.json" + }, + { + "path": "node_modules/configstore/package.json" + }, + { + "path": "node_modules/unpipe/package.json" + }, + { + "path": "node_modules/merge-source-map/package.json" + }, + { + "path": "node_modules/agent-base/package.json" + }, + { + "path": "node_modules/extend/package.json" + }, + { + "path": "node_modules/eslint-utils/package.json" + }, + { + "path": "node_modules/is-promise/package.json" + }, + { + "path": "node_modules/rimraf/package.json" + }, + { + "path": "node_modules/inquirer/package.json" + }, + { + "path": "node_modules/concat-map/package.json" + }, + { + "path": "node_modules/word-wrap/package.json" + }, + { + "path": "node_modules/fresh/package.json" + }, + { + "path": "node_modules/deep-extend/package.json" + }, + { + "path": "node_modules/glob-parent/package.json" + }, + { + "path": "node_modules/node-fetch/package.json" + }, + { + "path": "node_modules/indexof/package.json" + }, + { + "path": "node_modules/power-assert-renderer-comparison/package.json" + }, + { + "path": "node_modules/package-hash/package.json" + }, + { + "path": "node_modules/es5-ext/package.json" + }, + { + "path": "node_modules/@grpc/grpc-js/package.json" + }, + { + "path": "node_modules/@grpc/proto-loader/package.json" + }, + { + "path": "node_modules/espower-location-detector/package.json" + }, + { + "path": "node_modules/espower-location-detector/node_modules/source-map/package.json" + }, + { + "path": "node_modules/brace-expansion/package.json" + }, + { + "path": "node_modules/p-timeout/package.json" + }, + { + "path": "node_modules/js-tokens/package.json" + }, + { + "path": "node_modules/onetime/package.json" + }, + { + "path": "node_modules/empower-core/package.json" + }, + { + "path": "node_modules/safe-buffer/package.json" + }, + { + "path": "node_modules/loud-rejection/package.json" + }, + { + "path": "node_modules/type-fest/package.json" + }, + { + "path": "node_modules/es6-symbol/package.json" + }, + { + "path": "node_modules/es6-promisify/package.json" + }, + { + "path": "node_modules/serve-static/package.json" + }, + { + "path": "node_modules/unique-string/package.json" + }, + { + "path": "node_modules/boxen/package.json" + }, + { + "path": "node_modules/boxen/node_modules/type-fest/package.json" + }, + { + "path": "node_modules/boxen/node_modules/is-fullwidth-code-point/package.json" + }, + { + "path": "node_modules/boxen/node_modules/string-width/package.json" + }, + { + "path": "node_modules/boxen/node_modules/camelcase/package.json" + }, + { + "path": "node_modules/boxen/node_modules/emoji-regex/package.json" + }, + { + "path": "node_modules/jsdoc-fresh/package.json" + }, + { + "path": "node_modules/jsdoc-fresh/node_modules/taffydb/package.json" + }, + { + "path": "node_modules/ini/package.json" + }, + { + "path": "node_modules/mdurl/package.json" + }, + { + "path": "node_modules/http-errors/package.json" + }, + { + "path": "node_modules/global-dirs/package.json" + }, + { + "path": "node_modules/type-name/package.json" + }, + { + "path": "node_modules/buffer-equal-constant-time/package.json" + }, + { + "path": "node_modules/es6-promise/package.json" + }, + { + "path": "node_modules/normalize-url/package.json" + }, + { + "path": "node_modules/registry-url/package.json" + }, + { + "path": "node_modules/pseudomap/package.json" + }, + { + "path": "node_modules/latest-version/package.json" + }, + { + "path": "node_modules/espower/package.json" + }, + { + "path": "node_modules/espower/node_modules/source-map/package.json" + }, + { + "path": "node_modules/isarray/package.json" + }, + { + "path": "node_modules/cacheable-request/package.json" + }, + { + "path": "node_modules/cacheable-request/node_modules/get-stream/package.json" + }, + { + "path": "node_modules/cacheable-request/node_modules/lowercase-keys/package.json" + }, + { + "path": "node_modules/toidentifier/package.json" + }, + { + "path": "node_modules/to-readable-stream/package.json" + }, + { + "path": "node_modules/quick-lru/package.json" + }, + { + "path": "node_modules/regexp.prototype.flags/package.json" + }, + { + "path": "node_modules/which/package.json" + }, + { + "path": "node_modules/spdx-correct/package.json" + }, + { + "path": "node_modules/escape-string-regexp/package.json" + }, + { + "path": "node_modules/ansi-regex/package.json" + }, + { + "path": "node_modules/wrap-ansi/package.json" + }, + { + "path": "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/package.json" + }, + { + "path": "node_modules/wrap-ansi/node_modules/string-width/package.json" + }, + { + "path": "node_modules/wrap-ansi/node_modules/emoji-regex/package.json" + }, + { + "path": "node_modules/update-notifier/package.json" + }, + { + "path": "node_modules/strip-indent/package.json" + }, + { + "path": "node_modules/has/package.json" + }, + { + "path": "node_modules/release-zalgo/package.json" + }, + { + "path": "node_modules/browser-stdout/package.json" + }, + { + "path": "node_modules/esquery/package.json" + }, + { + "path": "node_modules/bluebird/package.json" + }, + { + "path": "node_modules/ext/package.json" + }, + { + "path": "node_modules/ext/node_modules/type/package.json" + }, + { + "path": "node_modules/argparse/package.json" + }, + { + "path": "node_modules/is-ci/package.json" + }, + { + "path": "node_modules/escallmatch/package.json" + }, + { + "path": "node_modules/escallmatch/node_modules/esprima/package.json" + }, + { + "path": "node_modules/google-p12-pem/package.json" + }, + { + "path": "node_modules/d/package.json" + }, + { + "path": "node_modules/acorn-jsx/package.json" + }, + { + "path": "node_modules/text-table/package.json" + }, + { + "path": "node_modules/color-name/package.json" + }, + { + "path": "node_modules/linkify-it/package.json" + }, + { + "path": "node_modules/minimist/package.json" + }, + { + "path": "node_modules/pump/package.json" + }, + { + "path": "node_modules/util-deprecate/package.json" + }, + { + "path": "node_modules/flat/package.json" + }, + { + "path": "node_modules/load-json-file/package.json" + }, + { + "path": "node_modules/locate-path/package.json" + }, + { + "path": "node_modules/is-regex/package.json" + }, + { + "path": "node_modules/eslint-plugin-node/package.json" + }, + { + "path": "node_modules/eslint-plugin-node/node_modules/ignore/package.json" + }, + { + "path": "node_modules/yallist/package.json" + }, + { + "path": "node_modules/semver-diff/package.json" + }, + { + "path": "node_modules/semver-diff/node_modules/semver/package.json" + }, + { + "path": "node_modules/ansi-colors/package.json" + }, + { + "path": "node_modules/file-entry-cache/package.json" + }, + { + "path": "node_modules/fs.realpath/package.json" + }, + { + "path": "node_modules/execa/package.json" + }, + { + "path": "node_modules/execa/node_modules/yallist/package.json" + }, + { + "path": "node_modules/execa/node_modules/cross-spawn/package.json" + }, + { + "path": "node_modules/execa/node_modules/lru-cache/package.json" + }, + { + "path": "node_modules/execa/node_modules/is-stream/package.json" + }, + { + "path": "node_modules/clone-response/package.json" + }, + { + "path": "node_modules/object-is/package.json" + }, + { + "path": "node_modules/rxjs/package.json" + }, + { + "path": "node_modules/teeny-request/package.json" + }, + { + "path": "node_modules/teeny-request/node_modules/https-proxy-agent/package.json" + }, + { + "path": "node_modules/spawn-wrap/package.json" + }, + { + "path": "node_modules/istanbul-lib-instrument/package.json" + }, + { + "path": "node_modules/eslint-plugin-es/package.json" + }, + { + "path": "node_modules/eslint-plugin-es/node_modules/regexpp/package.json" + }, + { + "path": "node_modules/signal-exit/package.json" + }, + { + "path": "node_modules/json-bigint/package.json" + }, + { + "path": "node_modules/es6-error/package.json" + }, + { + "path": "node_modules/through2/package.json" + }, + { + "path": "node_modules/minimist-options/package.json" + }, + { + "path": "node_modules/minimist-options/node_modules/arrify/package.json" + }, + { + "path": "node_modules/cp-file/package.json" + }, + { + "path": "node_modules/cp-file/node_modules/make-dir/package.json" + }, + { + "path": "node_modules/cp-file/node_modules/pify/package.json" + }, + { + "path": "node_modules/cp-file/node_modules/semver/package.json" + }, + { + "path": "node_modules/nyc/package.json" + }, + { + "path": "node_modules/nyc/node_modules/p-limit/package.json" + }, + { + "path": "node_modules/nyc/node_modules/locate-path/package.json" + }, + { + "path": "node_modules/nyc/node_modules/find-up/package.json" + }, + { + "path": "node_modules/nyc/node_modules/make-dir/package.json" + }, + { + "path": "node_modules/nyc/node_modules/pify/package.json" + }, + { + "path": "node_modules/nyc/node_modules/yargs-parser/package.json" + }, + { + "path": "node_modules/nyc/node_modules/p-try/package.json" + }, + { + "path": "node_modules/nyc/node_modules/p-locate/package.json" + }, + { + "path": "node_modules/nyc/node_modules/semver/package.json" + }, + { + "path": "node_modules/nyc/node_modules/camelcase/package.json" + }, + { + "path": "node_modules/depd/package.json" + }, + { + "path": "node_modules/table/package.json" + }, + { + "path": "node_modules/table/node_modules/is-fullwidth-code-point/package.json" + }, + { + "path": "node_modules/table/node_modules/string-width/package.json" + }, + { + "path": "node_modules/table/node_modules/emoji-regex/package.json" + }, + { + "path": "node_modules/is-extglob/package.json" + }, + { + "path": "node_modules/ci-info/package.json" + }, + { + "path": "node_modules/lodash.has/package.json" + }, + { + "path": "node_modules/require-main-filename/package.json" + }, + { + "path": "node_modules/foreground-child/package.json" + }, + { + "path": "node_modules/foreground-child/node_modules/yallist/package.json" + }, + { + "path": "node_modules/foreground-child/node_modules/cross-spawn/package.json" + }, + { + "path": "node_modules/foreground-child/node_modules/lru-cache/package.json" + }, + { + "path": "node_modules/xtend/package.json" + }, + { + "path": "node_modules/markdown-it-anchor/package.json" + }, + { + "path": "node_modules/string_decoder/package.json" + }, + { + "path": "node_modules/node-forge/package.json" + }, + { + "path": "node_modules/type/package.json" + }, + { + "path": "node_modules/test-exclude/package.json" + }, + { + "path": "node_modules/test-exclude/node_modules/p-limit/package.json" + }, + { + "path": "node_modules/test-exclude/node_modules/read-pkg-up/package.json" + }, + { + "path": "node_modules/test-exclude/node_modules/locate-path/package.json" + }, + { + "path": "node_modules/test-exclude/node_modules/find-up/package.json" + }, + { + "path": "node_modules/test-exclude/node_modules/p-try/package.json" + }, + { + "path": "node_modules/test-exclude/node_modules/p-locate/package.json" + }, + { + "path": "node_modules/es6-map/package.json" + }, + { + "path": "node_modules/strip-ansi/package.json" + }, + { + "path": "node_modules/strip-ansi/node_modules/ansi-regex/package.json" + }, + { + "path": "node_modules/npm-run-path/package.json" + }, + { + "path": "node_modules/estraverse/package.json" + }, + { + "path": "node_modules/find-cache-dir/package.json" + }, + { + "path": "node_modules/find-cache-dir/node_modules/make-dir/package.json" + }, + { + "path": "node_modules/find-cache-dir/node_modules/pify/package.json" + }, + { + "path": "node_modules/find-cache-dir/node_modules/semver/package.json" + }, + { + "path": "node_modules/espree/package.json" + }, + { + "path": "node_modules/bignumber.js/package.json" + }, + { + "path": "node_modules/walkdir/package.json" + }, + { + "path": "node_modules/strip-bom/package.json" + }, + { + "path": "node_modules/figures/package.json" + }, + { + "path": "node_modules/parse-json/package.json" + }, + { + "path": "node_modules/run-async/package.json" + }, + { + "path": "node_modules/es6-weak-map/package.json" + }, + { + "path": "node_modules/decompress-response/package.json" + }, + { + "path": "node_modules/to-fast-properties/package.json" + }, + { + "path": "node_modules/color-convert/package.json" + }, + { + "path": "node_modules/functional-red-black-tree/package.json" + }, + { + "path": "node_modules/prettier-linter-helpers/package.json" + }, + { + "path": "node_modules/entities/package.json" + }, + { + "path": "node_modules/read-pkg/package.json" + }, + { + "path": "node_modules/istanbul-lib-report/package.json" + }, + { + "path": "node_modules/istanbul-lib-report/node_modules/make-dir/package.json" + }, + { + "path": "node_modules/istanbul-lib-report/node_modules/pify/package.json" + }, + { + "path": "node_modules/istanbul-lib-report/node_modules/semver/package.json" + }, + { + "path": "node_modules/istanbul-lib-report/node_modules/supports-color/package.json" + }, + { + "path": "node_modules/json-stable-stringify-without-jsonify/package.json" + }, + { + "path": "node_modules/package-json/package.json" + }, + { + "path": "node_modules/is-path-inside/package.json" + }, + { + "path": "node_modules/cross-spawn/README.md" + }, + { + "path": "node_modules/cross-spawn/index.js" + }, + { + "path": "node_modules/cross-spawn/LICENSE" + }, + { + "path": "node_modules/cross-spawn/CHANGELOG.md" + }, + { + "path": "node_modules/cross-spawn/package.json" + }, + { + "path": "node_modules/cross-spawn/node_modules/semver/package.json" + }, + { + "path": "node_modules/cross-spawn/lib/enoent.js" + }, + { + "path": "node_modules/cross-spawn/lib/parse.js" + }, + { + "path": "node_modules/cross-spawn/lib/util/readShebang.js" + }, + { + "path": "node_modules/cross-spawn/lib/util/escape.js" + }, + { + "path": "node_modules/cross-spawn/lib/util/resolveCommand.js" + }, + { + "path": "node_modules/intelli-espower-loader/package.json" + }, + { + "path": "node_modules/hosted-git-info/package.json" + }, + { + "path": "node_modules/argv/package.json" + }, + { + "path": "node_modules/levn/package.json" + }, + { + "path": "node_modules/json-parse-better-errors/package.json" + }, + { + "path": "node_modules/array-find/package.json" + }, + { + "path": "node_modules/uuid/package.json" + }, + { + "path": "node_modules/object-inspect/package.json" + }, + { + "path": "node_modules/uc.micro/package.json" + }, + { + "path": "node_modules/retry-request/package.json" + }, + { + "path": "node_modules/retry-request/node_modules/debug/package.json" + }, + { + "path": "node_modules/find-up/package.json" + }, + { + "path": "node_modules/underscore/package.json" + }, + { + "path": "node_modules/import-lazy/package.json" + }, + { + "path": "node_modules/flatted/package.json" + }, + { + "path": "node_modules/acorn-es7-plugin/package.json" + }, + { + "path": "node_modules/ee-first/package.json" + }, + { + "path": "node_modules/restore-cursor/package.json" + }, + { + "path": "node_modules/defer-to-connect/package.json" + }, + { + "path": "node_modules/escape-html/package.json" + }, + { + "path": "node_modules/is-date-object/package.json" + }, + { + "path": "node_modules/is-fullwidth-code-point/package.json" + }, + { + "path": "node_modules/duplexify/package.json" + }, + { + "path": "node_modules/set-blocking/package.json" + }, + { + "path": "node_modules/linkinator/package.json" + }, + { + "path": "node_modules/linkinator/node_modules/chalk/package.json" + }, + { + "path": "node_modules/linkinator/node_modules/has-flag/package.json" + }, + { + "path": "node_modules/linkinator/node_modules/color-name/package.json" + }, + { + "path": "node_modules/linkinator/node_modules/color-convert/package.json" + }, + { + "path": "node_modules/linkinator/node_modules/ansi-styles/package.json" + }, + { + "path": "node_modules/linkinator/node_modules/supports-color/package.json" + }, + { + "path": "node_modules/domelementtype/package.json" + }, + { + "path": "node_modules/htmlparser2/package.json" + }, + { + "path": "node_modules/htmlparser2/node_modules/readable-stream/package.json" + }, + { + "path": "node_modules/send/package.json" + }, + { + "path": "node_modules/send/node_modules/ms/package.json" + }, + { + "path": "node_modules/send/node_modules/debug/package.json" + }, + { + "path": "node_modules/send/node_modules/debug/node_modules/ms/package.json" + }, + { + "path": "node_modules/send/node_modules/mime/package.json" + }, + { + "path": "node_modules/xmlcreate/package.json" + }, + { + "path": "node_modules/strip-eof/package.json" + }, + { + "path": "node_modules/make-dir/package.json" + }, + { + "path": "node_modules/path-is-inside/package.json" + }, + { + "path": "node_modules/is-yarn-global/package.json" + }, + { + "path": "node_modules/eslint-plugin-prettier/package.json" + }, + { + "path": "node_modules/log-symbols/package.json" + }, + { + "path": "node_modules/taffydb/package.json" + }, + { + "path": "node_modules/url-parse-lax/package.json" + }, + { + "path": "node_modules/fast-diff/package.json" + }, + { + "path": "node_modules/chardet/package.json" + }, + { + "path": "node_modules/power-assert-renderer-assertion/package.json" + }, + { + "path": "node_modules/cliui/package.json" + }, + { + "path": "node_modules/cliui/node_modules/is-fullwidth-code-point/package.json" + }, + { + "path": "node_modules/cliui/node_modules/string-width/package.json" + }, + { + "path": "node_modules/cliui/node_modules/emoji-regex/package.json" + }, + { + "path": "node_modules/prepend-http/package.json" + }, + { + "path": "node_modules/uri-js/package.json" + }, + { + "path": "node_modules/@szmarczak/http-timer/package.json" + }, + { + "path": "node_modules/@babel/highlight/package.json" + }, + { + "path": "node_modules/@babel/helper-split-export-declaration/package.json" + }, + { + "path": "node_modules/@babel/types/package.json" + }, + { + "path": "node_modules/@babel/parser/package.json" + }, + { + "path": "node_modules/@babel/helper-function-name/package.json" + }, + { + "path": "node_modules/@babel/generator/package.json" + }, + { + "path": "node_modules/@babel/generator/node_modules/source-map/package.json" + }, + { + "path": "node_modules/@babel/code-frame/package.json" + }, + { + "path": "node_modules/@babel/helper-get-function-arity/package.json" + }, + { + "path": "node_modules/@babel/template/package.json" + }, + { + "path": "node_modules/@babel/traverse/package.json" + }, + { + "path": "node_modules/@babel/traverse/node_modules/debug/package.json" + }, + { + "path": "node_modules/@babel/traverse/node_modules/globals/package.json" + }, + { + "path": "node_modules/fast-text-encoding/package.json" + }, + { + "path": "node_modules/tslib/package.json" + }, + { + "path": "node_modules/normalize-package-data/package.json" + }, + { + "path": "node_modules/normalize-package-data/node_modules/semver/package.json" + }, + { + "path": "node_modules/mkdirp/package.json" + }, + { + "path": "node_modules/cli-boxes/package.json" + }, + { + "path": "node_modules/array-find-index/package.json" + }, + { + "path": "node_modules/commander/package.json" + }, + { + "path": "node_modules/is-callable/package.json" + }, + { + "path": "node_modules/import-fresh/package.json" + }, + { + "path": "node_modules/ignore-walk/package.json" + }, + { + "path": "node_modules/type-check/package.json" + }, + { + "path": "node_modules/camelcase-keys/package.json" + }, + { + "path": "node_modules/event-target-shim/package.json" + }, + { + "path": "node_modules/trim-newlines/package.json" + }, + { + "path": "node_modules/glob/package.json" + }, + { + "path": "node_modules/prettier/package.json" + }, + { + "path": "node_modules/mute-stream/package.json" + }, + { + "path": "node_modules/diff/package.json" + }, + { + "path": "node_modules/power-assert-context-reducer-ast/package.json" + }, + { + "path": "node_modules/power-assert-context-reducer-ast/node_modules/acorn/package.json" + }, + { + "path": "node_modules/inflight/package.json" + }, + { + "path": "node_modules/eslint-scope/package.json" + }, + { + "path": "node_modules/get-stdin/package.json" + }, + { + "path": "node_modules/pify/package.json" + }, + { + "path": "node_modules/string.prototype.trimleft/package.json" + }, + { + "path": "node_modules/lodash.camelcase/package.json" + }, + { + "path": "node_modules/codecov/package.json" + }, + { + "path": "node_modules/esrecurse/package.json" + }, + { + "path": "node_modules/domhandler/package.json" + }, + { + "path": "node_modules/currently-unhandled/package.json" + }, + { + "path": "node_modules/ansi-styles/package.json" + }, + { + "path": "node_modules/jsdoc-region-tag/package.json" + }, + { + "path": "node_modules/function-bind/package.json" + }, + { + "path": "node_modules/etag/package.json" + }, + { + "path": "node_modules/cli-width/package.json" + }, + { + "path": "node_modules/once/package.json" + }, + { + "path": "node_modules/convert-source-map/package.json" + }, + { + "path": "node_modules/string-width/package.json" + }, + { + "path": "node_modules/string-width/node_modules/strip-ansi/package.json" + }, + { + "path": "node_modules/jws/package.json" + }, + { + "path": "node_modules/xdg-basedir/package.json" + }, + { + "path": "node_modules/has-symbols/package.json" + }, + { + "path": "node_modules/safer-buffer/package.json" + }, + { + "path": "node_modules/cli-cursor/package.json" + }, + { + "path": "node_modules/lru-cache/package.json" + }, + { + "path": "node_modules/nth-check/package.json" + }, + { + "path": "node_modules/json-buffer/package.json" + }, + { + "path": "node_modules/duplexer3/package.json" + }, + { + "path": "node_modules/lodash.at/package.json" + }, + { + "path": "node_modules/istanbul-lib-hook/package.json" + }, + { + "path": "node_modules/arrify/package.json" + }, + { + "path": "node_modules/get-caller-file/package.json" + }, + { + "path": "node_modules/flat-cache/package.json" + }, + { + "path": "node_modules/regexpp/package.json" + }, + { + "path": "node_modules/eslint/package.json" + }, + { + "path": "node_modules/eslint/node_modules/debug/package.json" + }, + { + "path": "node_modules/yargs-parser/package.json" + }, + { + "path": "node_modules/eslint-config-prettier/package.json" + }, + { + "path": "node_modules/strip-json-comments/package.json" + }, + { + "path": "node_modules/decamelize-keys/package.json" + }, + { + "path": "node_modules/decamelize-keys/node_modules/map-obj/package.json" + }, + { + "path": "node_modules/yargs-unparser/package.json" + }, + { + "path": "node_modules/handlebars/package.json" + }, + { + "path": "node_modules/archy/package.json" + }, + { + "path": "node_modules/object.getownpropertydescriptors/package.json" + }, + { + "path": "node_modules/is-glob/package.json" + }, + { + "path": "node_modules/power-assert-formatter/package.json" + }, + { + "path": "node_modules/inherits/package.json" + }, + { + "path": "node_modules/power-assert-util-string-width/package.json" + }, + { + "path": "node_modules/json-schema-traverse/package.json" + }, + { + "path": "node_modules/os-tmpdir/package.json" + }, + { + "path": "node_modules/write/package.json" + }, + { + "path": "node_modules/doctrine/package.json" + }, + { + "path": "node_modules/marked/package.json" + }, + { + "path": "node_modules/cheerio/package.json" + }, + { + "path": "node_modules/abort-controller/package.json" + }, + { + "path": "node_modules/mocha/package.json" + }, + { + "path": "node_modules/mocha/node_modules/p-limit/package.json" + }, + { + "path": "node_modules/mocha/node_modules/ms/package.json" + }, + { + "path": "node_modules/mocha/node_modules/locate-path/package.json" + }, + { + "path": "node_modules/mocha/node_modules/find-up/package.json" + }, + { + "path": "node_modules/mocha/node_modules/glob/package.json" + }, + { + "path": "node_modules/mocha/node_modules/yargs-parser/package.json" + }, + { + "path": "node_modules/mocha/node_modules/strip-json-comments/package.json" + }, + { + "path": "node_modules/mocha/node_modules/p-try/package.json" + }, + { + "path": "node_modules/mocha/node_modules/p-locate/package.json" + }, + { + "path": "node_modules/mocha/node_modules/camelcase/package.json" + }, + { + "path": "node_modules/mocha/node_modules/supports-color/package.json" + }, + { + "path": "node_modules/redent/package.json" + }, + { + "path": "node_modules/markdown-it/package.json" + }, + { + "path": "node_modules/ignore/package.json" + }, + { + "path": "node_modules/is-stream/package.json" + }, + { + "path": "node_modules/os-homedir/package.json" + }, + { + "path": "node_modules/tmp/package.json" + }, + { + "path": "node_modules/readable-stream/package.json" + }, + { + "path": "node_modules/array-filter/package.json" + }, + { + "path": "node_modules/power-assert/package.json" + }, + { + "path": "node_modules/p-try/package.json" + }, + { + "path": "node_modules/slice-ansi/package.json" + }, + { + "path": "node_modules/slice-ansi/node_modules/is-fullwidth-code-point/package.json" + }, + { + "path": "node_modules/wrappy/package.json" + }, + { + "path": "node_modules/on-finished/package.json" + }, + { + "path": "node_modules/registry-auth-token/package.json" + }, + { + "path": "node_modules/eastasianwidth/package.json" + }, + { + "path": "node_modules/caching-transform/package.json" + }, + { + "path": "node_modules/caching-transform/node_modules/make-dir/package.json" + }, + { + "path": "node_modules/caching-transform/node_modules/pify/package.json" + }, + { + "path": "node_modules/caching-transform/node_modules/semver/package.json" + }, + { + "path": "node_modules/core-js/package.json" + }, + { + "path": "node_modules/istanbul-lib-source-maps/package.json" + }, + { + "path": "node_modules/istanbul-lib-source-maps/node_modules/debug/package.json" + }, + { + "path": "node_modules/istanbul-lib-source-maps/node_modules/make-dir/package.json" + }, + { + "path": "node_modules/istanbul-lib-source-maps/node_modules/pify/package.json" + }, + { + "path": "node_modules/istanbul-lib-source-maps/node_modules/semver/package.json" + }, + { + "path": "node_modules/google-gax/package.json" + }, + { + "path": "node_modules/setprototypeof/package.json" + }, + { + "path": "node_modules/pkg-dir/package.json" + }, + { + "path": "node_modules/pkg-dir/node_modules/p-limit/package.json" + }, + { + "path": "node_modules/pkg-dir/node_modules/locate-path/package.json" + }, + { + "path": "node_modules/pkg-dir/node_modules/find-up/package.json" + }, + { + "path": "node_modules/pkg-dir/node_modules/p-try/package.json" + }, + { + "path": "node_modules/pkg-dir/node_modules/p-locate/package.json" + }, + { + "path": "node_modules/p-locate/package.json" + }, + { + "path": "node_modules/finalhandler/package.json" + }, + { + "path": "node_modules/finalhandler/node_modules/ms/package.json" + }, + { + "path": "node_modules/finalhandler/node_modules/debug/package.json" + }, + { + "path": "node_modules/eslint-visitor-keys/package.json" + }, + { + "path": "node_modules/lodash/package.json" + }, + { + "path": "node_modules/natural-compare/package.json" + }, + { + "path": "node_modules/default-require-extensions/package.json" + }, + { + "path": "node_modules/@protobufjs/aspromise/package.json" + }, + { + "path": "node_modules/@protobufjs/pool/package.json" + }, + { + "path": "node_modules/@protobufjs/float/package.json" + }, + { + "path": "node_modules/@protobufjs/base64/package.json" + }, + { + "path": "node_modules/@protobufjs/codegen/package.json" + }, + { + "path": "node_modules/@protobufjs/inquire/package.json" + }, + { + "path": "node_modules/@protobufjs/eventemitter/package.json" + }, + { + "path": "node_modules/@protobufjs/fetch/package.json" + }, + { + "path": "node_modules/@protobufjs/path/package.json" + }, + { + "path": "node_modules/@protobufjs/utf8/package.json" + }, + { + "path": "node_modules/https-proxy-agent/package.json" + }, + { + "path": "node_modules/ansi-escapes/package.json" + }, + { + "path": "node_modules/spdx-license-ids/package.json" + }, + { + "path": "node_modules/power-assert-renderer-diagram/package.json" + }, + { + "path": "node_modules/wide-align/package.json" + }, + { + "path": "node_modules/wide-align/node_modules/ansi-regex/package.json" + }, + { + "path": "node_modules/wide-align/node_modules/strip-ansi/package.json" + }, + { + "path": "node_modules/wide-align/node_modules/is-fullwidth-code-point/package.json" + }, + { + "path": "node_modules/wide-align/node_modules/string-width/package.json" + }, + { + "path": "node_modules/base64-js/package.json" + }, + { + "path": "node_modules/sprintf-js/package.json" + }, + { + "path": "node_modules/is-plain-obj/package.json" + }, + { + "path": "node_modules/is-arguments/package.json" + }, + { + "path": "node_modules/commondir/package.json" + }, + { + "path": "node_modules/optimist/package.json" + }, + { + "path": "node_modules/power-assert-context-traversal/package.json" + }, + { + "path": "node_modules/source-map-support/package.json" + }, + { + "path": "node_modules/source-map-support/node_modules/source-map/package.json" + }, + { + "path": "node_modules/is-npm/package.json" + }, + { + "path": "node_modules/p-cancelable/package.json" + }, + { + "path": "node_modules/v8-compile-cache/package.json" + }, + { + "path": "node_modules/semver/package.json" + }, + { + "path": "node_modules/stringifier/package.json" + }, + { + "path": "node_modules/spdx-exceptions/package.json" + }, + { + "path": "node_modules/progress/package.json" + }, + { + "path": "node_modules/camelcase/package.json" + }, + { + "path": "node_modules/urlgrey/package.json" + }, + { + "path": "node_modules/keyv/package.json" + }, + { + "path": "node_modules/validate-npm-package-license/package.json" + }, + { + "path": "node_modules/get-stream/package.json" + }, + { + "path": "node_modules/is-stream-ended/package.json" + }, + { + "path": "node_modules/deep-equal/package.json" + }, + { + "path": "node_modules/fast-levenshtein/package.json" + }, + { + "path": "node_modules/klaw/package.json" + }, + { + "path": "node_modules/jsonexport/package.json" + }, + { + "path": "node_modules/event-emitter/package.json" + }, + { + "path": "node_modules/acorn/package.json" + }, + { + "path": "node_modules/supports-color/package.json" + }, + { + "path": "node_modules/ajv/package.json" + }, + { + "path": "node_modules/emoji-regex/package.json" + }, + { + "path": "node_modules/jsdoc/package.json" + }, + { + "path": "node_modules/jsdoc/node_modules/escape-string-regexp/package.json" + }, + { + "path": "node_modules/requizzle/package.json" + }, + { + "path": "node_modules/lowercase-keys/package.json" + }, + { + "path": "node_modules/power-assert-renderer-base/package.json" + }, + { + "path": "node_modules/wordwrap/package.json" + }, + { + "path": "node_modules/es-abstract/package.json" + }, + { + "path": "node_modules/gaxios/package.json" + }, + { + "path": "node_modules/map-obj/package.json" + }, + { + "path": "node_modules/stream-shift/package.json" + }, + { + "path": "node_modules/domutils/package.json" + }, + { + "path": "node_modules/es6-iterator/package.json" + }, + { + "path": "node_modules/uglify-js/package.json" + }, + { + "path": "node_modules/amdefine/package.json" + }, + { + "path": "node_modules/@types/color-name/package.json" + }, + { + "path": "node_modules/@types/node/package.json" + }, + { + "path": "node_modules/@types/long/package.json" + }, + { + "path": "node_modules/balanced-match/package.json" + }, + { + "path": "node_modules/is-buffer/package.json" + }, + { + "path": "node_modules/optionator/package.json" + }, + { + "path": "node_modules/rc/package.json" + }, + { + "path": "node_modules/rc/node_modules/minimist/package.json" + }, + { + "path": "node_modules/rc/node_modules/strip-json-comments/package.json" + }, + { + "path": "node_modules/nested-error-stacks/package.json" + }, + { + "path": "node_modules/traverse/package.json" + }, + { + "path": "node_modules/crypto-random-string/package.json" + }, + { + "path": "node_modules/lodash.flattendeep/package.json" + }, + { + "path": "node_modules/resolve-from/package.json" + }, + { + "path": "node_modules/espower-source/package.json" + }, + { + "path": "node_modules/espower-source/node_modules/acorn/package.json" + }, + { + "path": "node_modules/globals/package.json" + }, + { + "path": "node_modules/call-signature/package.json" + }, + { + "path": "node_modules/escodegen/package.json" + }, + { + "path": "node_modules/escodegen/node_modules/esprima/package.json" + }, + { + "path": "node_modules/google-auth-library/package.json" + }, + { + "path": "node_modules/istanbul-lib-coverage/package.json" + }, + { + "path": "node_modules/power-assert-renderer-file/package.json" + }, + { + "path": "node_modules/decamelize/package.json" + }, + { + "path": "node_modules/process-nextick-args/package.json" + }, + { + "path": "node_modules/long/package.json" + }, + { + "path": "node_modules/shebang-regex/package.json" + }, + { + "path": "node_modules/astral-regex/package.json" + }, + { + "path": "node_modules/path-exists/package.json" + }, + { + "path": "node_modules/protobufjs/package.json" + }, + { + "path": "node_modules/protobufjs/cli/package.json" + }, + { + "path": "node_modules/protobufjs/cli/package-lock.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/node_modules/acorn/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/minimist/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/espree/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/semver/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/acorn/package.json" + }, + { + "path": "node_modules/deep-is/package.json" + }, + { + "path": "node_modules/dot-prop/package.json" + }, + { + "path": "node_modules/dom-serializer/package.json" + }, + { + "path": "node_modules/universal-deep-strict-equal/package.json" + }, + { + "path": "node_modules/term-size/package.json" + }, + { + "path": "node_modules/has-yarn/package.json" + }, + { + "path": "node_modules/call-matcher/package.json" + }, + { + "path": "system-test/no-test.js" + }, + { + "path": "system-test/.eslintrc.yml" + }, + { + "path": ".kokoro/docs.sh" + }, + { + "path": ".kokoro/trampoline.sh" + }, + { + "path": ".kokoro/test.sh" + }, + { + "path": ".kokoro/publish.sh" + }, + { + "path": ".kokoro/common.cfg" + }, + { + "path": ".kokoro/test.bat" + }, + { + "path": ".kokoro/lint.sh" + }, + { + "path": ".kokoro/system-test.sh" + }, + { + "path": ".kokoro/.gitattributes" + }, + { + "path": ".kokoro/samples-test.sh" + }, + { + "path": ".kokoro/continuous/node8/test.cfg" + }, + { + "path": ".kokoro/continuous/node8/common.cfg" + }, + { + "path": ".kokoro/continuous/node12/test.cfg" + }, + { + "path": ".kokoro/continuous/node12/common.cfg" + }, + { + "path": ".kokoro/continuous/node10/docs.cfg" + }, + { + "path": ".kokoro/continuous/node10/lint.cfg" + }, + { + "path": ".kokoro/continuous/node10/system-test.cfg" + }, + { + "path": ".kokoro/continuous/node10/test.cfg" + }, + { + "path": ".kokoro/continuous/node10/samples-test.cfg" + }, + { + "path": ".kokoro/continuous/node10/common.cfg" + }, + { + "path": ".kokoro/presubmit/node8/test.cfg" + }, + { + "path": ".kokoro/presubmit/node8/common.cfg" + }, + { + "path": ".kokoro/presubmit/node12/test.cfg" + }, + { + "path": ".kokoro/presubmit/node12/common.cfg" + }, + { + "path": ".kokoro/presubmit/node10/docs.cfg" + }, + { + "path": ".kokoro/presubmit/node10/lint.cfg" + }, + { + "path": ".kokoro/presubmit/node10/system-test.cfg" + }, + { + "path": ".kokoro/presubmit/node10/test.cfg" + }, + { + "path": ".kokoro/presubmit/node10/samples-test.cfg" + }, + { + "path": ".kokoro/presubmit/node10/common.cfg" + }, + { + "path": ".kokoro/presubmit/windows/test.cfg" + }, + { + "path": ".kokoro/presubmit/windows/common.cfg" + }, + { + "path": ".kokoro/release/docs.cfg" + }, + { + "path": ".kokoro/release/docs.sh" + }, + { + "path": ".kokoro/release/publish.cfg" + }, + { + "path": ".kokoro/release/common.cfg" + }, + { + "path": "test/mocha.opts" + }, + { + "path": "test/.eslintrc.yml" + }, + { + "path": "test/gapic-v1.js" + }, + { + "path": "src/index.js" + }, + { + "path": "src/browser.js" + }, + { + "path": "src/v1beta1/index.js" + }, + { + "path": "src/v1beta1/security_center_proto_list.json" + }, + { + "path": "src/v1beta1/security_center_client.js" + }, + { + "path": "src/v1beta1/security_center_client_config.json" + }, + { + "path": "src/v1beta1/doc/google/protobuf/doc_any.js" + }, + { + "path": "src/v1beta1/doc/google/protobuf/doc_duration.js" + }, + { + "path": "src/v1beta1/doc/google/protobuf/doc_timestamp.js" + }, + { + "path": "src/v1beta1/doc/google/protobuf/doc_struct.js" + }, + { + "path": "src/v1beta1/doc/google/protobuf/doc_field_mask.js" + }, + { + "path": "src/v1beta1/doc/google/type/doc_expr.js" + }, + { + "path": "src/v1beta1/doc/google/iam/v1/doc_iam_policy.js" + }, + { + "path": "src/v1beta1/doc/google/iam/v1/doc_options.js" + }, + { + "path": "src/v1beta1/doc/google/iam/v1/doc_policy.js" + }, + { + "path": "src/v1beta1/doc/google/cloud/securitycenter/v1beta1/doc_securitycenter_service.js" + }, + { + "path": "src/v1beta1/doc/google/cloud/securitycenter/v1beta1/doc_asset.js" + }, + { + "path": "src/v1beta1/doc/google/cloud/securitycenter/v1beta1/doc_source.js" + }, + { + "path": "src/v1beta1/doc/google/cloud/securitycenter/v1beta1/doc_organization_settings.js" + }, + { + "path": "src/v1beta1/doc/google/cloud/securitycenter/v1beta1/doc_security_marks.js" + }, + { + "path": "src/v1beta1/doc/google/cloud/securitycenter/v1beta1/doc_finding.js" + }, + { + "path": "src/v1beta1/doc/google/longrunning/doc_operations.js" + }, + { + "path": "src/v1beta1/doc/google/rpc/doc_status.js" + }, + { + "path": "src/v1/index.js" + }, + { + "path": "src/v1/security_center_proto_list.json" + }, + { + "path": "src/v1/security_center_client.js" + }, + { + "path": "src/v1/security_center_client_config.json" + }, + { + "path": "src/v1/doc/google/protobuf/doc_any.js" + }, + { + "path": "src/v1/doc/google/protobuf/doc_duration.js" + }, + { + "path": "src/v1/doc/google/protobuf/doc_timestamp.js" + }, + { + "path": "src/v1/doc/google/protobuf/doc_struct.js" + }, + { + "path": "src/v1/doc/google/protobuf/doc_field_mask.js" + }, + { + "path": "src/v1/doc/google/type/doc_expr.js" + }, + { + "path": "src/v1/doc/google/iam/v1/doc_iam_policy.js" + }, + { + "path": "src/v1/doc/google/iam/v1/doc_options.js" + }, + { + "path": "src/v1/doc/google/iam/v1/doc_policy.js" + }, + { + "path": "src/v1/doc/google/cloud/securitycenter/v1/doc_securitycenter_service.js" + }, + { + "path": "src/v1/doc/google/cloud/securitycenter/v1/doc_asset.js" + }, + { + "path": "src/v1/doc/google/cloud/securitycenter/v1/doc_source.js" + }, + { + "path": "src/v1/doc/google/cloud/securitycenter/v1/doc_organization_settings.js" + }, + { + "path": "src/v1/doc/google/cloud/securitycenter/v1/doc_security_marks.js" + }, + { + "path": "src/v1/doc/google/cloud/securitycenter/v1/doc_finding.js" + }, + { + "path": "src/v1/doc/google/longrunning/doc_operations.js" + }, + { + "path": "src/v1/doc/google/rpc/doc_status.js" + }, + { + "path": ".github/ISSUE_TEMPLATE.md" + }, + { + "path": ".github/release-please.yml" + }, + { + "path": ".github/PULL_REQUEST_TEMPLATE.md" + }, + { + "path": ".github/ISSUE_TEMPLATE/bug_report.md" + }, + { + "path": ".github/ISSUE_TEMPLATE/feature_request.md" + }, + { + "path": ".github/ISSUE_TEMPLATE/support_request.md" + } ] } \ No newline at end of file