diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index dc53bbb57..3d2f82824 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:d4b2141d65566523dfd523f63c6e6899ab1281463bce182a9f600e74b0511875 + digest: sha256:a4d7b2cfc6a9d6b378a6b2458740eae15fcab28854bd23dad3a15102d2e47c87 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2425d7234..05de1f60d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -8,13 +8,11 @@ jobs: units: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: java: [8, 11, 17] steps: - uses: actions/checkout@v2 - - uses: stCarolas/setup-maven@v4 - with: - maven-version: 3.8.1 - uses: actions/setup-java@v2 with: distribution: zulu @@ -27,9 +25,6 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v2 - - uses: stCarolas/setup-maven@v4 - with: - maven-version: 3.8.1 - uses: actions/setup-java@v2 with: distribution: zulu @@ -45,9 +40,6 @@ jobs: java: [8, 11, 17] steps: - uses: actions/checkout@v2 - - uses: stCarolas/setup-maven@v4 - with: - maven-version: 3.8.1 - uses: actions/setup-java@v2 with: distribution: zulu @@ -58,13 +50,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: stCarolas/setup-maven@v4 - with: - maven-version: 3.8.1 - uses: actions/setup-java@v2 with: distribution: zulu - java-version: 8 + java-version: 11 - run: java -version - run: .kokoro/build.sh env: @@ -73,9 +62,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: stCarolas/setup-maven@v4 - with: - maven-version: 3.8.1 - uses: actions/setup-java@v2 with: distribution: zulu diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 47feea3a4..c36c9caf1 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -71,7 +71,7 @@ integration) ;; graalvm) # Run Unit and Integration Tests with Native Image - mvn test -Pnative -Penable-integration-tests + mvn -ntp -Pnative -Penable-integration-tests test RETURN_CODE=$? ;; samples) @@ -91,7 +91,6 @@ samples) pushd ${SAMPLES_DIR} mvn -B \ - -Penable-samples \ -ntp \ -DtrimStackTrace=false \ -Dclirr.skip=true \ diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index 9a5105d7e..d7476cfe9 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -38,15 +38,13 @@ function determineMavenOpts() { | sed -E 's/^(1\.[0-9]\.0).*$/\1/g' ) - case $javaVersion in - "17") + if [[ $javaVersion == 17* ]] + then # MaxPermSize is no longer supported as of jdk 17 echo -n "-Xmx1024m" - ;; - *) + else echo -n "-Xmx1024m -XX:MaxPermSize=128m" - ;; - esac + fi } export MAVEN_OPTS=$(determineMavenOpts) diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh index c6ac90f17..87f51f5be 100755 --- a/.kokoro/release/publish_javadoc11.sh +++ b/.kokoro/release/publish_javadoc11.sh @@ -36,13 +36,9 @@ mvn clean install -B -q -DskipTests=true export NAME=google-cloud-securitycenter export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) -# V3 generates docfx yml from javadoc -# generate yml -mvn clean site -B -q -P docFX - -# copy README to docfx-yml dir and rename index.md -cp README.md target/docfx-yml/index.md -# copy CHANGELOG to docfx-yml dir and rename history.md +# cloud RAD generation +mvn clean javadoc:aggregate -B -q -P docFX +# include CHANGELOG cp CHANGELOG.md target/docfx-yml/history.md pushd target/docfx-yml diff --git a/CHANGELOG.md b/CHANGELOG.md index fa42139b9..391c737e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,34 @@ # Changelog +## [2.3.0](https://www.github.com/googleapis/java-securitycenter/compare/v2.2.0...v2.3.0) (2021-12-06) + + +### Features + +* Added a new API method UpdateExternalSystem, which enables updating a finding w/ external system metadata. External systems are a child resource under finding, and are housed on the finding itself, and can also be filtered on in Notifications, th... ([#705](https://www.github.com/googleapis/java-securitycenter/issues/705)) ([73ee05e](https://www.github.com/googleapis/java-securitycenter/commit/73ee05ef049b42cf05d8ab9ccd2f7cd9cb3d49e3)) +* Added mute related APIs, proto messages and fields ([#702](https://www.github.com/googleapis/java-securitycenter/issues/702)) ([5b88a33](https://www.github.com/googleapis/java-securitycenter/commit/5b88a33193d2eaba1e1b03bba42271211f61b2de)) +* Added resource type and display_name field to the FindingResult, and supported them in the filter for ListFindings and GroupFindings. Also added display_name to the resource which is surfaced in NotificationMessage ([#693](https://www.github.com/googleapis/java-securitycenter/issues/693)) ([bf8f477](https://www.github.com/googleapis/java-securitycenter/commit/bf8f4774bb18da8568d1dacefa09900a54007e62)) + + +### Bug Fixes + +* **java:** add -ntp flag to native image testing command ([#1299](https://www.github.com/googleapis/java-securitycenter/issues/1299)) ([#711](https://www.github.com/googleapis/java-securitycenter/issues/711)) ([88d9aa6](https://www.github.com/googleapis/java-securitycenter/commit/88d9aa6ea93f0c0802c3adb6a479c727c6680b6d)) +* **java:** java 17 dependency arguments ([#1266](https://www.github.com/googleapis/java-securitycenter/issues/1266)) ([#688](https://www.github.com/googleapis/java-securitycenter/issues/688)) ([ae4bc65](https://www.github.com/googleapis/java-securitycenter/commit/ae4bc65147b692b6237eb9683e698258857374bb)) + + +### Documentation + +* fix docstring formatting ([#698](https://www.github.com/googleapis/java-securitycenter/issues/698)) ([ccf2673](https://www.github.com/googleapis/java-securitycenter/commit/ccf2673592aab31731db307c20b4779809a1547a)) +* fix docstring formatting ([#704](https://www.github.com/googleapis/java-securitycenter/issues/704)) ([9508222](https://www.github.com/googleapis/java-securitycenter/commit/950822299d7adcaf123992d0a668a37c901b96a2)) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.0 ([#701](https://www.github.com/googleapis/java-securitycenter/issues/701)) ([3f862c6](https://www.github.com/googleapis/java-securitycenter/commit/3f862c6263b382d5012909a6979715a2dac4ea7d)) +* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.1 ([#710](https://www.github.com/googleapis/java-securitycenter/issues/710)) ([6a02612](https://www.github.com/googleapis/java-securitycenter/commit/6a02612320a2e888cc317be08eb55a0a6a0fdea7)) +* update dependency com.google.protobuf:protobuf-java-util to v3.19.0 ([#686](https://www.github.com/googleapis/java-securitycenter/issues/686)) ([dfa655f](https://www.github.com/googleapis/java-securitycenter/commit/dfa655fb3cf91d81f7175cf32e0fe7ac7f425e74)) +* update dependency com.google.protobuf:protobuf-java-util to v3.19.1 ([#699](https://www.github.com/googleapis/java-securitycenter/issues/699)) ([5c9f5f0](https://www.github.com/googleapis/java-securitycenter/commit/5c9f5f0f7aa9e7e6112f102caa65671604db4efa)) + ## [2.2.0](https://www.github.com/googleapis/java-securitycenter/compare/v2.1.7...v2.2.0) (2021-10-20) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f2dbdee06..b65dd279c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -53,12 +53,12 @@ mvn -Penable-integration-tests clean verify ## Code Samples -Code Samples must be bundled in separate Maven modules, and guarded by a -Maven profile with the name `enable-samples`. +All code samples must be in compliance with the [java sample formatting guide][3]. +Code Samples must be bundled in separate Maven modules. The samples must be separate from the primary project for a few reasons: -1. Primary projects have a minimum Java version of Java 7 whereas samples have - a minimum Java version of Java 8. Due to this we need the ability to +1. Primary projects have a minimum Java version of Java 8 whereas samples can have + Java version of Java 11. Due to this we need the ability to selectively exclude samples from a build run. 2. Many code samples depend on external GCP services and need credentials to access the service. @@ -68,39 +68,16 @@ The samples must be separate from the primary project for a few reasons: ### Building ```bash -mvn -Penable-samples clean verify +mvn clean verify ``` Some samples require access to GCP services and require a service account: ```bash export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service/account.json -mvn -Penable-samples clean verify +mvn clean verify ``` -### Profile Config - -1. To add samples in a profile to your Maven project, add the following to your -`pom.xml` - - ```xml - - [...] - - - enable-samples - - sample - - - - [...] - - ``` - -2. [Activate](#profile-activation) the profile. -3. Define your samples in a normal Maven project in the `samples/` directory. - ### Code Formatting Code in this repo is formatted with @@ -110,30 +87,6 @@ To run formatting on your project, you can run: mvn com.coveo:fmt-maven-plugin:format ``` -### Profile Activation - -To include code samples when building and testing the project, enable the -`enable-samples` Maven profile. - -#### Command line - -To activate the Maven profile on the command line add `-Penable-samples` to your -Maven command. - -#### Maven `settings.xml` - -To activate the Maven profile in your `~/.m2/settings.xml` add an entry of -`enable-samples` following the instructions in [Active Profiles][2]. - -This method has the benefit of applying to all projects you build (and is -respected by IntelliJ IDEA) and is recommended if you are going to be -contributing samples to several projects. - -#### IntelliJ IDEA - -To activate the Maven Profile inside IntelliJ IDEA, follow the instructions in -[Activate Maven profiles][3] to activate `enable-samples`. - [1]: https://cloud.google.com/docs/authentication/getting-started#creating_a_service_account [2]: https://maven.apache.org/settings.html#Active_Profiles -[3]: https://www.jetbrains.com/help/idea/work-with-maven-profiles.html#activate_maven_profiles +[3]: https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md \ No newline at end of file diff --git a/README.md b/README.md index 0504e368d..d6e43e129 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file com.google.cloud libraries-bom - 23.1.0 + 24.0.0 pom import @@ -46,7 +46,7 @@ If you are using Maven without BOM, add this to your dependencies: com.google.cloud google-cloud-securitycenter - 2.1.7 + 2.2.0 ``` @@ -54,20 +54,20 @@ If you are using Maven without BOM, add this to your dependencies: If you are using Gradle 5.x or later, add this to your dependencies ```Groovy -implementation platform('com.google.cloud:libraries-bom:23.1.0') +implementation platform('com.google.cloud:libraries-bom:24.0.0') implementation 'com.google.cloud:google-cloud-securitycenter' ``` If you are using Gradle without BOM, add this to your dependencies ```Groovy -implementation 'com.google.cloud:google-cloud-securitycenter:2.1.7' +implementation 'com.google.cloud:google-cloud-securitycenter:2.2.0' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-securitycenter" % "2.1.7" +libraryDependencies += "com.google.cloud" % "google-cloud-securitycenter" % "2.2.0" ``` ## Authentication @@ -130,7 +130,7 @@ Security Command Center uses gRPC for the transport layer. ## Supported Java Versions -Java 7 or above is required for using this client. +Java 8 or above is required for using this client. Google's Java client libraries, [Google Cloud Client Libraries][cloudlibs] @@ -199,7 +199,6 @@ Apache 2.0 - See [LICENSE][license] for more information. Java Version | Status ------------ | ------ -Java 7 | [![Kokoro CI][kokoro-badge-image-1]][kokoro-badge-link-1] Java 8 | [![Kokoro CI][kokoro-badge-image-2]][kokoro-badge-link-2] Java 8 OSX | [![Kokoro CI][kokoro-badge-image-3]][kokoro-badge-link-3] Java 8 Windows | [![Kokoro CI][kokoro-badge-image-4]][kokoro-badge-link-4] diff --git a/google-cloud-securitycenter-bom/pom.xml b/google-cloud-securitycenter-bom/pom.xml index f98e2c03a..5b3198fac 100644 --- a/google-cloud-securitycenter-bom/pom.xml +++ b/google-cloud-securitycenter-bom/pom.xml @@ -3,12 +3,12 @@ 4.0.0 com.google.cloud google-cloud-securitycenter-bom - 2.2.0 + 2.3.0 pom com.google.cloud google-cloud-shared-config - 1.1.0 + 1.2.2 Google Cloud Security Command Center BOM @@ -53,37 +53,37 @@ com.google.cloud google-cloud-securitycenter - 2.2.0 + 2.3.0 com.google.api.grpc grpc-google-cloud-securitycenter-v1 - 2.2.0 + 2.3.0 com.google.api.grpc grpc-google-cloud-securitycenter-v1beta1 - 0.97.0 + 0.98.0 com.google.api.grpc grpc-google-cloud-securitycenter-v1p1beta1 - 0.97.0 + 0.98.0 com.google.api.grpc proto-google-cloud-securitycenter-v1 - 2.2.0 + 2.3.0 com.google.api.grpc proto-google-cloud-securitycenter-v1beta1 - 0.97.0 + 0.98.0 com.google.api.grpc proto-google-cloud-securitycenter-v1p1beta1 - 0.97.0 + 0.98.0 diff --git a/google-cloud-securitycenter/pom.xml b/google-cloud-securitycenter/pom.xml index 8934eac07..aa13fd615 100644 --- a/google-cloud-securitycenter/pom.xml +++ b/google-cloud-securitycenter/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-securitycenter - 2.2.0 + 2.3.0 jar Google Cloud Security Command Center https://github.com/googleapis/java-securitycenter @@ -11,7 +11,7 @@ com.google.cloud google-cloud-securitycenter-parent - 2.2.0 + 2.3.0 google-cloud-securitycenter diff --git a/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterClient.java b/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterClient.java index 186dceb15..04b37ace3 100644 --- a/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterClient.java +++ b/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterClient.java @@ -171,6 +171,143 @@ public final OperationsClient getOperationsClient() { return operationsClient; } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either + * an organization, folder or project. The findings matched by the filter will be muted after the + * LRO is done. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ResourceName parent = FolderName.of("[FOLDER]");
+   *   BulkMuteFindingsResponse response = securityCenterClient.bulkMuteFindingsAsync(parent).get();
+   * }
+   * }
+ * + * @param parent Required. The parent, at which bulk action needs to be applied. Its format is + * "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture bulkMuteFindingsAsync( + ResourceName parent) { + BulkMuteFindingsRequest request = + BulkMuteFindingsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return bulkMuteFindingsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either + * an organization, folder or project. The findings matched by the filter will be muted after the + * LRO is done. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   String parent = FolderName.of("[FOLDER]").toString();
+   *   BulkMuteFindingsResponse response = securityCenterClient.bulkMuteFindingsAsync(parent).get();
+   * }
+   * }
+ * + * @param parent Required. The parent, at which bulk action needs to be applied. Its format is + * "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture bulkMuteFindingsAsync( + String parent) { + BulkMuteFindingsRequest request = + BulkMuteFindingsRequest.newBuilder().setParent(parent).build(); + return bulkMuteFindingsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either + * an organization, folder or project. The findings matched by the filter will be muted after the + * LRO is done. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   BulkMuteFindingsRequest request =
+   *       BulkMuteFindingsRequest.newBuilder()
+   *           .setParent(FolderName.of("[FOLDER]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setMuteAnnotation("muteAnnotation-2111042008")
+   *           .build();
+   *   BulkMuteFindingsResponse response = securityCenterClient.bulkMuteFindingsAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture bulkMuteFindingsAsync( + BulkMuteFindingsRequest request) { + return bulkMuteFindingsOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either + * an organization, folder or project. The findings matched by the filter will be muted after the + * LRO is done. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   BulkMuteFindingsRequest request =
+   *       BulkMuteFindingsRequest.newBuilder()
+   *           .setParent(FolderName.of("[FOLDER]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setMuteAnnotation("muteAnnotation-2111042008")
+   *           .build();
+   *   OperationFuture future =
+   *       securityCenterClient.bulkMuteFindingsOperationCallable().futureCall(request);
+   *   // Do something.
+   *   BulkMuteFindingsResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + bulkMuteFindingsOperationCallable() { + return stub.bulkMuteFindingsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either + * an organization, folder or project. The findings matched by the filter will be muted after the + * LRO is done. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   BulkMuteFindingsRequest request =
+   *       BulkMuteFindingsRequest.newBuilder()
+   *           .setParent(FolderName.of("[FOLDER]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setMuteAnnotation("muteAnnotation-2111042008")
+   *           .build();
+   *   ApiFuture future =
+   *       securityCenterClient.bulkMuteFindingsCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable bulkMuteFindingsCallable() { + return stub.bulkMuteFindingsCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a source. @@ -392,6 +529,301 @@ public final UnaryCallable createFindingCallable( return stub.createFindingCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a mute config. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   FolderName parent = FolderName.of("[FOLDER]");
+   *   MuteConfig muteConfig = MuteConfig.newBuilder().build();
+   *   MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig);
+   * }
+   * }
+ * + * @param parent Required. Resource name of the new mute configs's parent. Its format is + * "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". + * @param muteConfig Required. The mute config being created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final MuteConfig createMuteConfig(FolderName parent, MuteConfig muteConfig) { + CreateMuteConfigRequest request = + CreateMuteConfigRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setMuteConfig(muteConfig) + .build(); + return createMuteConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a mute config. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+   *   MuteConfig muteConfig = MuteConfig.newBuilder().build();
+   *   MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig);
+   * }
+   * }
+ * + * @param parent Required. Resource name of the new mute configs's parent. Its format is + * "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". + * @param muteConfig Required. The mute config being created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final MuteConfig createMuteConfig(OrganizationName parent, MuteConfig muteConfig) { + CreateMuteConfigRequest request = + CreateMuteConfigRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setMuteConfig(muteConfig) + .build(); + return createMuteConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a mute config. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   MuteConfig muteConfig = MuteConfig.newBuilder().build();
+   *   MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig);
+   * }
+   * }
+ * + * @param parent Required. Resource name of the new mute configs's parent. Its format is + * "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". + * @param muteConfig Required. The mute config being created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final MuteConfig createMuteConfig(ProjectName parent, MuteConfig muteConfig) { + CreateMuteConfigRequest request = + CreateMuteConfigRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setMuteConfig(muteConfig) + .build(); + return createMuteConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a mute config. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
+   *   MuteConfig muteConfig = MuteConfig.newBuilder().build();
+   *   MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig);
+   * }
+   * }
+ * + * @param parent Required. Resource name of the new mute configs's parent. Its format is + * "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". + * @param muteConfig Required. The mute config being created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final MuteConfig createMuteConfig(String parent, MuteConfig muteConfig) { + CreateMuteConfigRequest request = + CreateMuteConfigRequest.newBuilder().setParent(parent).setMuteConfig(muteConfig).build(); + return createMuteConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a mute config. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   FolderName parent = FolderName.of("[FOLDER]");
+   *   MuteConfig muteConfig = MuteConfig.newBuilder().build();
+   *   String muteConfigId = "muteConfigId1689669942";
+   *   MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig, muteConfigId);
+   * }
+   * }
+ * + * @param parent Required. Resource name of the new mute configs's parent. Its format is + * "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". + * @param muteConfig Required. The mute config being created. + * @param muteConfigId Required. Unique identifier provided by the client within the parent scope. + * It must consist of lower case letters, numbers, and hyphen, with the first character a + * letter, the last a letter or a number, and a 63 character maximum. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final MuteConfig createMuteConfig( + FolderName parent, MuteConfig muteConfig, String muteConfigId) { + CreateMuteConfigRequest request = + CreateMuteConfigRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setMuteConfig(muteConfig) + .setMuteConfigId(muteConfigId) + .build(); + return createMuteConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a mute config. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+   *   MuteConfig muteConfig = MuteConfig.newBuilder().build();
+   *   String muteConfigId = "muteConfigId1689669942";
+   *   MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig, muteConfigId);
+   * }
+   * }
+ * + * @param parent Required. Resource name of the new mute configs's parent. Its format is + * "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". + * @param muteConfig Required. The mute config being created. + * @param muteConfigId Required. Unique identifier provided by the client within the parent scope. + * It must consist of lower case letters, numbers, and hyphen, with the first character a + * letter, the last a letter or a number, and a 63 character maximum. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final MuteConfig createMuteConfig( + OrganizationName parent, MuteConfig muteConfig, String muteConfigId) { + CreateMuteConfigRequest request = + CreateMuteConfigRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setMuteConfig(muteConfig) + .setMuteConfigId(muteConfigId) + .build(); + return createMuteConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a mute config. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   MuteConfig muteConfig = MuteConfig.newBuilder().build();
+   *   String muteConfigId = "muteConfigId1689669942";
+   *   MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig, muteConfigId);
+   * }
+   * }
+ * + * @param parent Required. Resource name of the new mute configs's parent. Its format is + * "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". + * @param muteConfig Required. The mute config being created. + * @param muteConfigId Required. Unique identifier provided by the client within the parent scope. + * It must consist of lower case letters, numbers, and hyphen, with the first character a + * letter, the last a letter or a number, and a 63 character maximum. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final MuteConfig createMuteConfig( + ProjectName parent, MuteConfig muteConfig, String muteConfigId) { + CreateMuteConfigRequest request = + CreateMuteConfigRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setMuteConfig(muteConfig) + .setMuteConfigId(muteConfigId) + .build(); + return createMuteConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a mute config. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
+   *   MuteConfig muteConfig = MuteConfig.newBuilder().build();
+   *   String muteConfigId = "muteConfigId1689669942";
+   *   MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig, muteConfigId);
+   * }
+   * }
+ * + * @param parent Required. Resource name of the new mute configs's parent. Its format is + * "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". + * @param muteConfig Required. The mute config being created. + * @param muteConfigId Required. Unique identifier provided by the client within the parent scope. + * It must consist of lower case letters, numbers, and hyphen, with the first character a + * letter, the last a letter or a number, and a 63 character maximum. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final MuteConfig createMuteConfig( + String parent, MuteConfig muteConfig, String muteConfigId) { + CreateMuteConfigRequest request = + CreateMuteConfigRequest.newBuilder() + .setParent(parent) + .setMuteConfig(muteConfig) + .setMuteConfigId(muteConfigId) + .build(); + return createMuteConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a mute config. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   CreateMuteConfigRequest request =
+   *       CreateMuteConfigRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setMuteConfig(MuteConfig.newBuilder().build())
+   *           .setMuteConfigId("muteConfigId1689669942")
+   *           .build();
+   *   MuteConfig response = securityCenterClient.createMuteConfig(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final MuteConfig createMuteConfig(CreateMuteConfigRequest request) { + return createMuteConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a mute config. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   CreateMuteConfigRequest request =
+   *       CreateMuteConfigRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setMuteConfig(MuteConfig.newBuilder().build())
+   *           .setMuteConfigId("muteConfigId1689669942")
+   *           .build();
+   *   ApiFuture future =
+   *       securityCenterClient.createMuteConfigCallable().futureCall(request);
+   *   // Do something.
+   *   MuteConfig response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createMuteConfigCallable() { + return stub.createMuteConfigCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a notification config. @@ -528,54 +960,152 @@ public final NotificationConfig createNotificationConfig( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a notification config. + * Creates a notification config. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   CreateNotificationConfigRequest request =
+   *       CreateNotificationConfigRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setConfigId("configId-580140035")
+   *           .setNotificationConfig(NotificationConfig.newBuilder().build())
+   *           .build();
+   *   NotificationConfig response = securityCenterClient.createNotificationConfig(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NotificationConfig createNotificationConfig( + CreateNotificationConfigRequest request) { + return createNotificationConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a notification config. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   CreateNotificationConfigRequest request =
+   *       CreateNotificationConfigRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setConfigId("configId-580140035")
+   *           .setNotificationConfig(NotificationConfig.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       securityCenterClient.createNotificationConfigCallable().futureCall(request);
+   *   // Do something.
+   *   NotificationConfig response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createNotificationConfigCallable() { + return stub.createNotificationConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an existing mute config. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   MuteConfigName name =
+   *       MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]");
+   *   securityCenterClient.deleteMuteConfig(name);
+   * }
+   * }
+ * + * @param name Required. Name of the mute config to delete. Its format is + * organizations/{organization}/muteConfigs/{config_id}, + * folders/{folder}/muteConfigs/{config_id}, or projects/{project}/muteConfigs/{config_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteMuteConfig(MuteConfigName name) { + DeleteMuteConfigRequest request = + DeleteMuteConfigRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteMuteConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an existing mute config. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   String name =
+   *       MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]").toString();
+   *   securityCenterClient.deleteMuteConfig(name);
+   * }
+   * }
+ * + * @param name Required. Name of the mute config to delete. Its format is + * organizations/{organization}/muteConfigs/{config_id}, + * folders/{folder}/muteConfigs/{config_id}, or projects/{project}/muteConfigs/{config_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteMuteConfig(String name) { + DeleteMuteConfigRequest request = DeleteMuteConfigRequest.newBuilder().setName(name).build(); + deleteMuteConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an existing mute config. * *

Sample code: * *

{@code
    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   CreateNotificationConfigRequest request =
-   *       CreateNotificationConfigRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setConfigId("configId-580140035")
-   *           .setNotificationConfig(NotificationConfig.newBuilder().build())
+   *   DeleteMuteConfigRequest request =
+   *       DeleteMuteConfigRequest.newBuilder()
+   *           .setName(
+   *               MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]")
+   *                   .toString())
    *           .build();
-   *   NotificationConfig response = securityCenterClient.createNotificationConfig(request);
+   *   securityCenterClient.deleteMuteConfig(request);
    * }
    * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final NotificationConfig createNotificationConfig( - CreateNotificationConfigRequest request) { - return createNotificationConfigCallable().call(request); + public final void deleteMuteConfig(DeleteMuteConfigRequest request) { + deleteMuteConfigCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a notification config. + * Deletes an existing mute config. * *

Sample code: * *

{@code
    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   CreateNotificationConfigRequest request =
-   *       CreateNotificationConfigRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setConfigId("configId-580140035")
-   *           .setNotificationConfig(NotificationConfig.newBuilder().build())
+   *   DeleteMuteConfigRequest request =
+   *       DeleteMuteConfigRequest.newBuilder()
+   *           .setName(
+   *               MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]")
+   *                   .toString())
    *           .build();
-   *   ApiFuture future =
-   *       securityCenterClient.createNotificationConfigCallable().futureCall(request);
+   *   ApiFuture future = securityCenterClient.deleteMuteConfigCallable().futureCall(request);
    *   // Do something.
-   *   NotificationConfig response = future.get();
+   *   future.get();
    * }
    * }
*/ - public final UnaryCallable - createNotificationConfigCallable() { - return stub.createNotificationConfigCallable(); + public final UnaryCallable deleteMuteConfigCallable() { + return stub.deleteMuteConfigCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. @@ -770,6 +1300,105 @@ public final UnaryCallable getIamPolicyCallable() { return stub.getIamPolicyCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a mute config. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   MuteConfigName name =
+   *       MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]");
+   *   MuteConfig response = securityCenterClient.getMuteConfig(name);
+   * }
+   * }
+ * + * @param name Required. Name of the mute config to retrieve. Its format is + * organizations/{organization}/muteConfigs/{config_id}, + * folders/{folder}/muteConfigs/{config_id}, or projects/{project}/muteConfigs/{config_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final MuteConfig getMuteConfig(MuteConfigName name) { + GetMuteConfigRequest request = + GetMuteConfigRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getMuteConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a mute config. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   String name =
+   *       MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]").toString();
+   *   MuteConfig response = securityCenterClient.getMuteConfig(name);
+   * }
+   * }
+ * + * @param name Required. Name of the mute config to retrieve. Its format is + * organizations/{organization}/muteConfigs/{config_id}, + * folders/{folder}/muteConfigs/{config_id}, or projects/{project}/muteConfigs/{config_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final MuteConfig getMuteConfig(String name) { + GetMuteConfigRequest request = GetMuteConfigRequest.newBuilder().setName(name).build(); + return getMuteConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a mute config. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   GetMuteConfigRequest request =
+   *       GetMuteConfigRequest.newBuilder()
+   *           .setName(
+   *               MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]")
+   *                   .toString())
+   *           .build();
+   *   MuteConfig response = securityCenterClient.getMuteConfig(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final MuteConfig getMuteConfig(GetMuteConfigRequest request) { + return getMuteConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a mute config. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   GetMuteConfigRequest request =
+   *       GetMuteConfigRequest.newBuilder()
+   *           .setName(
+   *               MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       securityCenterClient.getMuteConfigCallable().futureCall(request);
+   *   // Do something.
+   *   MuteConfig response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getMuteConfigCallable() { + return stub.getMuteConfigCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a notification config. @@ -1064,7 +1693,7 @@ public final UnaryCallable getSourceCallable() { * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { * GroupAssetsRequest request = * GroupAssetsRequest.newBuilder() - * .setParent(AssetName.ofOrganizationAssetName("[ORGANIZATION]", "[ASSET]").toString()) + * .setParent(OrganizationName.of("[ORGANIZATION]").toString()) * .setFilter("filter-1274492040") * .setGroupBy("groupBy293428022") * .setCompareDuration(Duration.newBuilder().build()) @@ -1095,7 +1724,7 @@ public final GroupAssetsPagedResponse groupAssets(GroupAssetsRequest request) { * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { * GroupAssetsRequest request = * GroupAssetsRequest.newBuilder() - * .setParent(AssetName.ofOrganizationAssetName("[ORGANIZATION]", "[ASSET]").toString()) + * .setParent(OrganizationName.of("[ORGANIZATION]").toString()) * .setFilter("filter-1274492040") * .setGroupBy("groupBy293428022") * .setCompareDuration(Duration.newBuilder().build()) @@ -1127,7 +1756,7 @@ public final GroupAssetsPagedResponse groupAssets(GroupAssetsRequest request) { * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { * GroupAssetsRequest request = * GroupAssetsRequest.newBuilder() - * .setParent(AssetName.ofOrganizationAssetName("[ORGANIZATION]", "[ASSET]").toString()) + * .setParent(OrganizationName.of("[ORGANIZATION]").toString()) * .setFilter("filter-1274492040") * .setGroupBy("groupBy293428022") * .setCompareDuration(Duration.newBuilder().build()) @@ -1382,7 +2011,7 @@ public final UnaryCallable groupFin * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { * ListAssetsRequest request = * ListAssetsRequest.newBuilder() - * .setParent(AssetName.ofOrganizationAssetName("[ORGANIZATION]", "[ASSET]").toString()) + * .setParent(OrganizationName.of("[ORGANIZATION]").toString()) * .setFilter("filter-1274492040") * .setOrderBy("orderBy-1207110587") * .setReadTime(Timestamp.newBuilder().build()) @@ -1415,7 +2044,7 @@ public final ListAssetsPagedResponse listAssets(ListAssetsRequest request) { * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { * ListAssetsRequest request = * ListAssetsRequest.newBuilder() - * .setParent(AssetName.ofOrganizationAssetName("[ORGANIZATION]", "[ASSET]").toString()) + * .setParent(OrganizationName.of("[ORGANIZATION]").toString()) * .setFilter("filter-1274492040") * .setOrderBy("orderBy-1207110587") * .setReadTime(Timestamp.newBuilder().build()) @@ -1447,7 +2076,7 @@ public final UnaryCallable listAsset * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { * ListAssetsRequest request = * ListAssetsRequest.newBuilder() - * .setParent(AssetName.ofOrganizationAssetName("[ORGANIZATION]", "[ASSET]").toString()) + * .setParent(OrganizationName.of("[ORGANIZATION]").toString()) * .setFilter("filter-1274492040") * .setOrderBy("orderBy-1207110587") * .setReadTime(Timestamp.newBuilder().build()) @@ -1535,46 +2164,240 @@ public final ListFindingsPagedResponse listFindings(ListFindingsRequest request) * .setPageToken("pageToken873572522") * .setPageSize(883849137) * .build(); - * ApiFuture future = - * securityCenterClient.listFindingsPagedCallable().futureCall(request); + * ApiFuture future = + * securityCenterClient.listFindingsPagedCallable().futureCall(request); + * // Do something. + * for (ListFindingsResponse.ListFindingsResult element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * } + */ + public final UnaryCallable + listFindingsPagedCallable() { + return stub.listFindingsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists an organization or source's findings. + * + *

To list across all sources provide a `-` as the source id. Example: + * /v1/organizations/{organization_id}/sources/-/findings + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ListFindingsRequest request =
+   *       ListFindingsRequest.newBuilder()
+   *           .setParent(
+   *               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setReadTime(Timestamp.newBuilder().build())
+   *           .setCompareDuration(Duration.newBuilder().build())
+   *           .setFieldMask(FieldMask.newBuilder().build())
+   *           .setPageToken("pageToken873572522")
+   *           .setPageSize(883849137)
+   *           .build();
+   *   while (true) {
+   *     ListFindingsResponse response = securityCenterClient.listFindingsCallable().call(request);
+   *     for (ListFindingsResponse.ListFindingsResult element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listFindingsCallable() { + return stub.listFindingsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists mute configs. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   FolderName parent = FolderName.of("[FOLDER]");
+   *   for (MuteConfig element : securityCenterClient.listMuteConfigs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns the collection of mute configs. Its format is + * "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListMuteConfigsPagedResponse listMuteConfigs(FolderName parent) { + ListMuteConfigsRequest request = + ListMuteConfigsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listMuteConfigs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists mute configs. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+   *   for (MuteConfig element : securityCenterClient.listMuteConfigs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns the collection of mute configs. Its format is + * "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListMuteConfigsPagedResponse listMuteConfigs(OrganizationName parent) { + ListMuteConfigsRequest request = + ListMuteConfigsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listMuteConfigs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists mute configs. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   for (MuteConfig element : securityCenterClient.listMuteConfigs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns the collection of mute configs. Its format is + * "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListMuteConfigsPagedResponse listMuteConfigs(ProjectName parent) { + ListMuteConfigsRequest request = + ListMuteConfigsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listMuteConfigs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists mute configs. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
+   *   for (MuteConfig element : securityCenterClient.listMuteConfigs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns the collection of mute configs. Its format is + * "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListMuteConfigsPagedResponse listMuteConfigs(String parent) { + ListMuteConfigsRequest request = ListMuteConfigsRequest.newBuilder().setParent(parent).build(); + return listMuteConfigs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists mute configs. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ListMuteConfigsRequest request =
+   *       ListMuteConfigsRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (MuteConfig element : securityCenterClient.listMuteConfigs(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListMuteConfigsPagedResponse listMuteConfigs(ListMuteConfigsRequest request) { + return listMuteConfigsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists mute configs. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ListMuteConfigsRequest request =
+   *       ListMuteConfigsRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       securityCenterClient.listMuteConfigsPagedCallable().futureCall(request);
    *   // Do something.
-   *   for (ListFindingsResponse.ListFindingsResult element : future.get().iterateAll()) {
+   *   for (MuteConfig element : future.get().iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * }
*/ - public final UnaryCallable - listFindingsPagedCallable() { - return stub.listFindingsPagedCallable(); + public final UnaryCallable + listMuteConfigsPagedCallable() { + return stub.listMuteConfigsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists an organization or source's findings. - * - *

To list across all sources provide a `-` as the source id. Example: - * /v1/organizations/{organization_id}/sources/-/findings + * Lists mute configs. * *

Sample code: * *

{@code
    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ListFindingsRequest request =
-   *       ListFindingsRequest.newBuilder()
-   *           .setParent(
-   *               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setReadTime(Timestamp.newBuilder().build())
-   *           .setCompareDuration(Duration.newBuilder().build())
-   *           .setFieldMask(FieldMask.newBuilder().build())
-   *           .setPageToken("pageToken873572522")
+   *   ListMuteConfigsRequest request =
+   *       ListMuteConfigsRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
    *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
    *           .build();
    *   while (true) {
-   *     ListFindingsResponse response = securityCenterClient.listFindingsCallable().call(request);
-   *     for (ListFindingsResponse.ListFindingsResult element : response.getResponsesList()) {
+   *     ListMuteConfigsResponse response =
+   *         securityCenterClient.listMuteConfigsCallable().call(request);
+   *     for (MuteConfig element : response.getResponsesList()) {
    *       // doThingsWith(element);
    *     }
    *     String nextPageToken = response.getNextPageToken();
@@ -1587,8 +2410,9 @@ public final ListFindingsPagedResponse listFindings(ListFindingsRequest request)
    * }
    * }
*/ - public final UnaryCallable listFindingsCallable() { - return stub.listFindingsCallable(); + public final UnaryCallable + listMuteConfigsCallable() { + return stub.listMuteConfigsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. @@ -1827,7 +2651,7 @@ public final ListSourcesPagedResponse listSources(ProjectName parent) { * *
{@code
    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   String parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString();
+   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
    *   for (Source element : securityCenterClient.listSources(parent).iterateAll()) {
    *     // doThingsWith(element);
    *   }
@@ -1853,8 +2677,7 @@ public final ListSourcesPagedResponse listSources(String parent) {
    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
    *   ListSourcesRequest request =
    *       ListSourcesRequest.newBuilder()
-   *           .setParent(
-   *               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
    *           .setPageToken("pageToken873572522")
    *           .setPageSize(883849137)
    *           .build();
@@ -1881,8 +2704,7 @@ public final ListSourcesPagedResponse listSources(ListSourcesRequest request) {
    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
    *   ListSourcesRequest request =
    *       ListSourcesRequest.newBuilder()
-   *           .setParent(
-   *               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
    *           .setPageToken("pageToken873572522")
    *           .setPageSize(883849137)
    *           .build();
@@ -1910,8 +2732,7 @@ public final ListSourcesPagedResponse listSources(ListSourcesRequest request) {
    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
    *   ListSourcesRequest request =
    *       ListSourcesRequest.newBuilder()
-   *           .setParent(
-   *               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
    *           .setPageToken("pageToken873572522")
    *           .setPageSize(883849137)
    *           .build();
@@ -2194,6 +3015,118 @@ public final UnaryCallable setFindingStateCalla
     return stub.setFindingStateCallable();
   }
 
+  // AUTO-GENERATED DOCUMENTATION AND METHOD.
+  /**
+   * Updates the mute state of a finding.
+   *
+   * 

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   FindingName name =
+   *       FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]", "[SOURCE]", "[FINDING]");
+   *   Finding.Mute mute = Finding.Mute.forNumber(0);
+   *   Finding response = securityCenterClient.setMute(name, mute);
+   * }
+   * }
+ * + * @param name Required. The relative resource name of the finding. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: + * "organizations/{organization_id}/sources/{source_id}/finding/{finding_id}", + * "folders/{folder_id}/sources/{source_id}/finding/{finding_id}", + * "projects/{project_id}/sources/{source_id}/finding/{finding_id}". + * @param mute Required. The desired state of the Mute. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Finding setMute(FindingName name, Finding.Mute mute) { + SetMuteRequest request = + SetMuteRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setMute(mute) + .build(); + return setMute(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the mute state of a finding. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   String name =
+   *       FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]", "[SOURCE]", "[FINDING]")
+   *           .toString();
+   *   Finding.Mute mute = Finding.Mute.forNumber(0);
+   *   Finding response = securityCenterClient.setMute(name, mute);
+   * }
+   * }
+ * + * @param name Required. The relative resource name of the finding. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: + * "organizations/{organization_id}/sources/{source_id}/finding/{finding_id}", + * "folders/{folder_id}/sources/{source_id}/finding/{finding_id}", + * "projects/{project_id}/sources/{source_id}/finding/{finding_id}". + * @param mute Required. The desired state of the Mute. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Finding setMute(String name, Finding.Mute mute) { + SetMuteRequest request = SetMuteRequest.newBuilder().setName(name).setMute(mute).build(); + return setMute(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the mute state of a finding. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   SetMuteRequest request =
+   *       SetMuteRequest.newBuilder()
+   *           .setName(
+   *               FindingName.ofOrganizationSourceFindingName(
+   *                       "[ORGANIZATION]", "[SOURCE]", "[FINDING]")
+   *                   .toString())
+   *           .build();
+   *   Finding response = securityCenterClient.setMute(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Finding setMute(SetMuteRequest request) { + return setMuteCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the mute state of a finding. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   SetMuteRequest request =
+   *       SetMuteRequest.newBuilder()
+   *           .setName(
+   *               FindingName.ofOrganizationSourceFindingName(
+   *                       "[ORGANIZATION]", "[SOURCE]", "[FINDING]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = securityCenterClient.setMuteCallable().futureCall(request);
+   *   // Do something.
+   *   Finding response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable setMuteCallable() { + return stub.setMuteCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Sets the access control policy on the specified Source. @@ -2411,6 +3344,85 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq return stub.testIamPermissionsCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates external system. This is for a given finding. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ExternalSystem externalSystem = ExternalSystem.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   ExternalSystem response =
+   *       securityCenterClient.updateExternalSystem(externalSystem, updateMask);
+   * }
+   * }
+ * + * @param externalSystem Required. The external system resource to update. + * @param updateMask The FieldMask to use when updating the external system resource. + *

If empty all mutable fields will be updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ExternalSystem updateExternalSystem( + ExternalSystem externalSystem, FieldMask updateMask) { + UpdateExternalSystemRequest request = + UpdateExternalSystemRequest.newBuilder() + .setExternalSystem(externalSystem) + .setUpdateMask(updateMask) + .build(); + return updateExternalSystem(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates external system. This is for a given finding. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   UpdateExternalSystemRequest request =
+   *       UpdateExternalSystemRequest.newBuilder()
+   *           .setExternalSystem(ExternalSystem.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ExternalSystem response = securityCenterClient.updateExternalSystem(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ExternalSystem updateExternalSystem(UpdateExternalSystemRequest request) { + return updateExternalSystemCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates external system. This is for a given finding. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   UpdateExternalSystemRequest request =
+   *       UpdateExternalSystemRequest.newBuilder()
+   *           .setExternalSystem(ExternalSystem.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       securityCenterClient.updateExternalSystemCallable().futureCall(request);
+   *   // Do something.
+   *   ExternalSystem response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateExternalSystemCallable() { + return stub.updateExternalSystemCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates or updates a finding. The corresponding source must exist for a finding creation to @@ -2485,6 +3497,82 @@ public final UnaryCallable updateFindingCallable( return stub.updateFindingCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a mute config. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   MuteConfig muteConfig = MuteConfig.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   MuteConfig response = securityCenterClient.updateMuteConfig(muteConfig, updateMask);
+   * }
+   * }
+ * + * @param muteConfig Required. The mute config being updated. + * @param updateMask The list of fields to be updated. If empty all mutable fields will be + * updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final MuteConfig updateMuteConfig(MuteConfig muteConfig, FieldMask updateMask) { + UpdateMuteConfigRequest request = + UpdateMuteConfigRequest.newBuilder() + .setMuteConfig(muteConfig) + .setUpdateMask(updateMask) + .build(); + return updateMuteConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a mute config. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   UpdateMuteConfigRequest request =
+   *       UpdateMuteConfigRequest.newBuilder()
+   *           .setMuteConfig(MuteConfig.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   MuteConfig response = securityCenterClient.updateMuteConfig(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final MuteConfig updateMuteConfig(UpdateMuteConfigRequest request) { + return updateMuteConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a mute config. + * + *

Sample code: + * + *

{@code
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   UpdateMuteConfigRequest request =
+   *       UpdateMuteConfigRequest.newBuilder()
+   *           .setMuteConfig(MuteConfig.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       securityCenterClient.updateMuteConfigCallable().futureCall(request);
+   *   // Do something.
+   *   MuteConfig response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateMuteConfigCallable() { + return stub.updateMuteConfigCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a notification config. The following update fields are allowed: description, @@ -3158,6 +4246,83 @@ protected ListFindingsFixedSizeCollection createCollection( } } + public static class ListMuteConfigsPagedResponse + extends AbstractPagedListResponse< + ListMuteConfigsRequest, + ListMuteConfigsResponse, + MuteConfig, + ListMuteConfigsPage, + ListMuteConfigsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListMuteConfigsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListMuteConfigsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListMuteConfigsPagedResponse(ListMuteConfigsPage page) { + super(page, ListMuteConfigsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListMuteConfigsPage + extends AbstractPage< + ListMuteConfigsRequest, ListMuteConfigsResponse, MuteConfig, ListMuteConfigsPage> { + + private ListMuteConfigsPage( + PageContext context, + ListMuteConfigsResponse response) { + super(context, response); + } + + private static ListMuteConfigsPage createEmptyPage() { + return new ListMuteConfigsPage(null, null); + } + + @Override + protected ListMuteConfigsPage createPage( + PageContext context, + ListMuteConfigsResponse response) { + return new ListMuteConfigsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListMuteConfigsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListMuteConfigsRequest, + ListMuteConfigsResponse, + MuteConfig, + ListMuteConfigsPage, + ListMuteConfigsFixedSizeCollection> { + + private ListMuteConfigsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListMuteConfigsFixedSizeCollection createEmptyCollection() { + return new ListMuteConfigsFixedSizeCollection(null, 0); + } + + @Override + protected ListMuteConfigsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListMuteConfigsFixedSizeCollection(pages, collectionSize); + } + } + public static class ListNotificationConfigsPagedResponse extends AbstractPagedListResponse< ListNotificationConfigsRequest, diff --git a/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterSettings.java b/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterSettings.java index 4ab17fcd7..b1ffb6f3a 100644 --- a/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterSettings.java +++ b/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterSettings.java @@ -20,6 +20,7 @@ import static com.google.cloud.securitycenter.v1.SecurityCenterClient.GroupFindingsPagedResponse; import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListAssetsPagedResponse; import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListFindingsPagedResponse; +import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListMuteConfigsPagedResponse; import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListNotificationConfigsPagedResponse; import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListSourcesPagedResponse; @@ -83,6 +84,17 @@ @Generated("by gapic-generator-java") public class SecurityCenterSettings extends ClientSettings { + /** Returns the object with the settings used for calls to bulkMuteFindings. */ + public UnaryCallSettings bulkMuteFindingsSettings() { + return ((SecurityCenterStubSettings) getStubSettings()).bulkMuteFindingsSettings(); + } + + /** Returns the object with the settings used for calls to bulkMuteFindings. */ + public OperationCallSettings + bulkMuteFindingsOperationSettings() { + return ((SecurityCenterStubSettings) getStubSettings()).bulkMuteFindingsOperationSettings(); + } + /** Returns the object with the settings used for calls to createSource. */ public UnaryCallSettings createSourceSettings() { return ((SecurityCenterStubSettings) getStubSettings()).createSourceSettings(); @@ -93,12 +105,22 @@ public UnaryCallSettings createFindingSettings() return ((SecurityCenterStubSettings) getStubSettings()).createFindingSettings(); } + /** Returns the object with the settings used for calls to createMuteConfig. */ + public UnaryCallSettings createMuteConfigSettings() { + return ((SecurityCenterStubSettings) getStubSettings()).createMuteConfigSettings(); + } + /** Returns the object with the settings used for calls to createNotificationConfig. */ public UnaryCallSettings createNotificationConfigSettings() { return ((SecurityCenterStubSettings) getStubSettings()).createNotificationConfigSettings(); } + /** Returns the object with the settings used for calls to deleteMuteConfig. */ + public UnaryCallSettings deleteMuteConfigSettings() { + return ((SecurityCenterStubSettings) getStubSettings()).deleteMuteConfigSettings(); + } + /** Returns the object with the settings used for calls to deleteNotificationConfig. */ public UnaryCallSettings deleteNotificationConfigSettings() { @@ -110,6 +132,11 @@ public UnaryCallSettings getIamPolicySettings() { return ((SecurityCenterStubSettings) getStubSettings()).getIamPolicySettings(); } + /** Returns the object with the settings used for calls to getMuteConfig. */ + public UnaryCallSettings getMuteConfigSettings() { + return ((SecurityCenterStubSettings) getStubSettings()).getMuteConfigSettings(); + } + /** Returns the object with the settings used for calls to getNotificationConfig. */ public UnaryCallSettings getNotificationConfigSettings() { @@ -151,6 +178,13 @@ public UnaryCallSettings getSourceSettings() { return ((SecurityCenterStubSettings) getStubSettings()).listFindingsSettings(); } + /** Returns the object with the settings used for calls to listMuteConfigs. */ + public PagedCallSettings< + ListMuteConfigsRequest, ListMuteConfigsResponse, ListMuteConfigsPagedResponse> + listMuteConfigsSettings() { + return ((SecurityCenterStubSettings) getStubSettings()).listMuteConfigsSettings(); + } + /** Returns the object with the settings used for calls to listNotificationConfigs. */ public PagedCallSettings< ListNotificationConfigsRequest, @@ -182,6 +216,11 @@ public UnaryCallSettings setFindingStateSetting return ((SecurityCenterStubSettings) getStubSettings()).setFindingStateSettings(); } + /** Returns the object with the settings used for calls to setMute. */ + public UnaryCallSettings setMuteSettings() { + return ((SecurityCenterStubSettings) getStubSettings()).setMuteSettings(); + } + /** Returns the object with the settings used for calls to setIamPolicy. */ public UnaryCallSettings setIamPolicySettings() { return ((SecurityCenterStubSettings) getStubSettings()).setIamPolicySettings(); @@ -193,11 +232,22 @@ public UnaryCallSettings setIamPolicySettings() { return ((SecurityCenterStubSettings) getStubSettings()).testIamPermissionsSettings(); } + /** Returns the object with the settings used for calls to updateExternalSystem. */ + public UnaryCallSettings + updateExternalSystemSettings() { + return ((SecurityCenterStubSettings) getStubSettings()).updateExternalSystemSettings(); + } + /** Returns the object with the settings used for calls to updateFinding. */ public UnaryCallSettings updateFindingSettings() { return ((SecurityCenterStubSettings) getStubSettings()).updateFindingSettings(); } + /** Returns the object with the settings used for calls to updateMuteConfig. */ + public UnaryCallSettings updateMuteConfigSettings() { + return ((SecurityCenterStubSettings) getStubSettings()).updateMuteConfigSettings(); + } + /** Returns the object with the settings used for calls to updateNotificationConfig. */ public UnaryCallSettings updateNotificationConfigSettings() { @@ -318,6 +368,18 @@ public Builder applyToAllUnaryMethods( return this; } + /** Returns the builder for the settings used for calls to bulkMuteFindings. */ + public UnaryCallSettings.Builder + bulkMuteFindingsSettings() { + return getStubSettingsBuilder().bulkMuteFindingsSettings(); + } + + /** Returns the builder for the settings used for calls to bulkMuteFindings. */ + public OperationCallSettings.Builder + bulkMuteFindingsOperationSettings() { + return getStubSettingsBuilder().bulkMuteFindingsOperationSettings(); + } + /** Returns the builder for the settings used for calls to createSource. */ public UnaryCallSettings.Builder createSourceSettings() { return getStubSettingsBuilder().createSourceSettings(); @@ -328,12 +390,23 @@ public UnaryCallSettings.Builder createFindingSet return getStubSettingsBuilder().createFindingSettings(); } + /** Returns the builder for the settings used for calls to createMuteConfig. */ + public UnaryCallSettings.Builder + createMuteConfigSettings() { + return getStubSettingsBuilder().createMuteConfigSettings(); + } + /** Returns the builder for the settings used for calls to createNotificationConfig. */ public UnaryCallSettings.Builder createNotificationConfigSettings() { return getStubSettingsBuilder().createNotificationConfigSettings(); } + /** Returns the builder for the settings used for calls to deleteMuteConfig. */ + public UnaryCallSettings.Builder deleteMuteConfigSettings() { + return getStubSettingsBuilder().deleteMuteConfigSettings(); + } + /** Returns the builder for the settings used for calls to deleteNotificationConfig. */ public UnaryCallSettings.Builder deleteNotificationConfigSettings() { @@ -345,6 +418,11 @@ public UnaryCallSettings.Builder getIamPolicySettin return getStubSettingsBuilder().getIamPolicySettings(); } + /** Returns the builder for the settings used for calls to getMuteConfig. */ + public UnaryCallSettings.Builder getMuteConfigSettings() { + return getStubSettingsBuilder().getMuteConfigSettings(); + } + /** Returns the builder for the settings used for calls to getNotificationConfig. */ public UnaryCallSettings.Builder getNotificationConfigSettings() { @@ -389,6 +467,13 @@ public UnaryCallSettings.Builder getSourceSettings() { return getStubSettingsBuilder().listFindingsSettings(); } + /** Returns the builder for the settings used for calls to listMuteConfigs. */ + public PagedCallSettings.Builder< + ListMuteConfigsRequest, ListMuteConfigsResponse, ListMuteConfigsPagedResponse> + listMuteConfigsSettings() { + return getStubSettingsBuilder().listMuteConfigsSettings(); + } + /** Returns the builder for the settings used for calls to listNotificationConfigs. */ public PagedCallSettings.Builder< ListNotificationConfigsRequest, @@ -422,6 +507,11 @@ public UnaryCallSettings.Builder setFindingStat return getStubSettingsBuilder().setFindingStateSettings(); } + /** Returns the builder for the settings used for calls to setMute. */ + public UnaryCallSettings.Builder setMuteSettings() { + return getStubSettingsBuilder().setMuteSettings(); + } + /** Returns the builder for the settings used for calls to setIamPolicy. */ public UnaryCallSettings.Builder setIamPolicySettings() { return getStubSettingsBuilder().setIamPolicySettings(); @@ -433,11 +523,23 @@ public UnaryCallSettings.Builder setIamPolicySettin return getStubSettingsBuilder().testIamPermissionsSettings(); } + /** Returns the builder for the settings used for calls to updateExternalSystem. */ + public UnaryCallSettings.Builder + updateExternalSystemSettings() { + return getStubSettingsBuilder().updateExternalSystemSettings(); + } + /** Returns the builder for the settings used for calls to updateFinding. */ public UnaryCallSettings.Builder updateFindingSettings() { return getStubSettingsBuilder().updateFindingSettings(); } + /** Returns the builder for the settings used for calls to updateMuteConfig. */ + public UnaryCallSettings.Builder + updateMuteConfigSettings() { + return getStubSettingsBuilder().updateMuteConfigSettings(); + } + /** Returns the builder for the settings used for calls to updateNotificationConfig. */ public UnaryCallSettings.Builder updateNotificationConfigSettings() { diff --git a/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/gapic_metadata.json b/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/gapic_metadata.json index af54e7668..d3dd86cfb 100644 --- a/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/gapic_metadata.json +++ b/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/gapic_metadata.json @@ -10,21 +10,33 @@ "grpc": { "libraryClient": "SecurityCenterClient", "rpcs": { + "BulkMuteFindings": { + "methods": ["bulkMuteFindingsAsync", "bulkMuteFindingsAsync", "bulkMuteFindingsAsync", "bulkMuteFindingsOperationCallable", "bulkMuteFindingsCallable"] + }, "CreateFinding": { "methods": ["createFinding", "createFinding", "createFinding", "createFindingCallable"] }, + "CreateMuteConfig": { + "methods": ["createMuteConfig", "createMuteConfig", "createMuteConfig", "createMuteConfig", "createMuteConfig", "createMuteConfig", "createMuteConfig", "createMuteConfig", "createMuteConfig", "createMuteConfigCallable"] + }, "CreateNotificationConfig": { "methods": ["createNotificationConfig", "createNotificationConfig", "createNotificationConfig", "createNotificationConfig", "createNotificationConfig", "createNotificationConfigCallable"] }, "CreateSource": { "methods": ["createSource", "createSource", "createSource", "createSourceCallable"] }, + "DeleteMuteConfig": { + "methods": ["deleteMuteConfig", "deleteMuteConfig", "deleteMuteConfig", "deleteMuteConfigCallable"] + }, "DeleteNotificationConfig": { "methods": ["deleteNotificationConfig", "deleteNotificationConfig", "deleteNotificationConfig", "deleteNotificationConfigCallable"] }, "GetIamPolicy": { "methods": ["getIamPolicy", "getIamPolicy", "getIamPolicy", "getIamPolicyCallable"] }, + "GetMuteConfig": { + "methods": ["getMuteConfig", "getMuteConfig", "getMuteConfig", "getMuteConfigCallable"] + }, "GetNotificationConfig": { "methods": ["getNotificationConfig", "getNotificationConfig", "getNotificationConfig", "getNotificationConfigCallable"] }, @@ -46,6 +58,9 @@ "ListFindings": { "methods": ["listFindings", "listFindingsPagedCallable", "listFindingsCallable"] }, + "ListMuteConfigs": { + "methods": ["listMuteConfigs", "listMuteConfigs", "listMuteConfigs", "listMuteConfigs", "listMuteConfigs", "listMuteConfigsPagedCallable", "listMuteConfigsCallable"] + }, "ListNotificationConfigs": { "methods": ["listNotificationConfigs", "listNotificationConfigs", "listNotificationConfigs", "listNotificationConfigsPagedCallable", "listNotificationConfigsCallable"] }, @@ -61,12 +76,21 @@ "SetIamPolicy": { "methods": ["setIamPolicy", "setIamPolicy", "setIamPolicy", "setIamPolicyCallable"] }, + "SetMute": { + "methods": ["setMute", "setMute", "setMute", "setMuteCallable"] + }, "TestIamPermissions": { "methods": ["testIamPermissions", "testIamPermissions", "testIamPermissions", "testIamPermissionsCallable"] }, + "UpdateExternalSystem": { + "methods": ["updateExternalSystem", "updateExternalSystem", "updateExternalSystemCallable"] + }, "UpdateFinding": { "methods": ["updateFinding", "updateFinding", "updateFindingCallable"] }, + "UpdateMuteConfig": { + "methods": ["updateMuteConfig", "updateMuteConfig", "updateMuteConfigCallable"] + }, "UpdateNotificationConfig": { "methods": ["updateNotificationConfig", "updateNotificationConfig", "updateNotificationConfig", "updateNotificationConfigCallable"] }, diff --git a/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/package-info.java b/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/package-info.java index 342faf3e7..275c5cfac 100644 --- a/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/package-info.java +++ b/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/package-info.java @@ -15,7 +15,9 @@ */ /** - * The interfaces provided are listed below, along with usage samples. + * A client to Security Command Center API + * + *

The interfaces provided are listed below, along with usage samples. * *

======================= SecurityCenterClient ======================= * diff --git a/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/GrpcSecurityCenterStub.java b/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/GrpcSecurityCenterStub.java index 826525621..f5c55baec 100644 --- a/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/GrpcSecurityCenterStub.java +++ b/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/GrpcSecurityCenterStub.java @@ -20,6 +20,7 @@ import static com.google.cloud.securitycenter.v1.SecurityCenterClient.GroupFindingsPagedResponse; import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListAssetsPagedResponse; import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListFindingsPagedResponse; +import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListMuteConfigsPagedResponse; import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListNotificationConfigsPagedResponse; import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListSourcesPagedResponse; @@ -30,11 +31,17 @@ import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest; +import com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse; import com.google.cloud.securitycenter.v1.CreateFindingRequest; +import com.google.cloud.securitycenter.v1.CreateMuteConfigRequest; import com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest; import com.google.cloud.securitycenter.v1.CreateSourceRequest; +import com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest; import com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest; +import com.google.cloud.securitycenter.v1.ExternalSystem; import com.google.cloud.securitycenter.v1.Finding; +import com.google.cloud.securitycenter.v1.GetMuteConfigRequest; import com.google.cloud.securitycenter.v1.GetNotificationConfigRequest; import com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest; import com.google.cloud.securitycenter.v1.GetSourceRequest; @@ -46,18 +53,24 @@ import com.google.cloud.securitycenter.v1.ListAssetsResponse; import com.google.cloud.securitycenter.v1.ListFindingsRequest; import com.google.cloud.securitycenter.v1.ListFindingsResponse; +import com.google.cloud.securitycenter.v1.ListMuteConfigsRequest; +import com.google.cloud.securitycenter.v1.ListMuteConfigsResponse; import com.google.cloud.securitycenter.v1.ListNotificationConfigsRequest; import com.google.cloud.securitycenter.v1.ListNotificationConfigsResponse; import com.google.cloud.securitycenter.v1.ListSourcesRequest; import com.google.cloud.securitycenter.v1.ListSourcesResponse; +import com.google.cloud.securitycenter.v1.MuteConfig; import com.google.cloud.securitycenter.v1.NotificationConfig; import com.google.cloud.securitycenter.v1.OrganizationSettings; import com.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest; import com.google.cloud.securitycenter.v1.RunAssetDiscoveryResponse; import com.google.cloud.securitycenter.v1.SecurityMarks; import com.google.cloud.securitycenter.v1.SetFindingStateRequest; +import com.google.cloud.securitycenter.v1.SetMuteRequest; import com.google.cloud.securitycenter.v1.Source; +import com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest; import com.google.cloud.securitycenter.v1.UpdateFindingRequest; +import com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest; import com.google.cloud.securitycenter.v1.UpdateNotificationConfigRequest; import com.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest; import com.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest; @@ -85,6 +98,16 @@ */ @Generated("by gapic-generator-java") public class GrpcSecurityCenterStub extends SecurityCenterStub { + private static final MethodDescriptor + bulkMuteFindingsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/BulkMuteFindings") + .setRequestMarshaller( + ProtoUtils.marshaller(BulkMuteFindingsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor createSourceMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -103,6 +126,16 @@ public class GrpcSecurityCenterStub extends SecurityCenterStub { .setResponseMarshaller(ProtoUtils.marshaller(Finding.getDefaultInstance())) .build(); + private static final MethodDescriptor + createMuteConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/CreateMuteConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateMuteConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(MuteConfig.getDefaultInstance())) + .build(); + private static final MethodDescriptor createNotificationConfigMethodDescriptor = MethodDescriptor.newBuilder() @@ -114,6 +147,16 @@ public class GrpcSecurityCenterStub extends SecurityCenterStub { .setResponseMarshaller(ProtoUtils.marshaller(NotificationConfig.getDefaultInstance())) .build(); + private static final MethodDescriptor + deleteMuteConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/DeleteMuteConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteMuteConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + private static final MethodDescriptor deleteNotificationConfigMethodDescriptor = MethodDescriptor.newBuilder() @@ -133,6 +176,16 @@ public class GrpcSecurityCenterStub extends SecurityCenterStub { .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) .build(); + private static final MethodDescriptor + getMuteConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/GetMuteConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(GetMuteConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(MuteConfig.getDefaultInstance())) + .build(); + private static final MethodDescriptor getNotificationConfigMethodDescriptor = MethodDescriptor.newBuilder() @@ -204,6 +257,17 @@ public class GrpcSecurityCenterStub extends SecurityCenterStub { ProtoUtils.marshaller(ListFindingsResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor + listMuteConfigsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/ListMuteConfigs") + .setRequestMarshaller( + ProtoUtils.marshaller(ListMuteConfigsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListMuteConfigsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor< ListNotificationConfigsRequest, ListNotificationConfigsResponse> listNotificationConfigsMethodDescriptor = @@ -248,6 +312,14 @@ public class GrpcSecurityCenterStub extends SecurityCenterStub { .setResponseMarshaller(ProtoUtils.marshaller(Finding.getDefaultInstance())) .build(); + private static final MethodDescriptor setMuteMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/SetMute") + .setRequestMarshaller(ProtoUtils.marshaller(SetMuteRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Finding.getDefaultInstance())) + .build(); + private static final MethodDescriptor setIamPolicyMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -267,6 +339,17 @@ public class GrpcSecurityCenterStub extends SecurityCenterStub { ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor + updateExternalSystemMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.securitycenter.v1.SecurityCenter/UpdateExternalSystem") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateExternalSystemRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ExternalSystem.getDefaultInstance())) + .build(); + private static final MethodDescriptor updateFindingMethodDescriptor = MethodDescriptor.newBuilder() @@ -277,6 +360,16 @@ public class GrpcSecurityCenterStub extends SecurityCenterStub { .setResponseMarshaller(ProtoUtils.marshaller(Finding.getDefaultInstance())) .build(); + private static final MethodDescriptor + updateMuteConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/UpdateMuteConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateMuteConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(MuteConfig.getDefaultInstance())) + .build(); + private static final MethodDescriptor updateNotificationConfigMethodDescriptor = MethodDescriptor.newBuilder() @@ -319,13 +412,19 @@ public class GrpcSecurityCenterStub extends SecurityCenterStub { .setResponseMarshaller(ProtoUtils.marshaller(SecurityMarks.getDefaultInstance())) .build(); + private final UnaryCallable bulkMuteFindingsCallable; + private final OperationCallable + bulkMuteFindingsOperationCallable; private final UnaryCallable createSourceCallable; private final UnaryCallable createFindingCallable; + private final UnaryCallable createMuteConfigCallable; private final UnaryCallable createNotificationConfigCallable; + private final UnaryCallable deleteMuteConfigCallable; private final UnaryCallable deleteNotificationConfigCallable; private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable getMuteConfigCallable; private final UnaryCallable getNotificationConfigCallable; private final UnaryCallable @@ -342,6 +441,10 @@ public class GrpcSecurityCenterStub extends SecurityCenterStub { private final UnaryCallable listFindingsCallable; private final UnaryCallable listFindingsPagedCallable; + private final UnaryCallable + listMuteConfigsCallable; + private final UnaryCallable + listMuteConfigsPagedCallable; private final UnaryCallable listNotificationConfigsCallable; private final UnaryCallable @@ -353,10 +456,14 @@ public class GrpcSecurityCenterStub extends SecurityCenterStub { private final OperationCallable runAssetDiscoveryOperationCallable; private final UnaryCallable setFindingStateCallable; + private final UnaryCallable setMuteCallable; private final UnaryCallable setIamPolicyCallable; private final UnaryCallable testIamPermissionsCallable; + private final UnaryCallable + updateExternalSystemCallable; private final UnaryCallable updateFindingCallable; + private final UnaryCallable updateMuteConfigCallable; private final UnaryCallable updateNotificationConfigCallable; private final UnaryCallable @@ -409,6 +516,16 @@ protected GrpcSecurityCenterStub( this.callableFactory = callableFactory; this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + GrpcCallSettings bulkMuteFindingsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(bulkMuteFindingsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); GrpcCallSettings createSourceTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createSourceMethodDescriptor) @@ -429,6 +546,16 @@ protected GrpcSecurityCenterStub( return params.build(); }) .build(); + GrpcCallSettings createMuteConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createMuteConfigMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); GrpcCallSettings createNotificationConfigTransportSettings = GrpcCallSettings.newBuilder() @@ -440,6 +567,16 @@ protected GrpcSecurityCenterStub( return params.build(); }) .build(); + GrpcCallSettings deleteMuteConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteMuteConfigMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); GrpcCallSettings deleteNotificationConfigTransportSettings = GrpcCallSettings.newBuilder() @@ -461,6 +598,16 @@ protected GrpcSecurityCenterStub( return params.build(); }) .build(); + GrpcCallSettings getMuteConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getMuteConfigMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); GrpcCallSettings getNotificationConfigTransportSettings = GrpcCallSettings.newBuilder() @@ -533,6 +680,17 @@ protected GrpcSecurityCenterStub( return params.build(); }) .build(); + GrpcCallSettings + listMuteConfigsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listMuteConfigsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); GrpcCallSettings listNotificationConfigsTransportSettings = GrpcCallSettings @@ -575,6 +733,16 @@ protected GrpcSecurityCenterStub( return params.build(); }) .build(); + GrpcCallSettings setMuteTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setMuteMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); GrpcCallSettings setIamPolicyTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(setIamPolicyMethodDescriptor) @@ -596,6 +764,19 @@ protected GrpcSecurityCenterStub( return params.build(); }) .build(); + GrpcCallSettings + updateExternalSystemTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateExternalSystemMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "external_system.name", + String.valueOf(request.getExternalSystem().getName())); + return params.build(); + }) + .build(); GrpcCallSettings updateFindingTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateFindingMethodDescriptor) @@ -606,6 +787,16 @@ protected GrpcSecurityCenterStub( return params.build(); }) .build(); + GrpcCallSettings updateMuteConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateMuteConfigMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("mute_config.name", String.valueOf(request.getMuteConfig().getName())); + return params.build(); + }) + .build(); GrpcCallSettings updateNotificationConfigTransportSettings = GrpcCallSettings.newBuilder() @@ -656,17 +847,32 @@ protected GrpcSecurityCenterStub( }) .build(); + this.bulkMuteFindingsCallable = + callableFactory.createUnaryCallable( + bulkMuteFindingsTransportSettings, settings.bulkMuteFindingsSettings(), clientContext); + this.bulkMuteFindingsOperationCallable = + callableFactory.createOperationCallable( + bulkMuteFindingsTransportSettings, + settings.bulkMuteFindingsOperationSettings(), + clientContext, + operationsStub); this.createSourceCallable = callableFactory.createUnaryCallable( createSourceTransportSettings, settings.createSourceSettings(), clientContext); this.createFindingCallable = callableFactory.createUnaryCallable( createFindingTransportSettings, settings.createFindingSettings(), clientContext); + this.createMuteConfigCallable = + callableFactory.createUnaryCallable( + createMuteConfigTransportSettings, settings.createMuteConfigSettings(), clientContext); this.createNotificationConfigCallable = callableFactory.createUnaryCallable( createNotificationConfigTransportSettings, settings.createNotificationConfigSettings(), clientContext); + this.deleteMuteConfigCallable = + callableFactory.createUnaryCallable( + deleteMuteConfigTransportSettings, settings.deleteMuteConfigSettings(), clientContext); this.deleteNotificationConfigCallable = callableFactory.createUnaryCallable( deleteNotificationConfigTransportSettings, @@ -675,6 +881,9 @@ protected GrpcSecurityCenterStub( this.getIamPolicyCallable = callableFactory.createUnaryCallable( getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.getMuteConfigCallable = + callableFactory.createUnaryCallable( + getMuteConfigTransportSettings, settings.getMuteConfigSettings(), clientContext); this.getNotificationConfigCallable = callableFactory.createUnaryCallable( getNotificationConfigTransportSettings, @@ -712,6 +921,12 @@ protected GrpcSecurityCenterStub( this.listFindingsPagedCallable = callableFactory.createPagedCallable( listFindingsTransportSettings, settings.listFindingsSettings(), clientContext); + this.listMuteConfigsCallable = + callableFactory.createUnaryCallable( + listMuteConfigsTransportSettings, settings.listMuteConfigsSettings(), clientContext); + this.listMuteConfigsPagedCallable = + callableFactory.createPagedCallable( + listMuteConfigsTransportSettings, settings.listMuteConfigsSettings(), clientContext); this.listNotificationConfigsCallable = callableFactory.createUnaryCallable( listNotificationConfigsTransportSettings, @@ -742,6 +957,9 @@ protected GrpcSecurityCenterStub( this.setFindingStateCallable = callableFactory.createUnaryCallable( setFindingStateTransportSettings, settings.setFindingStateSettings(), clientContext); + this.setMuteCallable = + callableFactory.createUnaryCallable( + setMuteTransportSettings, settings.setMuteSettings(), clientContext); this.setIamPolicyCallable = callableFactory.createUnaryCallable( setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); @@ -750,9 +968,17 @@ protected GrpcSecurityCenterStub( testIamPermissionsTransportSettings, settings.testIamPermissionsSettings(), clientContext); + this.updateExternalSystemCallable = + callableFactory.createUnaryCallable( + updateExternalSystemTransportSettings, + settings.updateExternalSystemSettings(), + clientContext); this.updateFindingCallable = callableFactory.createUnaryCallable( updateFindingTransportSettings, settings.updateFindingSettings(), clientContext); + this.updateMuteConfigCallable = + callableFactory.createUnaryCallable( + updateMuteConfigTransportSettings, settings.updateMuteConfigSettings(), clientContext); this.updateNotificationConfigCallable = callableFactory.createUnaryCallable( updateNotificationConfigTransportSettings, @@ -780,6 +1006,17 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override + public UnaryCallable bulkMuteFindingsCallable() { + return bulkMuteFindingsCallable; + } + + @Override + public OperationCallable + bulkMuteFindingsOperationCallable() { + return bulkMuteFindingsOperationCallable; + } + @Override public UnaryCallable createSourceCallable() { return createSourceCallable; @@ -790,12 +1027,22 @@ public UnaryCallable createFindingCallable() { return createFindingCallable; } + @Override + public UnaryCallable createMuteConfigCallable() { + return createMuteConfigCallable; + } + @Override public UnaryCallable createNotificationConfigCallable() { return createNotificationConfigCallable; } + @Override + public UnaryCallable deleteMuteConfigCallable() { + return deleteMuteConfigCallable; + } + @Override public UnaryCallable deleteNotificationConfigCallable() { return deleteNotificationConfigCallable; @@ -806,6 +1053,11 @@ public UnaryCallable getIamPolicyCallable() { return getIamPolicyCallable; } + @Override + public UnaryCallable getMuteConfigCallable() { + return getMuteConfigCallable; + } + @Override public UnaryCallable getNotificationConfigCallable() { @@ -864,6 +1116,17 @@ public UnaryCallable listFinding return listFindingsPagedCallable; } + @Override + public UnaryCallable listMuteConfigsCallable() { + return listMuteConfigsCallable; + } + + @Override + public UnaryCallable + listMuteConfigsPagedCallable() { + return listMuteConfigsPagedCallable; + } + @Override public UnaryCallable listNotificationConfigsCallable() { @@ -902,6 +1165,11 @@ public UnaryCallable setFindingStateCallable() return setFindingStateCallable; } + @Override + public UnaryCallable setMuteCallable() { + return setMuteCallable; + } + @Override public UnaryCallable setIamPolicyCallable() { return setIamPolicyCallable; @@ -913,11 +1181,21 @@ public UnaryCallable setIamPolicyCallable() { return testIamPermissionsCallable; } + @Override + public UnaryCallable updateExternalSystemCallable() { + return updateExternalSystemCallable; + } + @Override public UnaryCallable updateFindingCallable() { return updateFindingCallable; } + @Override + public UnaryCallable updateMuteConfigCallable() { + return updateMuteConfigCallable; + } + @Override public UnaryCallable updateNotificationConfigCallable() { diff --git a/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStub.java b/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStub.java index 903465be2..dc5486ea2 100644 --- a/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStub.java +++ b/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStub.java @@ -20,17 +20,24 @@ import static com.google.cloud.securitycenter.v1.SecurityCenterClient.GroupFindingsPagedResponse; import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListAssetsPagedResponse; import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListFindingsPagedResponse; +import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListMuteConfigsPagedResponse; import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListNotificationConfigsPagedResponse; import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListSourcesPagedResponse; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest; +import com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse; import com.google.cloud.securitycenter.v1.CreateFindingRequest; +import com.google.cloud.securitycenter.v1.CreateMuteConfigRequest; import com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest; import com.google.cloud.securitycenter.v1.CreateSourceRequest; +import com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest; import com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest; +import com.google.cloud.securitycenter.v1.ExternalSystem; import com.google.cloud.securitycenter.v1.Finding; +import com.google.cloud.securitycenter.v1.GetMuteConfigRequest; import com.google.cloud.securitycenter.v1.GetNotificationConfigRequest; import com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest; import com.google.cloud.securitycenter.v1.GetSourceRequest; @@ -42,18 +49,24 @@ import com.google.cloud.securitycenter.v1.ListAssetsResponse; import com.google.cloud.securitycenter.v1.ListFindingsRequest; import com.google.cloud.securitycenter.v1.ListFindingsResponse; +import com.google.cloud.securitycenter.v1.ListMuteConfigsRequest; +import com.google.cloud.securitycenter.v1.ListMuteConfigsResponse; import com.google.cloud.securitycenter.v1.ListNotificationConfigsRequest; import com.google.cloud.securitycenter.v1.ListNotificationConfigsResponse; import com.google.cloud.securitycenter.v1.ListSourcesRequest; import com.google.cloud.securitycenter.v1.ListSourcesResponse; +import com.google.cloud.securitycenter.v1.MuteConfig; import com.google.cloud.securitycenter.v1.NotificationConfig; import com.google.cloud.securitycenter.v1.OrganizationSettings; import com.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest; import com.google.cloud.securitycenter.v1.RunAssetDiscoveryResponse; import com.google.cloud.securitycenter.v1.SecurityMarks; import com.google.cloud.securitycenter.v1.SetFindingStateRequest; +import com.google.cloud.securitycenter.v1.SetMuteRequest; import com.google.cloud.securitycenter.v1.Source; +import com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest; import com.google.cloud.securitycenter.v1.UpdateFindingRequest; +import com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest; import com.google.cloud.securitycenter.v1.UpdateNotificationConfigRequest; import com.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest; import com.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest; @@ -81,6 +94,15 @@ public OperationsStub getOperationsStub() { throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); } + public OperationCallable + bulkMuteFindingsOperationCallable() { + throw new UnsupportedOperationException("Not implemented: bulkMuteFindingsOperationCallable()"); + } + + public UnaryCallable bulkMuteFindingsCallable() { + throw new UnsupportedOperationException("Not implemented: bulkMuteFindingsCallable()"); + } + public UnaryCallable createSourceCallable() { throw new UnsupportedOperationException("Not implemented: createSourceCallable()"); } @@ -89,11 +111,19 @@ public UnaryCallable createFindingCallable() { throw new UnsupportedOperationException("Not implemented: createFindingCallable()"); } + public UnaryCallable createMuteConfigCallable() { + throw new UnsupportedOperationException("Not implemented: createMuteConfigCallable()"); + } + public UnaryCallable createNotificationConfigCallable() { throw new UnsupportedOperationException("Not implemented: createNotificationConfigCallable()"); } + public UnaryCallable deleteMuteConfigCallable() { + throw new UnsupportedOperationException("Not implemented: deleteMuteConfigCallable()"); + } + public UnaryCallable deleteNotificationConfigCallable() { throw new UnsupportedOperationException("Not implemented: deleteNotificationConfigCallable()"); } @@ -102,6 +132,10 @@ public UnaryCallable getIamPolicyCallable() { throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); } + public UnaryCallable getMuteConfigCallable() { + throw new UnsupportedOperationException("Not implemented: getMuteConfigCallable()"); + } + public UnaryCallable getNotificationConfigCallable() { throw new UnsupportedOperationException("Not implemented: getNotificationConfigCallable()"); @@ -149,6 +183,15 @@ public UnaryCallable listFindingsCall throw new UnsupportedOperationException("Not implemented: listFindingsCallable()"); } + public UnaryCallable + listMuteConfigsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listMuteConfigsPagedCallable()"); + } + + public UnaryCallable listMuteConfigsCallable() { + throw new UnsupportedOperationException("Not implemented: listMuteConfigsCallable()"); + } + public UnaryCallable listNotificationConfigsPagedCallable() { throw new UnsupportedOperationException( @@ -182,6 +225,10 @@ public UnaryCallable setFindingStateCallable() throw new UnsupportedOperationException("Not implemented: setFindingStateCallable()"); } + public UnaryCallable setMuteCallable() { + throw new UnsupportedOperationException("Not implemented: setMuteCallable()"); + } + public UnaryCallable setIamPolicyCallable() { throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); } @@ -191,10 +238,18 @@ public UnaryCallable setIamPolicyCallable() { throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); } + public UnaryCallable updateExternalSystemCallable() { + throw new UnsupportedOperationException("Not implemented: updateExternalSystemCallable()"); + } + public UnaryCallable updateFindingCallable() { throw new UnsupportedOperationException("Not implemented: updateFindingCallable()"); } + public UnaryCallable updateMuteConfigCallable() { + throw new UnsupportedOperationException("Not implemented: updateMuteConfigCallable()"); + } + public UnaryCallable updateNotificationConfigCallable() { throw new UnsupportedOperationException("Not implemented: updateNotificationConfigCallable()"); diff --git a/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStubSettings.java b/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStubSettings.java index 73a529581..43c801c24 100644 --- a/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStubSettings.java +++ b/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStubSettings.java @@ -20,6 +20,7 @@ import static com.google.cloud.securitycenter.v1.SecurityCenterClient.GroupFindingsPagedResponse; import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListAssetsPagedResponse; import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListFindingsPagedResponse; +import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListMuteConfigsPagedResponse; import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListNotificationConfigsPagedResponse; import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListSourcesPagedResponse; @@ -49,11 +50,17 @@ import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest; +import com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse; import com.google.cloud.securitycenter.v1.CreateFindingRequest; +import com.google.cloud.securitycenter.v1.CreateMuteConfigRequest; import com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest; import com.google.cloud.securitycenter.v1.CreateSourceRequest; +import com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest; import com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest; +import com.google.cloud.securitycenter.v1.ExternalSystem; import com.google.cloud.securitycenter.v1.Finding; +import com.google.cloud.securitycenter.v1.GetMuteConfigRequest; import com.google.cloud.securitycenter.v1.GetNotificationConfigRequest; import com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest; import com.google.cloud.securitycenter.v1.GetSourceRequest; @@ -66,18 +73,24 @@ import com.google.cloud.securitycenter.v1.ListAssetsResponse; import com.google.cloud.securitycenter.v1.ListFindingsRequest; import com.google.cloud.securitycenter.v1.ListFindingsResponse; +import com.google.cloud.securitycenter.v1.ListMuteConfigsRequest; +import com.google.cloud.securitycenter.v1.ListMuteConfigsResponse; import com.google.cloud.securitycenter.v1.ListNotificationConfigsRequest; import com.google.cloud.securitycenter.v1.ListNotificationConfigsResponse; import com.google.cloud.securitycenter.v1.ListSourcesRequest; import com.google.cloud.securitycenter.v1.ListSourcesResponse; +import com.google.cloud.securitycenter.v1.MuteConfig; import com.google.cloud.securitycenter.v1.NotificationConfig; import com.google.cloud.securitycenter.v1.OrganizationSettings; import com.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest; import com.google.cloud.securitycenter.v1.RunAssetDiscoveryResponse; import com.google.cloud.securitycenter.v1.SecurityMarks; import com.google.cloud.securitycenter.v1.SetFindingStateRequest; +import com.google.cloud.securitycenter.v1.SetMuteRequest; import com.google.cloud.securitycenter.v1.Source; +import com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest; import com.google.cloud.securitycenter.v1.UpdateFindingRequest; +import com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest; import com.google.cloud.securitycenter.v1.UpdateNotificationConfigRequest; import com.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest; import com.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest; @@ -137,13 +150,19 @@ public class SecurityCenterStubSettings extends StubSettings DEFAULT_SERVICE_SCOPES = ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + private final UnaryCallSettings bulkMuteFindingsSettings; + private final OperationCallSettings + bulkMuteFindingsOperationSettings; private final UnaryCallSettings createSourceSettings; private final UnaryCallSettings createFindingSettings; + private final UnaryCallSettings createMuteConfigSettings; private final UnaryCallSettings createNotificationConfigSettings; + private final UnaryCallSettings deleteMuteConfigSettings; private final UnaryCallSettings deleteNotificationConfigSettings; private final UnaryCallSettings getIamPolicySettings; + private final UnaryCallSettings getMuteConfigSettings; private final UnaryCallSettings getNotificationConfigSettings; private final UnaryCallSettings @@ -159,6 +178,9 @@ public class SecurityCenterStubSettings extends StubSettings listFindingsSettings; + private final PagedCallSettings< + ListMuteConfigsRequest, ListMuteConfigsResponse, ListMuteConfigsPagedResponse> + listMuteConfigsSettings; private final PagedCallSettings< ListNotificationConfigsRequest, ListNotificationConfigsResponse, @@ -170,10 +192,14 @@ public class SecurityCenterStubSettings extends StubSettings runAssetDiscoveryOperationSettings; private final UnaryCallSettings setFindingStateSettings; + private final UnaryCallSettings setMuteSettings; private final UnaryCallSettings setIamPolicySettings; private final UnaryCallSettings testIamPermissionsSettings; + private final UnaryCallSettings + updateExternalSystemSettings; private final UnaryCallSettings updateFindingSettings; + private final UnaryCallSettings updateMuteConfigSettings; private final UnaryCallSettings updateNotificationConfigSettings; private final UnaryCallSettings @@ -334,6 +360,45 @@ public Iterable extractResources( } }; + private static final PagedListDescriptor< + ListMuteConfigsRequest, ListMuteConfigsResponse, MuteConfig> + LIST_MUTE_CONFIGS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListMuteConfigsRequest injectToken( + ListMuteConfigsRequest payload, String token) { + return ListMuteConfigsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListMuteConfigsRequest injectPageSize( + ListMuteConfigsRequest payload, int pageSize) { + return ListMuteConfigsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListMuteConfigsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListMuteConfigsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListMuteConfigsResponse payload) { + return payload.getMuteConfigsList() == null + ? ImmutableList.of() + : payload.getMuteConfigsList(); + } + }; + private static final PagedListDescriptor< ListNotificationConfigsRequest, ListNotificationConfigsResponse, NotificationConfig> LIST_NOTIFICATION_CONFIGS_PAGE_STR_DESC = @@ -489,6 +554,23 @@ public ApiFuture getFuturePagedResponse( } }; + private static final PagedListResponseFactory< + ListMuteConfigsRequest, ListMuteConfigsResponse, ListMuteConfigsPagedResponse> + LIST_MUTE_CONFIGS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListMuteConfigsRequest, ListMuteConfigsResponse, ListMuteConfigsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListMuteConfigsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_MUTE_CONFIGS_PAGE_STR_DESC, request, context); + return ListMuteConfigsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + private static final PagedListResponseFactory< ListNotificationConfigsRequest, ListNotificationConfigsResponse, @@ -533,6 +615,17 @@ public ApiFuture getFuturePagedResponse( } }; + /** Returns the object with the settings used for calls to bulkMuteFindings. */ + public UnaryCallSettings bulkMuteFindingsSettings() { + return bulkMuteFindingsSettings; + } + + /** Returns the object with the settings used for calls to bulkMuteFindings. */ + public OperationCallSettings + bulkMuteFindingsOperationSettings() { + return bulkMuteFindingsOperationSettings; + } + /** Returns the object with the settings used for calls to createSource. */ public UnaryCallSettings createSourceSettings() { return createSourceSettings; @@ -543,12 +636,22 @@ public UnaryCallSettings createFindingSettings() return createFindingSettings; } + /** Returns the object with the settings used for calls to createMuteConfig. */ + public UnaryCallSettings createMuteConfigSettings() { + return createMuteConfigSettings; + } + /** Returns the object with the settings used for calls to createNotificationConfig. */ public UnaryCallSettings createNotificationConfigSettings() { return createNotificationConfigSettings; } + /** Returns the object with the settings used for calls to deleteMuteConfig. */ + public UnaryCallSettings deleteMuteConfigSettings() { + return deleteMuteConfigSettings; + } + /** Returns the object with the settings used for calls to deleteNotificationConfig. */ public UnaryCallSettings deleteNotificationConfigSettings() { @@ -560,6 +663,11 @@ public UnaryCallSettings getIamPolicySettings() { return getIamPolicySettings; } + /** Returns the object with the settings used for calls to getMuteConfig. */ + public UnaryCallSettings getMuteConfigSettings() { + return getMuteConfigSettings; + } + /** Returns the object with the settings used for calls to getNotificationConfig. */ public UnaryCallSettings getNotificationConfigSettings() { @@ -601,6 +709,13 @@ public UnaryCallSettings getSourceSettings() { return listFindingsSettings; } + /** Returns the object with the settings used for calls to listMuteConfigs. */ + public PagedCallSettings< + ListMuteConfigsRequest, ListMuteConfigsResponse, ListMuteConfigsPagedResponse> + listMuteConfigsSettings() { + return listMuteConfigsSettings; + } + /** Returns the object with the settings used for calls to listNotificationConfigs. */ public PagedCallSettings< ListNotificationConfigsRequest, @@ -632,6 +747,11 @@ public UnaryCallSettings setFindingStateSetting return setFindingStateSettings; } + /** Returns the object with the settings used for calls to setMute. */ + public UnaryCallSettings setMuteSettings() { + return setMuteSettings; + } + /** Returns the object with the settings used for calls to setIamPolicy. */ public UnaryCallSettings setIamPolicySettings() { return setIamPolicySettings; @@ -643,11 +763,22 @@ public UnaryCallSettings setIamPolicySettings() { return testIamPermissionsSettings; } + /** Returns the object with the settings used for calls to updateExternalSystem. */ + public UnaryCallSettings + updateExternalSystemSettings() { + return updateExternalSystemSettings; + } + /** Returns the object with the settings used for calls to updateFinding. */ public UnaryCallSettings updateFindingSettings() { return updateFindingSettings; } + /** Returns the object with the settings used for calls to updateMuteConfig. */ + public UnaryCallSettings updateMuteConfigSettings() { + return updateMuteConfigSettings; + } + /** Returns the object with the settings used for calls to updateNotificationConfig. */ public UnaryCallSettings updateNotificationConfigSettings() { @@ -747,11 +878,16 @@ public Builder toBuilder() { protected SecurityCenterStubSettings(Builder settingsBuilder) throws IOException { super(settingsBuilder); + bulkMuteFindingsSettings = settingsBuilder.bulkMuteFindingsSettings().build(); + bulkMuteFindingsOperationSettings = settingsBuilder.bulkMuteFindingsOperationSettings().build(); createSourceSettings = settingsBuilder.createSourceSettings().build(); createFindingSettings = settingsBuilder.createFindingSettings().build(); + createMuteConfigSettings = settingsBuilder.createMuteConfigSettings().build(); createNotificationConfigSettings = settingsBuilder.createNotificationConfigSettings().build(); + deleteMuteConfigSettings = settingsBuilder.deleteMuteConfigSettings().build(); deleteNotificationConfigSettings = settingsBuilder.deleteNotificationConfigSettings().build(); getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + getMuteConfigSettings = settingsBuilder.getMuteConfigSettings().build(); getNotificationConfigSettings = settingsBuilder.getNotificationConfigSettings().build(); getOrganizationSettingsSettings = settingsBuilder.getOrganizationSettingsSettings().build(); getSourceSettings = settingsBuilder.getSourceSettings().build(); @@ -759,15 +895,19 @@ protected SecurityCenterStubSettings(Builder settingsBuilder) throws IOException groupFindingsSettings = settingsBuilder.groupFindingsSettings().build(); listAssetsSettings = settingsBuilder.listAssetsSettings().build(); listFindingsSettings = settingsBuilder.listFindingsSettings().build(); + listMuteConfigsSettings = settingsBuilder.listMuteConfigsSettings().build(); listNotificationConfigsSettings = settingsBuilder.listNotificationConfigsSettings().build(); listSourcesSettings = settingsBuilder.listSourcesSettings().build(); runAssetDiscoverySettings = settingsBuilder.runAssetDiscoverySettings().build(); runAssetDiscoveryOperationSettings = settingsBuilder.runAssetDiscoveryOperationSettings().build(); setFindingStateSettings = settingsBuilder.setFindingStateSettings().build(); + setMuteSettings = settingsBuilder.setMuteSettings().build(); setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + updateExternalSystemSettings = settingsBuilder.updateExternalSystemSettings().build(); updateFindingSettings = settingsBuilder.updateFindingSettings().build(); + updateMuteConfigSettings = settingsBuilder.updateMuteConfigSettings().build(); updateNotificationConfigSettings = settingsBuilder.updateNotificationConfigSettings().build(); updateOrganizationSettingsSettings = settingsBuilder.updateOrganizationSettingsSettings().build(); @@ -778,13 +918,23 @@ protected SecurityCenterStubSettings(Builder settingsBuilder) throws IOException /** Builder for SecurityCenterStubSettings. */ public static class Builder extends StubSettings.Builder { private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + bulkMuteFindingsSettings; + private final OperationCallSettings.Builder< + BulkMuteFindingsRequest, BulkMuteFindingsResponse, Empty> + bulkMuteFindingsOperationSettings; private final UnaryCallSettings.Builder createSourceSettings; private final UnaryCallSettings.Builder createFindingSettings; + private final UnaryCallSettings.Builder + createMuteConfigSettings; private final UnaryCallSettings.Builder createNotificationConfigSettings; + private final UnaryCallSettings.Builder + deleteMuteConfigSettings; private final UnaryCallSettings.Builder deleteNotificationConfigSettings; private final UnaryCallSettings.Builder getIamPolicySettings; + private final UnaryCallSettings.Builder getMuteConfigSettings; private final UnaryCallSettings.Builder getNotificationConfigSettings; private final UnaryCallSettings.Builder @@ -802,6 +952,9 @@ public static class Builder extends StubSettings.Builder listFindingsSettings; + private final PagedCallSettings.Builder< + ListMuteConfigsRequest, ListMuteConfigsResponse, ListMuteConfigsPagedResponse> + listMuteConfigsSettings; private final PagedCallSettings.Builder< ListNotificationConfigsRequest, ListNotificationConfigsResponse, @@ -817,10 +970,15 @@ public static class Builder extends StubSettings.Builder setFindingStateSettings; + private final UnaryCallSettings.Builder setMuteSettings; private final UnaryCallSettings.Builder setIamPolicySettings; private final UnaryCallSettings.Builder testIamPermissionsSettings; + private final UnaryCallSettings.Builder + updateExternalSystemSettings; private final UnaryCallSettings.Builder updateFindingSettings; + private final UnaryCallSettings.Builder + updateMuteConfigSettings; private final UnaryCallSettings.Builder updateNotificationConfigSettings; private final UnaryCallSettings.Builder @@ -834,6 +992,7 @@ public static class Builder extends StubSettings.Builder> definitions = ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); definitions.put( "no_retry_0_codes", ImmutableSet.copyOf(Lists.newArrayList())); definitions.put( @@ -856,6 +1015,8 @@ public static class Builder extends StubSettings.Builder definitions = ImmutableMap.builder(); RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); settings = RetrySettings.newBuilder() .setInitialRpcTimeout(Duration.ofMillis(60000L)) @@ -904,11 +1065,16 @@ protected Builder() { protected Builder(ClientContext clientContext) { super(clientContext); + bulkMuteFindingsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + bulkMuteFindingsOperationSettings = OperationCallSettings.newBuilder(); createSourceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); createFindingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createMuteConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); createNotificationConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteMuteConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); deleteNotificationConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getMuteConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); getNotificationConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); getOrganizationSettingsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); getSourceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -916,15 +1082,19 @@ protected Builder(ClientContext clientContext) { groupFindingsSettings = PagedCallSettings.newBuilder(GROUP_FINDINGS_PAGE_STR_FACT); listAssetsSettings = PagedCallSettings.newBuilder(LIST_ASSETS_PAGE_STR_FACT); listFindingsSettings = PagedCallSettings.newBuilder(LIST_FINDINGS_PAGE_STR_FACT); + listMuteConfigsSettings = PagedCallSettings.newBuilder(LIST_MUTE_CONFIGS_PAGE_STR_FACT); listNotificationConfigsSettings = PagedCallSettings.newBuilder(LIST_NOTIFICATION_CONFIGS_PAGE_STR_FACT); listSourcesSettings = PagedCallSettings.newBuilder(LIST_SOURCES_PAGE_STR_FACT); runAssetDiscoverySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); runAssetDiscoveryOperationSettings = OperationCallSettings.newBuilder(); setFindingStateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setMuteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateExternalSystemSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); updateFindingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateMuteConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); updateNotificationConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); updateOrganizationSettingsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); updateSourceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -932,11 +1102,15 @@ protected Builder(ClientContext clientContext) { unaryMethodSettingsBuilders = ImmutableList.>of( + bulkMuteFindingsSettings, createSourceSettings, createFindingSettings, + createMuteConfigSettings, createNotificationConfigSettings, + deleteMuteConfigSettings, deleteNotificationConfigSettings, getIamPolicySettings, + getMuteConfigSettings, getNotificationConfigSettings, getOrganizationSettingsSettings, getSourceSettings, @@ -944,13 +1118,17 @@ protected Builder(ClientContext clientContext) { groupFindingsSettings, listAssetsSettings, listFindingsSettings, + listMuteConfigsSettings, listNotificationConfigsSettings, listSourcesSettings, runAssetDiscoverySettings, setFindingStateSettings, + setMuteSettings, setIamPolicySettings, testIamPermissionsSettings, + updateExternalSystemSettings, updateFindingSettings, + updateMuteConfigSettings, updateNotificationConfigSettings, updateOrganizationSettingsSettings, updateSourceSettings, @@ -961,11 +1139,16 @@ protected Builder(ClientContext clientContext) { protected Builder(SecurityCenterStubSettings settings) { super(settings); + bulkMuteFindingsSettings = settings.bulkMuteFindingsSettings.toBuilder(); + bulkMuteFindingsOperationSettings = settings.bulkMuteFindingsOperationSettings.toBuilder(); createSourceSettings = settings.createSourceSettings.toBuilder(); createFindingSettings = settings.createFindingSettings.toBuilder(); + createMuteConfigSettings = settings.createMuteConfigSettings.toBuilder(); createNotificationConfigSettings = settings.createNotificationConfigSettings.toBuilder(); + deleteMuteConfigSettings = settings.deleteMuteConfigSettings.toBuilder(); deleteNotificationConfigSettings = settings.deleteNotificationConfigSettings.toBuilder(); getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + getMuteConfigSettings = settings.getMuteConfigSettings.toBuilder(); getNotificationConfigSettings = settings.getNotificationConfigSettings.toBuilder(); getOrganizationSettingsSettings = settings.getOrganizationSettingsSettings.toBuilder(); getSourceSettings = settings.getSourceSettings.toBuilder(); @@ -973,14 +1156,18 @@ protected Builder(SecurityCenterStubSettings settings) { groupFindingsSettings = settings.groupFindingsSettings.toBuilder(); listAssetsSettings = settings.listAssetsSettings.toBuilder(); listFindingsSettings = settings.listFindingsSettings.toBuilder(); + listMuteConfigsSettings = settings.listMuteConfigsSettings.toBuilder(); listNotificationConfigsSettings = settings.listNotificationConfigsSettings.toBuilder(); listSourcesSettings = settings.listSourcesSettings.toBuilder(); runAssetDiscoverySettings = settings.runAssetDiscoverySettings.toBuilder(); runAssetDiscoveryOperationSettings = settings.runAssetDiscoveryOperationSettings.toBuilder(); setFindingStateSettings = settings.setFindingStateSettings.toBuilder(); + setMuteSettings = settings.setMuteSettings.toBuilder(); setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + updateExternalSystemSettings = settings.updateExternalSystemSettings.toBuilder(); updateFindingSettings = settings.updateFindingSettings.toBuilder(); + updateMuteConfigSettings = settings.updateMuteConfigSettings.toBuilder(); updateNotificationConfigSettings = settings.updateNotificationConfigSettings.toBuilder(); updateOrganizationSettingsSettings = settings.updateOrganizationSettingsSettings.toBuilder(); updateSourceSettings = settings.updateSourceSettings.toBuilder(); @@ -988,11 +1175,15 @@ protected Builder(SecurityCenterStubSettings settings) { unaryMethodSettingsBuilders = ImmutableList.>of( + bulkMuteFindingsSettings, createSourceSettings, createFindingSettings, + createMuteConfigSettings, createNotificationConfigSettings, + deleteMuteConfigSettings, deleteNotificationConfigSettings, getIamPolicySettings, + getMuteConfigSettings, getNotificationConfigSettings, getOrganizationSettingsSettings, getSourceSettings, @@ -1000,13 +1191,17 @@ protected Builder(SecurityCenterStubSettings settings) { groupFindingsSettings, listAssetsSettings, listFindingsSettings, + listMuteConfigsSettings, listNotificationConfigsSettings, listSourcesSettings, runAssetDiscoverySettings, setFindingStateSettings, + setMuteSettings, setIamPolicySettings, testIamPermissionsSettings, + updateExternalSystemSettings, updateFindingSettings, + updateMuteConfigSettings, updateNotificationConfigSettings, updateOrganizationSettingsSettings, updateSourceSettings, @@ -1027,6 +1222,11 @@ private static Builder createDefault() { } private static Builder initDefaults(Builder builder) { + builder + .bulkMuteFindingsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .createSourceSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) @@ -1037,11 +1237,21 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + builder + .createMuteConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .createNotificationConfigSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + builder + .deleteMuteConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .deleteNotificationConfigSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) @@ -1052,6 +1262,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + builder + .getMuteConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .getNotificationConfigSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) @@ -1087,6 +1302,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")); + builder + .listMuteConfigsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .listNotificationConfigsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) @@ -1107,6 +1327,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + builder + .setMuteSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .setIamPolicySettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) @@ -1117,11 +1342,21 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + builder + .updateExternalSystemSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .updateFindingSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + builder + .updateMuteConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .updateNotificationConfigSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) @@ -1142,6 +1377,30 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); + builder + .bulkMuteFindingsOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(BulkMuteFindingsResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(Empty.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + builder .runAssetDiscoveryOperationSettings() .setInitialCallSettings( @@ -1185,6 +1444,20 @@ public Builder applyToAllUnaryMethods( return unaryMethodSettingsBuilders; } + /** Returns the builder for the settings used for calls to bulkMuteFindings. */ + public UnaryCallSettings.Builder + bulkMuteFindingsSettings() { + return bulkMuteFindingsSettings; + } + + /** Returns the builder for the settings used for calls to bulkMuteFindings. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + bulkMuteFindingsOperationSettings() { + return bulkMuteFindingsOperationSettings; + } + /** Returns the builder for the settings used for calls to createSource. */ public UnaryCallSettings.Builder createSourceSettings() { return createSourceSettings; @@ -1195,12 +1468,23 @@ public UnaryCallSettings.Builder createFindingSet return createFindingSettings; } + /** Returns the builder for the settings used for calls to createMuteConfig. */ + public UnaryCallSettings.Builder + createMuteConfigSettings() { + return createMuteConfigSettings; + } + /** Returns the builder for the settings used for calls to createNotificationConfig. */ public UnaryCallSettings.Builder createNotificationConfigSettings() { return createNotificationConfigSettings; } + /** Returns the builder for the settings used for calls to deleteMuteConfig. */ + public UnaryCallSettings.Builder deleteMuteConfigSettings() { + return deleteMuteConfigSettings; + } + /** Returns the builder for the settings used for calls to deleteNotificationConfig. */ public UnaryCallSettings.Builder deleteNotificationConfigSettings() { @@ -1212,6 +1496,11 @@ public UnaryCallSettings.Builder getIamPolicySettin return getIamPolicySettings; } + /** Returns the builder for the settings used for calls to getMuteConfig. */ + public UnaryCallSettings.Builder getMuteConfigSettings() { + return getMuteConfigSettings; + } + /** Returns the builder for the settings used for calls to getNotificationConfig. */ public UnaryCallSettings.Builder getNotificationConfigSettings() { @@ -1256,6 +1545,13 @@ public UnaryCallSettings.Builder getSourceSettings() { return listFindingsSettings; } + /** Returns the builder for the settings used for calls to listMuteConfigs. */ + public PagedCallSettings.Builder< + ListMuteConfigsRequest, ListMuteConfigsResponse, ListMuteConfigsPagedResponse> + listMuteConfigsSettings() { + return listMuteConfigsSettings; + } + /** Returns the builder for the settings used for calls to listNotificationConfigs. */ public PagedCallSettings.Builder< ListNotificationConfigsRequest, @@ -1291,6 +1587,11 @@ public UnaryCallSettings.Builder setFindingStat return setFindingStateSettings; } + /** Returns the builder for the settings used for calls to setMute. */ + public UnaryCallSettings.Builder setMuteSettings() { + return setMuteSettings; + } + /** Returns the builder for the settings used for calls to setIamPolicy. */ public UnaryCallSettings.Builder setIamPolicySettings() { return setIamPolicySettings; @@ -1302,11 +1603,23 @@ public UnaryCallSettings.Builder setIamPolicySettin return testIamPermissionsSettings; } + /** Returns the builder for the settings used for calls to updateExternalSystem. */ + public UnaryCallSettings.Builder + updateExternalSystemSettings() { + return updateExternalSystemSettings; + } + /** Returns the builder for the settings used for calls to updateFinding. */ public UnaryCallSettings.Builder updateFindingSettings() { return updateFindingSettings; } + /** Returns the builder for the settings used for calls to updateMuteConfig. */ + public UnaryCallSettings.Builder + updateMuteConfigSettings() { + return updateMuteConfigSettings; + } + /** Returns the builder for the settings used for calls to updateNotificationConfig. */ public UnaryCallSettings.Builder updateNotificationConfigSettings() { diff --git a/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1p1beta1/SecurityCenterClient.java b/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1p1beta1/SecurityCenterClient.java index 49f93704b..a32521fae 100644 --- a/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1p1beta1/SecurityCenterClient.java +++ b/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1p1beta1/SecurityCenterClient.java @@ -1125,7 +1125,7 @@ public final UnaryCallable getSourceCallable() { * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { * GroupAssetsRequest request = * GroupAssetsRequest.newBuilder() - * .setParent(AssetName.ofOrganizationAssetName("[ORGANIZATION]", "[ASSET]").toString()) + * .setParent(OrganizationName.of("[ORGANIZATION]").toString()) * .setFilter("filter-1274492040") * .setGroupBy("groupBy293428022") * .setCompareDuration(Duration.newBuilder().build()) @@ -1156,7 +1156,7 @@ public final GroupAssetsPagedResponse groupAssets(GroupAssetsRequest request) { * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { * GroupAssetsRequest request = * GroupAssetsRequest.newBuilder() - * .setParent(AssetName.ofOrganizationAssetName("[ORGANIZATION]", "[ASSET]").toString()) + * .setParent(OrganizationName.of("[ORGANIZATION]").toString()) * .setFilter("filter-1274492040") * .setGroupBy("groupBy293428022") * .setCompareDuration(Duration.newBuilder().build()) @@ -1188,7 +1188,7 @@ public final GroupAssetsPagedResponse groupAssets(GroupAssetsRequest request) { * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { * GroupAssetsRequest request = * GroupAssetsRequest.newBuilder() - * .setParent(AssetName.ofOrganizationAssetName("[ORGANIZATION]", "[ASSET]").toString()) + * .setParent(OrganizationName.of("[ORGANIZATION]").toString()) * .setFilter("filter-1274492040") * .setGroupBy("groupBy293428022") * .setCompareDuration(Duration.newBuilder().build()) @@ -1519,7 +1519,7 @@ public final ListAssetsPagedResponse listAssets(ProjectName parent) { * *

{@code
    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   String parent = AssetName.ofOrganizationAssetName("[ORGANIZATION]", "[ASSET]").toString();
+   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
    *   for (ListAssetsResponse.ListAssetsResult element :
    *       securityCenterClient.listAssets(parent).iterateAll()) {
    *     // doThingsWith(element);
@@ -1546,7 +1546,7 @@ public final ListAssetsPagedResponse listAssets(String parent) {
    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
    *   ListAssetsRequest request =
    *       ListAssetsRequest.newBuilder()
-   *           .setParent(AssetName.ofOrganizationAssetName("[ORGANIZATION]", "[ASSET]").toString())
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
    *           .setFilter("filter-1274492040")
    *           .setOrderBy("orderBy-1207110587")
    *           .setReadTime(Timestamp.newBuilder().build())
@@ -1579,7 +1579,7 @@ public final ListAssetsPagedResponse listAssets(ListAssetsRequest request) {
    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
    *   ListAssetsRequest request =
    *       ListAssetsRequest.newBuilder()
-   *           .setParent(AssetName.ofOrganizationAssetName("[ORGANIZATION]", "[ASSET]").toString())
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
    *           .setFilter("filter-1274492040")
    *           .setOrderBy("orderBy-1207110587")
    *           .setReadTime(Timestamp.newBuilder().build())
@@ -1611,7 +1611,7 @@ public final UnaryCallable listAsset
    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
    *   ListAssetsRequest request =
    *       ListAssetsRequest.newBuilder()
-   *           .setParent(AssetName.ofOrganizationAssetName("[ORGANIZATION]", "[ASSET]").toString())
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
    *           .setFilter("filter-1274492040")
    *           .setOrderBy("orderBy-1207110587")
    *           .setReadTime(Timestamp.newBuilder().build())
@@ -2058,7 +2058,7 @@ public final ListSourcesPagedResponse listSources(ProjectName parent) {
    *
    * 
{@code
    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   String parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString();
+   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
    *   for (Source element : securityCenterClient.listSources(parent).iterateAll()) {
    *     // doThingsWith(element);
    *   }
@@ -2084,8 +2084,7 @@ public final ListSourcesPagedResponse listSources(String parent) {
    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
    *   ListSourcesRequest request =
    *       ListSourcesRequest.newBuilder()
-   *           .setParent(
-   *               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
    *           .setPageToken("pageToken873572522")
    *           .setPageSize(883849137)
    *           .build();
@@ -2112,8 +2111,7 @@ public final ListSourcesPagedResponse listSources(ListSourcesRequest request) {
    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
    *   ListSourcesRequest request =
    *       ListSourcesRequest.newBuilder()
-   *           .setParent(
-   *               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
    *           .setPageToken("pageToken873572522")
    *           .setPageSize(883849137)
    *           .build();
@@ -2141,8 +2139,7 @@ public final ListSourcesPagedResponse listSources(ListSourcesRequest request) {
    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
    *   ListSourcesRequest request =
    *       ListSourcesRequest.newBuilder()
-   *           .setParent(
-   *               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
    *           .setPageToken("pageToken873572522")
    *           .setPageSize(883849137)
    *           .build();
diff --git a/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/MockSecurityCenterImpl.java b/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/MockSecurityCenterImpl.java
index 85f12b2a4..9d6c41768 100644
--- a/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/MockSecurityCenterImpl.java
+++ b/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/MockSecurityCenterImpl.java
@@ -65,6 +65,27 @@ public void reset() {
     responses = new LinkedList<>();
   }
 
+  @Override
+  public void bulkMuteFindings(
+      BulkMuteFindingsRequest request, StreamObserver responseObserver) {
+    Object response = responses.poll();
+    if (response instanceof Operation) {
+      requests.add(request);
+      responseObserver.onNext(((Operation) response));
+      responseObserver.onCompleted();
+    } else if (response instanceof Exception) {
+      responseObserver.onError(((Exception) response));
+    } else {
+      responseObserver.onError(
+          new IllegalArgumentException(
+              String.format(
+                  "Unrecognized response type %s for method BulkMuteFindings, expected %s or %s",
+                  response == null ? "null" : response.getClass().getName(),
+                  Operation.class.getName(),
+                  Exception.class.getName())));
+    }
+  }
+
   @Override
   public void createSource(CreateSourceRequest request, StreamObserver responseObserver) {
     Object response = responses.poll();
@@ -106,6 +127,27 @@ public void createFinding(
     }
   }
 
+  @Override
+  public void createMuteConfig(
+      CreateMuteConfigRequest request, StreamObserver responseObserver) {
+    Object response = responses.poll();
+    if (response instanceof MuteConfig) {
+      requests.add(request);
+      responseObserver.onNext(((MuteConfig) response));
+      responseObserver.onCompleted();
+    } else if (response instanceof Exception) {
+      responseObserver.onError(((Exception) response));
+    } else {
+      responseObserver.onError(
+          new IllegalArgumentException(
+              String.format(
+                  "Unrecognized response type %s for method CreateMuteConfig, expected %s or %s",
+                  response == null ? "null" : response.getClass().getName(),
+                  MuteConfig.class.getName(),
+                  Exception.class.getName())));
+    }
+  }
+
   @Override
   public void createNotificationConfig(
       CreateNotificationConfigRequest request,
@@ -128,6 +170,27 @@ public void createNotificationConfig(
     }
   }
 
+  @Override
+  public void deleteMuteConfig(
+      DeleteMuteConfigRequest request, StreamObserver responseObserver) {
+    Object response = responses.poll();
+    if (response instanceof Empty) {
+      requests.add(request);
+      responseObserver.onNext(((Empty) response));
+      responseObserver.onCompleted();
+    } else if (response instanceof Exception) {
+      responseObserver.onError(((Exception) response));
+    } else {
+      responseObserver.onError(
+          new IllegalArgumentException(
+              String.format(
+                  "Unrecognized response type %s for method DeleteMuteConfig, expected %s or %s",
+                  response == null ? "null" : response.getClass().getName(),
+                  Empty.class.getName(),
+                  Exception.class.getName())));
+    }
+  }
+
   @Override
   public void deleteNotificationConfig(
       DeleteNotificationConfigRequest request, StreamObserver responseObserver) {
@@ -169,6 +232,27 @@ public void getIamPolicy(GetIamPolicyRequest request, StreamObserver res
     }
   }
 
+  @Override
+  public void getMuteConfig(
+      GetMuteConfigRequest request, StreamObserver responseObserver) {
+    Object response = responses.poll();
+    if (response instanceof MuteConfig) {
+      requests.add(request);
+      responseObserver.onNext(((MuteConfig) response));
+      responseObserver.onCompleted();
+    } else if (response instanceof Exception) {
+      responseObserver.onError(((Exception) response));
+    } else {
+      responseObserver.onError(
+          new IllegalArgumentException(
+              String.format(
+                  "Unrecognized response type %s for method GetMuteConfig, expected %s or %s",
+                  response == null ? "null" : response.getClass().getName(),
+                  MuteConfig.class.getName(),
+                  Exception.class.getName())));
+    }
+  }
+
   @Override
   public void getNotificationConfig(
       GetNotificationConfigRequest request, StreamObserver responseObserver) {
@@ -316,6 +400,27 @@ public void listFindings(
     }
   }
 
+  @Override
+  public void listMuteConfigs(
+      ListMuteConfigsRequest request, StreamObserver responseObserver) {
+    Object response = responses.poll();
+    if (response instanceof ListMuteConfigsResponse) {
+      requests.add(request);
+      responseObserver.onNext(((ListMuteConfigsResponse) response));
+      responseObserver.onCompleted();
+    } else if (response instanceof Exception) {
+      responseObserver.onError(((Exception) response));
+    } else {
+      responseObserver.onError(
+          new IllegalArgumentException(
+              String.format(
+                  "Unrecognized response type %s for method ListMuteConfigs, expected %s or %s",
+                  response == null ? "null" : response.getClass().getName(),
+                  ListMuteConfigsResponse.class.getName(),
+                  Exception.class.getName())));
+    }
+  }
+
   @Override
   public void listNotificationConfigs(
       ListNotificationConfigsRequest request,
@@ -401,6 +506,26 @@ public void setFindingState(
     }
   }
 
+  @Override
+  public void setMute(SetMuteRequest request, StreamObserver responseObserver) {
+    Object response = responses.poll();
+    if (response instanceof Finding) {
+      requests.add(request);
+      responseObserver.onNext(((Finding) response));
+      responseObserver.onCompleted();
+    } else if (response instanceof Exception) {
+      responseObserver.onError(((Exception) response));
+    } else {
+      responseObserver.onError(
+          new IllegalArgumentException(
+              String.format(
+                  "Unrecognized response type %s for method SetMute, expected %s or %s",
+                  response == null ? "null" : response.getClass().getName(),
+                  Finding.class.getName(),
+                  Exception.class.getName())));
+    }
+  }
+
   @Override
   public void setIamPolicy(SetIamPolicyRequest request, StreamObserver responseObserver) {
     Object response = responses.poll();
@@ -443,6 +568,27 @@ public void testIamPermissions(
     }
   }
 
+  @Override
+  public void updateExternalSystem(
+      UpdateExternalSystemRequest request, StreamObserver responseObserver) {
+    Object response = responses.poll();
+    if (response instanceof ExternalSystem) {
+      requests.add(request);
+      responseObserver.onNext(((ExternalSystem) response));
+      responseObserver.onCompleted();
+    } else if (response instanceof Exception) {
+      responseObserver.onError(((Exception) response));
+    } else {
+      responseObserver.onError(
+          new IllegalArgumentException(
+              String.format(
+                  "Unrecognized response type %s for method UpdateExternalSystem, expected %s or %s",
+                  response == null ? "null" : response.getClass().getName(),
+                  ExternalSystem.class.getName(),
+                  Exception.class.getName())));
+    }
+  }
+
   @Override
   public void updateFinding(
       UpdateFindingRequest request, StreamObserver responseObserver) {
@@ -464,6 +610,27 @@ public void updateFinding(
     }
   }
 
+  @Override
+  public void updateMuteConfig(
+      UpdateMuteConfigRequest request, StreamObserver responseObserver) {
+    Object response = responses.poll();
+    if (response instanceof MuteConfig) {
+      requests.add(request);
+      responseObserver.onNext(((MuteConfig) response));
+      responseObserver.onCompleted();
+    } else if (response instanceof Exception) {
+      responseObserver.onError(((Exception) response));
+    } else {
+      responseObserver.onError(
+          new IllegalArgumentException(
+              String.format(
+                  "Unrecognized response type %s for method UpdateMuteConfig, expected %s or %s",
+                  response == null ? "null" : response.getClass().getName(),
+                  MuteConfig.class.getName(),
+                  Exception.class.getName())));
+    }
+  }
+
   @Override
   public void updateNotificationConfig(
       UpdateNotificationConfigRequest request,
diff --git a/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientTest.java b/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientTest.java
index c21613699..eacc92718 100644
--- a/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientTest.java
+++ b/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientTest.java
@@ -20,6 +20,7 @@
 import static com.google.cloud.securitycenter.v1.SecurityCenterClient.GroupFindingsPagedResponse;
 import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListAssetsPagedResponse;
 import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListFindingsPagedResponse;
+import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListMuteConfigsPagedResponse;
 import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListNotificationConfigsPagedResponse;
 import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListSourcesPagedResponse;
 
@@ -102,6 +103,92 @@ public void tearDown() throws Exception {
     client.close();
   }
 
+  @Test
+  public void bulkMuteFindingsTest() throws Exception {
+    BulkMuteFindingsResponse expectedResponse = BulkMuteFindingsResponse.newBuilder().build();
+    Operation resultOperation =
+        Operation.newBuilder()
+            .setName("bulkMuteFindingsTest")
+            .setDone(true)
+            .setResponse(Any.pack(expectedResponse))
+            .build();
+    mockSecurityCenter.addResponse(resultOperation);
+
+    ResourceName parent = FolderName.of("[FOLDER]");
+
+    BulkMuteFindingsResponse actualResponse = client.bulkMuteFindingsAsync(parent).get();
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockSecurityCenter.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    BulkMuteFindingsRequest actualRequest = ((BulkMuteFindingsRequest) actualRequests.get(0));
+
+    Assert.assertEquals(parent.toString(), actualRequest.getParent());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void bulkMuteFindingsExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockSecurityCenter.addException(exception);
+
+    try {
+      ResourceName parent = FolderName.of("[FOLDER]");
+      client.bulkMuteFindingsAsync(parent).get();
+      Assert.fail("No exception raised");
+    } catch (ExecutionException e) {
+      Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass());
+      InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause());
+      Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode());
+    }
+  }
+
+  @Test
+  public void bulkMuteFindingsTest2() throws Exception {
+    BulkMuteFindingsResponse expectedResponse = BulkMuteFindingsResponse.newBuilder().build();
+    Operation resultOperation =
+        Operation.newBuilder()
+            .setName("bulkMuteFindingsTest")
+            .setDone(true)
+            .setResponse(Any.pack(expectedResponse))
+            .build();
+    mockSecurityCenter.addResponse(resultOperation);
+
+    String parent = "parent-995424086";
+
+    BulkMuteFindingsResponse actualResponse = client.bulkMuteFindingsAsync(parent).get();
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockSecurityCenter.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    BulkMuteFindingsRequest actualRequest = ((BulkMuteFindingsRequest) actualRequests.get(0));
+
+    Assert.assertEquals(parent, actualRequest.getParent());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void bulkMuteFindingsExceptionTest2() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockSecurityCenter.addException(exception);
+
+    try {
+      String parent = "parent-995424086";
+      client.bulkMuteFindingsAsync(parent).get();
+      Assert.fail("No exception raised");
+    } catch (ExecutionException e) {
+      Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass());
+      InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause());
+      Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode());
+    }
+  }
+
   @Test
   public void createSourceTest() throws Exception {
     Source expectedResponse =
@@ -209,6 +296,9 @@ public void createFindingTest() throws Exception {
             .setCanonicalName("canonicalName2122381727")
             .setIndicator(Indicator.newBuilder().build())
             .setVulnerability(Vulnerability.newBuilder().build())
+            .setMuteUpdateTime(Timestamp.newBuilder().build())
+            .putAllExternalSystems(new HashMap())
+            .setMuteInitiator("muteInitiator1395645462")
             .build();
     mockSecurityCenter.addResponse(expectedResponse);
 
@@ -267,6 +357,9 @@ public void createFindingTest2() throws Exception {
             .setCanonicalName("canonicalName2122381727")
             .setIndicator(Indicator.newBuilder().build())
             .setVulnerability(Vulnerability.newBuilder().build())
+            .setMuteUpdateTime(Timestamp.newBuilder().build())
+            .putAllExternalSystems(new HashMap())
+            .setMuteInitiator("muteInitiator1395645462")
             .build();
     mockSecurityCenter.addResponse(expectedResponse);
 
@@ -306,6 +399,410 @@ public void createFindingExceptionTest2() throws Exception {
     }
   }
 
+  @Test
+  public void createMuteConfigTest() throws Exception {
+    MuteConfig expectedResponse =
+        MuteConfig.newBuilder()
+            .setName(
+                MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]")
+                    .toString())
+            .setDisplayName("displayName1714148973")
+            .setDescription("description-1724546052")
+            .setFilter("filter-1274492040")
+            .setCreateTime(Timestamp.newBuilder().build())
+            .setUpdateTime(Timestamp.newBuilder().build())
+            .setMostRecentEditor("mostRecentEditor-833861941")
+            .build();
+    mockSecurityCenter.addResponse(expectedResponse);
+
+    FolderName parent = FolderName.of("[FOLDER]");
+    MuteConfig muteConfig = MuteConfig.newBuilder().build();
+
+    MuteConfig actualResponse = client.createMuteConfig(parent, muteConfig);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockSecurityCenter.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    CreateMuteConfigRequest actualRequest = ((CreateMuteConfigRequest) actualRequests.get(0));
+
+    Assert.assertEquals(parent.toString(), actualRequest.getParent());
+    Assert.assertEquals(muteConfig, actualRequest.getMuteConfig());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void createMuteConfigExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockSecurityCenter.addException(exception);
+
+    try {
+      FolderName parent = FolderName.of("[FOLDER]");
+      MuteConfig muteConfig = MuteConfig.newBuilder().build();
+      client.createMuteConfig(parent, muteConfig);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
+  @Test
+  public void createMuteConfigTest2() throws Exception {
+    MuteConfig expectedResponse =
+        MuteConfig.newBuilder()
+            .setName(
+                MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]")
+                    .toString())
+            .setDisplayName("displayName1714148973")
+            .setDescription("description-1724546052")
+            .setFilter("filter-1274492040")
+            .setCreateTime(Timestamp.newBuilder().build())
+            .setUpdateTime(Timestamp.newBuilder().build())
+            .setMostRecentEditor("mostRecentEditor-833861941")
+            .build();
+    mockSecurityCenter.addResponse(expectedResponse);
+
+    OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+    MuteConfig muteConfig = MuteConfig.newBuilder().build();
+
+    MuteConfig actualResponse = client.createMuteConfig(parent, muteConfig);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockSecurityCenter.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    CreateMuteConfigRequest actualRequest = ((CreateMuteConfigRequest) actualRequests.get(0));
+
+    Assert.assertEquals(parent.toString(), actualRequest.getParent());
+    Assert.assertEquals(muteConfig, actualRequest.getMuteConfig());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void createMuteConfigExceptionTest2() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockSecurityCenter.addException(exception);
+
+    try {
+      OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+      MuteConfig muteConfig = MuteConfig.newBuilder().build();
+      client.createMuteConfig(parent, muteConfig);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
+  @Test
+  public void createMuteConfigTest3() throws Exception {
+    MuteConfig expectedResponse =
+        MuteConfig.newBuilder()
+            .setName(
+                MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]")
+                    .toString())
+            .setDisplayName("displayName1714148973")
+            .setDescription("description-1724546052")
+            .setFilter("filter-1274492040")
+            .setCreateTime(Timestamp.newBuilder().build())
+            .setUpdateTime(Timestamp.newBuilder().build())
+            .setMostRecentEditor("mostRecentEditor-833861941")
+            .build();
+    mockSecurityCenter.addResponse(expectedResponse);
+
+    ProjectName parent = ProjectName.of("[PROJECT]");
+    MuteConfig muteConfig = MuteConfig.newBuilder().build();
+
+    MuteConfig actualResponse = client.createMuteConfig(parent, muteConfig);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockSecurityCenter.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    CreateMuteConfigRequest actualRequest = ((CreateMuteConfigRequest) actualRequests.get(0));
+
+    Assert.assertEquals(parent.toString(), actualRequest.getParent());
+    Assert.assertEquals(muteConfig, actualRequest.getMuteConfig());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void createMuteConfigExceptionTest3() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockSecurityCenter.addException(exception);
+
+    try {
+      ProjectName parent = ProjectName.of("[PROJECT]");
+      MuteConfig muteConfig = MuteConfig.newBuilder().build();
+      client.createMuteConfig(parent, muteConfig);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
+  @Test
+  public void createMuteConfigTest4() throws Exception {
+    MuteConfig expectedResponse =
+        MuteConfig.newBuilder()
+            .setName(
+                MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]")
+                    .toString())
+            .setDisplayName("displayName1714148973")
+            .setDescription("description-1724546052")
+            .setFilter("filter-1274492040")
+            .setCreateTime(Timestamp.newBuilder().build())
+            .setUpdateTime(Timestamp.newBuilder().build())
+            .setMostRecentEditor("mostRecentEditor-833861941")
+            .build();
+    mockSecurityCenter.addResponse(expectedResponse);
+
+    String parent = "parent-995424086";
+    MuteConfig muteConfig = MuteConfig.newBuilder().build();
+
+    MuteConfig actualResponse = client.createMuteConfig(parent, muteConfig);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockSecurityCenter.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    CreateMuteConfigRequest actualRequest = ((CreateMuteConfigRequest) actualRequests.get(0));
+
+    Assert.assertEquals(parent, actualRequest.getParent());
+    Assert.assertEquals(muteConfig, actualRequest.getMuteConfig());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void createMuteConfigExceptionTest4() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockSecurityCenter.addException(exception);
+
+    try {
+      String parent = "parent-995424086";
+      MuteConfig muteConfig = MuteConfig.newBuilder().build();
+      client.createMuteConfig(parent, muteConfig);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
+  @Test
+  public void createMuteConfigTest5() throws Exception {
+    MuteConfig expectedResponse =
+        MuteConfig.newBuilder()
+            .setName(
+                MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]")
+                    .toString())
+            .setDisplayName("displayName1714148973")
+            .setDescription("description-1724546052")
+            .setFilter("filter-1274492040")
+            .setCreateTime(Timestamp.newBuilder().build())
+            .setUpdateTime(Timestamp.newBuilder().build())
+            .setMostRecentEditor("mostRecentEditor-833861941")
+            .build();
+    mockSecurityCenter.addResponse(expectedResponse);
+
+    FolderName parent = FolderName.of("[FOLDER]");
+    MuteConfig muteConfig = MuteConfig.newBuilder().build();
+    String muteConfigId = "muteConfigId1689669942";
+
+    MuteConfig actualResponse = client.createMuteConfig(parent, muteConfig, muteConfigId);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockSecurityCenter.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    CreateMuteConfigRequest actualRequest = ((CreateMuteConfigRequest) actualRequests.get(0));
+
+    Assert.assertEquals(parent.toString(), actualRequest.getParent());
+    Assert.assertEquals(muteConfig, actualRequest.getMuteConfig());
+    Assert.assertEquals(muteConfigId, actualRequest.getMuteConfigId());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void createMuteConfigExceptionTest5() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockSecurityCenter.addException(exception);
+
+    try {
+      FolderName parent = FolderName.of("[FOLDER]");
+      MuteConfig muteConfig = MuteConfig.newBuilder().build();
+      String muteConfigId = "muteConfigId1689669942";
+      client.createMuteConfig(parent, muteConfig, muteConfigId);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
+  @Test
+  public void createMuteConfigTest6() throws Exception {
+    MuteConfig expectedResponse =
+        MuteConfig.newBuilder()
+            .setName(
+                MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]")
+                    .toString())
+            .setDisplayName("displayName1714148973")
+            .setDescription("description-1724546052")
+            .setFilter("filter-1274492040")
+            .setCreateTime(Timestamp.newBuilder().build())
+            .setUpdateTime(Timestamp.newBuilder().build())
+            .setMostRecentEditor("mostRecentEditor-833861941")
+            .build();
+    mockSecurityCenter.addResponse(expectedResponse);
+
+    OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+    MuteConfig muteConfig = MuteConfig.newBuilder().build();
+    String muteConfigId = "muteConfigId1689669942";
+
+    MuteConfig actualResponse = client.createMuteConfig(parent, muteConfig, muteConfigId);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockSecurityCenter.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    CreateMuteConfigRequest actualRequest = ((CreateMuteConfigRequest) actualRequests.get(0));
+
+    Assert.assertEquals(parent.toString(), actualRequest.getParent());
+    Assert.assertEquals(muteConfig, actualRequest.getMuteConfig());
+    Assert.assertEquals(muteConfigId, actualRequest.getMuteConfigId());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void createMuteConfigExceptionTest6() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockSecurityCenter.addException(exception);
+
+    try {
+      OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+      MuteConfig muteConfig = MuteConfig.newBuilder().build();
+      String muteConfigId = "muteConfigId1689669942";
+      client.createMuteConfig(parent, muteConfig, muteConfigId);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
+  @Test
+  public void createMuteConfigTest7() throws Exception {
+    MuteConfig expectedResponse =
+        MuteConfig.newBuilder()
+            .setName(
+                MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]")
+                    .toString())
+            .setDisplayName("displayName1714148973")
+            .setDescription("description-1724546052")
+            .setFilter("filter-1274492040")
+            .setCreateTime(Timestamp.newBuilder().build())
+            .setUpdateTime(Timestamp.newBuilder().build())
+            .setMostRecentEditor("mostRecentEditor-833861941")
+            .build();
+    mockSecurityCenter.addResponse(expectedResponse);
+
+    ProjectName parent = ProjectName.of("[PROJECT]");
+    MuteConfig muteConfig = MuteConfig.newBuilder().build();
+    String muteConfigId = "muteConfigId1689669942";
+
+    MuteConfig actualResponse = client.createMuteConfig(parent, muteConfig, muteConfigId);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockSecurityCenter.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    CreateMuteConfigRequest actualRequest = ((CreateMuteConfigRequest) actualRequests.get(0));
+
+    Assert.assertEquals(parent.toString(), actualRequest.getParent());
+    Assert.assertEquals(muteConfig, actualRequest.getMuteConfig());
+    Assert.assertEquals(muteConfigId, actualRequest.getMuteConfigId());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void createMuteConfigExceptionTest7() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockSecurityCenter.addException(exception);
+
+    try {
+      ProjectName parent = ProjectName.of("[PROJECT]");
+      MuteConfig muteConfig = MuteConfig.newBuilder().build();
+      String muteConfigId = "muteConfigId1689669942";
+      client.createMuteConfig(parent, muteConfig, muteConfigId);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
+  @Test
+  public void createMuteConfigTest8() throws Exception {
+    MuteConfig expectedResponse =
+        MuteConfig.newBuilder()
+            .setName(
+                MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]")
+                    .toString())
+            .setDisplayName("displayName1714148973")
+            .setDescription("description-1724546052")
+            .setFilter("filter-1274492040")
+            .setCreateTime(Timestamp.newBuilder().build())
+            .setUpdateTime(Timestamp.newBuilder().build())
+            .setMostRecentEditor("mostRecentEditor-833861941")
+            .build();
+    mockSecurityCenter.addResponse(expectedResponse);
+
+    String parent = "parent-995424086";
+    MuteConfig muteConfig = MuteConfig.newBuilder().build();
+    String muteConfigId = "muteConfigId1689669942";
+
+    MuteConfig actualResponse = client.createMuteConfig(parent, muteConfig, muteConfigId);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockSecurityCenter.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    CreateMuteConfigRequest actualRequest = ((CreateMuteConfigRequest) actualRequests.get(0));
+
+    Assert.assertEquals(parent, actualRequest.getParent());
+    Assert.assertEquals(muteConfig, actualRequest.getMuteConfig());
+    Assert.assertEquals(muteConfigId, actualRequest.getMuteConfigId());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void createMuteConfigExceptionTest8() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockSecurityCenter.addException(exception);
+
+    try {
+      String parent = "parent-995424086";
+      MuteConfig muteConfig = MuteConfig.newBuilder().build();
+      String muteConfigId = "muteConfigId1689669942";
+      client.createMuteConfig(parent, muteConfig, muteConfigId);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
   @Test
   public void createNotificationConfigTest() throws Exception {
     NotificationConfig expectedResponse =
@@ -498,6 +995,76 @@ public void createNotificationConfigExceptionTest4() throws Exception {
     }
   }
 
+  @Test
+  public void deleteMuteConfigTest() throws Exception {
+    Empty expectedResponse = Empty.newBuilder().build();
+    mockSecurityCenter.addResponse(expectedResponse);
+
+    MuteConfigName name =
+        MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]");
+
+    client.deleteMuteConfig(name);
+
+    List actualRequests = mockSecurityCenter.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    DeleteMuteConfigRequest actualRequest = ((DeleteMuteConfigRequest) actualRequests.get(0));
+
+    Assert.assertEquals(name.toString(), actualRequest.getName());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void deleteMuteConfigExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockSecurityCenter.addException(exception);
+
+    try {
+      MuteConfigName name =
+          MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]");
+      client.deleteMuteConfig(name);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
+  @Test
+  public void deleteMuteConfigTest2() throws Exception {
+    Empty expectedResponse = Empty.newBuilder().build();
+    mockSecurityCenter.addResponse(expectedResponse);
+
+    String name = "name3373707";
+
+    client.deleteMuteConfig(name);
+
+    List actualRequests = mockSecurityCenter.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    DeleteMuteConfigRequest actualRequest = ((DeleteMuteConfigRequest) actualRequests.get(0));
+
+    Assert.assertEquals(name, actualRequest.getName());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void deleteMuteConfigExceptionTest2() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockSecurityCenter.addException(exception);
+
+    try {
+      String name = "name3373707";
+      client.deleteMuteConfig(name);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
   @Test
   public void deleteNotificationConfigTest() throws Exception {
     Empty expectedResponse = Empty.newBuilder().build();
@@ -557,13 +1124,93 @@ public void deleteNotificationConfigTest2() throws Exception {
   }
 
   @Test
-  public void deleteNotificationConfigExceptionTest2() throws Exception {
+  public void deleteNotificationConfigExceptionTest2() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockSecurityCenter.addException(exception);
+
+    try {
+      String name = "name3373707";
+      client.deleteNotificationConfig(name);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
+  @Test
+  public void getIamPolicyTest() throws Exception {
+    Policy expectedResponse =
+        Policy.newBuilder()
+            .setVersion(351608024)
+            .addAllBindings(new ArrayList())
+            .setEtag(ByteString.EMPTY)
+            .build();
+    mockSecurityCenter.addResponse(expectedResponse);
+
+    ResourceName resource = FolderName.of("[FOLDER]");
+
+    Policy actualResponse = client.getIamPolicy(resource);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockSecurityCenter.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0));
+
+    Assert.assertEquals(resource.toString(), actualRequest.getResource());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void getIamPolicyExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockSecurityCenter.addException(exception);
+
+    try {
+      ResourceName resource = FolderName.of("[FOLDER]");
+      client.getIamPolicy(resource);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
+  @Test
+  public void getIamPolicyTest2() throws Exception {
+    Policy expectedResponse =
+        Policy.newBuilder()
+            .setVersion(351608024)
+            .addAllBindings(new ArrayList())
+            .setEtag(ByteString.EMPTY)
+            .build();
+    mockSecurityCenter.addResponse(expectedResponse);
+
+    String resource = "resource-341064690";
+
+    Policy actualResponse = client.getIamPolicy(resource);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockSecurityCenter.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0));
+
+    Assert.assertEquals(resource, actualRequest.getResource());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void getIamPolicyExceptionTest2() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
     mockSecurityCenter.addException(exception);
 
     try {
-      String name = "name3373707";
-      client.deleteNotificationConfig(name);
+      String resource = "resource-341064690";
+      client.getIamPolicy(resource);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception.
@@ -571,25 +1218,32 @@ public void deleteNotificationConfigExceptionTest2() throws Exception {
   }
 
   @Test
-  public void getIamPolicyTest() throws Exception {
-    Policy expectedResponse =
-        Policy.newBuilder()
-            .setVersion(351608024)
-            .addAllBindings(new ArrayList())
-            .setEtag(ByteString.EMPTY)
+  public void getMuteConfigTest() throws Exception {
+    MuteConfig expectedResponse =
+        MuteConfig.newBuilder()
+            .setName(
+                MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]")
+                    .toString())
+            .setDisplayName("displayName1714148973")
+            .setDescription("description-1724546052")
+            .setFilter("filter-1274492040")
+            .setCreateTime(Timestamp.newBuilder().build())
+            .setUpdateTime(Timestamp.newBuilder().build())
+            .setMostRecentEditor("mostRecentEditor-833861941")
             .build();
     mockSecurityCenter.addResponse(expectedResponse);
 
-    ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]");
+    MuteConfigName name =
+        MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]");
 
-    Policy actualResponse = client.getIamPolicy(resource);
+    MuteConfig actualResponse = client.getMuteConfig(name);
     Assert.assertEquals(expectedResponse, actualResponse);
 
     List actualRequests = mockSecurityCenter.getRequests();
     Assert.assertEquals(1, actualRequests.size());
-    GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0));
+    GetMuteConfigRequest actualRequest = ((GetMuteConfigRequest) actualRequests.get(0));
 
-    Assert.assertEquals(resource.toString(), actualRequest.getResource());
+    Assert.assertEquals(name.toString(), actualRequest.getName());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -597,13 +1251,14 @@ public void getIamPolicyTest() throws Exception {
   }
 
   @Test
-  public void getIamPolicyExceptionTest() throws Exception {
+  public void getMuteConfigExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
     mockSecurityCenter.addException(exception);
 
     try {
-      ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]");
-      client.getIamPolicy(resource);
+      MuteConfigName name =
+          MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]");
+      client.getMuteConfig(name);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception.
@@ -611,25 +1266,31 @@ public void getIamPolicyExceptionTest() throws Exception {
   }
 
   @Test
-  public void getIamPolicyTest2() throws Exception {
-    Policy expectedResponse =
-        Policy.newBuilder()
-            .setVersion(351608024)
-            .addAllBindings(new ArrayList())
-            .setEtag(ByteString.EMPTY)
+  public void getMuteConfigTest2() throws Exception {
+    MuteConfig expectedResponse =
+        MuteConfig.newBuilder()
+            .setName(
+                MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]")
+                    .toString())
+            .setDisplayName("displayName1714148973")
+            .setDescription("description-1724546052")
+            .setFilter("filter-1274492040")
+            .setCreateTime(Timestamp.newBuilder().build())
+            .setUpdateTime(Timestamp.newBuilder().build())
+            .setMostRecentEditor("mostRecentEditor-833861941")
             .build();
     mockSecurityCenter.addResponse(expectedResponse);
 
-    String resource = "resource-341064690";
+    String name = "name3373707";
 
-    Policy actualResponse = client.getIamPolicy(resource);
+    MuteConfig actualResponse = client.getMuteConfig(name);
     Assert.assertEquals(expectedResponse, actualResponse);
 
     List actualRequests = mockSecurityCenter.getRequests();
     Assert.assertEquals(1, actualRequests.size());
-    GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0));
+    GetMuteConfigRequest actualRequest = ((GetMuteConfigRequest) actualRequests.get(0));
 
-    Assert.assertEquals(resource, actualRequest.getResource());
+    Assert.assertEquals(name, actualRequest.getName());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -637,13 +1298,13 @@ public void getIamPolicyTest2() throws Exception {
   }
 
   @Test
-  public void getIamPolicyExceptionTest2() throws Exception {
+  public void getMuteConfigExceptionTest2() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
     mockSecurityCenter.addException(exception);
 
     try {
-      String resource = "resource-341064690";
-      client.getIamPolicy(resource);
+      String name = "name3373707";
+      client.getMuteConfig(name);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception.
@@ -914,7 +1575,7 @@ public void groupAssetsTest() throws Exception {
 
     GroupAssetsRequest request =
         GroupAssetsRequest.newBuilder()
-            .setParent(AssetName.ofOrganizationAssetName("[ORGANIZATION]", "[ASSET]").toString())
+            .setParent(OrganizationName.of("[ORGANIZATION]").toString())
             .setFilter("filter-1274492040")
             .setGroupBy("groupBy293428022")
             .setCompareDuration(Duration.newBuilder().build())
@@ -955,7 +1616,7 @@ public void groupAssetsExceptionTest() throws Exception {
     try {
       GroupAssetsRequest request =
           GroupAssetsRequest.newBuilder()
-              .setParent(AssetName.ofOrganizationAssetName("[ORGANIZATION]", "[ASSET]").toString())
+              .setParent(OrganizationName.of("[ORGANIZATION]").toString())
               .setFilter("filter-1274492040")
               .setGroupBy("groupBy293428022")
               .setCompareDuration(Duration.newBuilder().build())
@@ -1065,48 +1726,264 @@ public void groupFindingsExceptionTest2() throws Exception {
   }
 
   @Test
-  public void listAssetsTest() throws Exception {
-    ListAssetsResponse.ListAssetsResult responsesElement =
-        ListAssetsResponse.ListAssetsResult.newBuilder().build();
-    ListAssetsResponse expectedResponse =
-        ListAssetsResponse.newBuilder()
+  public void listAssetsTest() throws Exception {
+    ListAssetsResponse.ListAssetsResult responsesElement =
+        ListAssetsResponse.ListAssetsResult.newBuilder().build();
+    ListAssetsResponse expectedResponse =
+        ListAssetsResponse.newBuilder()
+            .setNextPageToken("")
+            .addAllListAssetsResults(Arrays.asList(responsesElement))
+            .build();
+    mockSecurityCenter.addResponse(expectedResponse);
+
+    ListAssetsRequest request =
+        ListAssetsRequest.newBuilder()
+            .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+            .setFilter("filter-1274492040")
+            .setOrderBy("orderBy-1207110587")
+            .setReadTime(Timestamp.newBuilder().build())
+            .setCompareDuration(Duration.newBuilder().build())
+            .setFieldMask(FieldMask.newBuilder().build())
+            .setPageToken("pageToken873572522")
+            .setPageSize(883849137)
+            .build();
+
+    ListAssetsPagedResponse pagedListResponse = client.listAssets(request);
+
+    List resources =
+        Lists.newArrayList(pagedListResponse.iterateAll());
+
+    Assert.assertEquals(1, resources.size());
+    Assert.assertEquals(expectedResponse.getListAssetsResultsList().get(0), resources.get(0));
+
+    List actualRequests = mockSecurityCenter.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    ListAssetsRequest actualRequest = ((ListAssetsRequest) actualRequests.get(0));
+
+    Assert.assertEquals(request.getParent(), actualRequest.getParent());
+    Assert.assertEquals(request.getFilter(), actualRequest.getFilter());
+    Assert.assertEquals(request.getOrderBy(), actualRequest.getOrderBy());
+    Assert.assertEquals(request.getReadTime(), actualRequest.getReadTime());
+    Assert.assertEquals(request.getCompareDuration(), actualRequest.getCompareDuration());
+    Assert.assertEquals(request.getFieldMask(), actualRequest.getFieldMask());
+    Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken());
+    Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void listAssetsExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockSecurityCenter.addException(exception);
+
+    try {
+      ListAssetsRequest request =
+          ListAssetsRequest.newBuilder()
+              .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+              .setFilter("filter-1274492040")
+              .setOrderBy("orderBy-1207110587")
+              .setReadTime(Timestamp.newBuilder().build())
+              .setCompareDuration(Duration.newBuilder().build())
+              .setFieldMask(FieldMask.newBuilder().build())
+              .setPageToken("pageToken873572522")
+              .setPageSize(883849137)
+              .build();
+      client.listAssets(request);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
+  @Test
+  public void listFindingsTest() throws Exception {
+    ListFindingsResponse.ListFindingsResult responsesElement =
+        ListFindingsResponse.ListFindingsResult.newBuilder().build();
+    ListFindingsResponse expectedResponse =
+        ListFindingsResponse.newBuilder()
+            .setNextPageToken("")
+            .addAllListFindingsResults(Arrays.asList(responsesElement))
+            .build();
+    mockSecurityCenter.addResponse(expectedResponse);
+
+    ListFindingsRequest request =
+        ListFindingsRequest.newBuilder()
+            .setParent(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
+            .setFilter("filter-1274492040")
+            .setOrderBy("orderBy-1207110587")
+            .setReadTime(Timestamp.newBuilder().build())
+            .setCompareDuration(Duration.newBuilder().build())
+            .setFieldMask(FieldMask.newBuilder().build())
+            .setPageToken("pageToken873572522")
+            .setPageSize(883849137)
+            .build();
+
+    ListFindingsPagedResponse pagedListResponse = client.listFindings(request);
+
+    List resources =
+        Lists.newArrayList(pagedListResponse.iterateAll());
+
+    Assert.assertEquals(1, resources.size());
+    Assert.assertEquals(expectedResponse.getListFindingsResultsList().get(0), resources.get(0));
+
+    List actualRequests = mockSecurityCenter.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    ListFindingsRequest actualRequest = ((ListFindingsRequest) actualRequests.get(0));
+
+    Assert.assertEquals(request.getParent(), actualRequest.getParent());
+    Assert.assertEquals(request.getFilter(), actualRequest.getFilter());
+    Assert.assertEquals(request.getOrderBy(), actualRequest.getOrderBy());
+    Assert.assertEquals(request.getReadTime(), actualRequest.getReadTime());
+    Assert.assertEquals(request.getCompareDuration(), actualRequest.getCompareDuration());
+    Assert.assertEquals(request.getFieldMask(), actualRequest.getFieldMask());
+    Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken());
+    Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void listFindingsExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockSecurityCenter.addException(exception);
+
+    try {
+      ListFindingsRequest request =
+          ListFindingsRequest.newBuilder()
+              .setParent(
+                  SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
+              .setFilter("filter-1274492040")
+              .setOrderBy("orderBy-1207110587")
+              .setReadTime(Timestamp.newBuilder().build())
+              .setCompareDuration(Duration.newBuilder().build())
+              .setFieldMask(FieldMask.newBuilder().build())
+              .setPageToken("pageToken873572522")
+              .setPageSize(883849137)
+              .build();
+      client.listFindings(request);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
+  @Test
+  public void listMuteConfigsTest() throws Exception {
+    MuteConfig responsesElement = MuteConfig.newBuilder().build();
+    ListMuteConfigsResponse expectedResponse =
+        ListMuteConfigsResponse.newBuilder()
+            .setNextPageToken("")
+            .addAllMuteConfigs(Arrays.asList(responsesElement))
+            .build();
+    mockSecurityCenter.addResponse(expectedResponse);
+
+    FolderName parent = FolderName.of("[FOLDER]");
+
+    ListMuteConfigsPagedResponse pagedListResponse = client.listMuteConfigs(parent);
+
+    List resources = Lists.newArrayList(pagedListResponse.iterateAll());
+
+    Assert.assertEquals(1, resources.size());
+    Assert.assertEquals(expectedResponse.getMuteConfigsList().get(0), resources.get(0));
+
+    List actualRequests = mockSecurityCenter.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    ListMuteConfigsRequest actualRequest = ((ListMuteConfigsRequest) actualRequests.get(0));
+
+    Assert.assertEquals(parent.toString(), actualRequest.getParent());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void listMuteConfigsExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockSecurityCenter.addException(exception);
+
+    try {
+      FolderName parent = FolderName.of("[FOLDER]");
+      client.listMuteConfigs(parent);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
+  @Test
+  public void listMuteConfigsTest2() throws Exception {
+    MuteConfig responsesElement = MuteConfig.newBuilder().build();
+    ListMuteConfigsResponse expectedResponse =
+        ListMuteConfigsResponse.newBuilder()
+            .setNextPageToken("")
+            .addAllMuteConfigs(Arrays.asList(responsesElement))
+            .build();
+    mockSecurityCenter.addResponse(expectedResponse);
+
+    OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+
+    ListMuteConfigsPagedResponse pagedListResponse = client.listMuteConfigs(parent);
+
+    List resources = Lists.newArrayList(pagedListResponse.iterateAll());
+
+    Assert.assertEquals(1, resources.size());
+    Assert.assertEquals(expectedResponse.getMuteConfigsList().get(0), resources.get(0));
+
+    List actualRequests = mockSecurityCenter.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    ListMuteConfigsRequest actualRequest = ((ListMuteConfigsRequest) actualRequests.get(0));
+
+    Assert.assertEquals(parent.toString(), actualRequest.getParent());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void listMuteConfigsExceptionTest2() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockSecurityCenter.addException(exception);
+
+    try {
+      OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+      client.listMuteConfigs(parent);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
+  @Test
+  public void listMuteConfigsTest3() throws Exception {
+    MuteConfig responsesElement = MuteConfig.newBuilder().build();
+    ListMuteConfigsResponse expectedResponse =
+        ListMuteConfigsResponse.newBuilder()
             .setNextPageToken("")
-            .addAllListAssetsResults(Arrays.asList(responsesElement))
+            .addAllMuteConfigs(Arrays.asList(responsesElement))
             .build();
     mockSecurityCenter.addResponse(expectedResponse);
 
-    ListAssetsRequest request =
-        ListAssetsRequest.newBuilder()
-            .setParent(AssetName.ofOrganizationAssetName("[ORGANIZATION]", "[ASSET]").toString())
-            .setFilter("filter-1274492040")
-            .setOrderBy("orderBy-1207110587")
-            .setReadTime(Timestamp.newBuilder().build())
-            .setCompareDuration(Duration.newBuilder().build())
-            .setFieldMask(FieldMask.newBuilder().build())
-            .setPageToken("pageToken873572522")
-            .setPageSize(883849137)
-            .build();
+    ProjectName parent = ProjectName.of("[PROJECT]");
 
-    ListAssetsPagedResponse pagedListResponse = client.listAssets(request);
+    ListMuteConfigsPagedResponse pagedListResponse = client.listMuteConfigs(parent);
 
-    List resources =
-        Lists.newArrayList(pagedListResponse.iterateAll());
+    List resources = Lists.newArrayList(pagedListResponse.iterateAll());
 
     Assert.assertEquals(1, resources.size());
-    Assert.assertEquals(expectedResponse.getListAssetsResultsList().get(0), resources.get(0));
+    Assert.assertEquals(expectedResponse.getMuteConfigsList().get(0), resources.get(0));
 
     List actualRequests = mockSecurityCenter.getRequests();
     Assert.assertEquals(1, actualRequests.size());
-    ListAssetsRequest actualRequest = ((ListAssetsRequest) actualRequests.get(0));
+    ListMuteConfigsRequest actualRequest = ((ListMuteConfigsRequest) actualRequests.get(0));
 
-    Assert.assertEquals(request.getParent(), actualRequest.getParent());
-    Assert.assertEquals(request.getFilter(), actualRequest.getFilter());
-    Assert.assertEquals(request.getOrderBy(), actualRequest.getOrderBy());
-    Assert.assertEquals(request.getReadTime(), actualRequest.getReadTime());
-    Assert.assertEquals(request.getCompareDuration(), actualRequest.getCompareDuration());
-    Assert.assertEquals(request.getFieldMask(), actualRequest.getFieldMask());
-    Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken());
-    Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize());
+    Assert.assertEquals(parent.toString(), actualRequest.getParent());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -1114,23 +1991,13 @@ public void listAssetsTest() throws Exception {
   }
 
   @Test
-  public void listAssetsExceptionTest() throws Exception {
+  public void listMuteConfigsExceptionTest3() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
     mockSecurityCenter.addException(exception);
 
     try {
-      ListAssetsRequest request =
-          ListAssetsRequest.newBuilder()
-              .setParent(AssetName.ofOrganizationAssetName("[ORGANIZATION]", "[ASSET]").toString())
-              .setFilter("filter-1274492040")
-              .setOrderBy("orderBy-1207110587")
-              .setReadTime(Timestamp.newBuilder().build())
-              .setCompareDuration(Duration.newBuilder().build())
-              .setFieldMask(FieldMask.newBuilder().build())
-              .setPageToken("pageToken873572522")
-              .setPageSize(883849137)
-              .build();
-      client.listAssets(request);
+      ProjectName parent = ProjectName.of("[PROJECT]");
+      client.listMuteConfigs(parent);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception.
@@ -1138,48 +2005,29 @@ public void listAssetsExceptionTest() throws Exception {
   }
 
   @Test
-  public void listFindingsTest() throws Exception {
-    ListFindingsResponse.ListFindingsResult responsesElement =
-        ListFindingsResponse.ListFindingsResult.newBuilder().build();
-    ListFindingsResponse expectedResponse =
-        ListFindingsResponse.newBuilder()
+  public void listMuteConfigsTest4() throws Exception {
+    MuteConfig responsesElement = MuteConfig.newBuilder().build();
+    ListMuteConfigsResponse expectedResponse =
+        ListMuteConfigsResponse.newBuilder()
             .setNextPageToken("")
-            .addAllListFindingsResults(Arrays.asList(responsesElement))
+            .addAllMuteConfigs(Arrays.asList(responsesElement))
             .build();
     mockSecurityCenter.addResponse(expectedResponse);
 
-    ListFindingsRequest request =
-        ListFindingsRequest.newBuilder()
-            .setParent(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
-            .setFilter("filter-1274492040")
-            .setOrderBy("orderBy-1207110587")
-            .setReadTime(Timestamp.newBuilder().build())
-            .setCompareDuration(Duration.newBuilder().build())
-            .setFieldMask(FieldMask.newBuilder().build())
-            .setPageToken("pageToken873572522")
-            .setPageSize(883849137)
-            .build();
+    String parent = "parent-995424086";
 
-    ListFindingsPagedResponse pagedListResponse = client.listFindings(request);
+    ListMuteConfigsPagedResponse pagedListResponse = client.listMuteConfigs(parent);
 
-    List resources =
-        Lists.newArrayList(pagedListResponse.iterateAll());
+    List resources = Lists.newArrayList(pagedListResponse.iterateAll());
 
     Assert.assertEquals(1, resources.size());
-    Assert.assertEquals(expectedResponse.getListFindingsResultsList().get(0), resources.get(0));
+    Assert.assertEquals(expectedResponse.getMuteConfigsList().get(0), resources.get(0));
 
     List actualRequests = mockSecurityCenter.getRequests();
     Assert.assertEquals(1, actualRequests.size());
-    ListFindingsRequest actualRequest = ((ListFindingsRequest) actualRequests.get(0));
+    ListMuteConfigsRequest actualRequest = ((ListMuteConfigsRequest) actualRequests.get(0));
 
-    Assert.assertEquals(request.getParent(), actualRequest.getParent());
-    Assert.assertEquals(request.getFilter(), actualRequest.getFilter());
-    Assert.assertEquals(request.getOrderBy(), actualRequest.getOrderBy());
-    Assert.assertEquals(request.getReadTime(), actualRequest.getReadTime());
-    Assert.assertEquals(request.getCompareDuration(), actualRequest.getCompareDuration());
-    Assert.assertEquals(request.getFieldMask(), actualRequest.getFieldMask());
-    Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken());
-    Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize());
+    Assert.assertEquals(parent, actualRequest.getParent());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -1187,24 +2035,13 @@ public void listFindingsTest() throws Exception {
   }
 
   @Test
-  public void listFindingsExceptionTest() throws Exception {
+  public void listMuteConfigsExceptionTest4() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
     mockSecurityCenter.addException(exception);
 
     try {
-      ListFindingsRequest request =
-          ListFindingsRequest.newBuilder()
-              .setParent(
-                  SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
-              .setFilter("filter-1274492040")
-              .setOrderBy("orderBy-1207110587")
-              .setReadTime(Timestamp.newBuilder().build())
-              .setCompareDuration(Duration.newBuilder().build())
-              .setFieldMask(FieldMask.newBuilder().build())
-              .setPageToken("pageToken873572522")
-              .setPageSize(883849137)
-              .build();
-      client.listFindings(request);
+      String parent = "parent-995424086";
+      client.listMuteConfigs(parent);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception.
@@ -1584,6 +2421,9 @@ public void setFindingStateTest() throws Exception {
             .setCanonicalName("canonicalName2122381727")
             .setIndicator(Indicator.newBuilder().build())
             .setVulnerability(Vulnerability.newBuilder().build())
+            .setMuteUpdateTime(Timestamp.newBuilder().build())
+            .putAllExternalSystems(new HashMap())
+            .setMuteInitiator("muteInitiator1395645462")
             .build();
     mockSecurityCenter.addResponse(expectedResponse);
 
@@ -1644,6 +2484,9 @@ public void setFindingStateTest2() throws Exception {
             .setCanonicalName("canonicalName2122381727")
             .setIndicator(Indicator.newBuilder().build())
             .setVulnerability(Vulnerability.newBuilder().build())
+            .setMuteUpdateTime(Timestamp.newBuilder().build())
+            .putAllExternalSystems(new HashMap())
+            .setMuteInitiator("muteInitiator1395645462")
             .build();
     mockSecurityCenter.addResponse(expectedResponse);
 
@@ -1683,6 +2526,124 @@ public void setFindingStateExceptionTest2() throws Exception {
     }
   }
 
+  @Test
+  public void setMuteTest() throws Exception {
+    Finding expectedResponse =
+        Finding.newBuilder()
+            .setName(
+                FindingName.ofOrganizationSourceFindingName(
+                        "[ORGANIZATION]", "[SOURCE]", "[FINDING]")
+                    .toString())
+            .setParent("parent-995424086")
+            .setResourceName("resourceName-384566343")
+            .setCategory("category50511102")
+            .setExternalUri("externalUri-1153085023")
+            .putAllSourceProperties(new HashMap())
+            .setSecurityMarks(SecurityMarks.newBuilder().build())
+            .setEventTime(Timestamp.newBuilder().build())
+            .setCreateTime(Timestamp.newBuilder().build())
+            .setCanonicalName("canonicalName2122381727")
+            .setIndicator(Indicator.newBuilder().build())
+            .setVulnerability(Vulnerability.newBuilder().build())
+            .setMuteUpdateTime(Timestamp.newBuilder().build())
+            .putAllExternalSystems(new HashMap())
+            .setMuteInitiator("muteInitiator1395645462")
+            .build();
+    mockSecurityCenter.addResponse(expectedResponse);
+
+    FindingName name =
+        FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]", "[SOURCE]", "[FINDING]");
+    Finding.Mute mute = Finding.Mute.forNumber(0);
+
+    Finding actualResponse = client.setMute(name, mute);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockSecurityCenter.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    SetMuteRequest actualRequest = ((SetMuteRequest) actualRequests.get(0));
+
+    Assert.assertEquals(name.toString(), actualRequest.getName());
+    Assert.assertEquals(mute, actualRequest.getMute());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void setMuteExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockSecurityCenter.addException(exception);
+
+    try {
+      FindingName name =
+          FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]", "[SOURCE]", "[FINDING]");
+      Finding.Mute mute = Finding.Mute.forNumber(0);
+      client.setMute(name, mute);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
+  @Test
+  public void setMuteTest2() throws Exception {
+    Finding expectedResponse =
+        Finding.newBuilder()
+            .setName(
+                FindingName.ofOrganizationSourceFindingName(
+                        "[ORGANIZATION]", "[SOURCE]", "[FINDING]")
+                    .toString())
+            .setParent("parent-995424086")
+            .setResourceName("resourceName-384566343")
+            .setCategory("category50511102")
+            .setExternalUri("externalUri-1153085023")
+            .putAllSourceProperties(new HashMap())
+            .setSecurityMarks(SecurityMarks.newBuilder().build())
+            .setEventTime(Timestamp.newBuilder().build())
+            .setCreateTime(Timestamp.newBuilder().build())
+            .setCanonicalName("canonicalName2122381727")
+            .setIndicator(Indicator.newBuilder().build())
+            .setVulnerability(Vulnerability.newBuilder().build())
+            .setMuteUpdateTime(Timestamp.newBuilder().build())
+            .putAllExternalSystems(new HashMap())
+            .setMuteInitiator("muteInitiator1395645462")
+            .build();
+    mockSecurityCenter.addResponse(expectedResponse);
+
+    String name = "name3373707";
+    Finding.Mute mute = Finding.Mute.forNumber(0);
+
+    Finding actualResponse = client.setMute(name, mute);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockSecurityCenter.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    SetMuteRequest actualRequest = ((SetMuteRequest) actualRequests.get(0));
+
+    Assert.assertEquals(name, actualRequest.getName());
+    Assert.assertEquals(mute, actualRequest.getMute());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void setMuteExceptionTest2() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockSecurityCenter.addException(exception);
+
+    try {
+      String name = "name3373707";
+      Finding.Mute mute = Finding.Mute.forNumber(0);
+      client.setMute(name, mute);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
   @Test
   public void setIamPolicyTest() throws Exception {
     Policy expectedResponse =
@@ -1693,7 +2654,7 @@ public void setIamPolicyTest() throws Exception {
             .build();
     mockSecurityCenter.addResponse(expectedResponse);
 
-    ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]");
+    ResourceName resource = FolderName.of("[FOLDER]");
     Policy policy = Policy.newBuilder().build();
 
     Policy actualResponse = client.setIamPolicy(resource, policy);
@@ -1717,7 +2678,7 @@ public void setIamPolicyExceptionTest() throws Exception {
     mockSecurityCenter.addException(exception);
 
     try {
-      ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]");
+      ResourceName resource = FolderName.of("[FOLDER]");
       Policy policy = Policy.newBuilder().build();
       client.setIamPolicy(resource, policy);
       Assert.fail("No exception raised");
@@ -1775,7 +2736,7 @@ public void testIamPermissionsTest() throws Exception {
         TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build();
     mockSecurityCenter.addResponse(expectedResponse);
 
-    ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]");
+    ResourceName resource = FolderName.of("[FOLDER]");
     List permissions = new ArrayList<>();
 
     TestIamPermissionsResponse actualResponse = client.testIamPermissions(resource, permissions);
@@ -1799,7 +2760,7 @@ public void testIamPermissionsExceptionTest() throws Exception {
     mockSecurityCenter.addException(exception);
 
     try {
-      ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]");
+      ResourceName resource = FolderName.of("[FOLDER]");
       List permissions = new ArrayList<>();
       client.testIamPermissions(resource, permissions);
       Assert.fail("No exception raised");
@@ -1847,6 +2808,52 @@ public void testIamPermissionsExceptionTest2() throws Exception {
     }
   }
 
+  @Test
+  public void updateExternalSystemTest() throws Exception {
+    ExternalSystem expectedResponse =
+        ExternalSystem.newBuilder()
+            .setName("name3373707")
+            .addAllAssignees(new ArrayList())
+            .setExternalUid("externalUid-1153085307")
+            .setStatus("status-892481550")
+            .setExternalSystemUpdateTime(Timestamp.newBuilder().build())
+            .build();
+    mockSecurityCenter.addResponse(expectedResponse);
+
+    ExternalSystem externalSystem = ExternalSystem.newBuilder().build();
+    FieldMask updateMask = FieldMask.newBuilder().build();
+
+    ExternalSystem actualResponse = client.updateExternalSystem(externalSystem, updateMask);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockSecurityCenter.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    UpdateExternalSystemRequest actualRequest =
+        ((UpdateExternalSystemRequest) actualRequests.get(0));
+
+    Assert.assertEquals(externalSystem, actualRequest.getExternalSystem());
+    Assert.assertEquals(updateMask, actualRequest.getUpdateMask());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void updateExternalSystemExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockSecurityCenter.addException(exception);
+
+    try {
+      ExternalSystem externalSystem = ExternalSystem.newBuilder().build();
+      FieldMask updateMask = FieldMask.newBuilder().build();
+      client.updateExternalSystem(externalSystem, updateMask);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
   @Test
   public void updateFindingTest() throws Exception {
     Finding expectedResponse =
@@ -1866,6 +2873,9 @@ public void updateFindingTest() throws Exception {
             .setCanonicalName("canonicalName2122381727")
             .setIndicator(Indicator.newBuilder().build())
             .setVulnerability(Vulnerability.newBuilder().build())
+            .setMuteUpdateTime(Timestamp.newBuilder().build())
+            .putAllExternalSystems(new HashMap())
+            .setMuteInitiator("muteInitiator1395645462")
             .build();
     mockSecurityCenter.addResponse(expectedResponse);
 
@@ -1899,6 +2909,55 @@ public void updateFindingExceptionTest() throws Exception {
     }
   }
 
+  @Test
+  public void updateMuteConfigTest() throws Exception {
+    MuteConfig expectedResponse =
+        MuteConfig.newBuilder()
+            .setName(
+                MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]")
+                    .toString())
+            .setDisplayName("displayName1714148973")
+            .setDescription("description-1724546052")
+            .setFilter("filter-1274492040")
+            .setCreateTime(Timestamp.newBuilder().build())
+            .setUpdateTime(Timestamp.newBuilder().build())
+            .setMostRecentEditor("mostRecentEditor-833861941")
+            .build();
+    mockSecurityCenter.addResponse(expectedResponse);
+
+    MuteConfig muteConfig = MuteConfig.newBuilder().build();
+    FieldMask updateMask = FieldMask.newBuilder().build();
+
+    MuteConfig actualResponse = client.updateMuteConfig(muteConfig, updateMask);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockSecurityCenter.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    UpdateMuteConfigRequest actualRequest = ((UpdateMuteConfigRequest) actualRequests.get(0));
+
+    Assert.assertEquals(muteConfig, actualRequest.getMuteConfig());
+    Assert.assertEquals(updateMask, actualRequest.getUpdateMask());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void updateMuteConfigExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockSecurityCenter.addException(exception);
+
+    try {
+      MuteConfig muteConfig = MuteConfig.newBuilder().build();
+      FieldMask updateMask = FieldMask.newBuilder().build();
+      client.updateMuteConfig(muteConfig, updateMask);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
   @Test
   public void updateNotificationConfigTest() throws Exception {
     NotificationConfig expectedResponse =
diff --git a/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1beta1/SecurityCenterClientTest.java b/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1beta1/SecurityCenterClientTest.java
index 2e3f1d9c8..5dd94f234 100644
--- a/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1beta1/SecurityCenterClientTest.java
+++ b/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1beta1/SecurityCenterClientTest.java
@@ -301,7 +301,7 @@ public void getIamPolicyTest() throws Exception {
             .build();
     mockSecurityCenter.addResponse(expectedResponse);
 
-    ResourceName resource = SourceName.of("[ORGANIZATION]", "[SOURCE]");
+    ResourceName resource = OrganizationName.of("[ORGANIZATION]");
 
     Policy actualResponse = client.getIamPolicy(resource);
     Assert.assertEquals(expectedResponse, actualResponse);
@@ -323,7 +323,7 @@ public void getIamPolicyExceptionTest() throws Exception {
     mockSecurityCenter.addException(exception);
 
     try {
-      ResourceName resource = SourceName.of("[ORGANIZATION]", "[SOURCE]");
+      ResourceName resource = OrganizationName.of("[ORGANIZATION]");
       client.getIamPolicy(resource);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
@@ -1122,7 +1122,7 @@ public void setIamPolicyTest() throws Exception {
             .build();
     mockSecurityCenter.addResponse(expectedResponse);
 
-    ResourceName resource = SourceName.of("[ORGANIZATION]", "[SOURCE]");
+    ResourceName resource = OrganizationName.of("[ORGANIZATION]");
     Policy policy = Policy.newBuilder().build();
 
     Policy actualResponse = client.setIamPolicy(resource, policy);
@@ -1146,7 +1146,7 @@ public void setIamPolicyExceptionTest() throws Exception {
     mockSecurityCenter.addException(exception);
 
     try {
-      ResourceName resource = SourceName.of("[ORGANIZATION]", "[SOURCE]");
+      ResourceName resource = OrganizationName.of("[ORGANIZATION]");
       Policy policy = Policy.newBuilder().build();
       client.setIamPolicy(resource, policy);
       Assert.fail("No exception raised");
@@ -1204,7 +1204,7 @@ public void testIamPermissionsTest() throws Exception {
         TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build();
     mockSecurityCenter.addResponse(expectedResponse);
 
-    ResourceName resource = SourceName.of("[ORGANIZATION]", "[SOURCE]");
+    ResourceName resource = OrganizationName.of("[ORGANIZATION]");
     List permissions = new ArrayList<>();
 
     TestIamPermissionsResponse actualResponse = client.testIamPermissions(resource, permissions);
@@ -1228,7 +1228,7 @@ public void testIamPermissionsExceptionTest() throws Exception {
     mockSecurityCenter.addException(exception);
 
     try {
-      ResourceName resource = SourceName.of("[ORGANIZATION]", "[SOURCE]");
+      ResourceName resource = OrganizationName.of("[ORGANIZATION]");
       List permissions = new ArrayList<>();
       client.testIamPermissions(resource, permissions);
       Assert.fail("No exception raised");
diff --git a/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1p1beta1/SecurityCenterClientTest.java b/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1p1beta1/SecurityCenterClientTest.java
index 3cfba6d00..8e80e6d3a 100644
--- a/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1p1beta1/SecurityCenterClientTest.java
+++ b/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1p1beta1/SecurityCenterClientTest.java
@@ -688,7 +688,7 @@ public void getIamPolicyTest() throws Exception {
             .build();
     mockSecurityCenter.addResponse(expectedResponse);
 
-    ResourceName resource = ProjectName.of("[PROJECT]");
+    ResourceName resource = FolderName.of("[FOLDER]");
 
     Policy actualResponse = client.getIamPolicy(resource);
     Assert.assertEquals(expectedResponse, actualResponse);
@@ -710,7 +710,7 @@ public void getIamPolicyExceptionTest() throws Exception {
     mockSecurityCenter.addException(exception);
 
     try {
-      ResourceName resource = ProjectName.of("[PROJECT]");
+      ResourceName resource = FolderName.of("[FOLDER]");
       client.getIamPolicy(resource);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
@@ -1022,7 +1022,7 @@ public void groupAssetsTest() throws Exception {
 
     GroupAssetsRequest request =
         GroupAssetsRequest.newBuilder()
-            .setParent(AssetName.ofOrganizationAssetName("[ORGANIZATION]", "[ASSET]").toString())
+            .setParent(OrganizationName.of("[ORGANIZATION]").toString())
             .setFilter("filter-1274492040")
             .setGroupBy("groupBy293428022")
             .setCompareDuration(Duration.newBuilder().build())
@@ -1063,7 +1063,7 @@ public void groupAssetsExceptionTest() throws Exception {
     try {
       GroupAssetsRequest request =
           GroupAssetsRequest.newBuilder()
-              .setParent(AssetName.ofOrganizationAssetName("[ORGANIZATION]", "[ASSET]").toString())
+              .setParent(OrganizationName.of("[ORGANIZATION]").toString())
               .setFilter("filter-1274492040")
               .setGroupBy("groupBy293428022")
               .setCompareDuration(Duration.newBuilder().build())
@@ -1926,7 +1926,7 @@ public void setIamPolicyTest() throws Exception {
             .build();
     mockSecurityCenter.addResponse(expectedResponse);
 
-    ResourceName resource = ProjectName.of("[PROJECT]");
+    ResourceName resource = FolderName.of("[FOLDER]");
     Policy policy = Policy.newBuilder().build();
 
     Policy actualResponse = client.setIamPolicy(resource, policy);
@@ -1950,7 +1950,7 @@ public void setIamPolicyExceptionTest() throws Exception {
     mockSecurityCenter.addException(exception);
 
     try {
-      ResourceName resource = ProjectName.of("[PROJECT]");
+      ResourceName resource = FolderName.of("[FOLDER]");
       Policy policy = Policy.newBuilder().build();
       client.setIamPolicy(resource, policy);
       Assert.fail("No exception raised");
@@ -2008,7 +2008,7 @@ public void testIamPermissionsTest() throws Exception {
         TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build();
     mockSecurityCenter.addResponse(expectedResponse);
 
-    ResourceName resource = ProjectName.of("[PROJECT]");
+    ResourceName resource = FolderName.of("[FOLDER]");
     List permissions = new ArrayList<>();
 
     TestIamPermissionsResponse actualResponse = client.testIamPermissions(resource, permissions);
@@ -2032,7 +2032,7 @@ public void testIamPermissionsExceptionTest() throws Exception {
     mockSecurityCenter.addException(exception);
 
     try {
-      ResourceName resource = ProjectName.of("[PROJECT]");
+      ResourceName resource = FolderName.of("[FOLDER]");
       List permissions = new ArrayList<>();
       client.testIamPermissions(resource, permissions);
       Assert.fail("No exception raised");
diff --git a/grpc-google-cloud-securitycenter-v1/pom.xml b/grpc-google-cloud-securitycenter-v1/pom.xml
index b62f6a4e1..13da2c8e8 100644
--- a/grpc-google-cloud-securitycenter-v1/pom.xml
+++ b/grpc-google-cloud-securitycenter-v1/pom.xml
@@ -4,13 +4,13 @@
   4.0.0
   com.google.api.grpc
   grpc-google-cloud-securitycenter-v1
-  2.2.0
+  2.3.0
   grpc-google-cloud-securitycenter-v1
   GRPC library for grpc-google-cloud-securitycenter-v1
   
     com.google.cloud
     google-cloud-securitycenter-parent
-    2.2.0
+    2.3.0
   
   
     
diff --git a/grpc-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterGrpc.java b/grpc-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterGrpc.java
index 2bce8861e..d0f2273d7 100644
--- a/grpc-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterGrpc.java
+++ b/grpc-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterGrpc.java
@@ -27,6 +27,7 @@
 @javax.annotation.Generated(
     value = "by gRPC proto compiler",
     comments = "Source: google/cloud/securitycenter/v1/securitycenter_service.proto")
+@io.grpc.stub.annotations.GrpcGenerated
 public final class SecurityCenterGrpc {
 
   private SecurityCenterGrpc() {}
@@ -34,6 +35,52 @@ private SecurityCenterGrpc() {}
   public static final String SERVICE_NAME = "google.cloud.securitycenter.v1.SecurityCenter";
 
   // Static method descriptors that strictly reflect the proto.
+  private static volatile io.grpc.MethodDescriptor<
+          com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest,
+          com.google.longrunning.Operation>
+      getBulkMuteFindingsMethod;
+
+  @io.grpc.stub.annotations.RpcMethod(
+      fullMethodName = SERVICE_NAME + '/' + "BulkMuteFindings",
+      requestType = com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest.class,
+      responseType = com.google.longrunning.Operation.class,
+      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+  public static io.grpc.MethodDescriptor<
+          com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest,
+          com.google.longrunning.Operation>
+      getBulkMuteFindingsMethod() {
+    io.grpc.MethodDescriptor<
+            com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest,
+            com.google.longrunning.Operation>
+        getBulkMuteFindingsMethod;
+    if ((getBulkMuteFindingsMethod = SecurityCenterGrpc.getBulkMuteFindingsMethod) == null) {
+      synchronized (SecurityCenterGrpc.class) {
+        if ((getBulkMuteFindingsMethod = SecurityCenterGrpc.getBulkMuteFindingsMethod) == null) {
+          SecurityCenterGrpc.getBulkMuteFindingsMethod =
+              getBulkMuteFindingsMethod =
+                  io.grpc.MethodDescriptor
+                      .
+                          newBuilder()
+                      .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+                      .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BulkMuteFindings"))
+                      .setSampledToLocalTracing(true)
+                      .setRequestMarshaller(
+                          io.grpc.protobuf.ProtoUtils.marshaller(
+                              com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest
+                                  .getDefaultInstance()))
+                      .setResponseMarshaller(
+                          io.grpc.protobuf.ProtoUtils.marshaller(
+                              com.google.longrunning.Operation.getDefaultInstance()))
+                      .setSchemaDescriptor(
+                          new SecurityCenterMethodDescriptorSupplier("BulkMuteFindings"))
+                      .build();
+        }
+      }
+    }
+    return getBulkMuteFindingsMethod;
+  }
+
   private static volatile io.grpc.MethodDescriptor<
           com.google.cloud.securitycenter.v1.CreateSourceRequest,
           com.google.cloud.securitycenter.v1.Source>
@@ -126,6 +173,52 @@ private SecurityCenterGrpc() {}
     return getCreateFindingMethod;
   }
 
+  private static volatile io.grpc.MethodDescriptor<
+          com.google.cloud.securitycenter.v1.CreateMuteConfigRequest,
+          com.google.cloud.securitycenter.v1.MuteConfig>
+      getCreateMuteConfigMethod;
+
+  @io.grpc.stub.annotations.RpcMethod(
+      fullMethodName = SERVICE_NAME + '/' + "CreateMuteConfig",
+      requestType = com.google.cloud.securitycenter.v1.CreateMuteConfigRequest.class,
+      responseType = com.google.cloud.securitycenter.v1.MuteConfig.class,
+      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+  public static io.grpc.MethodDescriptor<
+          com.google.cloud.securitycenter.v1.CreateMuteConfigRequest,
+          com.google.cloud.securitycenter.v1.MuteConfig>
+      getCreateMuteConfigMethod() {
+    io.grpc.MethodDescriptor<
+            com.google.cloud.securitycenter.v1.CreateMuteConfigRequest,
+            com.google.cloud.securitycenter.v1.MuteConfig>
+        getCreateMuteConfigMethod;
+    if ((getCreateMuteConfigMethod = SecurityCenterGrpc.getCreateMuteConfigMethod) == null) {
+      synchronized (SecurityCenterGrpc.class) {
+        if ((getCreateMuteConfigMethod = SecurityCenterGrpc.getCreateMuteConfigMethod) == null) {
+          SecurityCenterGrpc.getCreateMuteConfigMethod =
+              getCreateMuteConfigMethod =
+                  io.grpc.MethodDescriptor
+                      .
+                          newBuilder()
+                      .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+                      .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateMuteConfig"))
+                      .setSampledToLocalTracing(true)
+                      .setRequestMarshaller(
+                          io.grpc.protobuf.ProtoUtils.marshaller(
+                              com.google.cloud.securitycenter.v1.CreateMuteConfigRequest
+                                  .getDefaultInstance()))
+                      .setResponseMarshaller(
+                          io.grpc.protobuf.ProtoUtils.marshaller(
+                              com.google.cloud.securitycenter.v1.MuteConfig.getDefaultInstance()))
+                      .setSchemaDescriptor(
+                          new SecurityCenterMethodDescriptorSupplier("CreateMuteConfig"))
+                      .build();
+        }
+      }
+    }
+    return getCreateMuteConfigMethod;
+  }
+
   private static volatile io.grpc.MethodDescriptor<
           com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest,
           com.google.cloud.securitycenter.v1.NotificationConfig>
@@ -177,6 +270,49 @@ private SecurityCenterGrpc() {}
     return getCreateNotificationConfigMethod;
   }
 
+  private static volatile io.grpc.MethodDescriptor<
+          com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest, com.google.protobuf.Empty>
+      getDeleteMuteConfigMethod;
+
+  @io.grpc.stub.annotations.RpcMethod(
+      fullMethodName = SERVICE_NAME + '/' + "DeleteMuteConfig",
+      requestType = com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest.class,
+      responseType = com.google.protobuf.Empty.class,
+      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+  public static io.grpc.MethodDescriptor<
+          com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest, com.google.protobuf.Empty>
+      getDeleteMuteConfigMethod() {
+    io.grpc.MethodDescriptor<
+            com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest, com.google.protobuf.Empty>
+        getDeleteMuteConfigMethod;
+    if ((getDeleteMuteConfigMethod = SecurityCenterGrpc.getDeleteMuteConfigMethod) == null) {
+      synchronized (SecurityCenterGrpc.class) {
+        if ((getDeleteMuteConfigMethod = SecurityCenterGrpc.getDeleteMuteConfigMethod) == null) {
+          SecurityCenterGrpc.getDeleteMuteConfigMethod =
+              getDeleteMuteConfigMethod =
+                  io.grpc.MethodDescriptor
+                      .
+                          newBuilder()
+                      .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+                      .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteMuteConfig"))
+                      .setSampledToLocalTracing(true)
+                      .setRequestMarshaller(
+                          io.grpc.protobuf.ProtoUtils.marshaller(
+                              com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest
+                                  .getDefaultInstance()))
+                      .setResponseMarshaller(
+                          io.grpc.protobuf.ProtoUtils.marshaller(
+                              com.google.protobuf.Empty.getDefaultInstance()))
+                      .setSchemaDescriptor(
+                          new SecurityCenterMethodDescriptorSupplier("DeleteMuteConfig"))
+                      .build();
+        }
+      }
+    }
+    return getDeleteMuteConfigMethod;
+  }
+
   private static volatile io.grpc.MethodDescriptor<
           com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest,
           com.google.protobuf.Empty>
@@ -266,6 +402,52 @@ private SecurityCenterGrpc() {}
     return getGetIamPolicyMethod;
   }
 
+  private static volatile io.grpc.MethodDescriptor<
+          com.google.cloud.securitycenter.v1.GetMuteConfigRequest,
+          com.google.cloud.securitycenter.v1.MuteConfig>
+      getGetMuteConfigMethod;
+
+  @io.grpc.stub.annotations.RpcMethod(
+      fullMethodName = SERVICE_NAME + '/' + "GetMuteConfig",
+      requestType = com.google.cloud.securitycenter.v1.GetMuteConfigRequest.class,
+      responseType = com.google.cloud.securitycenter.v1.MuteConfig.class,
+      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+  public static io.grpc.MethodDescriptor<
+          com.google.cloud.securitycenter.v1.GetMuteConfigRequest,
+          com.google.cloud.securitycenter.v1.MuteConfig>
+      getGetMuteConfigMethod() {
+    io.grpc.MethodDescriptor<
+            com.google.cloud.securitycenter.v1.GetMuteConfigRequest,
+            com.google.cloud.securitycenter.v1.MuteConfig>
+        getGetMuteConfigMethod;
+    if ((getGetMuteConfigMethod = SecurityCenterGrpc.getGetMuteConfigMethod) == null) {
+      synchronized (SecurityCenterGrpc.class) {
+        if ((getGetMuteConfigMethod = SecurityCenterGrpc.getGetMuteConfigMethod) == null) {
+          SecurityCenterGrpc.getGetMuteConfigMethod =
+              getGetMuteConfigMethod =
+                  io.grpc.MethodDescriptor
+                      .
+                          newBuilder()
+                      .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+                      .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetMuteConfig"))
+                      .setSampledToLocalTracing(true)
+                      .setRequestMarshaller(
+                          io.grpc.protobuf.ProtoUtils.marshaller(
+                              com.google.cloud.securitycenter.v1.GetMuteConfigRequest
+                                  .getDefaultInstance()))
+                      .setResponseMarshaller(
+                          io.grpc.protobuf.ProtoUtils.marshaller(
+                              com.google.cloud.securitycenter.v1.MuteConfig.getDefaultInstance()))
+                      .setSchemaDescriptor(
+                          new SecurityCenterMethodDescriptorSupplier("GetMuteConfig"))
+                      .build();
+        }
+      }
+    }
+    return getGetMuteConfigMethod;
+  }
+
   private static volatile io.grpc.MethodDescriptor<
           com.google.cloud.securitycenter.v1.GetNotificationConfigRequest,
           com.google.cloud.securitycenter.v1.NotificationConfig>
@@ -598,6 +780,53 @@ private SecurityCenterGrpc() {}
     return getListFindingsMethod;
   }
 
+  private static volatile io.grpc.MethodDescriptor<
+          com.google.cloud.securitycenter.v1.ListMuteConfigsRequest,
+          com.google.cloud.securitycenter.v1.ListMuteConfigsResponse>
+      getListMuteConfigsMethod;
+
+  @io.grpc.stub.annotations.RpcMethod(
+      fullMethodName = SERVICE_NAME + '/' + "ListMuteConfigs",
+      requestType = com.google.cloud.securitycenter.v1.ListMuteConfigsRequest.class,
+      responseType = com.google.cloud.securitycenter.v1.ListMuteConfigsResponse.class,
+      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+  public static io.grpc.MethodDescriptor<
+          com.google.cloud.securitycenter.v1.ListMuteConfigsRequest,
+          com.google.cloud.securitycenter.v1.ListMuteConfigsResponse>
+      getListMuteConfigsMethod() {
+    io.grpc.MethodDescriptor<
+            com.google.cloud.securitycenter.v1.ListMuteConfigsRequest,
+            com.google.cloud.securitycenter.v1.ListMuteConfigsResponse>
+        getListMuteConfigsMethod;
+    if ((getListMuteConfigsMethod = SecurityCenterGrpc.getListMuteConfigsMethod) == null) {
+      synchronized (SecurityCenterGrpc.class) {
+        if ((getListMuteConfigsMethod = SecurityCenterGrpc.getListMuteConfigsMethod) == null) {
+          SecurityCenterGrpc.getListMuteConfigsMethod =
+              getListMuteConfigsMethod =
+                  io.grpc.MethodDescriptor
+                      .
+                          newBuilder()
+                      .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+                      .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListMuteConfigs"))
+                      .setSampledToLocalTracing(true)
+                      .setRequestMarshaller(
+                          io.grpc.protobuf.ProtoUtils.marshaller(
+                              com.google.cloud.securitycenter.v1.ListMuteConfigsRequest
+                                  .getDefaultInstance()))
+                      .setResponseMarshaller(
+                          io.grpc.protobuf.ProtoUtils.marshaller(
+                              com.google.cloud.securitycenter.v1.ListMuteConfigsResponse
+                                  .getDefaultInstance()))
+                      .setSchemaDescriptor(
+                          new SecurityCenterMethodDescriptorSupplier("ListMuteConfigs"))
+                      .build();
+        }
+      }
+    }
+    return getListMuteConfigsMethod;
+  }
+
   private static volatile io.grpc.MethodDescriptor<
           com.google.cloud.securitycenter.v1.ListNotificationConfigsRequest,
           com.google.cloud.securitycenter.v1.ListNotificationConfigsResponse>
@@ -787,6 +1016,51 @@ private SecurityCenterGrpc() {}
     return getSetFindingStateMethod;
   }
 
+  private static volatile io.grpc.MethodDescriptor<
+          com.google.cloud.securitycenter.v1.SetMuteRequest,
+          com.google.cloud.securitycenter.v1.Finding>
+      getSetMuteMethod;
+
+  @io.grpc.stub.annotations.RpcMethod(
+      fullMethodName = SERVICE_NAME + '/' + "SetMute",
+      requestType = com.google.cloud.securitycenter.v1.SetMuteRequest.class,
+      responseType = com.google.cloud.securitycenter.v1.Finding.class,
+      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+  public static io.grpc.MethodDescriptor<
+          com.google.cloud.securitycenter.v1.SetMuteRequest,
+          com.google.cloud.securitycenter.v1.Finding>
+      getSetMuteMethod() {
+    io.grpc.MethodDescriptor<
+            com.google.cloud.securitycenter.v1.SetMuteRequest,
+            com.google.cloud.securitycenter.v1.Finding>
+        getSetMuteMethod;
+    if ((getSetMuteMethod = SecurityCenterGrpc.getSetMuteMethod) == null) {
+      synchronized (SecurityCenterGrpc.class) {
+        if ((getSetMuteMethod = SecurityCenterGrpc.getSetMuteMethod) == null) {
+          SecurityCenterGrpc.getSetMuteMethod =
+              getSetMuteMethod =
+                  io.grpc.MethodDescriptor
+                      .
+                          newBuilder()
+                      .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+                      .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetMute"))
+                      .setSampledToLocalTracing(true)
+                      .setRequestMarshaller(
+                          io.grpc.protobuf.ProtoUtils.marshaller(
+                              com.google.cloud.securitycenter.v1.SetMuteRequest
+                                  .getDefaultInstance()))
+                      .setResponseMarshaller(
+                          io.grpc.protobuf.ProtoUtils.marshaller(
+                              com.google.cloud.securitycenter.v1.Finding.getDefaultInstance()))
+                      .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("SetMute"))
+                      .build();
+        }
+      }
+    }
+    return getSetMuteMethod;
+  }
+
   private static volatile io.grpc.MethodDescriptor<
           com.google.iam.v1.SetIamPolicyRequest, com.google.iam.v1.Policy>
       getSetIamPolicyMethod;
@@ -870,6 +1144,56 @@ private SecurityCenterGrpc() {}
     return getTestIamPermissionsMethod;
   }
 
+  private static volatile io.grpc.MethodDescriptor<
+          com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest,
+          com.google.cloud.securitycenter.v1.ExternalSystem>
+      getUpdateExternalSystemMethod;
+
+  @io.grpc.stub.annotations.RpcMethod(
+      fullMethodName = SERVICE_NAME + '/' + "UpdateExternalSystem",
+      requestType = com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest.class,
+      responseType = com.google.cloud.securitycenter.v1.ExternalSystem.class,
+      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+  public static io.grpc.MethodDescriptor<
+          com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest,
+          com.google.cloud.securitycenter.v1.ExternalSystem>
+      getUpdateExternalSystemMethod() {
+    io.grpc.MethodDescriptor<
+            com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest,
+            com.google.cloud.securitycenter.v1.ExternalSystem>
+        getUpdateExternalSystemMethod;
+    if ((getUpdateExternalSystemMethod = SecurityCenterGrpc.getUpdateExternalSystemMethod)
+        == null) {
+      synchronized (SecurityCenterGrpc.class) {
+        if ((getUpdateExternalSystemMethod = SecurityCenterGrpc.getUpdateExternalSystemMethod)
+            == null) {
+          SecurityCenterGrpc.getUpdateExternalSystemMethod =
+              getUpdateExternalSystemMethod =
+                  io.grpc.MethodDescriptor
+                      .
+                          newBuilder()
+                      .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+                      .setFullMethodName(
+                          generateFullMethodName(SERVICE_NAME, "UpdateExternalSystem"))
+                      .setSampledToLocalTracing(true)
+                      .setRequestMarshaller(
+                          io.grpc.protobuf.ProtoUtils.marshaller(
+                              com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest
+                                  .getDefaultInstance()))
+                      .setResponseMarshaller(
+                          io.grpc.protobuf.ProtoUtils.marshaller(
+                              com.google.cloud.securitycenter.v1.ExternalSystem
+                                  .getDefaultInstance()))
+                      .setSchemaDescriptor(
+                          new SecurityCenterMethodDescriptorSupplier("UpdateExternalSystem"))
+                      .build();
+        }
+      }
+    }
+    return getUpdateExternalSystemMethod;
+  }
+
   private static volatile io.grpc.MethodDescriptor<
           com.google.cloud.securitycenter.v1.UpdateFindingRequest,
           com.google.cloud.securitycenter.v1.Finding>
@@ -916,6 +1240,52 @@ private SecurityCenterGrpc() {}
     return getUpdateFindingMethod;
   }
 
+  private static volatile io.grpc.MethodDescriptor<
+          com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest,
+          com.google.cloud.securitycenter.v1.MuteConfig>
+      getUpdateMuteConfigMethod;
+
+  @io.grpc.stub.annotations.RpcMethod(
+      fullMethodName = SERVICE_NAME + '/' + "UpdateMuteConfig",
+      requestType = com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest.class,
+      responseType = com.google.cloud.securitycenter.v1.MuteConfig.class,
+      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+  public static io.grpc.MethodDescriptor<
+          com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest,
+          com.google.cloud.securitycenter.v1.MuteConfig>
+      getUpdateMuteConfigMethod() {
+    io.grpc.MethodDescriptor<
+            com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest,
+            com.google.cloud.securitycenter.v1.MuteConfig>
+        getUpdateMuteConfigMethod;
+    if ((getUpdateMuteConfigMethod = SecurityCenterGrpc.getUpdateMuteConfigMethod) == null) {
+      synchronized (SecurityCenterGrpc.class) {
+        if ((getUpdateMuteConfigMethod = SecurityCenterGrpc.getUpdateMuteConfigMethod) == null) {
+          SecurityCenterGrpc.getUpdateMuteConfigMethod =
+              getUpdateMuteConfigMethod =
+                  io.grpc.MethodDescriptor
+                      .
+                          newBuilder()
+                      .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+                      .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateMuteConfig"))
+                      .setSampledToLocalTracing(true)
+                      .setRequestMarshaller(
+                          io.grpc.protobuf.ProtoUtils.marshaller(
+                              com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest
+                                  .getDefaultInstance()))
+                      .setResponseMarshaller(
+                          io.grpc.protobuf.ProtoUtils.marshaller(
+                              com.google.cloud.securitycenter.v1.MuteConfig.getDefaultInstance()))
+                      .setSchemaDescriptor(
+                          new SecurityCenterMethodDescriptorSupplier("UpdateMuteConfig"))
+                      .build();
+        }
+      }
+    }
+    return getUpdateMuteConfigMethod;
+  }
+
   private static volatile io.grpc.MethodDescriptor<
           com.google.cloud.securitycenter.v1.UpdateNotificationConfigRequest,
           com.google.cloud.securitycenter.v1.NotificationConfig>
@@ -1164,6 +1534,22 @@ public SecurityCenterFutureStub newStub(
    */
   public abstract static class SecurityCenterImplBase implements io.grpc.BindableService {
 
+    /**
+     *
+     *
+     * 
+     * Kicks off an LRO to bulk mute findings for a parent based on a filter. The
+     * parent can be either an organization, folder or project. The findings
+     * matched by the filter will be muted after the LRO is done.
+     * 
+ */ + public void bulkMuteFindings( + com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getBulkMuteFindingsMethod(), responseObserver); + } + /** * * @@ -1193,6 +1579,21 @@ public void createFinding( getCreateFindingMethod(), responseObserver); } + /** + * + * + *
+     * Creates a mute config.
+     * 
+ */ + public void createMuteConfig( + com.google.cloud.securitycenter.v1.CreateMuteConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateMuteConfigMethod(), responseObserver); + } + /** * * @@ -1208,6 +1609,20 @@ public void createNotificationConfig( getCreateNotificationConfigMethod(), responseObserver); } + /** + * + * + *
+     * Deletes an existing mute config.
+     * 
+ */ + public void deleteMuteConfig( + com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteMuteConfigMethod(), responseObserver); + } + /** * * @@ -1236,6 +1651,21 @@ public void getIamPolicy( getGetIamPolicyMethod(), responseObserver); } + /** + * + * + *
+     * Gets a mute config.
+     * 
+ */ + public void getMuteConfig( + com.google.cloud.securitycenter.v1.GetMuteConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetMuteConfigMethod(), responseObserver); + } + /** * * @@ -1346,6 +1776,21 @@ public void listFindings( getListFindingsMethod(), responseObserver); } + /** + * + * + *
+     * Lists mute configs.
+     * 
+ */ + public void listMuteConfigs( + com.google.cloud.securitycenter.v1.ListMuteConfigsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListMuteConfigsMethod(), responseObserver); + } + /** * * @@ -1413,11 +1858,24 @@ public void setFindingState( * * *
-     * Sets the access control policy on the specified Source.
+     * Updates the mute state of a finding.
      * 
*/ - public void setIamPolicy( - com.google.iam.v1.SetIamPolicyRequest request, + public void setMute( + com.google.cloud.securitycenter.v1.SetMuteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetMuteMethod(), responseObserver); + } + + /** + * + * + *
+     * Sets the access control policy on the specified Source.
+     * 
+ */ + public void setIamPolicy( + com.google.iam.v1.SetIamPolicyRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getSetIamPolicyMethod(), responseObserver); @@ -1438,6 +1896,21 @@ public void testIamPermissions( getTestIamPermissionsMethod(), responseObserver); } + /** + * + * + *
+     * Updates external system. This is for a given finding.
+     * 
+ */ + public void updateExternalSystem( + com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateExternalSystemMethod(), responseObserver); + } + /** * * @@ -1453,6 +1926,21 @@ public void updateFinding( getUpdateFindingMethod(), responseObserver); } + /** + * + * + *
+     * Updates a mute config.
+     * 
+ */ + public void updateMuteConfig( + com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateMuteConfigMethod(), responseObserver); + } + /** * * @@ -1516,6 +2004,12 @@ public void updateSecurityMarks( @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getBulkMuteFindingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest, + com.google.longrunning.Operation>(this, METHODID_BULK_MUTE_FINDINGS))) .addMethod( getCreateSourceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1528,6 +2022,13 @@ public final io.grpc.ServerServiceDefinition bindService() { new MethodHandlers< com.google.cloud.securitycenter.v1.CreateFindingRequest, com.google.cloud.securitycenter.v1.Finding>(this, METHODID_CREATE_FINDING))) + .addMethod( + getCreateMuteConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v1.CreateMuteConfigRequest, + com.google.cloud.securitycenter.v1.MuteConfig>( + this, METHODID_CREATE_MUTE_CONFIG))) .addMethod( getCreateNotificationConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1535,6 +2036,12 @@ public final io.grpc.ServerServiceDefinition bindService() { com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest, com.google.cloud.securitycenter.v1.NotificationConfig>( this, METHODID_CREATE_NOTIFICATION_CONFIG))) + .addMethod( + getDeleteMuteConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest, + com.google.protobuf.Empty>(this, METHODID_DELETE_MUTE_CONFIG))) .addMethod( getDeleteNotificationConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1547,6 +2054,13 @@ public final io.grpc.ServerServiceDefinition bindService() { new MethodHandlers< com.google.iam.v1.GetIamPolicyRequest, com.google.iam.v1.Policy>( this, METHODID_GET_IAM_POLICY))) + .addMethod( + getGetMuteConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v1.GetMuteConfigRequest, + com.google.cloud.securitycenter.v1.MuteConfig>( + this, METHODID_GET_MUTE_CONFIG))) .addMethod( getGetNotificationConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1595,6 +2109,13 @@ public final io.grpc.ServerServiceDefinition bindService() { com.google.cloud.securitycenter.v1.ListFindingsRequest, com.google.cloud.securitycenter.v1.ListFindingsResponse>( this, METHODID_LIST_FINDINGS))) + .addMethod( + getListMuteConfigsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v1.ListMuteConfigsRequest, + com.google.cloud.securitycenter.v1.ListMuteConfigsResponse>( + this, METHODID_LIST_MUTE_CONFIGS))) .addMethod( getListNotificationConfigsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1622,6 +2143,12 @@ public final io.grpc.ServerServiceDefinition bindService() { com.google.cloud.securitycenter.v1.SetFindingStateRequest, com.google.cloud.securitycenter.v1.Finding>( this, METHODID_SET_FINDING_STATE))) + .addMethod( + getSetMuteMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v1.SetMuteRequest, + com.google.cloud.securitycenter.v1.Finding>(this, METHODID_SET_MUTE))) .addMethod( getSetIamPolicyMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1635,12 +2162,26 @@ public final io.grpc.ServerServiceDefinition bindService() { com.google.iam.v1.TestIamPermissionsRequest, com.google.iam.v1.TestIamPermissionsResponse>( this, METHODID_TEST_IAM_PERMISSIONS))) + .addMethod( + getUpdateExternalSystemMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest, + com.google.cloud.securitycenter.v1.ExternalSystem>( + this, METHODID_UPDATE_EXTERNAL_SYSTEM))) .addMethod( getUpdateFindingMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< com.google.cloud.securitycenter.v1.UpdateFindingRequest, com.google.cloud.securitycenter.v1.Finding>(this, METHODID_UPDATE_FINDING))) + .addMethod( + getUpdateMuteConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest, + com.google.cloud.securitycenter.v1.MuteConfig>( + this, METHODID_UPDATE_MUTE_CONFIG))) .addMethod( getUpdateNotificationConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1690,6 +2231,24 @@ protected SecurityCenterStub build(io.grpc.Channel channel, io.grpc.CallOptions return new SecurityCenterStub(channel, callOptions); } + /** + * + * + *
+     * Kicks off an LRO to bulk mute findings for a parent based on a filter. The
+     * parent can be either an organization, folder or project. The findings
+     * matched by the filter will be muted after the LRO is done.
+     * 
+ */ + public void bulkMuteFindings( + com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBulkMuteFindingsMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -1723,6 +2282,23 @@ public void createFinding( responseObserver); } + /** + * + * + *
+     * Creates a mute config.
+     * 
+ */ + public void createMuteConfig( + com.google.cloud.securitycenter.v1.CreateMuteConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateMuteConfigMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -1740,6 +2316,22 @@ public void createNotificationConfig( responseObserver); } + /** + * + * + *
+     * Deletes an existing mute config.
+     * 
+ */ + public void deleteMuteConfig( + com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteMuteConfigMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -1772,6 +2364,23 @@ public void getIamPolicy( responseObserver); } + /** + * + * + *
+     * Gets a mute config.
+     * 
+ */ + public void getMuteConfig( + com.google.cloud.securitycenter.v1.GetMuteConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetMuteConfigMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -1894,6 +2503,23 @@ public void listFindings( responseObserver); } + /** + * + * + *
+     * Lists mute configs.
+     * 
+ */ + public void listMuteConfigs( + com.google.cloud.securitycenter.v1.ListMuteConfigsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListMuteConfigsMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -1965,6 +2591,20 @@ public void setFindingState( responseObserver); } + /** + * + * + *
+     * Updates the mute state of a finding.
+     * 
+ */ + public void setMute( + com.google.cloud.securitycenter.v1.SetMuteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSetMuteMethod(), getCallOptions()), request, responseObserver); + } + /** * * @@ -1998,6 +2638,23 @@ public void testIamPermissions( responseObserver); } + /** + * + * + *
+     * Updates external system. This is for a given finding.
+     * 
+ */ + public void updateExternalSystem( + com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateExternalSystemMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -2015,6 +2672,23 @@ public void updateFinding( responseObserver); } + /** + * + * + *
+     * Updates a mute config.
+     * 
+ */ + public void updateMuteConfig( + com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateMuteConfigMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -2103,6 +2777,21 @@ protected SecurityCenterBlockingStub build( return new SecurityCenterBlockingStub(channel, callOptions); } + /** + * + * + *
+     * Kicks off an LRO to bulk mute findings for a parent based on a filter. The
+     * parent can be either an organization, folder or project. The findings
+     * matched by the filter will be muted after the LRO is done.
+     * 
+ */ + public com.google.longrunning.Operation bulkMuteFindings( + com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBulkMuteFindingsMethod(), getCallOptions(), request); + } + /** * * @@ -2130,6 +2819,19 @@ public com.google.cloud.securitycenter.v1.Finding createFinding( getChannel(), getCreateFindingMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Creates a mute config.
+     * 
+ */ + public com.google.cloud.securitycenter.v1.MuteConfig createMuteConfig( + com.google.cloud.securitycenter.v1.CreateMuteConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateMuteConfigMethod(), getCallOptions(), request); + } + /** * * @@ -2143,6 +2845,19 @@ public com.google.cloud.securitycenter.v1.NotificationConfig createNotificationC getChannel(), getCreateNotificationConfigMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Deletes an existing mute config.
+     * 
+ */ + public com.google.protobuf.Empty deleteMuteConfig( + com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteMuteConfigMethod(), getCallOptions(), request); + } + /** * * @@ -2168,6 +2883,19 @@ public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyReque getChannel(), getGetIamPolicyMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Gets a mute config.
+     * 
+ */ + public com.google.cloud.securitycenter.v1.MuteConfig getMuteConfig( + com.google.cloud.securitycenter.v1.GetMuteConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetMuteConfigMethod(), getCallOptions(), request); + } + /** * * @@ -2267,6 +2995,19 @@ public com.google.cloud.securitycenter.v1.ListFindingsResponse listFindings( getChannel(), getListFindingsMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Lists mute configs.
+     * 
+ */ + public com.google.cloud.securitycenter.v1.ListMuteConfigsResponse listMuteConfigs( + com.google.cloud.securitycenter.v1.ListMuteConfigsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListMuteConfigsMethod(), getCallOptions(), request); + } + /** * * @@ -2324,6 +3065,19 @@ public com.google.cloud.securitycenter.v1.Finding setFindingState( getChannel(), getSetFindingStateMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Updates the mute state of a finding.
+     * 
+ */ + public com.google.cloud.securitycenter.v1.Finding setMute( + com.google.cloud.securitycenter.v1.SetMuteRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSetMuteMethod(), getCallOptions(), request); + } + /** * * @@ -2349,6 +3103,19 @@ public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions( getChannel(), getTestIamPermissionsMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Updates external system. This is for a given finding.
+     * 
+ */ + public com.google.cloud.securitycenter.v1.ExternalSystem updateExternalSystem( + com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateExternalSystemMethod(), getCallOptions(), request); + } + /** * * @@ -2363,6 +3130,19 @@ public com.google.cloud.securitycenter.v1.Finding updateFinding( getChannel(), getUpdateFindingMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Updates a mute config.
+     * 
+ */ + public com.google.cloud.securitycenter.v1.MuteConfig updateMuteConfig( + com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateMuteConfigMethod(), getCallOptions(), request); + } + /** * * @@ -2436,6 +3216,21 @@ protected SecurityCenterFutureStub build( return new SecurityCenterFutureStub(channel, callOptions); } + /** + * + * + *
+     * Kicks off an LRO to bulk mute findings for a parent based on a filter. The
+     * parent can be either an organization, folder or project. The findings
+     * matched by the filter will be muted after the LRO is done.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + bulkMuteFindings(com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBulkMuteFindingsMethod(), getCallOptions()), request); + } + /** * * @@ -2465,6 +3260,20 @@ protected SecurityCenterFutureStub build( getChannel().newCall(getCreateFindingMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Creates a mute config.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v1.MuteConfig> + createMuteConfig(com.google.cloud.securitycenter.v1.CreateMuteConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateMuteConfigMethod(), getCallOptions()), request); + } + /** * * @@ -2480,6 +3289,19 @@ protected SecurityCenterFutureStub build( getChannel().newCall(getCreateNotificationConfigMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Deletes an existing mute config.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteMuteConfig(com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteMuteConfigMethod(), getCallOptions()), request); + } + /** * * @@ -2507,6 +3329,20 @@ protected SecurityCenterFutureStub build( getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Gets a mute config.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v1.MuteConfig> + getMuteConfig(com.google.cloud.securitycenter.v1.GetMuteConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetMuteConfigMethod(), getCallOptions()), request); + } + /** * * @@ -2615,6 +3451,20 @@ protected SecurityCenterFutureStub build( getChannel().newCall(getListFindingsMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Lists mute configs.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v1.ListMuteConfigsResponse> + listMuteConfigs(com.google.cloud.securitycenter.v1.ListMuteConfigsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListMuteConfigsMethod(), getCallOptions()), request); + } + /** * * @@ -2675,6 +3525,20 @@ protected SecurityCenterFutureStub build( getChannel().newCall(getSetFindingStateMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Updates the mute state of a finding.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v1.Finding> + setMute(com.google.cloud.securitycenter.v1.SetMuteRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSetMuteMethod(), getCallOptions()), request); + } + /** * * @@ -2702,6 +3566,21 @@ protected SecurityCenterFutureStub build( getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Updates external system. This is for a given finding.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v1.ExternalSystem> + updateExternalSystem( + com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateExternalSystemMethod(), getCallOptions()), request); + } + /** * * @@ -2717,6 +3596,20 @@ protected SecurityCenterFutureStub build( getChannel().newCall(getUpdateFindingMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Updates a mute config.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v1.MuteConfig> + updateMuteConfig(com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateMuteConfigMethod(), getCallOptions()), request); + } + /** * * @@ -2777,29 +3670,37 @@ protected SecurityCenterFutureStub build( } } - private static final int METHODID_CREATE_SOURCE = 0; - private static final int METHODID_CREATE_FINDING = 1; - private static final int METHODID_CREATE_NOTIFICATION_CONFIG = 2; - private static final int METHODID_DELETE_NOTIFICATION_CONFIG = 3; - private static final int METHODID_GET_IAM_POLICY = 4; - private static final int METHODID_GET_NOTIFICATION_CONFIG = 5; - private static final int METHODID_GET_ORGANIZATION_SETTINGS = 6; - private static final int METHODID_GET_SOURCE = 7; - private static final int METHODID_GROUP_ASSETS = 8; - private static final int METHODID_GROUP_FINDINGS = 9; - private static final int METHODID_LIST_ASSETS = 10; - private static final int METHODID_LIST_FINDINGS = 11; - private static final int METHODID_LIST_NOTIFICATION_CONFIGS = 12; - private static final int METHODID_LIST_SOURCES = 13; - private static final int METHODID_RUN_ASSET_DISCOVERY = 14; - private static final int METHODID_SET_FINDING_STATE = 15; - private static final int METHODID_SET_IAM_POLICY = 16; - private static final int METHODID_TEST_IAM_PERMISSIONS = 17; - private static final int METHODID_UPDATE_FINDING = 18; - private static final int METHODID_UPDATE_NOTIFICATION_CONFIG = 19; - private static final int METHODID_UPDATE_ORGANIZATION_SETTINGS = 20; - private static final int METHODID_UPDATE_SOURCE = 21; - private static final int METHODID_UPDATE_SECURITY_MARKS = 22; + private static final int METHODID_BULK_MUTE_FINDINGS = 0; + private static final int METHODID_CREATE_SOURCE = 1; + private static final int METHODID_CREATE_FINDING = 2; + private static final int METHODID_CREATE_MUTE_CONFIG = 3; + private static final int METHODID_CREATE_NOTIFICATION_CONFIG = 4; + private static final int METHODID_DELETE_MUTE_CONFIG = 5; + private static final int METHODID_DELETE_NOTIFICATION_CONFIG = 6; + private static final int METHODID_GET_IAM_POLICY = 7; + private static final int METHODID_GET_MUTE_CONFIG = 8; + private static final int METHODID_GET_NOTIFICATION_CONFIG = 9; + private static final int METHODID_GET_ORGANIZATION_SETTINGS = 10; + private static final int METHODID_GET_SOURCE = 11; + private static final int METHODID_GROUP_ASSETS = 12; + private static final int METHODID_GROUP_FINDINGS = 13; + private static final int METHODID_LIST_ASSETS = 14; + private static final int METHODID_LIST_FINDINGS = 15; + private static final int METHODID_LIST_MUTE_CONFIGS = 16; + private static final int METHODID_LIST_NOTIFICATION_CONFIGS = 17; + private static final int METHODID_LIST_SOURCES = 18; + private static final int METHODID_RUN_ASSET_DISCOVERY = 19; + private static final int METHODID_SET_FINDING_STATE = 20; + private static final int METHODID_SET_MUTE = 21; + private static final int METHODID_SET_IAM_POLICY = 22; + private static final int METHODID_TEST_IAM_PERMISSIONS = 23; + private static final int METHODID_UPDATE_EXTERNAL_SYSTEM = 24; + private static final int METHODID_UPDATE_FINDING = 25; + private static final int METHODID_UPDATE_MUTE_CONFIG = 26; + private static final int METHODID_UPDATE_NOTIFICATION_CONFIG = 27; + private static final int METHODID_UPDATE_ORGANIZATION_SETTINGS = 28; + private static final int METHODID_UPDATE_SOURCE = 29; + private static final int METHODID_UPDATE_SECURITY_MARKS = 30; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -2818,6 +3719,11 @@ private static final class MethodHandlers @java.lang.SuppressWarnings("unchecked") public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { + case METHODID_BULK_MUTE_FINDINGS: + serviceImpl.bulkMuteFindings( + (com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_CREATE_SOURCE: serviceImpl.createSource( (com.google.cloud.securitycenter.v1.CreateSourceRequest) request, @@ -2830,12 +3736,23 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_CREATE_MUTE_CONFIG: + serviceImpl.createMuteConfig( + (com.google.cloud.securitycenter.v1.CreateMuteConfigRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; case METHODID_CREATE_NOTIFICATION_CONFIG: serviceImpl.createNotificationConfig( (com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_DELETE_MUTE_CONFIG: + serviceImpl.deleteMuteConfig( + (com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_DELETE_NOTIFICATION_CONFIG: serviceImpl.deleteNotificationConfig( (com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest) request, @@ -2846,6 +3763,12 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.iam.v1.GetIamPolicyRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_GET_MUTE_CONFIG: + serviceImpl.getMuteConfig( + (com.google.cloud.securitycenter.v1.GetMuteConfigRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; case METHODID_GET_NOTIFICATION_CONFIG: serviceImpl.getNotificationConfig( (com.google.cloud.securitycenter.v1.GetNotificationConfigRequest) request, @@ -2889,6 +3812,13 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_LIST_MUTE_CONFIGS: + serviceImpl.listMuteConfigs( + (com.google.cloud.securitycenter.v1.ListMuteConfigsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.securitycenter.v1.ListMuteConfigsResponse>) + responseObserver); + break; case METHODID_LIST_NOTIFICATION_CONFIGS: serviceImpl.listNotificationConfigs( (com.google.cloud.securitycenter.v1.ListNotificationConfigsRequest) request, @@ -2913,6 +3843,12 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_SET_MUTE: + serviceImpl.setMute( + (com.google.cloud.securitycenter.v1.SetMuteRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; case METHODID_SET_IAM_POLICY: serviceImpl.setIamPolicy( (com.google.iam.v1.SetIamPolicyRequest) request, @@ -2924,12 +3860,24 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_UPDATE_EXTERNAL_SYSTEM: + serviceImpl.updateExternalSystem( + (com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; case METHODID_UPDATE_FINDING: serviceImpl.updateFinding( (com.google.cloud.securitycenter.v1.UpdateFindingRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_UPDATE_MUTE_CONFIG: + serviceImpl.updateMuteConfig( + (com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; case METHODID_UPDATE_NOTIFICATION_CONFIG: serviceImpl.updateNotificationConfig( (com.google.cloud.securitycenter.v1.UpdateNotificationConfigRequest) request, @@ -3018,11 +3966,15 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new SecurityCenterFileDescriptorSupplier()) + .addMethod(getBulkMuteFindingsMethod()) .addMethod(getCreateSourceMethod()) .addMethod(getCreateFindingMethod()) + .addMethod(getCreateMuteConfigMethod()) .addMethod(getCreateNotificationConfigMethod()) + .addMethod(getDeleteMuteConfigMethod()) .addMethod(getDeleteNotificationConfigMethod()) .addMethod(getGetIamPolicyMethod()) + .addMethod(getGetMuteConfigMethod()) .addMethod(getGetNotificationConfigMethod()) .addMethod(getGetOrganizationSettingsMethod()) .addMethod(getGetSourceMethod()) @@ -3030,13 +3982,17 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getGroupFindingsMethod()) .addMethod(getListAssetsMethod()) .addMethod(getListFindingsMethod()) + .addMethod(getListMuteConfigsMethod()) .addMethod(getListNotificationConfigsMethod()) .addMethod(getListSourcesMethod()) .addMethod(getRunAssetDiscoveryMethod()) .addMethod(getSetFindingStateMethod()) + .addMethod(getSetMuteMethod()) .addMethod(getSetIamPolicyMethod()) .addMethod(getTestIamPermissionsMethod()) + .addMethod(getUpdateExternalSystemMethod()) .addMethod(getUpdateFindingMethod()) + .addMethod(getUpdateMuteConfigMethod()) .addMethod(getUpdateNotificationConfigMethod()) .addMethod(getUpdateOrganizationSettingsMethod()) .addMethod(getUpdateSourceMethod()) diff --git a/grpc-google-cloud-securitycenter-v1beta1/pom.xml b/grpc-google-cloud-securitycenter-v1beta1/pom.xml index 4f7ad1e19..ddcf9bb86 100644 --- a/grpc-google-cloud-securitycenter-v1beta1/pom.xml +++ b/grpc-google-cloud-securitycenter-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-securitycenter-v1beta1 - 0.97.0 + 0.98.0 grpc-google-cloud-securitycenter-v1beta1 GRPC library for grpc-google-cloud-securitycenter-v1beta1 com.google.cloud google-cloud-securitycenter-parent - 2.2.0 + 2.3.0 diff --git a/grpc-google-cloud-securitycenter-v1beta1/src/main/java/com/google/cloud/securitycenter/v1beta1/SecurityCenterGrpc.java b/grpc-google-cloud-securitycenter-v1beta1/src/main/java/com/google/cloud/securitycenter/v1beta1/SecurityCenterGrpc.java index 3d7d18fd1..ebae1dfda 100644 --- a/grpc-google-cloud-securitycenter-v1beta1/src/main/java/com/google/cloud/securitycenter/v1beta1/SecurityCenterGrpc.java +++ b/grpc-google-cloud-securitycenter-v1beta1/src/main/java/com/google/cloud/securitycenter/v1beta1/SecurityCenterGrpc.java @@ -27,6 +27,7 @@ @javax.annotation.Generated( value = "by gRPC proto compiler", comments = "Source: google/cloud/securitycenter/v1beta1/securitycenter_service.proto") +@io.grpc.stub.annotations.GrpcGenerated public final class SecurityCenterGrpc { private SecurityCenterGrpc() {} diff --git a/grpc-google-cloud-securitycenter-v1p1beta1/pom.xml b/grpc-google-cloud-securitycenter-v1p1beta1/pom.xml index 2fac6bed5..a60d2c4c1 100644 --- a/grpc-google-cloud-securitycenter-v1p1beta1/pom.xml +++ b/grpc-google-cloud-securitycenter-v1p1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-securitycenter-v1p1beta1 - 0.97.0 + 0.98.0 grpc-google-cloud-securitycenter-v1p1beta1 GRPC library for grpc-google-cloud-securitycenter-v1p1beta1 com.google.cloud google-cloud-securitycenter-parent - 2.2.0 + 2.3.0 diff --git a/grpc-google-cloud-securitycenter-v1p1beta1/src/main/java/com/google/cloud/securitycenter/v1p1beta1/SecurityCenterGrpc.java b/grpc-google-cloud-securitycenter-v1p1beta1/src/main/java/com/google/cloud/securitycenter/v1p1beta1/SecurityCenterGrpc.java index 3be875631..593cee670 100644 --- a/grpc-google-cloud-securitycenter-v1p1beta1/src/main/java/com/google/cloud/securitycenter/v1p1beta1/SecurityCenterGrpc.java +++ b/grpc-google-cloud-securitycenter-v1p1beta1/src/main/java/com/google/cloud/securitycenter/v1p1beta1/SecurityCenterGrpc.java @@ -27,6 +27,7 @@ @javax.annotation.Generated( value = "by gRPC proto compiler", comments = "Source: google/cloud/securitycenter/v1p1beta1/securitycenter_service.proto") +@io.grpc.stub.annotations.GrpcGenerated public final class SecurityCenterGrpc { private SecurityCenterGrpc() {} diff --git a/pom.xml b/pom.xml index 963b8b65a..7a733a08e 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-securitycenter-parent pom - 2.2.0 + 2.3.0 Google Cloud Security Command Center Parent https://github.com/googleapis/java-securitycenter @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.1.0 + 1.2.2 @@ -61,43 +61,43 @@ com.google.api.grpc proto-google-cloud-securitycenter-v1 - 2.2.0 + 2.3.0 com.google.api.grpc proto-google-cloud-securitycenter-v1beta1 - 0.97.0 + 0.98.0 com.google.api.grpc proto-google-cloud-securitycenter-v1p1beta1 - 0.97.0 + 0.98.0 com.google.api.grpc grpc-google-cloud-securitycenter-v1 - 2.2.0 + 2.3.0 com.google.api.grpc grpc-google-cloud-securitycenter-v1beta1 - 0.97.0 + 0.98.0 com.google.api.grpc grpc-google-cloud-securitycenter-v1p1beta1 - 0.97.0 + 0.98.0 com.google.cloud google-cloud-securitycenter - 2.2.0 + 2.3.0 com.google.cloud google-cloud-shared-dependencies - 2.4.0 + 2.5.1 pom import diff --git a/proto-google-cloud-securitycenter-v1/pom.xml b/proto-google-cloud-securitycenter-v1/pom.xml index 5faa3b4c0..8c8523e03 100644 --- a/proto-google-cloud-securitycenter-v1/pom.xml +++ b/proto-google-cloud-securitycenter-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-securitycenter-v1 - 2.2.0 + 2.3.0 proto-google-cloud-securitycenter-v1 PROTO library for proto-google-cloud-securitycenter-v1 com.google.cloud google-cloud-securitycenter-parent - 2.2.0 + 2.3.0 diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BulkMuteFindingsRequest.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BulkMuteFindingsRequest.java new file mode 100644 index 000000000..b50fd8373 --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BulkMuteFindingsRequest.java @@ -0,0 +1,1143 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/securitycenter_service.proto + +package com.google.cloud.securitycenter.v1; + +/** + * + * + *
+ * Request message for bulk findings update.
+ * Note:
+ * 1. If multiple bulk update requests match the same resource, the order in
+ * which they get executed is not defined.
+ * 2. Once a bulk operation is started, there is no way to stop it.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.BulkMuteFindingsRequest} + */ +public final class BulkMuteFindingsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.BulkMuteFindingsRequest) + BulkMuteFindingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BulkMuteFindingsRequest.newBuilder() to construct. + private BulkMuteFindingsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BulkMuteFindingsRequest() { + parent_ = ""; + filter_ = ""; + muteAnnotation_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BulkMuteFindingsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BulkMuteFindingsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + muteAnnotation_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_BulkMuteFindingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_BulkMuteFindingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest.class, + com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent, at which bulk action needs to be applied. Its format is
+   * "organizations/[organization_id]", "folders/[folder_id]",
+   * "projects/[project_id]".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent, at which bulk action needs to be applied. Its format is
+   * "organizations/[organization_id]", "folders/[folder_id]",
+   * "projects/[project_id]".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * Expression that identifies findings that should be updated.
+   * The expression is a list of zero or more restrictions combined
+   * via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
+   * has higher precedence than `AND`.
+   * Restrictions have the form `<field> <operator> <value>` and may have a
+   * `-` character in front of them to indicate negation. The fields map to
+   * those defined in the corresponding resource.
+   * The supported operators are:
+   * * `=` for all value types.
+   * * `>`, `<`, `>=`, `<=` for integer values.
+   * * `:`, meaning substring matching, for strings.
+   * The supported value types are:
+   * * string literals in quotes.
+   * * integer literals without quotes.
+   * * boolean literals `true` and `false` without quotes.
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Expression that identifies findings that should be updated.
+   * The expression is a list of zero or more restrictions combined
+   * via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
+   * has higher precedence than `AND`.
+   * Restrictions have the form `<field> <operator> <value>` and may have a
+   * `-` character in front of them to indicate negation. The fields map to
+   * those defined in the corresponding resource.
+   * The supported operators are:
+   * * `=` for all value types.
+   * * `>`, `<`, `>=`, `<=` for integer values.
+   * * `:`, meaning substring matching, for strings.
+   * The supported value types are:
+   * * string literals in quotes.
+   * * integer literals without quotes.
+   * * boolean literals `true` and `false` without quotes.
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MUTE_ANNOTATION_FIELD_NUMBER = 3; + private volatile java.lang.Object muteAnnotation_; + /** + * + * + *
+   * This can be a mute configuration name or any identifier for mute/unmute
+   * of findings based on the filter.
+   * 
+ * + * string mute_annotation = 3 [deprecated = true]; + * + * @return The muteAnnotation. + */ + @java.lang.Override + @java.lang.Deprecated + public java.lang.String getMuteAnnotation() { + java.lang.Object ref = muteAnnotation_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + muteAnnotation_ = s; + return s; + } + } + /** + * + * + *
+   * This can be a mute configuration name or any identifier for mute/unmute
+   * of findings based on the filter.
+   * 
+ * + * string mute_annotation = 3 [deprecated = true]; + * + * @return The bytes for muteAnnotation. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.ByteString getMuteAnnotationBytes() { + java.lang.Object ref = muteAnnotation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + muteAnnotation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(muteAnnotation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, muteAnnotation_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(muteAnnotation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, muteAnnotation_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest other = + (com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getMuteAnnotation().equals(other.getMuteAnnotation())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + MUTE_ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getMuteAnnotation().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for bulk findings update.
+   * Note:
+   * 1. If multiple bulk update requests match the same resource, the order in
+   * which they get executed is not defined.
+   * 2. Once a bulk operation is started, there is no way to stop it.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.BulkMuteFindingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.BulkMuteFindingsRequest) + com.google.cloud.securitycenter.v1.BulkMuteFindingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_BulkMuteFindingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_BulkMuteFindingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest.class, + com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + filter_ = ""; + + muteAnnotation_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_BulkMuteFindingsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest build() { + com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest buildPartial() { + com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest result = + new com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest(this); + result.parent_ = parent_; + result.filter_ = filter_; + result.muteAnnotation_ = muteAnnotation_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest) { + return mergeFrom((com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest other) { + if (other == com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (!other.getMuteAnnotation().isEmpty()) { + muteAnnotation_ = other.muteAnnotation_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent, at which bulk action needs to be applied. Its format is
+     * "organizations/[organization_id]", "folders/[folder_id]",
+     * "projects/[project_id]".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent, at which bulk action needs to be applied. Its format is
+     * "organizations/[organization_id]", "folders/[folder_id]",
+     * "projects/[project_id]".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent, at which bulk action needs to be applied. Its format is
+     * "organizations/[organization_id]", "folders/[folder_id]",
+     * "projects/[project_id]".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent, at which bulk action needs to be applied. Its format is
+     * "organizations/[organization_id]", "folders/[folder_id]",
+     * "projects/[project_id]".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent, at which bulk action needs to be applied. Its format is
+     * "organizations/[organization_id]", "folders/[folder_id]",
+     * "projects/[project_id]".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Expression that identifies findings that should be updated.
+     * The expression is a list of zero or more restrictions combined
+     * via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
+     * has higher precedence than `AND`.
+     * Restrictions have the form `<field> <operator> <value>` and may have a
+     * `-` character in front of them to indicate negation. The fields map to
+     * those defined in the corresponding resource.
+     * The supported operators are:
+     * * `=` for all value types.
+     * * `>`, `<`, `>=`, `<=` for integer values.
+     * * `:`, meaning substring matching, for strings.
+     * The supported value types are:
+     * * string literals in quotes.
+     * * integer literals without quotes.
+     * * boolean literals `true` and `false` without quotes.
+     * 
+ * + * string filter = 2; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Expression that identifies findings that should be updated.
+     * The expression is a list of zero or more restrictions combined
+     * via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
+     * has higher precedence than `AND`.
+     * Restrictions have the form `<field> <operator> <value>` and may have a
+     * `-` character in front of them to indicate negation. The fields map to
+     * those defined in the corresponding resource.
+     * The supported operators are:
+     * * `=` for all value types.
+     * * `>`, `<`, `>=`, `<=` for integer values.
+     * * `:`, meaning substring matching, for strings.
+     * The supported value types are:
+     * * string literals in quotes.
+     * * integer literals without quotes.
+     * * boolean literals `true` and `false` without quotes.
+     * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Expression that identifies findings that should be updated.
+     * The expression is a list of zero or more restrictions combined
+     * via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
+     * has higher precedence than `AND`.
+     * Restrictions have the form `<field> <operator> <value>` and may have a
+     * `-` character in front of them to indicate negation. The fields map to
+     * those defined in the corresponding resource.
+     * The supported operators are:
+     * * `=` for all value types.
+     * * `>`, `<`, `>=`, `<=` for integer values.
+     * * `:`, meaning substring matching, for strings.
+     * The supported value types are:
+     * * string literals in quotes.
+     * * integer literals without quotes.
+     * * boolean literals `true` and `false` without quotes.
+     * 
+ * + * string filter = 2; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Expression that identifies findings that should be updated.
+     * The expression is a list of zero or more restrictions combined
+     * via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
+     * has higher precedence than `AND`.
+     * Restrictions have the form `<field> <operator> <value>` and may have a
+     * `-` character in front of them to indicate negation. The fields map to
+     * those defined in the corresponding resource.
+     * The supported operators are:
+     * * `=` for all value types.
+     * * `>`, `<`, `>=`, `<=` for integer values.
+     * * `:`, meaning substring matching, for strings.
+     * The supported value types are:
+     * * string literals in quotes.
+     * * integer literals without quotes.
+     * * boolean literals `true` and `false` without quotes.
+     * 
+ * + * string filter = 2; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Expression that identifies findings that should be updated.
+     * The expression is a list of zero or more restrictions combined
+     * via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
+     * has higher precedence than `AND`.
+     * Restrictions have the form `<field> <operator> <value>` and may have a
+     * `-` character in front of them to indicate negation. The fields map to
+     * those defined in the corresponding resource.
+     * The supported operators are:
+     * * `=` for all value types.
+     * * `>`, `<`, `>=`, `<=` for integer values.
+     * * `:`, meaning substring matching, for strings.
+     * The supported value types are:
+     * * string literals in quotes.
+     * * integer literals without quotes.
+     * * boolean literals `true` and `false` without quotes.
+     * 
+ * + * string filter = 2; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private java.lang.Object muteAnnotation_ = ""; + /** + * + * + *
+     * This can be a mute configuration name or any identifier for mute/unmute
+     * of findings based on the filter.
+     * 
+ * + * string mute_annotation = 3 [deprecated = true]; + * + * @return The muteAnnotation. + */ + @java.lang.Deprecated + public java.lang.String getMuteAnnotation() { + java.lang.Object ref = muteAnnotation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + muteAnnotation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * This can be a mute configuration name or any identifier for mute/unmute
+     * of findings based on the filter.
+     * 
+ * + * string mute_annotation = 3 [deprecated = true]; + * + * @return The bytes for muteAnnotation. + */ + @java.lang.Deprecated + public com.google.protobuf.ByteString getMuteAnnotationBytes() { + java.lang.Object ref = muteAnnotation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + muteAnnotation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * This can be a mute configuration name or any identifier for mute/unmute
+     * of findings based on the filter.
+     * 
+ * + * string mute_annotation = 3 [deprecated = true]; + * + * @param value The muteAnnotation to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setMuteAnnotation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + muteAnnotation_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * This can be a mute configuration name or any identifier for mute/unmute
+     * of findings based on the filter.
+     * 
+ * + * string mute_annotation = 3 [deprecated = true]; + * + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearMuteAnnotation() { + + muteAnnotation_ = getDefaultInstance().getMuteAnnotation(); + onChanged(); + return this; + } + /** + * + * + *
+     * This can be a mute configuration name or any identifier for mute/unmute
+     * of findings based on the filter.
+     * 
+ * + * string mute_annotation = 3 [deprecated = true]; + * + * @param value The bytes for muteAnnotation to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setMuteAnnotationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + muteAnnotation_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.BulkMuteFindingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.BulkMuteFindingsRequest) + private static final com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest(); + } + + public static com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BulkMuteFindingsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BulkMuteFindingsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BulkMuteFindingsRequestOrBuilder.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BulkMuteFindingsRequestOrBuilder.java new file mode 100644 index 000000000..ceeb935b9 --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BulkMuteFindingsRequestOrBuilder.java @@ -0,0 +1,140 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/securitycenter_service.proto + +package com.google.cloud.securitycenter.v1; + +public interface BulkMuteFindingsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.BulkMuteFindingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent, at which bulk action needs to be applied. Its format is
+   * "organizations/[organization_id]", "folders/[folder_id]",
+   * "projects/[project_id]".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent, at which bulk action needs to be applied. Its format is
+   * "organizations/[organization_id]", "folders/[folder_id]",
+   * "projects/[project_id]".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Expression that identifies findings that should be updated.
+   * The expression is a list of zero or more restrictions combined
+   * via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
+   * has higher precedence than `AND`.
+   * Restrictions have the form `<field> <operator> <value>` and may have a
+   * `-` character in front of them to indicate negation. The fields map to
+   * those defined in the corresponding resource.
+   * The supported operators are:
+   * * `=` for all value types.
+   * * `>`, `<`, `>=`, `<=` for integer values.
+   * * `:`, meaning substring matching, for strings.
+   * The supported value types are:
+   * * string literals in quotes.
+   * * integer literals without quotes.
+   * * boolean literals `true` and `false` without quotes.
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Expression that identifies findings that should be updated.
+   * The expression is a list of zero or more restrictions combined
+   * via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
+   * has higher precedence than `AND`.
+   * Restrictions have the form `<field> <operator> <value>` and may have a
+   * `-` character in front of them to indicate negation. The fields map to
+   * those defined in the corresponding resource.
+   * The supported operators are:
+   * * `=` for all value types.
+   * * `>`, `<`, `>=`, `<=` for integer values.
+   * * `:`, meaning substring matching, for strings.
+   * The supported value types are:
+   * * string literals in quotes.
+   * * integer literals without quotes.
+   * * boolean literals `true` and `false` without quotes.
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * This can be a mute configuration name or any identifier for mute/unmute
+   * of findings based on the filter.
+   * 
+ * + * string mute_annotation = 3 [deprecated = true]; + * + * @return The muteAnnotation. + */ + @java.lang.Deprecated + java.lang.String getMuteAnnotation(); + /** + * + * + *
+   * This can be a mute configuration name or any identifier for mute/unmute
+   * of findings based on the filter.
+   * 
+ * + * string mute_annotation = 3 [deprecated = true]; + * + * @return The bytes for muteAnnotation. + */ + @java.lang.Deprecated + com.google.protobuf.ByteString getMuteAnnotationBytes(); +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BulkMuteFindingsResponse.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BulkMuteFindingsResponse.java new file mode 100644 index 000000000..39cbb7805 --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BulkMuteFindingsResponse.java @@ -0,0 +1,457 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/securitycenter_service.proto + +package com.google.cloud.securitycenter.v1; + +/** + * + * + *
+ * The response to a BulkMute request. Contains the LRO information.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.BulkMuteFindingsResponse} + */ +public final class BulkMuteFindingsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.BulkMuteFindingsResponse) + BulkMuteFindingsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use BulkMuteFindingsResponse.newBuilder() to construct. + private BulkMuteFindingsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BulkMuteFindingsResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BulkMuteFindingsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BulkMuteFindingsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_BulkMuteFindingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_BulkMuteFindingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse.class, + com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse other = + (com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response to a BulkMute request. Contains the LRO information.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.BulkMuteFindingsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.BulkMuteFindingsResponse) + com.google.cloud.securitycenter.v1.BulkMuteFindingsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_BulkMuteFindingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_BulkMuteFindingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse.class, + com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_BulkMuteFindingsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse build() { + com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse buildPartial() { + com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse result = + new com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse) { + return mergeFrom((com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse other) { + if (other == com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.BulkMuteFindingsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.BulkMuteFindingsResponse) + private static final com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse(); + } + + public static com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BulkMuteFindingsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BulkMuteFindingsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BulkMuteFindingsResponseOrBuilder.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BulkMuteFindingsResponseOrBuilder.java new file mode 100644 index 000000000..15942a820 --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BulkMuteFindingsResponseOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/securitycenter_service.proto + +package com.google.cloud.securitycenter.v1; + +public interface BulkMuteFindingsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.BulkMuteFindingsResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateMuteConfigRequest.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateMuteConfigRequest.java new file mode 100644 index 000000000..3f08ddfd6 --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateMuteConfigRequest.java @@ -0,0 +1,1167 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/securitycenter_service.proto + +package com.google.cloud.securitycenter.v1; + +/** + * + * + *
+ * Request message for creating a mute config.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.CreateMuteConfigRequest} + */ +public final class CreateMuteConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.CreateMuteConfigRequest) + CreateMuteConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateMuteConfigRequest.newBuilder() to construct. + private CreateMuteConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateMuteConfigRequest() { + parent_ = ""; + muteConfigId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateMuteConfigRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateMuteConfigRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.securitycenter.v1.MuteConfig.Builder subBuilder = null; + if (muteConfig_ != null) { + subBuilder = muteConfig_.toBuilder(); + } + muteConfig_ = + input.readMessage( + com.google.cloud.securitycenter.v1.MuteConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(muteConfig_); + muteConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + muteConfigId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_CreateMuteConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_CreateMuteConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.CreateMuteConfigRequest.class, + com.google.cloud.securitycenter.v1.CreateMuteConfigRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Resource name of the new mute configs's parent. Its format is
+   * "organizations/[organization_id]", "folders/[folder_id]", or
+   * "projects/[project_id]".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Resource name of the new mute configs's parent. Its format is
+   * "organizations/[organization_id]", "folders/[folder_id]", or
+   * "projects/[project_id]".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MUTE_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.securitycenter.v1.MuteConfig muteConfig_; + /** + * + * + *
+   * Required. The mute config being created.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the muteConfig field is set. + */ + @java.lang.Override + public boolean hasMuteConfig() { + return muteConfig_ != null; + } + /** + * + * + *
+   * Required. The mute config being created.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The muteConfig. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.MuteConfig getMuteConfig() { + return muteConfig_ == null + ? com.google.cloud.securitycenter.v1.MuteConfig.getDefaultInstance() + : muteConfig_; + } + /** + * + * + *
+   * Required. The mute config being created.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.MuteConfigOrBuilder getMuteConfigOrBuilder() { + return getMuteConfig(); + } + + public static final int MUTE_CONFIG_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object muteConfigId_; + /** + * + * + *
+   * Required. Unique identifier provided by the client within the parent scope.
+   * It must consist of lower case letters, numbers, and hyphen, with the first
+   * character a letter, the last a letter or a number, and a 63 character
+   * maximum.
+   * 
+ * + * string mute_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The muteConfigId. + */ + @java.lang.Override + public java.lang.String getMuteConfigId() { + java.lang.Object ref = muteConfigId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + muteConfigId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Unique identifier provided by the client within the parent scope.
+   * It must consist of lower case letters, numbers, and hyphen, with the first
+   * character a letter, the last a letter or a number, and a 63 character
+   * maximum.
+   * 
+ * + * string mute_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for muteConfigId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMuteConfigIdBytes() { + java.lang.Object ref = muteConfigId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + muteConfigId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (muteConfig_ != null) { + output.writeMessage(2, getMuteConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(muteConfigId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, muteConfigId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (muteConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMuteConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(muteConfigId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, muteConfigId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.securitycenter.v1.CreateMuteConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v1.CreateMuteConfigRequest other = + (com.google.cloud.securitycenter.v1.CreateMuteConfigRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasMuteConfig() != other.hasMuteConfig()) return false; + if (hasMuteConfig()) { + if (!getMuteConfig().equals(other.getMuteConfig())) return false; + } + if (!getMuteConfigId().equals(other.getMuteConfigId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasMuteConfig()) { + hash = (37 * hash) + MUTE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getMuteConfig().hashCode(); + } + hash = (37 * hash) + MUTE_CONFIG_ID_FIELD_NUMBER; + hash = (53 * hash) + getMuteConfigId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v1.CreateMuteConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.CreateMuteConfigRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.CreateMuteConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.CreateMuteConfigRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.CreateMuteConfigRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.CreateMuteConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.CreateMuteConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.CreateMuteConfigRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.CreateMuteConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.CreateMuteConfigRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.CreateMuteConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.CreateMuteConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.securitycenter.v1.CreateMuteConfigRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for creating a mute config.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.CreateMuteConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.CreateMuteConfigRequest) + com.google.cloud.securitycenter.v1.CreateMuteConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_CreateMuteConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_CreateMuteConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.CreateMuteConfigRequest.class, + com.google.cloud.securitycenter.v1.CreateMuteConfigRequest.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v1.CreateMuteConfigRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (muteConfigBuilder_ == null) { + muteConfig_ = null; + } else { + muteConfig_ = null; + muteConfigBuilder_ = null; + } + muteConfigId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_CreateMuteConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.CreateMuteConfigRequest getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v1.CreateMuteConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.CreateMuteConfigRequest build() { + com.google.cloud.securitycenter.v1.CreateMuteConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.CreateMuteConfigRequest buildPartial() { + com.google.cloud.securitycenter.v1.CreateMuteConfigRequest result = + new com.google.cloud.securitycenter.v1.CreateMuteConfigRequest(this); + result.parent_ = parent_; + if (muteConfigBuilder_ == null) { + result.muteConfig_ = muteConfig_; + } else { + result.muteConfig_ = muteConfigBuilder_.build(); + } + result.muteConfigId_ = muteConfigId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.securitycenter.v1.CreateMuteConfigRequest) { + return mergeFrom((com.google.cloud.securitycenter.v1.CreateMuteConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v1.CreateMuteConfigRequest other) { + if (other == com.google.cloud.securitycenter.v1.CreateMuteConfigRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasMuteConfig()) { + mergeMuteConfig(other.getMuteConfig()); + } + if (!other.getMuteConfigId().isEmpty()) { + muteConfigId_ = other.muteConfigId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.securitycenter.v1.CreateMuteConfigRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.securitycenter.v1.CreateMuteConfigRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Resource name of the new mute configs's parent. Its format is
+     * "organizations/[organization_id]", "folders/[folder_id]", or
+     * "projects/[project_id]".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Resource name of the new mute configs's parent. Its format is
+     * "organizations/[organization_id]", "folders/[folder_id]", or
+     * "projects/[project_id]".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Resource name of the new mute configs's parent. Its format is
+     * "organizations/[organization_id]", "folders/[folder_id]", or
+     * "projects/[project_id]".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the new mute configs's parent. Its format is
+     * "organizations/[organization_id]", "folders/[folder_id]", or
+     * "projects/[project_id]".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the new mute configs's parent. Its format is
+     * "organizations/[organization_id]", "folders/[folder_id]", or
+     * "projects/[project_id]".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.securitycenter.v1.MuteConfig muteConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.MuteConfig, + com.google.cloud.securitycenter.v1.MuteConfig.Builder, + com.google.cloud.securitycenter.v1.MuteConfigOrBuilder> + muteConfigBuilder_; + /** + * + * + *
+     * Required. The mute config being created.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the muteConfig field is set. + */ + public boolean hasMuteConfig() { + return muteConfigBuilder_ != null || muteConfig_ != null; + } + /** + * + * + *
+     * Required. The mute config being created.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The muteConfig. + */ + public com.google.cloud.securitycenter.v1.MuteConfig getMuteConfig() { + if (muteConfigBuilder_ == null) { + return muteConfig_ == null + ? com.google.cloud.securitycenter.v1.MuteConfig.getDefaultInstance() + : muteConfig_; + } else { + return muteConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The mute config being created.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMuteConfig(com.google.cloud.securitycenter.v1.MuteConfig value) { + if (muteConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + muteConfig_ = value; + onChanged(); + } else { + muteConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The mute config being created.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMuteConfig( + com.google.cloud.securitycenter.v1.MuteConfig.Builder builderForValue) { + if (muteConfigBuilder_ == null) { + muteConfig_ = builderForValue.build(); + onChanged(); + } else { + muteConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The mute config being created.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeMuteConfig(com.google.cloud.securitycenter.v1.MuteConfig value) { + if (muteConfigBuilder_ == null) { + if (muteConfig_ != null) { + muteConfig_ = + com.google.cloud.securitycenter.v1.MuteConfig.newBuilder(muteConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + muteConfig_ = value; + } + onChanged(); + } else { + muteConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The mute config being created.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearMuteConfig() { + if (muteConfigBuilder_ == null) { + muteConfig_ = null; + onChanged(); + } else { + muteConfig_ = null; + muteConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The mute config being created.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.securitycenter.v1.MuteConfig.Builder getMuteConfigBuilder() { + + onChanged(); + return getMuteConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The mute config being created.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.securitycenter.v1.MuteConfigOrBuilder getMuteConfigOrBuilder() { + if (muteConfigBuilder_ != null) { + return muteConfigBuilder_.getMessageOrBuilder(); + } else { + return muteConfig_ == null + ? com.google.cloud.securitycenter.v1.MuteConfig.getDefaultInstance() + : muteConfig_; + } + } + /** + * + * + *
+     * Required. The mute config being created.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.MuteConfig, + com.google.cloud.securitycenter.v1.MuteConfig.Builder, + com.google.cloud.securitycenter.v1.MuteConfigOrBuilder> + getMuteConfigFieldBuilder() { + if (muteConfigBuilder_ == null) { + muteConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.MuteConfig, + com.google.cloud.securitycenter.v1.MuteConfig.Builder, + com.google.cloud.securitycenter.v1.MuteConfigOrBuilder>( + getMuteConfig(), getParentForChildren(), isClean()); + muteConfig_ = null; + } + return muteConfigBuilder_; + } + + private java.lang.Object muteConfigId_ = ""; + /** + * + * + *
+     * Required. Unique identifier provided by the client within the parent scope.
+     * It must consist of lower case letters, numbers, and hyphen, with the first
+     * character a letter, the last a letter or a number, and a 63 character
+     * maximum.
+     * 
+ * + * string mute_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The muteConfigId. + */ + public java.lang.String getMuteConfigId() { + java.lang.Object ref = muteConfigId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + muteConfigId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Unique identifier provided by the client within the parent scope.
+     * It must consist of lower case letters, numbers, and hyphen, with the first
+     * character a letter, the last a letter or a number, and a 63 character
+     * maximum.
+     * 
+ * + * string mute_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for muteConfigId. + */ + public com.google.protobuf.ByteString getMuteConfigIdBytes() { + java.lang.Object ref = muteConfigId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + muteConfigId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Unique identifier provided by the client within the parent scope.
+     * It must consist of lower case letters, numbers, and hyphen, with the first
+     * character a letter, the last a letter or a number, and a 63 character
+     * maximum.
+     * 
+ * + * string mute_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The muteConfigId to set. + * @return This builder for chaining. + */ + public Builder setMuteConfigId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + muteConfigId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Unique identifier provided by the client within the parent scope.
+     * It must consist of lower case letters, numbers, and hyphen, with the first
+     * character a letter, the last a letter or a number, and a 63 character
+     * maximum.
+     * 
+ * + * string mute_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMuteConfigId() { + + muteConfigId_ = getDefaultInstance().getMuteConfigId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Unique identifier provided by the client within the parent scope.
+     * It must consist of lower case letters, numbers, and hyphen, with the first
+     * character a letter, the last a letter or a number, and a 63 character
+     * maximum.
+     * 
+ * + * string mute_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for muteConfigId to set. + * @return This builder for chaining. + */ + public Builder setMuteConfigIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + muteConfigId_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.CreateMuteConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.CreateMuteConfigRequest) + private static final com.google.cloud.securitycenter.v1.CreateMuteConfigRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.CreateMuteConfigRequest(); + } + + public static com.google.cloud.securitycenter.v1.CreateMuteConfigRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateMuteConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateMuteConfigRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.CreateMuteConfigRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateMuteConfigRequestOrBuilder.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateMuteConfigRequestOrBuilder.java new file mode 100644 index 000000000..07965be0e --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateMuteConfigRequestOrBuilder.java @@ -0,0 +1,130 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/securitycenter_service.proto + +package com.google.cloud.securitycenter.v1; + +public interface CreateMuteConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.CreateMuteConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Resource name of the new mute configs's parent. Its format is
+   * "organizations/[organization_id]", "folders/[folder_id]", or
+   * "projects/[project_id]".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Resource name of the new mute configs's parent. Its format is
+   * "organizations/[organization_id]", "folders/[folder_id]", or
+   * "projects/[project_id]".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The mute config being created.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the muteConfig field is set. + */ + boolean hasMuteConfig(); + /** + * + * + *
+   * Required. The mute config being created.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The muteConfig. + */ + com.google.cloud.securitycenter.v1.MuteConfig getMuteConfig(); + /** + * + * + *
+   * Required. The mute config being created.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.securitycenter.v1.MuteConfigOrBuilder getMuteConfigOrBuilder(); + + /** + * + * + *
+   * Required. Unique identifier provided by the client within the parent scope.
+   * It must consist of lower case letters, numbers, and hyphen, with the first
+   * character a letter, the last a letter or a number, and a 63 character
+   * maximum.
+   * 
+ * + * string mute_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The muteConfigId. + */ + java.lang.String getMuteConfigId(); + /** + * + * + *
+   * Required. Unique identifier provided by the client within the parent scope.
+   * It must consist of lower case letters, numbers, and hyphen, with the first
+   * character a letter, the last a letter or a number, and a 63 character
+   * maximum.
+   * 
+ * + * string mute_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for muteConfigId. + */ + com.google.protobuf.ByteString getMuteConfigIdBytes(); +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DeleteMuteConfigRequest.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DeleteMuteConfigRequest.java new file mode 100644 index 000000000..d6fcddc1c --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DeleteMuteConfigRequest.java @@ -0,0 +1,672 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/securitycenter_service.proto + +package com.google.cloud.securitycenter.v1; + +/** + * + * + *
+ * Request message for deleting a mute config.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.DeleteMuteConfigRequest} + */ +public final class DeleteMuteConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.DeleteMuteConfigRequest) + DeleteMuteConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteMuteConfigRequest.newBuilder() to construct. + private DeleteMuteConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteMuteConfigRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteMuteConfigRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteMuteConfigRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_DeleteMuteConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_DeleteMuteConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest.class, + com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Name of the mute config to delete. Its format is
+   * organizations/{organization}/muteConfigs/{config_id},
+   * folders/{folder}/muteConfigs/{config_id}, or
+   * projects/{project}/muteConfigs/{config_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the mute config to delete. Its format is
+   * organizations/{organization}/muteConfigs/{config_id},
+   * folders/{folder}/muteConfigs/{config_id}, or
+   * projects/{project}/muteConfigs/{config_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest other = + (com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for deleting a mute config.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.DeleteMuteConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.DeleteMuteConfigRequest) + com.google.cloud.securitycenter.v1.DeleteMuteConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_DeleteMuteConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_DeleteMuteConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest.class, + com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_DeleteMuteConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest build() { + com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest buildPartial() { + com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest result = + new com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest) { + return mergeFrom((com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest other) { + if (other == com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the mute config to delete. Its format is
+     * organizations/{organization}/muteConfigs/{config_id},
+     * folders/{folder}/muteConfigs/{config_id}, or
+     * projects/{project}/muteConfigs/{config_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the mute config to delete. Its format is
+     * organizations/{organization}/muteConfigs/{config_id},
+     * folders/{folder}/muteConfigs/{config_id}, or
+     * projects/{project}/muteConfigs/{config_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the mute config to delete. Its format is
+     * organizations/{organization}/muteConfigs/{config_id},
+     * folders/{folder}/muteConfigs/{config_id}, or
+     * projects/{project}/muteConfigs/{config_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the mute config to delete. Its format is
+     * organizations/{organization}/muteConfigs/{config_id},
+     * folders/{folder}/muteConfigs/{config_id}, or
+     * projects/{project}/muteConfigs/{config_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the mute config to delete. Its format is
+     * organizations/{organization}/muteConfigs/{config_id},
+     * folders/{folder}/muteConfigs/{config_id}, or
+     * projects/{project}/muteConfigs/{config_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.DeleteMuteConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.DeleteMuteConfigRequest) + private static final com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest(); + } + + public static com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteMuteConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteMuteConfigRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DeleteMuteConfigRequestOrBuilder.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DeleteMuteConfigRequestOrBuilder.java new file mode 100644 index 000000000..488c64d4a --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DeleteMuteConfigRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/securitycenter_service.proto + +package com.google.cloud.securitycenter.v1; + +public interface DeleteMuteConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.DeleteMuteConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the mute config to delete. Its format is
+   * organizations/{organization}/muteConfigs/{config_id},
+   * folders/{folder}/muteConfigs/{config_id}, or
+   * projects/{project}/muteConfigs/{config_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the mute config to delete. Its format is
+   * organizations/{organization}/muteConfigs/{config_id},
+   * folders/{folder}/muteConfigs/{config_id}, or
+   * projects/{project}/muteConfigs/{config_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExternalSystem.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExternalSystem.java new file mode 100644 index 000000000..010ba80b0 --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExternalSystem.java @@ -0,0 +1,1593 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/external_system.proto + +package com.google.cloud.securitycenter.v1; + +/** + * + * + *
+ * Representation of third party SIEM/SOAR fields within SCC.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.ExternalSystem} + */ +public final class ExternalSystem extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.ExternalSystem) + ExternalSystemOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExternalSystem.newBuilder() to construct. + private ExternalSystem(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExternalSystem() { + name_ = ""; + assignees_ = com.google.protobuf.LazyStringArrayList.EMPTY; + externalUid_ = ""; + status_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExternalSystem(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExternalSystem( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + assignees_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + assignees_.add(s); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + externalUid_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + status_ = s; + break; + } + case 42: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (externalSystemUpdateTime_ != null) { + subBuilder = externalSystemUpdateTime_.toBuilder(); + } + externalSystemUpdateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(externalSystemUpdateTime_); + externalSystemUpdateTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + assignees_ = assignees_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.ExternalSystemProto + .internal_static_google_cloud_securitycenter_v1_ExternalSystem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.ExternalSystemProto + .internal_static_google_cloud_securitycenter_v1_ExternalSystem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.ExternalSystem.class, + com.google.cloud.securitycenter.v1.ExternalSystem.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * External System Name e.g. jira, demisto, etc.
+   *  e.g.: `organizations/1234/sources/5678/findings/123456/externalSystems/jira`
+   * `folders/1234/sources/5678/findings/123456/externalSystems/jira`
+   * `projects/1234/sources/5678/findings/123456/externalSystems/jira`
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * External System Name e.g. jira, demisto, etc.
+   *  e.g.: `organizations/1234/sources/5678/findings/123456/externalSystems/jira`
+   * `folders/1234/sources/5678/findings/123456/externalSystems/jira`
+   * `projects/1234/sources/5678/findings/123456/externalSystems/jira`
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ASSIGNEES_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList assignees_; + /** + * + * + *
+   * References primary/secondary etc assignees in the external system.
+   * 
+ * + * repeated string assignees = 2; + * + * @return A list containing the assignees. + */ + public com.google.protobuf.ProtocolStringList getAssigneesList() { + return assignees_; + } + /** + * + * + *
+   * References primary/secondary etc assignees in the external system.
+   * 
+ * + * repeated string assignees = 2; + * + * @return The count of assignees. + */ + public int getAssigneesCount() { + return assignees_.size(); + } + /** + * + * + *
+   * References primary/secondary etc assignees in the external system.
+   * 
+ * + * repeated string assignees = 2; + * + * @param index The index of the element to return. + * @return The assignees at the given index. + */ + public java.lang.String getAssignees(int index) { + return assignees_.get(index); + } + /** + * + * + *
+   * References primary/secondary etc assignees in the external system.
+   * 
+ * + * repeated string assignees = 2; + * + * @param index The index of the value to return. + * @return The bytes of the assignees at the given index. + */ + public com.google.protobuf.ByteString getAssigneesBytes(int index) { + return assignees_.getByteString(index); + } + + public static final int EXTERNAL_UID_FIELD_NUMBER = 3; + private volatile java.lang.Object externalUid_; + /** + * + * + *
+   * Identifier that's used to track the given finding in the external system.
+   * 
+ * + * string external_uid = 3; + * + * @return The externalUid. + */ + @java.lang.Override + public java.lang.String getExternalUid() { + java.lang.Object ref = externalUid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalUid_ = s; + return s; + } + } + /** + * + * + *
+   * Identifier that's used to track the given finding in the external system.
+   * 
+ * + * string external_uid = 3; + * + * @return The bytes for externalUid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExternalUidBytes() { + java.lang.Object ref = externalUid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalUid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_FIELD_NUMBER = 4; + private volatile java.lang.Object status_; + /** + * + * + *
+   * Most recent status of the corresponding finding's ticket/tracker in the
+   * external system.
+   * 
+ * + * string status = 4; + * + * @return The status. + */ + @java.lang.Override + public java.lang.String getStatus() { + java.lang.Object ref = status_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + status_ = s; + return s; + } + } + /** + * + * + *
+   * Most recent status of the corresponding finding's ticket/tracker in the
+   * external system.
+   * 
+ * + * string status = 4; + * + * @return The bytes for status. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStatusBytes() { + java.lang.Object ref = status_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + status_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXTERNAL_SYSTEM_UPDATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp externalSystemUpdateTime_; + /** + * + * + *
+   * The most recent time when the corresponding finding's ticket/tracker was
+   * updated in the external system.
+   * 
+ * + * .google.protobuf.Timestamp external_system_update_time = 5; + * + * @return Whether the externalSystemUpdateTime field is set. + */ + @java.lang.Override + public boolean hasExternalSystemUpdateTime() { + return externalSystemUpdateTime_ != null; + } + /** + * + * + *
+   * The most recent time when the corresponding finding's ticket/tracker was
+   * updated in the external system.
+   * 
+ * + * .google.protobuf.Timestamp external_system_update_time = 5; + * + * @return The externalSystemUpdateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getExternalSystemUpdateTime() { + return externalSystemUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : externalSystemUpdateTime_; + } + /** + * + * + *
+   * The most recent time when the corresponding finding's ticket/tracker was
+   * updated in the external system.
+   * 
+ * + * .google.protobuf.Timestamp external_system_update_time = 5; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getExternalSystemUpdateTimeOrBuilder() { + return getExternalSystemUpdateTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < assignees_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, assignees_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalUid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, externalUid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(status_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, status_); + } + if (externalSystemUpdateTime_ != null) { + output.writeMessage(5, getExternalSystemUpdateTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + { + int dataSize = 0; + for (int i = 0; i < assignees_.size(); i++) { + dataSize += computeStringSizeNoTag(assignees_.getRaw(i)); + } + size += dataSize; + size += 1 * getAssigneesList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalUid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, externalUid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(status_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, status_); + } + if (externalSystemUpdateTime_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, getExternalSystemUpdateTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.securitycenter.v1.ExternalSystem)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v1.ExternalSystem other = + (com.google.cloud.securitycenter.v1.ExternalSystem) obj; + + if (!getName().equals(other.getName())) return false; + if (!getAssigneesList().equals(other.getAssigneesList())) return false; + if (!getExternalUid().equals(other.getExternalUid())) return false; + if (!getStatus().equals(other.getStatus())) return false; + if (hasExternalSystemUpdateTime() != other.hasExternalSystemUpdateTime()) return false; + if (hasExternalSystemUpdateTime()) { + if (!getExternalSystemUpdateTime().equals(other.getExternalSystemUpdateTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getAssigneesCount() > 0) { + hash = (37 * hash) + ASSIGNEES_FIELD_NUMBER; + hash = (53 * hash) + getAssigneesList().hashCode(); + } + hash = (37 * hash) + EXTERNAL_UID_FIELD_NUMBER; + hash = (53 * hash) + getExternalUid().hashCode(); + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus().hashCode(); + if (hasExternalSystemUpdateTime()) { + hash = (37 * hash) + EXTERNAL_SYSTEM_UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getExternalSystemUpdateTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v1.ExternalSystem parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.ExternalSystem parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.ExternalSystem parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.ExternalSystem parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.ExternalSystem parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.ExternalSystem parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.ExternalSystem parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.ExternalSystem parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.ExternalSystem parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.ExternalSystem parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.ExternalSystem parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.ExternalSystem parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.securitycenter.v1.ExternalSystem prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Representation of third party SIEM/SOAR fields within SCC.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.ExternalSystem} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.ExternalSystem) + com.google.cloud.securitycenter.v1.ExternalSystemOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.ExternalSystemProto + .internal_static_google_cloud_securitycenter_v1_ExternalSystem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.ExternalSystemProto + .internal_static_google_cloud_securitycenter_v1_ExternalSystem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.ExternalSystem.class, + com.google.cloud.securitycenter.v1.ExternalSystem.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v1.ExternalSystem.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + assignees_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + externalUid_ = ""; + + status_ = ""; + + if (externalSystemUpdateTimeBuilder_ == null) { + externalSystemUpdateTime_ = null; + } else { + externalSystemUpdateTime_ = null; + externalSystemUpdateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v1.ExternalSystemProto + .internal_static_google_cloud_securitycenter_v1_ExternalSystem_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.ExternalSystem getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v1.ExternalSystem.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.ExternalSystem build() { + com.google.cloud.securitycenter.v1.ExternalSystem result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.ExternalSystem buildPartial() { + com.google.cloud.securitycenter.v1.ExternalSystem result = + new com.google.cloud.securitycenter.v1.ExternalSystem(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (((bitField0_ & 0x00000001) != 0)) { + assignees_ = assignees_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.assignees_ = assignees_; + result.externalUid_ = externalUid_; + result.status_ = status_; + if (externalSystemUpdateTimeBuilder_ == null) { + result.externalSystemUpdateTime_ = externalSystemUpdateTime_; + } else { + result.externalSystemUpdateTime_ = externalSystemUpdateTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.securitycenter.v1.ExternalSystem) { + return mergeFrom((com.google.cloud.securitycenter.v1.ExternalSystem) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v1.ExternalSystem other) { + if (other == com.google.cloud.securitycenter.v1.ExternalSystem.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.assignees_.isEmpty()) { + if (assignees_.isEmpty()) { + assignees_ = other.assignees_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAssigneesIsMutable(); + assignees_.addAll(other.assignees_); + } + onChanged(); + } + if (!other.getExternalUid().isEmpty()) { + externalUid_ = other.externalUid_; + onChanged(); + } + if (!other.getStatus().isEmpty()) { + status_ = other.status_; + onChanged(); + } + if (other.hasExternalSystemUpdateTime()) { + mergeExternalSystemUpdateTime(other.getExternalSystemUpdateTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.securitycenter.v1.ExternalSystem parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.securitycenter.v1.ExternalSystem) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * External System Name e.g. jira, demisto, etc.
+     *  e.g.: `organizations/1234/sources/5678/findings/123456/externalSystems/jira`
+     * `folders/1234/sources/5678/findings/123456/externalSystems/jira`
+     * `projects/1234/sources/5678/findings/123456/externalSystems/jira`
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * External System Name e.g. jira, demisto, etc.
+     *  e.g.: `organizations/1234/sources/5678/findings/123456/externalSystems/jira`
+     * `folders/1234/sources/5678/findings/123456/externalSystems/jira`
+     * `projects/1234/sources/5678/findings/123456/externalSystems/jira`
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * External System Name e.g. jira, demisto, etc.
+     *  e.g.: `organizations/1234/sources/5678/findings/123456/externalSystems/jira`
+     * `folders/1234/sources/5678/findings/123456/externalSystems/jira`
+     * `projects/1234/sources/5678/findings/123456/externalSystems/jira`
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * External System Name e.g. jira, demisto, etc.
+     *  e.g.: `organizations/1234/sources/5678/findings/123456/externalSystems/jira`
+     * `folders/1234/sources/5678/findings/123456/externalSystems/jira`
+     * `projects/1234/sources/5678/findings/123456/externalSystems/jira`
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * External System Name e.g. jira, demisto, etc.
+     *  e.g.: `organizations/1234/sources/5678/findings/123456/externalSystems/jira`
+     * `folders/1234/sources/5678/findings/123456/externalSystems/jira`
+     * `projects/1234/sources/5678/findings/123456/externalSystems/jira`
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList assignees_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureAssigneesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + assignees_ = new com.google.protobuf.LazyStringArrayList(assignees_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * References primary/secondary etc assignees in the external system.
+     * 
+ * + * repeated string assignees = 2; + * + * @return A list containing the assignees. + */ + public com.google.protobuf.ProtocolStringList getAssigneesList() { + return assignees_.getUnmodifiableView(); + } + /** + * + * + *
+     * References primary/secondary etc assignees in the external system.
+     * 
+ * + * repeated string assignees = 2; + * + * @return The count of assignees. + */ + public int getAssigneesCount() { + return assignees_.size(); + } + /** + * + * + *
+     * References primary/secondary etc assignees in the external system.
+     * 
+ * + * repeated string assignees = 2; + * + * @param index The index of the element to return. + * @return The assignees at the given index. + */ + public java.lang.String getAssignees(int index) { + return assignees_.get(index); + } + /** + * + * + *
+     * References primary/secondary etc assignees in the external system.
+     * 
+ * + * repeated string assignees = 2; + * + * @param index The index of the value to return. + * @return The bytes of the assignees at the given index. + */ + public com.google.protobuf.ByteString getAssigneesBytes(int index) { + return assignees_.getByteString(index); + } + /** + * + * + *
+     * References primary/secondary etc assignees in the external system.
+     * 
+ * + * repeated string assignees = 2; + * + * @param index The index to set the value at. + * @param value The assignees to set. + * @return This builder for chaining. + */ + public Builder setAssignees(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssigneesIsMutable(); + assignees_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * References primary/secondary etc assignees in the external system.
+     * 
+ * + * repeated string assignees = 2; + * + * @param value The assignees to add. + * @return This builder for chaining. + */ + public Builder addAssignees(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssigneesIsMutable(); + assignees_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * References primary/secondary etc assignees in the external system.
+     * 
+ * + * repeated string assignees = 2; + * + * @param values The assignees to add. + * @return This builder for chaining. + */ + public Builder addAllAssignees(java.lang.Iterable values) { + ensureAssigneesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, assignees_); + onChanged(); + return this; + } + /** + * + * + *
+     * References primary/secondary etc assignees in the external system.
+     * 
+ * + * repeated string assignees = 2; + * + * @return This builder for chaining. + */ + public Builder clearAssignees() { + assignees_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * References primary/secondary etc assignees in the external system.
+     * 
+ * + * repeated string assignees = 2; + * + * @param value The bytes of the assignees to add. + * @return This builder for chaining. + */ + public Builder addAssigneesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAssigneesIsMutable(); + assignees_.add(value); + onChanged(); + return this; + } + + private java.lang.Object externalUid_ = ""; + /** + * + * + *
+     * Identifier that's used to track the given finding in the external system.
+     * 
+ * + * string external_uid = 3; + * + * @return The externalUid. + */ + public java.lang.String getExternalUid() { + java.lang.Object ref = externalUid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalUid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Identifier that's used to track the given finding in the external system.
+     * 
+ * + * string external_uid = 3; + * + * @return The bytes for externalUid. + */ + public com.google.protobuf.ByteString getExternalUidBytes() { + java.lang.Object ref = externalUid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalUid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Identifier that's used to track the given finding in the external system.
+     * 
+ * + * string external_uid = 3; + * + * @param value The externalUid to set. + * @return This builder for chaining. + */ + public Builder setExternalUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + externalUid_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Identifier that's used to track the given finding in the external system.
+     * 
+ * + * string external_uid = 3; + * + * @return This builder for chaining. + */ + public Builder clearExternalUid() { + + externalUid_ = getDefaultInstance().getExternalUid(); + onChanged(); + return this; + } + /** + * + * + *
+     * Identifier that's used to track the given finding in the external system.
+     * 
+ * + * string external_uid = 3; + * + * @param value The bytes for externalUid to set. + * @return This builder for chaining. + */ + public Builder setExternalUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + externalUid_ = value; + onChanged(); + return this; + } + + private java.lang.Object status_ = ""; + /** + * + * + *
+     * Most recent status of the corresponding finding's ticket/tracker in the
+     * external system.
+     * 
+ * + * string status = 4; + * + * @return The status. + */ + public java.lang.String getStatus() { + java.lang.Object ref = status_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + status_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Most recent status of the corresponding finding's ticket/tracker in the
+     * external system.
+     * 
+ * + * string status = 4; + * + * @return The bytes for status. + */ + public com.google.protobuf.ByteString getStatusBytes() { + java.lang.Object ref = status_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + status_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Most recent status of the corresponding finding's ticket/tracker in the
+     * external system.
+     * 
+ * + * string status = 4; + * + * @param value The status to set. + * @return This builder for chaining. + */ + public Builder setStatus(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + status_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Most recent status of the corresponding finding's ticket/tracker in the
+     * external system.
+     * 
+ * + * string status = 4; + * + * @return This builder for chaining. + */ + public Builder clearStatus() { + + status_ = getDefaultInstance().getStatus(); + onChanged(); + return this; + } + /** + * + * + *
+     * Most recent status of the corresponding finding's ticket/tracker in the
+     * external system.
+     * 
+ * + * string status = 4; + * + * @param value The bytes for status to set. + * @return This builder for chaining. + */ + public Builder setStatusBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + status_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp externalSystemUpdateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + externalSystemUpdateTimeBuilder_; + /** + * + * + *
+     * The most recent time when the corresponding finding's ticket/tracker was
+     * updated in the external system.
+     * 
+ * + * .google.protobuf.Timestamp external_system_update_time = 5; + * + * @return Whether the externalSystemUpdateTime field is set. + */ + public boolean hasExternalSystemUpdateTime() { + return externalSystemUpdateTimeBuilder_ != null || externalSystemUpdateTime_ != null; + } + /** + * + * + *
+     * The most recent time when the corresponding finding's ticket/tracker was
+     * updated in the external system.
+     * 
+ * + * .google.protobuf.Timestamp external_system_update_time = 5; + * + * @return The externalSystemUpdateTime. + */ + public com.google.protobuf.Timestamp getExternalSystemUpdateTime() { + if (externalSystemUpdateTimeBuilder_ == null) { + return externalSystemUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : externalSystemUpdateTime_; + } else { + return externalSystemUpdateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The most recent time when the corresponding finding's ticket/tracker was
+     * updated in the external system.
+     * 
+ * + * .google.protobuf.Timestamp external_system_update_time = 5; + */ + public Builder setExternalSystemUpdateTime(com.google.protobuf.Timestamp value) { + if (externalSystemUpdateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + externalSystemUpdateTime_ = value; + onChanged(); + } else { + externalSystemUpdateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The most recent time when the corresponding finding's ticket/tracker was
+     * updated in the external system.
+     * 
+ * + * .google.protobuf.Timestamp external_system_update_time = 5; + */ + public Builder setExternalSystemUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (externalSystemUpdateTimeBuilder_ == null) { + externalSystemUpdateTime_ = builderForValue.build(); + onChanged(); + } else { + externalSystemUpdateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The most recent time when the corresponding finding's ticket/tracker was
+     * updated in the external system.
+     * 
+ * + * .google.protobuf.Timestamp external_system_update_time = 5; + */ + public Builder mergeExternalSystemUpdateTime(com.google.protobuf.Timestamp value) { + if (externalSystemUpdateTimeBuilder_ == null) { + if (externalSystemUpdateTime_ != null) { + externalSystemUpdateTime_ = + com.google.protobuf.Timestamp.newBuilder(externalSystemUpdateTime_) + .mergeFrom(value) + .buildPartial(); + } else { + externalSystemUpdateTime_ = value; + } + onChanged(); + } else { + externalSystemUpdateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The most recent time when the corresponding finding's ticket/tracker was
+     * updated in the external system.
+     * 
+ * + * .google.protobuf.Timestamp external_system_update_time = 5; + */ + public Builder clearExternalSystemUpdateTime() { + if (externalSystemUpdateTimeBuilder_ == null) { + externalSystemUpdateTime_ = null; + onChanged(); + } else { + externalSystemUpdateTime_ = null; + externalSystemUpdateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The most recent time when the corresponding finding's ticket/tracker was
+     * updated in the external system.
+     * 
+ * + * .google.protobuf.Timestamp external_system_update_time = 5; + */ + public com.google.protobuf.Timestamp.Builder getExternalSystemUpdateTimeBuilder() { + + onChanged(); + return getExternalSystemUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The most recent time when the corresponding finding's ticket/tracker was
+     * updated in the external system.
+     * 
+ * + * .google.protobuf.Timestamp external_system_update_time = 5; + */ + public com.google.protobuf.TimestampOrBuilder getExternalSystemUpdateTimeOrBuilder() { + if (externalSystemUpdateTimeBuilder_ != null) { + return externalSystemUpdateTimeBuilder_.getMessageOrBuilder(); + } else { + return externalSystemUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : externalSystemUpdateTime_; + } + } + /** + * + * + *
+     * The most recent time when the corresponding finding's ticket/tracker was
+     * updated in the external system.
+     * 
+ * + * .google.protobuf.Timestamp external_system_update_time = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getExternalSystemUpdateTimeFieldBuilder() { + if (externalSystemUpdateTimeBuilder_ == null) { + externalSystemUpdateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getExternalSystemUpdateTime(), getParentForChildren(), isClean()); + externalSystemUpdateTime_ = null; + } + return externalSystemUpdateTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.ExternalSystem) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.ExternalSystem) + private static final com.google.cloud.securitycenter.v1.ExternalSystem DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.ExternalSystem(); + } + + public static com.google.cloud.securitycenter.v1.ExternalSystem getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExternalSystem parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExternalSystem(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.ExternalSystem getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExternalSystemOrBuilder.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExternalSystemOrBuilder.java new file mode 100644 index 000000000..79cf8893c --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExternalSystemOrBuilder.java @@ -0,0 +1,197 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/external_system.proto + +package com.google.cloud.securitycenter.v1; + +public interface ExternalSystemOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.ExternalSystem) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * External System Name e.g. jira, demisto, etc.
+   *  e.g.: `organizations/1234/sources/5678/findings/123456/externalSystems/jira`
+   * `folders/1234/sources/5678/findings/123456/externalSystems/jira`
+   * `projects/1234/sources/5678/findings/123456/externalSystems/jira`
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * External System Name e.g. jira, demisto, etc.
+   *  e.g.: `organizations/1234/sources/5678/findings/123456/externalSystems/jira`
+   * `folders/1234/sources/5678/findings/123456/externalSystems/jira`
+   * `projects/1234/sources/5678/findings/123456/externalSystems/jira`
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * References primary/secondary etc assignees in the external system.
+   * 
+ * + * repeated string assignees = 2; + * + * @return A list containing the assignees. + */ + java.util.List getAssigneesList(); + /** + * + * + *
+   * References primary/secondary etc assignees in the external system.
+   * 
+ * + * repeated string assignees = 2; + * + * @return The count of assignees. + */ + int getAssigneesCount(); + /** + * + * + *
+   * References primary/secondary etc assignees in the external system.
+   * 
+ * + * repeated string assignees = 2; + * + * @param index The index of the element to return. + * @return The assignees at the given index. + */ + java.lang.String getAssignees(int index); + /** + * + * + *
+   * References primary/secondary etc assignees in the external system.
+   * 
+ * + * repeated string assignees = 2; + * + * @param index The index of the value to return. + * @return The bytes of the assignees at the given index. + */ + com.google.protobuf.ByteString getAssigneesBytes(int index); + + /** + * + * + *
+   * Identifier that's used to track the given finding in the external system.
+   * 
+ * + * string external_uid = 3; + * + * @return The externalUid. + */ + java.lang.String getExternalUid(); + /** + * + * + *
+   * Identifier that's used to track the given finding in the external system.
+   * 
+ * + * string external_uid = 3; + * + * @return The bytes for externalUid. + */ + com.google.protobuf.ByteString getExternalUidBytes(); + + /** + * + * + *
+   * Most recent status of the corresponding finding's ticket/tracker in the
+   * external system.
+   * 
+ * + * string status = 4; + * + * @return The status. + */ + java.lang.String getStatus(); + /** + * + * + *
+   * Most recent status of the corresponding finding's ticket/tracker in the
+   * external system.
+   * 
+ * + * string status = 4; + * + * @return The bytes for status. + */ + com.google.protobuf.ByteString getStatusBytes(); + + /** + * + * + *
+   * The most recent time when the corresponding finding's ticket/tracker was
+   * updated in the external system.
+   * 
+ * + * .google.protobuf.Timestamp external_system_update_time = 5; + * + * @return Whether the externalSystemUpdateTime field is set. + */ + boolean hasExternalSystemUpdateTime(); + /** + * + * + *
+   * The most recent time when the corresponding finding's ticket/tracker was
+   * updated in the external system.
+   * 
+ * + * .google.protobuf.Timestamp external_system_update_time = 5; + * + * @return The externalSystemUpdateTime. + */ + com.google.protobuf.Timestamp getExternalSystemUpdateTime(); + /** + * + * + *
+   * The most recent time when the corresponding finding's ticket/tracker was
+   * updated in the external system.
+   * 
+ * + * .google.protobuf.Timestamp external_system_update_time = 5; + */ + com.google.protobuf.TimestampOrBuilder getExternalSystemUpdateTimeOrBuilder(); +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExternalSystemProto.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExternalSystemProto.java new file mode 100644 index 000000000..627052481 --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExternalSystemProto.java @@ -0,0 +1,94 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/external_system.proto + +package com.google.cloud.securitycenter.v1; + +public final class ExternalSystemProto { + private ExternalSystemProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v1_ExternalSystem_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v1_ExternalSystem_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n4google/cloud/securitycenter/v1/externa" + + "l_system.proto\022\036google.cloud.securitycen" + + "ter.v1\032\031google/api/resource.proto\032\037googl" + + "e/protobuf/timestamp.proto\032\034google/api/a" + + "nnotations.proto\"\340\003\n\016ExternalSystem\022\014\n\004n" + + "ame\030\001 \001(\t\022\021\n\tassignees\030\002 \003(\t\022\024\n\014external" + + "_uid\030\003 \001(\t\022\016\n\006status\030\004 \001(\t\022?\n\033external_s" + + "ystem_update_time\030\005 \001(\0132\032.google.protobu" + + "f.Timestamp:\305\002\352A\301\002\n,securitycenter.googl" + + "eapis.com/ExternalSystem\022aorganizations/" + + "{organization}/sources/{source}/findings" + + "/{finding}/externalSystems/{externalsyst" + + "em}\022Ufolders/{folder}/sources/{source}/f" + + "indings/{finding}/externalSystems/{exter" + + "nalsystem}\022Wprojects/{project}/sources/{" + + "source}/findings/{finding}/externalSyste" + + "ms/{externalsystem}B\357\001\n\"com.google.cloud" + + ".securitycenter.v1B\023ExternalSystemProtoP" + + "\001ZLgoogle.golang.org/genproto/googleapis" + + "/cloud/securitycenter/v1;securitycenter\252" + + "\002\036Google.Cloud.SecurityCenter.V1\312\002\036Googl" + + "e\\Cloud\\SecurityCenter\\V1\352\002!Google::Clou" + + "d::SecurityCenter::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_securitycenter_v1_ExternalSystem_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_securitycenter_v1_ExternalSystem_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v1_ExternalSystem_descriptor, + new java.lang.String[] { + "Name", "Assignees", "ExternalUid", "Status", "ExternalSystemUpdateTime", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Finding.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Finding.java index 956937f67..7f578034c 100644 --- a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Finding.java +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Finding.java @@ -51,7 +51,9 @@ private Finding() { externalUri_ = ""; severity_ = 0; canonicalName_ = ""; + mute_ = 0; findingClass_ = 0; + muteInitiator_ = ""; } @java.lang.Override @@ -204,6 +206,13 @@ private Finding( canonicalName_ = s; break; } + case 120: + { + int rawValue = input.readEnum(); + + mute_ = rawValue; + break; + } case 136: { int rawValue = input.readEnum(); @@ -241,6 +250,47 @@ private Finding( vulnerability_ = subBuilder.buildPartial(); } + break; + } + case 170: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (muteUpdateTime_ != null) { + subBuilder = muteUpdateTime_.toBuilder(); + } + muteUpdateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(muteUpdateTime_); + muteUpdateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 178: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + externalSystems_ = + com.google.protobuf.MapField.newMapField( + ExternalSystemsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.securitycenter.v1.ExternalSystem> + externalSystems__ = + input.readMessage( + ExternalSystemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + externalSystems_ + .getMutableMap() + .put(externalSystems__.getKey(), externalSystems__.getValue()); + break; + } + case 226: + { + java.lang.String s = input.readStringRequireUtf8(); + + muteInitiator_ = s; break; } default: @@ -273,6 +323,8 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { switch (number) { case 7: return internalGetSourceProperties(); + case 22: + return internalGetExternalSystems(); default: throw new RuntimeException("Invalid map field number: " + number); } @@ -722,6 +774,185 @@ private Severity(int value) { // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v1.Finding.Severity) } + /** + * + * + *
+   * Mute state a finding can be in.
+   * 
+ * + * Protobuf enum {@code google.cloud.securitycenter.v1.Finding.Mute} + */ + public enum Mute implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified.
+     * 
+ * + * MUTE_UNSPECIFIED = 0; + */ + MUTE_UNSPECIFIED(0), + /** + * + * + *
+     * Finding has been muted.
+     * 
+ * + * MUTED = 1; + */ + MUTED(1), + /** + * + * + *
+     * Finding has been unmuted.
+     * 
+ * + * UNMUTED = 2; + */ + UNMUTED(2), + /** + * + * + *
+     * Finding has never been muted/unmuted.
+     * 
+ * + * UNDEFINED = 4; + */ + UNDEFINED(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified.
+     * 
+ * + * MUTE_UNSPECIFIED = 0; + */ + public static final int MUTE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Finding has been muted.
+     * 
+ * + * MUTED = 1; + */ + public static final int MUTED_VALUE = 1; + /** + * + * + *
+     * Finding has been unmuted.
+     * 
+ * + * UNMUTED = 2; + */ + public static final int UNMUTED_VALUE = 2; + /** + * + * + *
+     * Finding has never been muted/unmuted.
+     * 
+ * + * UNDEFINED = 4; + */ + public static final int UNDEFINED_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Mute valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Mute forNumber(int value) { + switch (value) { + case 0: + return MUTE_UNSPECIFIED; + case 1: + return MUTED; + case 2: + return UNMUTED; + case 4: + return UNDEFINED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Mute findValueByNumber(int number) { + return Mute.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.Finding.getDescriptor().getEnumTypes().get(2); + } + + private static final Mute[] VALUES = values(); + + public static Mute valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Mute(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v1.Finding.Mute) + } + /** * * @@ -903,7 +1134,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.securitycenter.v1.Finding.getDescriptor().getEnumTypes().get(2); + return com.google.cloud.securitycenter.v1.Finding.getDescriptor().getEnumTypes().get(3); } private static final FindingClass[] VALUES = values(); @@ -1624,6 +1855,44 @@ public com.google.protobuf.ByteString getCanonicalNameBytes() { } } + public static final int MUTE_FIELD_NUMBER = 15; + private int mute_; + /** + * + * + *
+   * Indicates the mute state of a finding (either unspecified, muted, unmuted
+   * or undefined).
+   * 
+ * + * .google.cloud.securitycenter.v1.Finding.Mute mute = 15; + * + * @return The enum numeric value on the wire for mute. + */ + @java.lang.Override + public int getMuteValue() { + return mute_; + } + /** + * + * + *
+   * Indicates the mute state of a finding (either unspecified, muted, unmuted
+   * or undefined).
+   * 
+ * + * .google.cloud.securitycenter.v1.Finding.Mute mute = 15; + * + * @return The mute. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.Finding.Mute getMute() { + @SuppressWarnings("deprecation") + com.google.cloud.securitycenter.v1.Finding.Mute result = + com.google.cloud.securitycenter.v1.Finding.Mute.valueOf(mute_); + return result == null ? com.google.cloud.securitycenter.v1.Finding.Mute.UNRECOGNIZED : result; + } + public static final int FINDING_CLASS_FIELD_NUMBER = 17; private int findingClass_; /** @@ -1776,27 +2045,259 @@ public com.google.cloud.securitycenter.v1.VulnerabilityOrBuilder getVulnerabilit return getVulnerability(); } - private byte memoizedIsInitialized = -1; - + public static final int MUTE_UPDATE_TIME_FIELD_NUMBER = 21; + private com.google.protobuf.Timestamp muteUpdateTime_; + /** + * + * + *
+   * Output only. The most recent time this finding was muted or unmuted.
+   * 
+ * + * + * .google.protobuf.Timestamp mute_update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the muteUpdateTime field is set. + */ @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public boolean hasMuteUpdateTime() { + return muteUpdateTime_ != null; + } + /** + * + * + *
+   * Output only. The most recent time this finding was muted or unmuted.
+   * 
+ * + * + * .google.protobuf.Timestamp mute_update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The muteUpdateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getMuteUpdateTime() { + return muteUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : muteUpdateTime_; + } + /** + * + * + *
+   * Output only. The most recent time this finding was muted or unmuted.
+   * 
+ * + * + * .google.protobuf.Timestamp mute_update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getMuteUpdateTimeOrBuilder() { + return getMuteUpdateTime(); + } - memoizedIsInitialized = 1; - return true; + public static final int EXTERNAL_SYSTEMS_FIELD_NUMBER = 22; + + private static final class ExternalSystemsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.securitycenter.v1.ExternalSystem> + defaultEntry = + com.google.protobuf.MapEntry + . + newDefaultInstance( + com.google.cloud.securitycenter.v1.FindingOuterClass + .internal_static_google_cloud_securitycenter_v1_Finding_ExternalSystemsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.securitycenter.v1.ExternalSystem.getDefaultInstance()); } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.securitycenter.v1.ExternalSystem> + externalSystems_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.securitycenter.v1.ExternalSystem> + internalGetExternalSystems() { + if (externalSystems_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ExternalSystemsDefaultEntryHolder.defaultEntry); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, parent_); + return externalSystems_; + } + + public int getExternalSystemsCount() { + return internalGetExternalSystems().getMap().size(); + } + /** + * + * + *
+   * Output only. Third party SIEM/SOAR fields within SCC, contains external system
+   * information and external system finding fields.
+   * 
+ * + * + * map<string, .google.cloud.securitycenter.v1.ExternalSystem> external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsExternalSystems(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) { + return internalGetExternalSystems().getMap().containsKey(key); + } + /** Use {@link #getExternalSystemsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getExternalSystems() { + return getExternalSystemsMap(); + } + /** + * + * + *
+   * Output only. Third party SIEM/SOAR fields within SCC, contains external system
+   * information and external system finding fields.
+   * 
+ * + * + * map<string, .google.cloud.securitycenter.v1.ExternalSystem> external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map + getExternalSystemsMap() { + return internalGetExternalSystems().getMap(); + } + /** + * + * + *
+   * Output only. Third party SIEM/SOAR fields within SCC, contains external system
+   * information and external system finding fields.
+   * 
+ * + * + * map<string, .google.cloud.securitycenter.v1.ExternalSystem> external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystemsOrDefault( + java.lang.String key, com.google.cloud.securitycenter.v1.ExternalSystem defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetExternalSystems().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Output only. Third party SIEM/SOAR fields within SCC, contains external system
+   * information and external system finding fields.
+   * 
+ * + * + * map<string, .google.cloud.securitycenter.v1.ExternalSystem> external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystemsOrThrow( + java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetExternalSystems().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int MUTE_INITIATOR_FIELD_NUMBER = 28; + private volatile java.lang.Object muteInitiator_; + /** + * + * + *
+   * First known as mute_annotation. Records additional information about the
+   * mute operation e.g. mute config that muted the finding, user who muted the
+   * finding, etc.
+   * 
+ * + * string mute_initiator = 28; + * + * @return The muteInitiator. + */ + @java.lang.Override + public java.lang.String getMuteInitiator() { + java.lang.Object ref = muteInitiator_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + muteInitiator_ = s; + return s; + } + } + /** + * + * + *
+   * First known as mute_annotation. Records additional information about the
+   * mute operation e.g. mute config that muted the finding, user who muted the
+   * finding, etc.
+   * 
+ * + * string mute_initiator = 28; + * + * @return The bytes for muteInitiator. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMuteInitiatorBytes() { + java.lang.Object ref = muteInitiator_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + muteInitiator_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, resourceName_); } if (state_ != com.google.cloud.securitycenter.v1.Finding.State.STATE_UNSPECIFIED.getNumber()) { @@ -1826,6 +2327,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(canonicalName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 14, canonicalName_); } + if (mute_ != com.google.cloud.securitycenter.v1.Finding.Mute.MUTE_UNSPECIFIED.getNumber()) { + output.writeEnum(15, mute_); + } if (findingClass_ != com.google.cloud.securitycenter.v1.Finding.FindingClass.FINDING_CLASS_UNSPECIFIED .getNumber()) { @@ -1837,6 +2341,14 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (vulnerability_ != null) { output.writeMessage(20, getVulnerability()); } + if (muteUpdateTime_ != null) { + output.writeMessage(21, getMuteUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetExternalSystems(), ExternalSystemsDefaultEntryHolder.defaultEntry, 22); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(muteInitiator_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 28, muteInitiator_); + } unknownFields.writeTo(output); } @@ -1890,6 +2402,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(canonicalName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, canonicalName_); } + if (mute_ != com.google.cloud.securitycenter.v1.Finding.Mute.MUTE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(15, mute_); + } if (findingClass_ != com.google.cloud.securitycenter.v1.Finding.FindingClass.FINDING_CLASS_UNSPECIFIED .getNumber()) { @@ -1901,6 +2416,24 @@ public int getSerializedSize() { if (vulnerability_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, getVulnerability()); } + if (muteUpdateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, getMuteUpdateTime()); + } + for (java.util.Map.Entry + entry : internalGetExternalSystems().getMap().entrySet()) { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.securitycenter.v1.ExternalSystem> + externalSystems__ = + ExternalSystemsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(22, externalSystems__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(muteInitiator_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(28, muteInitiator_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -1938,6 +2471,7 @@ public boolean equals(final java.lang.Object obj) { } if (severity_ != other.severity_) return false; if (!getCanonicalName().equals(other.getCanonicalName())) return false; + if (mute_ != other.mute_) return false; if (findingClass_ != other.findingClass_) return false; if (hasIndicator() != other.hasIndicator()) return false; if (hasIndicator()) { @@ -1947,6 +2481,12 @@ public boolean equals(final java.lang.Object obj) { if (hasVulnerability()) { if (!getVulnerability().equals(other.getVulnerability())) return false; } + if (hasMuteUpdateTime() != other.hasMuteUpdateTime()) return false; + if (hasMuteUpdateTime()) { + if (!getMuteUpdateTime().equals(other.getMuteUpdateTime())) return false; + } + if (!internalGetExternalSystems().equals(other.internalGetExternalSystems())) return false; + if (!getMuteInitiator().equals(other.getMuteInitiator())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -1990,6 +2530,8 @@ public int hashCode() { hash = (53 * hash) + severity_; hash = (37 * hash) + CANONICAL_NAME_FIELD_NUMBER; hash = (53 * hash) + getCanonicalName().hashCode(); + hash = (37 * hash) + MUTE_FIELD_NUMBER; + hash = (53 * hash) + mute_; hash = (37 * hash) + FINDING_CLASS_FIELD_NUMBER; hash = (53 * hash) + findingClass_; if (hasIndicator()) { @@ -2000,6 +2542,16 @@ public int hashCode() { hash = (37 * hash) + VULNERABILITY_FIELD_NUMBER; hash = (53 * hash) + getVulnerability().hashCode(); } + if (hasMuteUpdateTime()) { + hash = (37 * hash) + MUTE_UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getMuteUpdateTime().hashCode(); + } + if (!internalGetExternalSystems().getMap().isEmpty()) { + hash = (37 * hash) + EXTERNAL_SYSTEMS_FIELD_NUMBER; + hash = (53 * hash) + internalGetExternalSystems().hashCode(); + } + hash = (37 * hash) + MUTE_INITIATOR_FIELD_NUMBER; + hash = (53 * hash) + getMuteInitiator().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -2128,6 +2680,8 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { switch (number) { case 7: return internalGetSourceProperties(); + case 22: + return internalGetExternalSystems(); default: throw new RuntimeException("Invalid map field number: " + number); } @@ -2138,6 +2692,8 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { switch (number) { case 7: return internalGetMutableSourceProperties(); + case 22: + return internalGetMutableExternalSystems(); default: throw new RuntimeException("Invalid map field number: " + number); } @@ -2205,6 +2761,8 @@ public Builder clear() { canonicalName_ = ""; + mute_ = 0; + findingClass_ = 0; if (indicatorBuilder_ == null) { @@ -2219,6 +2777,15 @@ public Builder clear() { vulnerability_ = null; vulnerabilityBuilder_ = null; } + if (muteUpdateTimeBuilder_ == null) { + muteUpdateTime_ = null; + } else { + muteUpdateTime_ = null; + muteUpdateTimeBuilder_ = null; + } + internalGetMutableExternalSystems().clear(); + muteInitiator_ = ""; + return this; } @@ -2272,6 +2839,7 @@ public com.google.cloud.securitycenter.v1.Finding buildPartial() { } result.severity_ = severity_; result.canonicalName_ = canonicalName_; + result.mute_ = mute_; result.findingClass_ = findingClass_; if (indicatorBuilder_ == null) { result.indicator_ = indicator_; @@ -2283,6 +2851,14 @@ public com.google.cloud.securitycenter.v1.Finding buildPartial() { } else { result.vulnerability_ = vulnerabilityBuilder_.build(); } + if (muteUpdateTimeBuilder_ == null) { + result.muteUpdateTime_ = muteUpdateTime_; + } else { + result.muteUpdateTime_ = muteUpdateTimeBuilder_.build(); + } + result.externalSystems_ = internalGetExternalSystems(); + result.externalSystems_.makeImmutable(); + result.muteInitiator_ = muteInitiator_; onBuilt(); return result; } @@ -2372,6 +2948,9 @@ public Builder mergeFrom(com.google.cloud.securitycenter.v1.Finding other) { canonicalName_ = other.canonicalName_; onChanged(); } + if (other.mute_ != 0) { + setMuteValue(other.getMuteValue()); + } if (other.findingClass_ != 0) { setFindingClassValue(other.getFindingClassValue()); } @@ -2381,6 +2960,14 @@ public Builder mergeFrom(com.google.cloud.securitycenter.v1.Finding other) { if (other.hasVulnerability()) { mergeVulnerability(other.getVulnerability()); } + if (other.hasMuteUpdateTime()) { + mergeMuteUpdateTime(other.getMuteUpdateTime()); + } + internalGetMutableExternalSystems().mergeFrom(other.internalGetExternalSystems()); + if (!other.getMuteInitiator().isEmpty()) { + muteInitiator_ = other.muteInitiator_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -4159,6 +4746,102 @@ public Builder setCanonicalNameBytes(com.google.protobuf.ByteString value) { return this; } + private int mute_ = 0; + /** + * + * + *
+     * Indicates the mute state of a finding (either unspecified, muted, unmuted
+     * or undefined).
+     * 
+ * + * .google.cloud.securitycenter.v1.Finding.Mute mute = 15; + * + * @return The enum numeric value on the wire for mute. + */ + @java.lang.Override + public int getMuteValue() { + return mute_; + } + /** + * + * + *
+     * Indicates the mute state of a finding (either unspecified, muted, unmuted
+     * or undefined).
+     * 
+ * + * .google.cloud.securitycenter.v1.Finding.Mute mute = 15; + * + * @param value The enum numeric value on the wire for mute to set. + * @return This builder for chaining. + */ + public Builder setMuteValue(int value) { + + mute_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates the mute state of a finding (either unspecified, muted, unmuted
+     * or undefined).
+     * 
+ * + * .google.cloud.securitycenter.v1.Finding.Mute mute = 15; + * + * @return The mute. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.Finding.Mute getMute() { + @SuppressWarnings("deprecation") + com.google.cloud.securitycenter.v1.Finding.Mute result = + com.google.cloud.securitycenter.v1.Finding.Mute.valueOf(mute_); + return result == null ? com.google.cloud.securitycenter.v1.Finding.Mute.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Indicates the mute state of a finding (either unspecified, muted, unmuted
+     * or undefined).
+     * 
+ * + * .google.cloud.securitycenter.v1.Finding.Mute mute = 15; + * + * @param value The mute to set. + * @return This builder for chaining. + */ + public Builder setMute(com.google.cloud.securitycenter.v1.Finding.Mute value) { + if (value == null) { + throw new NullPointerException(); + } + + mute_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates the mute state of a finding (either unspecified, muted, unmuted
+     * or undefined).
+     * 
+ * + * .google.cloud.securitycenter.v1.Finding.Mute mute = 15; + * + * @return This builder for chaining. + */ + public Builder clearMute() { + + mute_ = 0; + onChanged(); + return this; + } + private int findingClass_ = 0; /** * @@ -4678,6 +5361,519 @@ public com.google.cloud.securitycenter.v1.VulnerabilityOrBuilder getVulnerabilit return vulnerabilityBuilder_; } + private com.google.protobuf.Timestamp muteUpdateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + muteUpdateTimeBuilder_; + /** + * + * + *
+     * Output only. The most recent time this finding was muted or unmuted.
+     * 
+ * + * + * .google.protobuf.Timestamp mute_update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the muteUpdateTime field is set. + */ + public boolean hasMuteUpdateTime() { + return muteUpdateTimeBuilder_ != null || muteUpdateTime_ != null; + } + /** + * + * + *
+     * Output only. The most recent time this finding was muted or unmuted.
+     * 
+ * + * + * .google.protobuf.Timestamp mute_update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The muteUpdateTime. + */ + public com.google.protobuf.Timestamp getMuteUpdateTime() { + if (muteUpdateTimeBuilder_ == null) { + return muteUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : muteUpdateTime_; + } else { + return muteUpdateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The most recent time this finding was muted or unmuted.
+     * 
+ * + * + * .google.protobuf.Timestamp mute_update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setMuteUpdateTime(com.google.protobuf.Timestamp value) { + if (muteUpdateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + muteUpdateTime_ = value; + onChanged(); + } else { + muteUpdateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The most recent time this finding was muted or unmuted.
+     * 
+ * + * + * .google.protobuf.Timestamp mute_update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setMuteUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (muteUpdateTimeBuilder_ == null) { + muteUpdateTime_ = builderForValue.build(); + onChanged(); + } else { + muteUpdateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The most recent time this finding was muted or unmuted.
+     * 
+ * + * + * .google.protobuf.Timestamp mute_update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeMuteUpdateTime(com.google.protobuf.Timestamp value) { + if (muteUpdateTimeBuilder_ == null) { + if (muteUpdateTime_ != null) { + muteUpdateTime_ = + com.google.protobuf.Timestamp.newBuilder(muteUpdateTime_) + .mergeFrom(value) + .buildPartial(); + } else { + muteUpdateTime_ = value; + } + onChanged(); + } else { + muteUpdateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The most recent time this finding was muted or unmuted.
+     * 
+ * + * + * .google.protobuf.Timestamp mute_update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearMuteUpdateTime() { + if (muteUpdateTimeBuilder_ == null) { + muteUpdateTime_ = null; + onChanged(); + } else { + muteUpdateTime_ = null; + muteUpdateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The most recent time this finding was muted or unmuted.
+     * 
+ * + * + * .google.protobuf.Timestamp mute_update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getMuteUpdateTimeBuilder() { + + onChanged(); + return getMuteUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The most recent time this finding was muted or unmuted.
+     * 
+ * + * + * .google.protobuf.Timestamp mute_update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getMuteUpdateTimeOrBuilder() { + if (muteUpdateTimeBuilder_ != null) { + return muteUpdateTimeBuilder_.getMessageOrBuilder(); + } else { + return muteUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : muteUpdateTime_; + } + } + /** + * + * + *
+     * Output only. The most recent time this finding was muted or unmuted.
+     * 
+ * + * + * .google.protobuf.Timestamp mute_update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getMuteUpdateTimeFieldBuilder() { + if (muteUpdateTimeBuilder_ == null) { + muteUpdateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getMuteUpdateTime(), getParentForChildren(), isClean()); + muteUpdateTime_ = null; + } + return muteUpdateTimeBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.securitycenter.v1.ExternalSystem> + externalSystems_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.securitycenter.v1.ExternalSystem> + internalGetExternalSystems() { + if (externalSystems_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ExternalSystemsDefaultEntryHolder.defaultEntry); + } + return externalSystems_; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.securitycenter.v1.ExternalSystem> + internalGetMutableExternalSystems() { + onChanged(); + ; + if (externalSystems_ == null) { + externalSystems_ = + com.google.protobuf.MapField.newMapField( + ExternalSystemsDefaultEntryHolder.defaultEntry); + } + if (!externalSystems_.isMutable()) { + externalSystems_ = externalSystems_.copy(); + } + return externalSystems_; + } + + public int getExternalSystemsCount() { + return internalGetExternalSystems().getMap().size(); + } + /** + * + * + *
+     * Output only. Third party SIEM/SOAR fields within SCC, contains external system
+     * information and external system finding fields.
+     * 
+ * + * + * map<string, .google.cloud.securitycenter.v1.ExternalSystem> external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsExternalSystems(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetExternalSystems().getMap().containsKey(key); + } + /** Use {@link #getExternalSystemsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getExternalSystems() { + return getExternalSystemsMap(); + } + /** + * + * + *
+     * Output only. Third party SIEM/SOAR fields within SCC, contains external system
+     * information and external system finding fields.
+     * 
+ * + * + * map<string, .google.cloud.securitycenter.v1.ExternalSystem> external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map + getExternalSystemsMap() { + return internalGetExternalSystems().getMap(); + } + /** + * + * + *
+     * Output only. Third party SIEM/SOAR fields within SCC, contains external system
+     * information and external system finding fields.
+     * 
+ * + * + * map<string, .google.cloud.securitycenter.v1.ExternalSystem> external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystemsOrDefault( + java.lang.String key, com.google.cloud.securitycenter.v1.ExternalSystem defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetExternalSystems().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Output only. Third party SIEM/SOAR fields within SCC, contains external system
+     * information and external system finding fields.
+     * 
+ * + * + * map<string, .google.cloud.securitycenter.v1.ExternalSystem> external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystemsOrThrow( + java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetExternalSystems().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearExternalSystems() { + internalGetMutableExternalSystems().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Output only. Third party SIEM/SOAR fields within SCC, contains external system
+     * information and external system finding fields.
+     * 
+ * + * + * map<string, .google.cloud.securitycenter.v1.ExternalSystem> external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeExternalSystems(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableExternalSystems().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map + getMutableExternalSystems() { + return internalGetMutableExternalSystems().getMutableMap(); + } + /** + * + * + *
+     * Output only. Third party SIEM/SOAR fields within SCC, contains external system
+     * information and external system finding fields.
+     * 
+ * + * + * map<string, .google.cloud.securitycenter.v1.ExternalSystem> external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putExternalSystems( + java.lang.String key, com.google.cloud.securitycenter.v1.ExternalSystem value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableExternalSystems().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Output only. Third party SIEM/SOAR fields within SCC, contains external system
+     * information and external system finding fields.
+     * 
+ * + * + * map<string, .google.cloud.securitycenter.v1.ExternalSystem> external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putAllExternalSystems( + java.util.Map values) { + internalGetMutableExternalSystems().getMutableMap().putAll(values); + return this; + } + + private java.lang.Object muteInitiator_ = ""; + /** + * + * + *
+     * First known as mute_annotation. Records additional information about the
+     * mute operation e.g. mute config that muted the finding, user who muted the
+     * finding, etc.
+     * 
+ * + * string mute_initiator = 28; + * + * @return The muteInitiator. + */ + public java.lang.String getMuteInitiator() { + java.lang.Object ref = muteInitiator_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + muteInitiator_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * First known as mute_annotation. Records additional information about the
+     * mute operation e.g. mute config that muted the finding, user who muted the
+     * finding, etc.
+     * 
+ * + * string mute_initiator = 28; + * + * @return The bytes for muteInitiator. + */ + public com.google.protobuf.ByteString getMuteInitiatorBytes() { + java.lang.Object ref = muteInitiator_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + muteInitiator_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * First known as mute_annotation. Records additional information about the
+     * mute operation e.g. mute config that muted the finding, user who muted the
+     * finding, etc.
+     * 
+ * + * string mute_initiator = 28; + * + * @param value The muteInitiator to set. + * @return This builder for chaining. + */ + public Builder setMuteInitiator(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + muteInitiator_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * First known as mute_annotation. Records additional information about the
+     * mute operation e.g. mute config that muted the finding, user who muted the
+     * finding, etc.
+     * 
+ * + * string mute_initiator = 28; + * + * @return This builder for chaining. + */ + public Builder clearMuteInitiator() { + + muteInitiator_ = getDefaultInstance().getMuteInitiator(); + onChanged(); + return this; + } + /** + * + * + *
+     * First known as mute_annotation. Records additional information about the
+     * mute operation e.g. mute config that muted the finding, user who muted the
+     * finding, etc.
+     * 
+ * + * string mute_initiator = 28; + * + * @param value The bytes for muteInitiator to set. + * @return This builder for chaining. + */ + public Builder setMuteInitiatorBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + muteInitiator_ = value; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOrBuilder.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOrBuilder.java index 935908d7c..6fa251540 100644 --- a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOrBuilder.java +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOrBuilder.java @@ -469,6 +469,33 @@ com.google.protobuf.Value getSourcePropertiesOrDefault( */ com.google.protobuf.ByteString getCanonicalNameBytes(); + /** + * + * + *
+   * Indicates the mute state of a finding (either unspecified, muted, unmuted
+   * or undefined).
+   * 
+ * + * .google.cloud.securitycenter.v1.Finding.Mute mute = 15; + * + * @return The enum numeric value on the wire for mute. + */ + int getMuteValue(); + /** + * + * + *
+   * Indicates the mute state of a finding (either unspecified, muted, unmuted
+   * or undefined).
+   * 
+ * + * .google.cloud.securitycenter.v1.Finding.Mute mute = 15; + * + * @return The mute. + */ + com.google.cloud.securitycenter.v1.Finding.Mute getMute(); + /** * * @@ -581,4 +608,146 @@ com.google.protobuf.Value getSourcePropertiesOrDefault( * .google.cloud.securitycenter.v1.Vulnerability vulnerability = 20; */ com.google.cloud.securitycenter.v1.VulnerabilityOrBuilder getVulnerabilityOrBuilder(); + + /** + * + * + *
+   * Output only. The most recent time this finding was muted or unmuted.
+   * 
+ * + * + * .google.protobuf.Timestamp mute_update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the muteUpdateTime field is set. + */ + boolean hasMuteUpdateTime(); + /** + * + * + *
+   * Output only. The most recent time this finding was muted or unmuted.
+   * 
+ * + * + * .google.protobuf.Timestamp mute_update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The muteUpdateTime. + */ + com.google.protobuf.Timestamp getMuteUpdateTime(); + /** + * + * + *
+   * Output only. The most recent time this finding was muted or unmuted.
+   * 
+ * + * + * .google.protobuf.Timestamp mute_update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getMuteUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Third party SIEM/SOAR fields within SCC, contains external system
+   * information and external system finding fields.
+   * 
+ * + * + * map<string, .google.cloud.securitycenter.v1.ExternalSystem> external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getExternalSystemsCount(); + /** + * + * + *
+   * Output only. Third party SIEM/SOAR fields within SCC, contains external system
+   * information and external system finding fields.
+   * 
+ * + * + * map<string, .google.cloud.securitycenter.v1.ExternalSystem> external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + boolean containsExternalSystems(java.lang.String key); + /** Use {@link #getExternalSystemsMap()} instead. */ + @java.lang.Deprecated + java.util.Map + getExternalSystems(); + /** + * + * + *
+   * Output only. Third party SIEM/SOAR fields within SCC, contains external system
+   * information and external system finding fields.
+   * 
+ * + * + * map<string, .google.cloud.securitycenter.v1.ExternalSystem> external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.Map + getExternalSystemsMap(); + /** + * + * + *
+   * Output only. Third party SIEM/SOAR fields within SCC, contains external system
+   * information and external system finding fields.
+   * 
+ * + * + * map<string, .google.cloud.securitycenter.v1.ExternalSystem> external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystemsOrDefault( + java.lang.String key, com.google.cloud.securitycenter.v1.ExternalSystem defaultValue); + /** + * + * + *
+   * Output only. Third party SIEM/SOAR fields within SCC, contains external system
+   * information and external system finding fields.
+   * 
+ * + * + * map<string, .google.cloud.securitycenter.v1.ExternalSystem> external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystemsOrThrow(java.lang.String key); + + /** + * + * + *
+   * First known as mute_annotation. Records additional information about the
+   * mute operation e.g. mute config that muted the finding, user who muted the
+   * finding, etc.
+   * 
+ * + * string mute_initiator = 28; + * + * @return The muteInitiator. + */ + java.lang.String getMuteInitiator(); + /** + * + * + *
+   * First known as mute_annotation. Records additional information about the
+   * mute operation e.g. mute config that muted the finding, user who muted the
+   * finding, etc.
+   * 
+ * + * string mute_initiator = 28; + * + * @return The bytes for muteInitiator. + */ + com.google.protobuf.ByteString getMuteInitiatorBytes(); } diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOuterClass.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOuterClass.java index f3bd5264a..bb9e4b374 100644 --- a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOuterClass.java +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOuterClass.java @@ -35,6 +35,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_securitycenter_v1_Finding_SourcePropertiesEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_securitycenter_v1_Finding_SourcePropertiesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v1_Finding_ExternalSystemsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v1_Finding_ExternalSystemsEntry_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -47,51 +51,63 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n,google/cloud/securitycenter/v1/finding" + ".proto\022\036google.cloud.securitycenter.v1\032\037" + "google/api/field_behavior.proto\032\031google/" - + "api/resource.proto\032.google/cloud/securit" - + "ycenter/v1/indicator.proto\0323google/cloud" - + "/securitycenter/v1/security_marks.proto\032" - + "2google/cloud/securitycenter/v1/vulnerab" - + "ility.proto\032\034google/protobuf/struct.prot" - + "o\032\037google/protobuf/timestamp.proto\032\034goog" - + "le/api/annotations.proto\"\211\n\n\007Finding\022\014\n\004" - + "name\030\001 \001(\t\022\016\n\006parent\030\002 \001(\t\022\025\n\rresource_n" - + "ame\030\003 \001(\t\022<\n\005state\030\004 \001(\0162-.google.cloud." - + "securitycenter.v1.Finding.State\022\020\n\010categ" - + "ory\030\005 \001(\t\022\024\n\014external_uri\030\006 \001(\t\022X\n\021sourc" - + "e_properties\030\007 \003(\0132=.google.cloud.securi" - + "tycenter.v1.Finding.SourcePropertiesEntr" - + "y\022J\n\016security_marks\030\010 \001(\0132-.google.cloud" - + ".securitycenter.v1.SecurityMarksB\003\340A\003\022.\n" - + "\nevent_time\030\t \001(\0132\032.google.protobuf.Time" - + "stamp\022/\n\013create_time\030\n \001(\0132\032.google.prot" - + "obuf.Timestamp\022B\n\010severity\030\014 \001(\01620.googl" - + "e.cloud.securitycenter.v1.Finding.Severi" - + "ty\022\026\n\016canonical_name\030\016 \001(\t\022K\n\rfinding_cl" - + "ass\030\021 \001(\01624.google.cloud.securitycenter." - + "v1.Finding.FindingClass\022<\n\tindicator\030\022 \001" - + "(\0132).google.cloud.securitycenter.v1.Indi" - + "cator\022D\n\rvulnerability\030\024 \001(\0132-.google.cl" - + "oud.securitycenter.v1.Vulnerability\032O\n\025S" - + "ourcePropertiesEntry\022\013\n\003key\030\001 \001(\t\022%\n\005val" - + "ue\030\002 \001(\0132\026.google.protobuf.Value:\0028\001\"8\n\005" - + "State\022\025\n\021STATE_UNSPECIFIED\020\000\022\n\n\006ACTIVE\020\001" - + "\022\014\n\010INACTIVE\020\002\"Q\n\010Severity\022\030\n\024SEVERITY_U" - + "NSPECIFIED\020\000\022\014\n\010CRITICAL\020\001\022\010\n\004HIGH\020\002\022\n\n\006" - + "MEDIUM\020\003\022\007\n\003LOW\020\004\"s\n\014FindingClass\022\035\n\031FIN" - + "DING_CLASS_UNSPECIFIED\020\000\022\n\n\006THREAT\020\001\022\021\n\r" - + "VULNERABILITY\020\002\022\024\n\020MISCONFIGURATION\020\003\022\017\n" - + "\013OBSERVATION\020\004:\333\001\352A\327\001\n%securitycenter.go" - + "ogleapis.com/Finding\022@organizations/{org" - + "anization}/sources/{source}/findings/{fi" - + "nding}\0224folders/{folder}/sources/{source" - + "}/findings/{finding}\0226projects/{project}" - + "/sources/{source}/findings/{finding}B\332\001\n" - + "\"com.google.cloud.securitycenter.v1P\001ZLg" - + "oogle.golang.org/genproto/googleapis/clo" - + "ud/securitycenter/v1;securitycenter\252\002\036Go" - + "ogle.Cloud.SecurityCenter.V1\312\002\036Google\\Cl" - + "oud\\SecurityCenter\\V1\352\002!Google::Cloud::S" - + "ecurityCenter::V1b\006proto3" + + "api/resource.proto\0324google/cloud/securit" + + "ycenter/v1/external_system.proto\032.google" + + "/cloud/securitycenter/v1/indicator.proto" + + "\0323google/cloud/securitycenter/v1/securit" + + "y_marks.proto\0322google/cloud/securitycent" + + "er/v1/vulnerability.proto\032\034google/protob" + + "uf/struct.proto\032\037google/protobuf/timesta" + + "mp.proto\032\034google/api/annotations.proto\"\242" + + "\r\n\007Finding\022\014\n\004name\030\001 \001(\t\022\016\n\006parent\030\002 \001(\t" + + "\022\025\n\rresource_name\030\003 \001(\t\022<\n\005state\030\004 \001(\0162-" + + ".google.cloud.securitycenter.v1.Finding." + + "State\022\020\n\010category\030\005 \001(\t\022\024\n\014external_uri\030" + + "\006 \001(\t\022X\n\021source_properties\030\007 \003(\0132=.googl" + + "e.cloud.securitycenter.v1.Finding.Source" + + "PropertiesEntry\022J\n\016security_marks\030\010 \001(\0132" + + "-.google.cloud.securitycenter.v1.Securit" + + "yMarksB\003\340A\003\022.\n\nevent_time\030\t \001(\0132\032.google" + + ".protobuf.Timestamp\022/\n\013create_time\030\n \001(\013" + + "2\032.google.protobuf.Timestamp\022B\n\010severity" + + "\030\014 \001(\01620.google.cloud.securitycenter.v1." + + "Finding.Severity\022\026\n\016canonical_name\030\016 \001(\t" + + "\022:\n\004mute\030\017 \001(\0162,.google.cloud.securityce" + + "nter.v1.Finding.Mute\022K\n\rfinding_class\030\021 " + + "\001(\01624.google.cloud.securitycenter.v1.Fin" + + "ding.FindingClass\022<\n\tindicator\030\022 \001(\0132).g" + + "oogle.cloud.securitycenter.v1.Indicator\022" + + "D\n\rvulnerability\030\024 \001(\0132-.google.cloud.se" + + "curitycenter.v1.Vulnerability\0229\n\020mute_up" + + "date_time\030\025 \001(\0132\032.google.protobuf.Timest" + + "ampB\003\340A\003\022[\n\020external_systems\030\026 \003(\0132<.goo" + + "gle.cloud.securitycenter.v1.Finding.Exte" + + "rnalSystemsEntryB\003\340A\003\022\026\n\016mute_initiator\030" + + "\034 \001(\t\032O\n\025SourcePropertiesEntry\022\013\n\003key\030\001 " + + "\001(\t\022%\n\005value\030\002 \001(\0132\026.google.protobuf.Val" + + "ue:\0028\001\032f\n\024ExternalSystemsEntry\022\013\n\003key\030\001 " + + "\001(\t\022=\n\005value\030\002 \001(\0132..google.cloud.securi" + + "tycenter.v1.ExternalSystem:\0028\001\"8\n\005State\022" + + "\025\n\021STATE_UNSPECIFIED\020\000\022\n\n\006ACTIVE\020\001\022\014\n\010IN" + + "ACTIVE\020\002\"Q\n\010Severity\022\030\n\024SEVERITY_UNSPECI" + + "FIED\020\000\022\014\n\010CRITICAL\020\001\022\010\n\004HIGH\020\002\022\n\n\006MEDIUM" + + "\020\003\022\007\n\003LOW\020\004\"C\n\004Mute\022\024\n\020MUTE_UNSPECIFIED\020" + + "\000\022\t\n\005MUTED\020\001\022\013\n\007UNMUTED\020\002\022\r\n\tUNDEFINED\020\004" + + "\"s\n\014FindingClass\022\035\n\031FINDING_CLASS_UNSPEC" + + "IFIED\020\000\022\n\n\006THREAT\020\001\022\021\n\rVULNERABILITY\020\002\022\024" + + "\n\020MISCONFIGURATION\020\003\022\017\n\013OBSERVATION\020\004:\333\001" + + "\352A\327\001\n%securitycenter.googleapis.com/Find" + + "ing\022@organizations/{organization}/source" + + "s/{source}/findings/{finding}\0224folders/{" + + "folder}/sources/{source}/findings/{findi" + + "ng}\0226projects/{project}/sources/{source}" + + "/findings/{finding}B\332\001\n\"com.google.cloud" + + ".securitycenter.v1P\001ZLgoogle.golang.org/" + + "genproto/googleapis/cloud/securitycenter" + + "/v1;securitycenter\252\002\036Google.Cloud.Securi" + + "tyCenter.V1\312\002\036Google\\Cloud\\SecurityCente" + + "r\\V1\352\002!Google::Cloud::SecurityCenter::V1" + + "b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -99,6 +115,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.securitycenter.v1.ExternalSystemProto.getDescriptor(), com.google.cloud.securitycenter.v1.IndicatorProto.getDescriptor(), com.google.cloud.securitycenter.v1.SecurityMarksOuterClass.getDescriptor(), com.google.cloud.securitycenter.v1.VulnerabilityProto.getDescriptor(), @@ -124,9 +141,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CreateTime", "Severity", "CanonicalName", + "Mute", "FindingClass", "Indicator", "Vulnerability", + "MuteUpdateTime", + "ExternalSystems", + "MuteInitiator", }); internal_static_google_cloud_securitycenter_v1_Finding_SourcePropertiesEntry_descriptor = internal_static_google_cloud_securitycenter_v1_Finding_descriptor.getNestedTypes().get(0); @@ -136,6 +157,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_securitycenter_v1_Finding_ExternalSystemsEntry_descriptor = + internal_static_google_cloud_securitycenter_v1_Finding_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_securitycenter_v1_Finding_ExternalSystemsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v1_Finding_ExternalSystemsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); @@ -144,6 +173,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { descriptor, registry); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.securitycenter.v1.ExternalSystemProto.getDescriptor(); com.google.cloud.securitycenter.v1.IndicatorProto.getDescriptor(); com.google.cloud.securitycenter.v1.SecurityMarksOuterClass.getDescriptor(); com.google.cloud.securitycenter.v1.VulnerabilityProto.getDescriptor(); diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetMuteConfigRequest.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetMuteConfigRequest.java new file mode 100644 index 000000000..50c710553 --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetMuteConfigRequest.java @@ -0,0 +1,672 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/securitycenter_service.proto + +package com.google.cloud.securitycenter.v1; + +/** + * + * + *
+ * Request message for retrieving a mute config.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.GetMuteConfigRequest} + */ +public final class GetMuteConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.GetMuteConfigRequest) + GetMuteConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetMuteConfigRequest.newBuilder() to construct. + private GetMuteConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetMuteConfigRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetMuteConfigRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetMuteConfigRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_GetMuteConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_GetMuteConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.GetMuteConfigRequest.class, + com.google.cloud.securitycenter.v1.GetMuteConfigRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Name of the mute config to retrieve. Its format is
+   * organizations/{organization}/muteConfigs/{config_id},
+   * folders/{folder}/muteConfigs/{config_id}, or
+   * projects/{project}/muteConfigs/{config_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the mute config to retrieve. Its format is
+   * organizations/{organization}/muteConfigs/{config_id},
+   * folders/{folder}/muteConfigs/{config_id}, or
+   * projects/{project}/muteConfigs/{config_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.securitycenter.v1.GetMuteConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v1.GetMuteConfigRequest other = + (com.google.cloud.securitycenter.v1.GetMuteConfigRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v1.GetMuteConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.GetMuteConfigRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.GetMuteConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.GetMuteConfigRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.GetMuteConfigRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.GetMuteConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.GetMuteConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.GetMuteConfigRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.GetMuteConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.GetMuteConfigRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.GetMuteConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.GetMuteConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.securitycenter.v1.GetMuteConfigRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for retrieving a mute config.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.GetMuteConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.GetMuteConfigRequest) + com.google.cloud.securitycenter.v1.GetMuteConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_GetMuteConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_GetMuteConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.GetMuteConfigRequest.class, + com.google.cloud.securitycenter.v1.GetMuteConfigRequest.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v1.GetMuteConfigRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_GetMuteConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.GetMuteConfigRequest getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v1.GetMuteConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.GetMuteConfigRequest build() { + com.google.cloud.securitycenter.v1.GetMuteConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.GetMuteConfigRequest buildPartial() { + com.google.cloud.securitycenter.v1.GetMuteConfigRequest result = + new com.google.cloud.securitycenter.v1.GetMuteConfigRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.securitycenter.v1.GetMuteConfigRequest) { + return mergeFrom((com.google.cloud.securitycenter.v1.GetMuteConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v1.GetMuteConfigRequest other) { + if (other == com.google.cloud.securitycenter.v1.GetMuteConfigRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.securitycenter.v1.GetMuteConfigRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.securitycenter.v1.GetMuteConfigRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the mute config to retrieve. Its format is
+     * organizations/{organization}/muteConfigs/{config_id},
+     * folders/{folder}/muteConfigs/{config_id}, or
+     * projects/{project}/muteConfigs/{config_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the mute config to retrieve. Its format is
+     * organizations/{organization}/muteConfigs/{config_id},
+     * folders/{folder}/muteConfigs/{config_id}, or
+     * projects/{project}/muteConfigs/{config_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the mute config to retrieve. Its format is
+     * organizations/{organization}/muteConfigs/{config_id},
+     * folders/{folder}/muteConfigs/{config_id}, or
+     * projects/{project}/muteConfigs/{config_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the mute config to retrieve. Its format is
+     * organizations/{organization}/muteConfigs/{config_id},
+     * folders/{folder}/muteConfigs/{config_id}, or
+     * projects/{project}/muteConfigs/{config_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the mute config to retrieve. Its format is
+     * organizations/{organization}/muteConfigs/{config_id},
+     * folders/{folder}/muteConfigs/{config_id}, or
+     * projects/{project}/muteConfigs/{config_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.GetMuteConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.GetMuteConfigRequest) + private static final com.google.cloud.securitycenter.v1.GetMuteConfigRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.GetMuteConfigRequest(); + } + + public static com.google.cloud.securitycenter.v1.GetMuteConfigRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetMuteConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetMuteConfigRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.GetMuteConfigRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetMuteConfigRequestOrBuilder.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetMuteConfigRequestOrBuilder.java new file mode 100644 index 000000000..2bc73edce --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetMuteConfigRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/securitycenter_service.proto + +package com.google.cloud.securitycenter.v1; + +public interface GetMuteConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.GetMuteConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the mute config to retrieve. Its format is
+   * organizations/{organization}/muteConfigs/{config_id},
+   * folders/{folder}/muteConfigs/{config_id}, or
+   * projects/{project}/muteConfigs/{config_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the mute config to retrieve. Its format is
+   * organizations/{organization}/muteConfigs/{config_id},
+   * folders/{folder}/muteConfigs/{config_id}, or
+   * projects/{project}/muteConfigs/{config_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ListFindingsRequest.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ListFindingsRequest.java index cb099e048..da3f8d854 100644 --- a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ListFindingsRequest.java +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ListFindingsRequest.java @@ -302,6 +302,7 @@ public com.google.protobuf.ByteString getParentBytes() { * * resource.project_display_name: `=`, `:` * * resource.type: `=`, `:` * * resource.folders.resource_folder: `=`, `:` + * * resource.display_name: `=`, `:` *
* * string filter = 2; @@ -370,6 +371,7 @@ public java.lang.String getFilter() { * * resource.project_display_name: `=`, `:` * * resource.type: `=`, `:` * * resource.folders.resource_folder: `=`, `:` + * * resource.display_name: `=`, `:` *
* * string filter = 2; @@ -1432,6 +1434,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * resource.project_display_name: `=`, `:` * * resource.type: `=`, `:` * * resource.folders.resource_folder: `=`, `:` + * * resource.display_name: `=`, `:` *
* * string filter = 2; @@ -1499,6 +1502,7 @@ public java.lang.String getFilter() { * * resource.project_display_name: `=`, `:` * * resource.type: `=`, `:` * * resource.folders.resource_folder: `=`, `:` + * * resource.display_name: `=`, `:` * * * string filter = 2; @@ -1566,6 +1570,7 @@ public com.google.protobuf.ByteString getFilterBytes() { * * resource.project_display_name: `=`, `:` * * resource.type: `=`, `:` * * resource.folders.resource_folder: `=`, `:` + * * resource.display_name: `=`, `:` * * * string filter = 2; @@ -1632,6 +1637,7 @@ public Builder setFilter(java.lang.String value) { * * resource.project_display_name: `=`, `:` * * resource.type: `=`, `:` * * resource.folders.resource_folder: `=`, `:` + * * resource.display_name: `=`, `:` * * * string filter = 2; @@ -1694,6 +1700,7 @@ public Builder clearFilter() { * * resource.project_display_name: `=`, `:` * * resource.type: `=`, `:` * * resource.folders.resource_folder: `=`, `:` + * * resource.display_name: `=`, `:` * * * string filter = 2; diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ListFindingsRequestOrBuilder.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ListFindingsRequestOrBuilder.java index b95745a83..1b7b701ca 100644 --- a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ListFindingsRequestOrBuilder.java +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ListFindingsRequestOrBuilder.java @@ -114,6 +114,7 @@ public interface ListFindingsRequestOrBuilder * * resource.project_display_name: `=`, `:` * * resource.type: `=`, `:` * * resource.folders.resource_folder: `=`, `:` + * * resource.display_name: `=`, `:` * * * string filter = 2; @@ -171,6 +172,7 @@ public interface ListFindingsRequestOrBuilder * * resource.project_display_name: `=`, `:` * * resource.type: `=`, `:` * * resource.folders.resource_folder: `=`, `:` + * * resource.display_name: `=`, `:` * * * string filter = 2; diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ListFindingsResponse.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ListFindingsResponse.java index c323f4f0a..f6738e6b4 100644 --- a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ListFindingsResponse.java +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ListFindingsResponse.java @@ -744,6 +744,31 @@ public interface ResourceOrBuilder */ com.google.protobuf.ByteString getParentDisplayNameBytes(); + /** + * + * + *
+       * The full resource type of the resource.
+       * 
+ * + * string type = 6; + * + * @return The type. + */ + java.lang.String getType(); + /** + * + * + *
+       * The full resource type of the resource.
+       * 
+ * + * string type = 6; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + /** * * @@ -805,6 +830,31 @@ public interface ResourceOrBuilder * repeated .google.cloud.securitycenter.v1.Folder folders = 7; */ com.google.cloud.securitycenter.v1.FolderOrBuilder getFoldersOrBuilder(int index); + + /** + * + * + *
+       * The human readable name of the resource.
+       * 
+ * + * string display_name = 8; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+       * The human readable name of the resource.
+       * 
+ * + * string display_name = 8; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); } /** * @@ -833,7 +883,9 @@ private Resource() { projectDisplayName_ = ""; parentName_ = ""; parentDisplayName_ = ""; + type_ = ""; folders_ = java.util.Collections.emptyList(); + displayName_ = ""; } @java.lang.Override @@ -901,6 +953,13 @@ private Resource( parentDisplayName_ = s; break; } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + type_ = s; + break; + } case 58: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { @@ -912,6 +971,13 @@ private Resource( com.google.cloud.securitycenter.v1.Folder.parser(), extensionRegistry)); break; } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -1199,6 +1265,55 @@ public com.google.protobuf.ByteString getParentDisplayNameBytes() { } } + public static final int TYPE_FIELD_NUMBER = 6; + private volatile java.lang.Object type_; + /** + * + * + *
+       * The full resource type of the resource.
+       * 
+ * + * string type = 6; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + * + * + *
+       * The full resource type of the resource.
+       * 
+ * + * string type = 6; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int FOLDERS_FIELD_NUMBER = 7; private java.util.List folders_; /** @@ -1278,6 +1393,55 @@ public com.google.cloud.securitycenter.v1.FolderOrBuilder getFoldersOrBuilder(in return folders_.get(index); } + public static final int DISPLAY_NAME_FIELD_NUMBER = 8; + private volatile java.lang.Object displayName_; + /** + * + * + *
+       * The human readable name of the resource.
+       * 
+ * + * string display_name = 8; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+       * The human readable name of the resource.
+       * 
+ * + * string display_name = 8; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1307,9 +1471,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parentDisplayName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, parentDisplayName_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, type_); + } for (int i = 0; i < folders_.size(); i++) { output.writeMessage(7, folders_.get(i)); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, displayName_); + } unknownFields.writeTo(output); } @@ -1334,9 +1504,15 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parentDisplayName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, parentDisplayName_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, type_); + } for (int i = 0; i < folders_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, folders_.get(i)); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, displayName_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -1361,7 +1537,9 @@ public boolean equals(final java.lang.Object obj) { if (!getProjectDisplayName().equals(other.getProjectDisplayName())) return false; if (!getParentName().equals(other.getParentName())) return false; if (!getParentDisplayName().equals(other.getParentDisplayName())) return false; + if (!getType().equals(other.getType())) return false; if (!getFoldersList().equals(other.getFoldersList())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -1383,10 +1561,14 @@ public int hashCode() { hash = (53 * hash) + getParentName().hashCode(); hash = (37 * hash) + PARENT_DISPLAY_NAME_FIELD_NUMBER; hash = (53 * hash) + getParentDisplayName().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); if (getFoldersCount() > 0) { hash = (37 * hash) + FOLDERS_FIELD_NUMBER; hash = (53 * hash) + getFoldersList().hashCode(); } + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -1574,12 +1756,16 @@ public Builder clear() { parentDisplayName_ = ""; + type_ = ""; + if (foldersBuilder_ == null) { folders_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { foldersBuilder_.clear(); } + displayName_ = ""; + return this; } @@ -1620,6 +1806,7 @@ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { result.projectDisplayName_ = projectDisplayName_; result.parentName_ = parentName_; result.parentDisplayName_ = parentDisplayName_; + result.type_ = type_; if (foldersBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { folders_ = java.util.Collections.unmodifiableList(folders_); @@ -1629,6 +1816,7 @@ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { } else { result.folders_ = foldersBuilder_.build(); } + result.displayName_ = displayName_; onBuilt(); return result; } @@ -1709,6 +1897,10 @@ public Builder mergeFrom( parentDisplayName_ = other.parentDisplayName_; onChanged(); } + if (!other.getType().isEmpty()) { + type_ = other.type_; + onChanged(); + } if (foldersBuilder_ == null) { if (!other.folders_.isEmpty()) { if (folders_.isEmpty()) { @@ -1736,6 +1928,10 @@ public Builder mergeFrom( } } } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -2306,6 +2502,112 @@ public Builder setParentDisplayNameBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object type_ = ""; + /** + * + * + *
+         * The full resource type of the resource.
+         * 
+ * + * string type = 6; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The full resource type of the resource.
+         * 
+ * + * string type = 6; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The full resource type of the resource.
+         * 
+ * + * string type = 6; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * The full resource type of the resource.
+         * 
+ * + * string type = 6; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + /** + * + * + *
+         * The full resource type of the resource.
+         * 
+ * + * string type = 6; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + type_ = value; + onChanged(); + return this; + } + private java.util.List folders_ = java.util.Collections.emptyList(); @@ -2692,6 +2994,112 @@ public com.google.cloud.securitycenter.v1.Folder.Builder addFoldersBuilder(int i return foldersBuilder_; } + private java.lang.Object displayName_ = ""; + /** + * + * + *
+         * The human readable name of the resource.
+         * 
+ * + * string display_name = 8; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The human readable name of the resource.
+         * 
+ * + * string display_name = 8; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The human readable name of the resource.
+         * 
+ * + * string display_name = 8; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * The human readable name of the resource.
+         * 
+ * + * string display_name = 8; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+         * The human readable name of the resource.
+         * 
+ * + * string display_name = 8; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ListMuteConfigsRequest.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ListMuteConfigsRequest.java new file mode 100644 index 000000000..268fc6dd4 --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ListMuteConfigsRequest.java @@ -0,0 +1,969 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/securitycenter_service.proto + +package com.google.cloud.securitycenter.v1; + +/** + * + * + *
+ * Request message for listing  mute configs at a given scope e.g. organization,
+ * folder or project.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.ListMuteConfigsRequest} + */ +public final class ListMuteConfigsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.ListMuteConfigsRequest) + ListMuteConfigsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListMuteConfigsRequest.newBuilder() to construct. + private ListMuteConfigsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListMuteConfigsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListMuteConfigsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListMuteConfigsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_ListMuteConfigsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_ListMuteConfigsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.ListMuteConfigsRequest.class, + com.google.cloud.securitycenter.v1.ListMuteConfigsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent, which owns the collection of mute configs. Its format is
+   * "organizations/[organization_id]", "folders/[folder_id]",
+   * "projects/[project_id]".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent, which owns the collection of mute configs. Its format is
+   * "organizations/[organization_id]", "folders/[folder_id]",
+   * "projects/[project_id]".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The maximum number of configs to return. The service may return fewer than
+   * this value.
+   * If unspecified, at most 10 configs will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * A page token, received from a previous `ListMuteConfigs` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListMuteConfigs` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A page token, received from a previous `ListMuteConfigs` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListMuteConfigs` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.securitycenter.v1.ListMuteConfigsRequest)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v1.ListMuteConfigsRequest other = + (com.google.cloud.securitycenter.v1.ListMuteConfigsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v1.ListMuteConfigsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.ListMuteConfigsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.ListMuteConfigsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.ListMuteConfigsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.ListMuteConfigsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.ListMuteConfigsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.ListMuteConfigsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.ListMuteConfigsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.ListMuteConfigsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.ListMuteConfigsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.ListMuteConfigsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.ListMuteConfigsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.securitycenter.v1.ListMuteConfigsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for listing  mute configs at a given scope e.g. organization,
+   * folder or project.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.ListMuteConfigsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.ListMuteConfigsRequest) + com.google.cloud.securitycenter.v1.ListMuteConfigsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_ListMuteConfigsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_ListMuteConfigsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.ListMuteConfigsRequest.class, + com.google.cloud.securitycenter.v1.ListMuteConfigsRequest.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v1.ListMuteConfigsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_ListMuteConfigsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.ListMuteConfigsRequest getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v1.ListMuteConfigsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.ListMuteConfigsRequest build() { + com.google.cloud.securitycenter.v1.ListMuteConfigsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.ListMuteConfigsRequest buildPartial() { + com.google.cloud.securitycenter.v1.ListMuteConfigsRequest result = + new com.google.cloud.securitycenter.v1.ListMuteConfigsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.securitycenter.v1.ListMuteConfigsRequest) { + return mergeFrom((com.google.cloud.securitycenter.v1.ListMuteConfigsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v1.ListMuteConfigsRequest other) { + if (other == com.google.cloud.securitycenter.v1.ListMuteConfigsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.securitycenter.v1.ListMuteConfigsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.securitycenter.v1.ListMuteConfigsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent, which owns the collection of mute configs. Its format is
+     * "organizations/[organization_id]", "folders/[folder_id]",
+     * "projects/[project_id]".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent, which owns the collection of mute configs. Its format is
+     * "organizations/[organization_id]", "folders/[folder_id]",
+     * "projects/[project_id]".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent, which owns the collection of mute configs. Its format is
+     * "organizations/[organization_id]", "folders/[folder_id]",
+     * "projects/[project_id]".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent, which owns the collection of mute configs. Its format is
+     * "organizations/[organization_id]", "folders/[folder_id]",
+     * "projects/[project_id]".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent, which owns the collection of mute configs. Its format is
+     * "organizations/[organization_id]", "folders/[folder_id]",
+     * "projects/[project_id]".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of configs to return. The service may return fewer than
+     * this value.
+     * If unspecified, at most 10 configs will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of configs to return. The service may return fewer than
+     * this value.
+     * If unspecified, at most 10 configs will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of configs to return. The service may return fewer than
+     * this value.
+     * If unspecified, at most 10 configs will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token, received from a previous `ListMuteConfigs` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListMuteConfigs` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListMuteConfigs` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListMuteConfigs` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListMuteConfigs` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListMuteConfigs` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListMuteConfigs` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListMuteConfigs` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListMuteConfigs` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListMuteConfigs` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.ListMuteConfigsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.ListMuteConfigsRequest) + private static final com.google.cloud.securitycenter.v1.ListMuteConfigsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.ListMuteConfigsRequest(); + } + + public static com.google.cloud.securitycenter.v1.ListMuteConfigsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListMuteConfigsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListMuteConfigsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.ListMuteConfigsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ListMuteConfigsRequestOrBuilder.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ListMuteConfigsRequestOrBuilder.java new file mode 100644 index 000000000..72889d2ce --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ListMuteConfigsRequestOrBuilder.java @@ -0,0 +1,105 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/securitycenter_service.proto + +package com.google.cloud.securitycenter.v1; + +public interface ListMuteConfigsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.ListMuteConfigsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent, which owns the collection of mute configs. Its format is
+   * "organizations/[organization_id]", "folders/[folder_id]",
+   * "projects/[project_id]".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent, which owns the collection of mute configs. Its format is
+   * "organizations/[organization_id]", "folders/[folder_id]",
+   * "projects/[project_id]".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of configs to return. The service may return fewer than
+   * this value.
+   * If unspecified, at most 10 configs will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token, received from a previous `ListMuteConfigs` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListMuteConfigs` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token, received from a previous `ListMuteConfigs` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListMuteConfigs` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ListMuteConfigsResponse.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ListMuteConfigsResponse.java new file mode 100644 index 000000000..76dc4401c --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ListMuteConfigsResponse.java @@ -0,0 +1,1140 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/securitycenter_service.proto + +package com.google.cloud.securitycenter.v1; + +/** + * + * + *
+ * Response message for listing mute configs.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.ListMuteConfigsResponse} + */ +public final class ListMuteConfigsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.ListMuteConfigsResponse) + ListMuteConfigsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListMuteConfigsResponse.newBuilder() to construct. + private ListMuteConfigsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListMuteConfigsResponse() { + muteConfigs_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListMuteConfigsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListMuteConfigsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + muteConfigs_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + muteConfigs_.add( + input.readMessage( + com.google.cloud.securitycenter.v1.MuteConfig.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + muteConfigs_ = java.util.Collections.unmodifiableList(muteConfigs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_ListMuteConfigsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_ListMuteConfigsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.ListMuteConfigsResponse.class, + com.google.cloud.securitycenter.v1.ListMuteConfigsResponse.Builder.class); + } + + public static final int MUTE_CONFIGS_FIELD_NUMBER = 1; + private java.util.List muteConfigs_; + /** + * + * + *
+   * The mute configs from the specified parent.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.MuteConfig mute_configs = 1; + */ + @java.lang.Override + public java.util.List getMuteConfigsList() { + return muteConfigs_; + } + /** + * + * + *
+   * The mute configs from the specified parent.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.MuteConfig mute_configs = 1; + */ + @java.lang.Override + public java.util.List + getMuteConfigsOrBuilderList() { + return muteConfigs_; + } + /** + * + * + *
+   * The mute configs from the specified parent.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.MuteConfig mute_configs = 1; + */ + @java.lang.Override + public int getMuteConfigsCount() { + return muteConfigs_.size(); + } + /** + * + * + *
+   * The mute configs from the specified parent.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.MuteConfig mute_configs = 1; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.MuteConfig getMuteConfigs(int index) { + return muteConfigs_.get(index); + } + /** + * + * + *
+   * The mute configs from the specified parent.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.MuteConfig mute_configs = 1; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.MuteConfigOrBuilder getMuteConfigsOrBuilder(int index) { + return muteConfigs_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < muteConfigs_.size(); i++) { + output.writeMessage(1, muteConfigs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < muteConfigs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, muteConfigs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.securitycenter.v1.ListMuteConfigsResponse)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v1.ListMuteConfigsResponse other = + (com.google.cloud.securitycenter.v1.ListMuteConfigsResponse) obj; + + if (!getMuteConfigsList().equals(other.getMuteConfigsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getMuteConfigsCount() > 0) { + hash = (37 * hash) + MUTE_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getMuteConfigsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v1.ListMuteConfigsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.ListMuteConfigsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.ListMuteConfigsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.ListMuteConfigsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.ListMuteConfigsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.ListMuteConfigsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.ListMuteConfigsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.ListMuteConfigsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.ListMuteConfigsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.ListMuteConfigsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.ListMuteConfigsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.ListMuteConfigsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.securitycenter.v1.ListMuteConfigsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for listing mute configs.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.ListMuteConfigsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.ListMuteConfigsResponse) + com.google.cloud.securitycenter.v1.ListMuteConfigsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_ListMuteConfigsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_ListMuteConfigsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.ListMuteConfigsResponse.class, + com.google.cloud.securitycenter.v1.ListMuteConfigsResponse.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v1.ListMuteConfigsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getMuteConfigsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (muteConfigsBuilder_ == null) { + muteConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + muteConfigsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_ListMuteConfigsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.ListMuteConfigsResponse getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v1.ListMuteConfigsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.ListMuteConfigsResponse build() { + com.google.cloud.securitycenter.v1.ListMuteConfigsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.ListMuteConfigsResponse buildPartial() { + com.google.cloud.securitycenter.v1.ListMuteConfigsResponse result = + new com.google.cloud.securitycenter.v1.ListMuteConfigsResponse(this); + int from_bitField0_ = bitField0_; + if (muteConfigsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + muteConfigs_ = java.util.Collections.unmodifiableList(muteConfigs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.muteConfigs_ = muteConfigs_; + } else { + result.muteConfigs_ = muteConfigsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.securitycenter.v1.ListMuteConfigsResponse) { + return mergeFrom((com.google.cloud.securitycenter.v1.ListMuteConfigsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v1.ListMuteConfigsResponse other) { + if (other == com.google.cloud.securitycenter.v1.ListMuteConfigsResponse.getDefaultInstance()) + return this; + if (muteConfigsBuilder_ == null) { + if (!other.muteConfigs_.isEmpty()) { + if (muteConfigs_.isEmpty()) { + muteConfigs_ = other.muteConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMuteConfigsIsMutable(); + muteConfigs_.addAll(other.muteConfigs_); + } + onChanged(); + } + } else { + if (!other.muteConfigs_.isEmpty()) { + if (muteConfigsBuilder_.isEmpty()) { + muteConfigsBuilder_.dispose(); + muteConfigsBuilder_ = null; + muteConfigs_ = other.muteConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + muteConfigsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMuteConfigsFieldBuilder() + : null; + } else { + muteConfigsBuilder_.addAllMessages(other.muteConfigs_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.securitycenter.v1.ListMuteConfigsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.securitycenter.v1.ListMuteConfigsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List muteConfigs_ = + java.util.Collections.emptyList(); + + private void ensureMuteConfigsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + muteConfigs_ = + new java.util.ArrayList(muteConfigs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v1.MuteConfig, + com.google.cloud.securitycenter.v1.MuteConfig.Builder, + com.google.cloud.securitycenter.v1.MuteConfigOrBuilder> + muteConfigsBuilder_; + + /** + * + * + *
+     * The mute configs from the specified parent.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.MuteConfig mute_configs = 1; + */ + public java.util.List getMuteConfigsList() { + if (muteConfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList(muteConfigs_); + } else { + return muteConfigsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The mute configs from the specified parent.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.MuteConfig mute_configs = 1; + */ + public int getMuteConfigsCount() { + if (muteConfigsBuilder_ == null) { + return muteConfigs_.size(); + } else { + return muteConfigsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The mute configs from the specified parent.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.MuteConfig mute_configs = 1; + */ + public com.google.cloud.securitycenter.v1.MuteConfig getMuteConfigs(int index) { + if (muteConfigsBuilder_ == null) { + return muteConfigs_.get(index); + } else { + return muteConfigsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The mute configs from the specified parent.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.MuteConfig mute_configs = 1; + */ + public Builder setMuteConfigs(int index, com.google.cloud.securitycenter.v1.MuteConfig value) { + if (muteConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMuteConfigsIsMutable(); + muteConfigs_.set(index, value); + onChanged(); + } else { + muteConfigsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The mute configs from the specified parent.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.MuteConfig mute_configs = 1; + */ + public Builder setMuteConfigs( + int index, com.google.cloud.securitycenter.v1.MuteConfig.Builder builderForValue) { + if (muteConfigsBuilder_ == null) { + ensureMuteConfigsIsMutable(); + muteConfigs_.set(index, builderForValue.build()); + onChanged(); + } else { + muteConfigsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The mute configs from the specified parent.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.MuteConfig mute_configs = 1; + */ + public Builder addMuteConfigs(com.google.cloud.securitycenter.v1.MuteConfig value) { + if (muteConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMuteConfigsIsMutable(); + muteConfigs_.add(value); + onChanged(); + } else { + muteConfigsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The mute configs from the specified parent.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.MuteConfig mute_configs = 1; + */ + public Builder addMuteConfigs(int index, com.google.cloud.securitycenter.v1.MuteConfig value) { + if (muteConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMuteConfigsIsMutable(); + muteConfigs_.add(index, value); + onChanged(); + } else { + muteConfigsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The mute configs from the specified parent.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.MuteConfig mute_configs = 1; + */ + public Builder addMuteConfigs( + com.google.cloud.securitycenter.v1.MuteConfig.Builder builderForValue) { + if (muteConfigsBuilder_ == null) { + ensureMuteConfigsIsMutable(); + muteConfigs_.add(builderForValue.build()); + onChanged(); + } else { + muteConfigsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The mute configs from the specified parent.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.MuteConfig mute_configs = 1; + */ + public Builder addMuteConfigs( + int index, com.google.cloud.securitycenter.v1.MuteConfig.Builder builderForValue) { + if (muteConfigsBuilder_ == null) { + ensureMuteConfigsIsMutable(); + muteConfigs_.add(index, builderForValue.build()); + onChanged(); + } else { + muteConfigsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The mute configs from the specified parent.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.MuteConfig mute_configs = 1; + */ + public Builder addAllMuteConfigs( + java.lang.Iterable values) { + if (muteConfigsBuilder_ == null) { + ensureMuteConfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, muteConfigs_); + onChanged(); + } else { + muteConfigsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The mute configs from the specified parent.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.MuteConfig mute_configs = 1; + */ + public Builder clearMuteConfigs() { + if (muteConfigsBuilder_ == null) { + muteConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + muteConfigsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The mute configs from the specified parent.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.MuteConfig mute_configs = 1; + */ + public Builder removeMuteConfigs(int index) { + if (muteConfigsBuilder_ == null) { + ensureMuteConfigsIsMutable(); + muteConfigs_.remove(index); + onChanged(); + } else { + muteConfigsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The mute configs from the specified parent.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.MuteConfig mute_configs = 1; + */ + public com.google.cloud.securitycenter.v1.MuteConfig.Builder getMuteConfigsBuilder(int index) { + return getMuteConfigsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The mute configs from the specified parent.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.MuteConfig mute_configs = 1; + */ + public com.google.cloud.securitycenter.v1.MuteConfigOrBuilder getMuteConfigsOrBuilder( + int index) { + if (muteConfigsBuilder_ == null) { + return muteConfigs_.get(index); + } else { + return muteConfigsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The mute configs from the specified parent.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.MuteConfig mute_configs = 1; + */ + public java.util.List + getMuteConfigsOrBuilderList() { + if (muteConfigsBuilder_ != null) { + return muteConfigsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(muteConfigs_); + } + } + /** + * + * + *
+     * The mute configs from the specified parent.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.MuteConfig mute_configs = 1; + */ + public com.google.cloud.securitycenter.v1.MuteConfig.Builder addMuteConfigsBuilder() { + return getMuteConfigsFieldBuilder() + .addBuilder(com.google.cloud.securitycenter.v1.MuteConfig.getDefaultInstance()); + } + /** + * + * + *
+     * The mute configs from the specified parent.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.MuteConfig mute_configs = 1; + */ + public com.google.cloud.securitycenter.v1.MuteConfig.Builder addMuteConfigsBuilder(int index) { + return getMuteConfigsFieldBuilder() + .addBuilder(index, com.google.cloud.securitycenter.v1.MuteConfig.getDefaultInstance()); + } + /** + * + * + *
+     * The mute configs from the specified parent.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.MuteConfig mute_configs = 1; + */ + public java.util.List + getMuteConfigsBuilderList() { + return getMuteConfigsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v1.MuteConfig, + com.google.cloud.securitycenter.v1.MuteConfig.Builder, + com.google.cloud.securitycenter.v1.MuteConfigOrBuilder> + getMuteConfigsFieldBuilder() { + if (muteConfigsBuilder_ == null) { + muteConfigsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v1.MuteConfig, + com.google.cloud.securitycenter.v1.MuteConfig.Builder, + com.google.cloud.securitycenter.v1.MuteConfigOrBuilder>( + muteConfigs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + muteConfigs_ = null; + } + return muteConfigsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.ListMuteConfigsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.ListMuteConfigsResponse) + private static final com.google.cloud.securitycenter.v1.ListMuteConfigsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.ListMuteConfigsResponse(); + } + + public static com.google.cloud.securitycenter.v1.ListMuteConfigsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListMuteConfigsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListMuteConfigsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.ListMuteConfigsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ListMuteConfigsResponseOrBuilder.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ListMuteConfigsResponseOrBuilder.java new file mode 100644 index 000000000..7b089bdd4 --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ListMuteConfigsResponseOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/securitycenter_service.proto + +package com.google.cloud.securitycenter.v1; + +public interface ListMuteConfigsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.ListMuteConfigsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The mute configs from the specified parent.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.MuteConfig mute_configs = 1; + */ + java.util.List getMuteConfigsList(); + /** + * + * + *
+   * The mute configs from the specified parent.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.MuteConfig mute_configs = 1; + */ + com.google.cloud.securitycenter.v1.MuteConfig getMuteConfigs(int index); + /** + * + * + *
+   * The mute configs from the specified parent.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.MuteConfig mute_configs = 1; + */ + int getMuteConfigsCount(); + /** + * + * + *
+   * The mute configs from the specified parent.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.MuteConfig mute_configs = 1; + */ + java.util.List + getMuteConfigsOrBuilderList(); + /** + * + * + *
+   * The mute configs from the specified parent.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.MuteConfig mute_configs = 1; + */ + com.google.cloud.securitycenter.v1.MuteConfigOrBuilder getMuteConfigsOrBuilder(int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/MuteConfig.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/MuteConfig.java new file mode 100644 index 000000000..85a6b2fd2 --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/MuteConfig.java @@ -0,0 +1,2147 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/mute_config.proto + +package com.google.cloud.securitycenter.v1; + +/** + * + * + *
+ * A mute config is a Cloud SCC resource that contains the configuration
+ * to mute create/update events of findings.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.MuteConfig} + */ +public final class MuteConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.MuteConfig) + MuteConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use MuteConfig.newBuilder() to construct. + private MuteConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MuteConfig() { + name_ = ""; + displayName_ = ""; + description_ = ""; + filter_ = ""; + mostRecentEditor_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MuteConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private MuteConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 42: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + mostRecentEditor_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.MuteConfigProto + .internal_static_google_cloud_securitycenter_v1_MuteConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.MuteConfigProto + .internal_static_google_cloud_securitycenter_v1_MuteConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.MuteConfig.class, + com.google.cloud.securitycenter.v1.MuteConfig.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * This field will be ignored if provided on config creation. Format
+   * "organizations/{organization}/muteConfigs/{mute_config}"
+   * "folders/{folder}/muteConfigs/{mute_config}"
+   * "projects/{project}/muteConfigs/{mute_config}"
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * This field will be ignored if provided on config creation. Format
+   * "organizations/{organization}/muteConfigs/{mute_config}"
+   * "folders/{folder}/muteConfigs/{mute_config}"
+   * "projects/{project}/muteConfigs/{mute_config}"
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * The human readable name to be displayed for the mute config.
+   * 
+ * + * string display_name = 2 [deprecated = true]; + * + * @return The displayName. + */ + @java.lang.Override + @java.lang.Deprecated + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * The human readable name to be displayed for the mute config.
+   * 
+ * + * string display_name = 2 [deprecated = true]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + * + * + *
+   * A description of the mute config.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * A description of the mute config.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * Required. An expression that defines the filter to apply across create/update events
+   * of findings. While creating a filter string, be mindful of the
+   * scope in which the mute configuration is being created. E.g., If a filter
+   * contains project = X but is created under the project = Y scope, it might
+   * not match any findings.
+   * The following field and operator combinations are supported:
+   * * severity: `=`, `:`
+   * * category: `=`, `:`
+   * * resource.name: `=`, `:`
+   * * resource.project_name: `=`, `:`
+   * * resource.project_display_name: `=`, `:`
+   * * resource.folders.resource_folder: `=`, `:`
+   * * resource.parent_name: `=`, `:`
+   * * resource.parent_display_name: `=`, `:`
+   * * resource.type: `=`, `:`
+   * * finding_class: `=`, `:`
+   * * indicator.ip_addresses: `=`, `:`
+   * * indicator.domains: `=`, `:`
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Required. An expression that defines the filter to apply across create/update events
+   * of findings. While creating a filter string, be mindful of the
+   * scope in which the mute configuration is being created. E.g., If a filter
+   * contains project = X but is created under the project = Y scope, it might
+   * not match any findings.
+   * The following field and operator combinations are supported:
+   * * severity: `=`, `:`
+   * * category: `=`, `:`
+   * * resource.name: `=`, `:`
+   * * resource.project_name: `=`, `:`
+   * * resource.project_display_name: `=`, `:`
+   * * resource.folders.resource_folder: `=`, `:`
+   * * resource.parent_name: `=`, `:`
+   * * resource.parent_display_name: `=`, `:`
+   * * resource.type: `=`, `:`
+   * * finding_class: `=`, `:`
+   * * indicator.ip_addresses: `=`, `:`
+   * * indicator.domains: `=`, `:`
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time at which the mute config was created.
+   * This field is set by the server and will be ignored if provided on config
+   * creation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The time at which the mute config was created.
+   * This field is set by the server and will be ignored if provided on config
+   * creation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The time at which the mute config was created.
+   * This field is set by the server and will be ignored if provided on config
+   * creation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The most recent time at which the mute config was updated.
+   * This field is set by the server and will be ignored if provided on config
+   * creation or update.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The most recent time at which the mute config was updated.
+   * This field is set by the server and will be ignored if provided on config
+   * creation or update.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The most recent time at which the mute config was updated.
+   * This field is set by the server and will be ignored if provided on config
+   * creation or update.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int MOST_RECENT_EDITOR_FIELD_NUMBER = 7; + private volatile java.lang.Object mostRecentEditor_; + /** + * + * + *
+   * Output only. Email address of the user who last edited the mute config.
+   * This field is set by the server and will be ignored if provided on config
+   * creation or update.
+   * 
+ * + * string most_recent_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The mostRecentEditor. + */ + @java.lang.Override + public java.lang.String getMostRecentEditor() { + java.lang.Object ref = mostRecentEditor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mostRecentEditor_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Email address of the user who last edited the mute config.
+   * This field is set by the server and will be ignored if provided on config
+   * creation or update.
+   * 
+ * + * string most_recent_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for mostRecentEditor. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMostRecentEditorBytes() { + java.lang.Object ref = mostRecentEditor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mostRecentEditor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (createTime_ != null) { + output.writeMessage(5, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(6, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mostRecentEditor_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, mostRecentEditor_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mostRecentEditor_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, mostRecentEditor_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.securitycenter.v1.MuteConfig)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v1.MuteConfig other = + (com.google.cloud.securitycenter.v1.MuteConfig) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getMostRecentEditor().equals(other.getMostRecentEditor())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + MOST_RECENT_EDITOR_FIELD_NUMBER; + hash = (53 * hash) + getMostRecentEditor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v1.MuteConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.MuteConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.MuteConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.MuteConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.MuteConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.MuteConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.MuteConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.MuteConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.MuteConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.MuteConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.MuteConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.MuteConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.securitycenter.v1.MuteConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A mute config is a Cloud SCC resource that contains the configuration
+   * to mute create/update events of findings.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.MuteConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.MuteConfig) + com.google.cloud.securitycenter.v1.MuteConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.MuteConfigProto + .internal_static_google_cloud_securitycenter_v1_MuteConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.MuteConfigProto + .internal_static_google_cloud_securitycenter_v1_MuteConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.MuteConfig.class, + com.google.cloud.securitycenter.v1.MuteConfig.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v1.MuteConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + description_ = ""; + + filter_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + mostRecentEditor_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v1.MuteConfigProto + .internal_static_google_cloud_securitycenter_v1_MuteConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.MuteConfig getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v1.MuteConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.MuteConfig build() { + com.google.cloud.securitycenter.v1.MuteConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.MuteConfig buildPartial() { + com.google.cloud.securitycenter.v1.MuteConfig result = + new com.google.cloud.securitycenter.v1.MuteConfig(this); + result.name_ = name_; + result.displayName_ = displayName_; + result.description_ = description_; + result.filter_ = filter_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.mostRecentEditor_ = mostRecentEditor_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.securitycenter.v1.MuteConfig) { + return mergeFrom((com.google.cloud.securitycenter.v1.MuteConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v1.MuteConfig other) { + if (other == com.google.cloud.securitycenter.v1.MuteConfig.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getMostRecentEditor().isEmpty()) { + mostRecentEditor_ = other.mostRecentEditor_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.securitycenter.v1.MuteConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.securitycenter.v1.MuteConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * This field will be ignored if provided on config creation. Format
+     * "organizations/{organization}/muteConfigs/{mute_config}"
+     * "folders/{folder}/muteConfigs/{mute_config}"
+     * "projects/{project}/muteConfigs/{mute_config}"
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * This field will be ignored if provided on config creation. Format
+     * "organizations/{organization}/muteConfigs/{mute_config}"
+     * "folders/{folder}/muteConfigs/{mute_config}"
+     * "projects/{project}/muteConfigs/{mute_config}"
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * This field will be ignored if provided on config creation. Format
+     * "organizations/{organization}/muteConfigs/{mute_config}"
+     * "folders/{folder}/muteConfigs/{mute_config}"
+     * "projects/{project}/muteConfigs/{mute_config}"
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * This field will be ignored if provided on config creation. Format
+     * "organizations/{organization}/muteConfigs/{mute_config}"
+     * "folders/{folder}/muteConfigs/{mute_config}"
+     * "projects/{project}/muteConfigs/{mute_config}"
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * This field will be ignored if provided on config creation. Format
+     * "organizations/{organization}/muteConfigs/{mute_config}"
+     * "folders/{folder}/muteConfigs/{mute_config}"
+     * "projects/{project}/muteConfigs/{mute_config}"
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * The human readable name to be displayed for the mute config.
+     * 
+ * + * string display_name = 2 [deprecated = true]; + * + * @return The displayName. + */ + @java.lang.Deprecated + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The human readable name to be displayed for the mute config.
+     * 
+ * + * string display_name = 2 [deprecated = true]; + * + * @return The bytes for displayName. + */ + @java.lang.Deprecated + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The human readable name to be displayed for the mute config.
+     * 
+ * + * string display_name = 2 [deprecated = true]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The human readable name to be displayed for the mute config.
+     * 
+ * + * string display_name = 2 [deprecated = true]; + * + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The human readable name to be displayed for the mute config.
+     * 
+ * + * string display_name = 2 [deprecated = true]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * A description of the mute config.
+     * 
+ * + * string description = 3; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A description of the mute config.
+     * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A description of the mute config.
+     * 
+ * + * string description = 3; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A description of the mute config.
+     * 
+ * + * string description = 3; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * A description of the mute config.
+     * 
+ * + * string description = 3; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Required. An expression that defines the filter to apply across create/update events
+     * of findings. While creating a filter string, be mindful of the
+     * scope in which the mute configuration is being created. E.g., If a filter
+     * contains project = X but is created under the project = Y scope, it might
+     * not match any findings.
+     * The following field and operator combinations are supported:
+     * * severity: `=`, `:`
+     * * category: `=`, `:`
+     * * resource.name: `=`, `:`
+     * * resource.project_name: `=`, `:`
+     * * resource.project_display_name: `=`, `:`
+     * * resource.folders.resource_folder: `=`, `:`
+     * * resource.parent_name: `=`, `:`
+     * * resource.parent_display_name: `=`, `:`
+     * * resource.type: `=`, `:`
+     * * finding_class: `=`, `:`
+     * * indicator.ip_addresses: `=`, `:`
+     * * indicator.domains: `=`, `:`
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. An expression that defines the filter to apply across create/update events
+     * of findings. While creating a filter string, be mindful of the
+     * scope in which the mute configuration is being created. E.g., If a filter
+     * contains project = X but is created under the project = Y scope, it might
+     * not match any findings.
+     * The following field and operator combinations are supported:
+     * * severity: `=`, `:`
+     * * category: `=`, `:`
+     * * resource.name: `=`, `:`
+     * * resource.project_name: `=`, `:`
+     * * resource.project_display_name: `=`, `:`
+     * * resource.folders.resource_folder: `=`, `:`
+     * * resource.parent_name: `=`, `:`
+     * * resource.parent_display_name: `=`, `:`
+     * * resource.type: `=`, `:`
+     * * finding_class: `=`, `:`
+     * * indicator.ip_addresses: `=`, `:`
+     * * indicator.domains: `=`, `:`
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. An expression that defines the filter to apply across create/update events
+     * of findings. While creating a filter string, be mindful of the
+     * scope in which the mute configuration is being created. E.g., If a filter
+     * contains project = X but is created under the project = Y scope, it might
+     * not match any findings.
+     * The following field and operator combinations are supported:
+     * * severity: `=`, `:`
+     * * category: `=`, `:`
+     * * resource.name: `=`, `:`
+     * * resource.project_name: `=`, `:`
+     * * resource.project_display_name: `=`, `:`
+     * * resource.folders.resource_folder: `=`, `:`
+     * * resource.parent_name: `=`, `:`
+     * * resource.parent_display_name: `=`, `:`
+     * * resource.type: `=`, `:`
+     * * finding_class: `=`, `:`
+     * * indicator.ip_addresses: `=`, `:`
+     * * indicator.domains: `=`, `:`
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. An expression that defines the filter to apply across create/update events
+     * of findings. While creating a filter string, be mindful of the
+     * scope in which the mute configuration is being created. E.g., If a filter
+     * contains project = X but is created under the project = Y scope, it might
+     * not match any findings.
+     * The following field and operator combinations are supported:
+     * * severity: `=`, `:`
+     * * category: `=`, `:`
+     * * resource.name: `=`, `:`
+     * * resource.project_name: `=`, `:`
+     * * resource.project_display_name: `=`, `:`
+     * * resource.folders.resource_folder: `=`, `:`
+     * * resource.parent_name: `=`, `:`
+     * * resource.parent_display_name: `=`, `:`
+     * * resource.type: `=`, `:`
+     * * finding_class: `=`, `:`
+     * * indicator.ip_addresses: `=`, `:`
+     * * indicator.domains: `=`, `:`
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. An expression that defines the filter to apply across create/update events
+     * of findings. While creating a filter string, be mindful of the
+     * scope in which the mute configuration is being created. E.g., If a filter
+     * contains project = X but is created under the project = Y scope, it might
+     * not match any findings.
+     * The following field and operator combinations are supported:
+     * * severity: `=`, `:`
+     * * category: `=`, `:`
+     * * resource.name: `=`, `:`
+     * * resource.project_name: `=`, `:`
+     * * resource.project_display_name: `=`, `:`
+     * * resource.folders.resource_folder: `=`, `:`
+     * * resource.parent_name: `=`, `:`
+     * * resource.parent_display_name: `=`, `:`
+     * * resource.type: `=`, `:`
+     * * finding_class: `=`, `:`
+     * * indicator.ip_addresses: `=`, `:`
+     * * indicator.domains: `=`, `:`
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The time at which the mute config was created.
+     * This field is set by the server and will be ignored if provided on config
+     * creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. The time at which the mute config was created.
+     * This field is set by the server and will be ignored if provided on config
+     * creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time at which the mute config was created.
+     * This field is set by the server and will be ignored if provided on config
+     * creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which the mute config was created.
+     * This field is set by the server and will be ignored if provided on config
+     * creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which the mute config was created.
+     * This field is set by the server and will be ignored if provided on config
+     * creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which the mute config was created.
+     * This field is set by the server and will be ignored if provided on config
+     * creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which the mute config was created.
+     * This field is set by the server and will be ignored if provided on config
+     * creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time at which the mute config was created.
+     * This field is set by the server and will be ignored if provided on config
+     * creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The time at which the mute config was created.
+     * This field is set by the server and will be ignored if provided on config
+     * creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The most recent time at which the mute config was updated.
+     * This field is set by the server and will be ignored if provided on config
+     * creation or update.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. The most recent time at which the mute config was updated.
+     * This field is set by the server and will be ignored if provided on config
+     * creation or update.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The most recent time at which the mute config was updated.
+     * This field is set by the server and will be ignored if provided on config
+     * creation or update.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The most recent time at which the mute config was updated.
+     * This field is set by the server and will be ignored if provided on config
+     * creation or update.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The most recent time at which the mute config was updated.
+     * This field is set by the server and will be ignored if provided on config
+     * creation or update.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The most recent time at which the mute config was updated.
+     * This field is set by the server and will be ignored if provided on config
+     * creation or update.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The most recent time at which the mute config was updated.
+     * This field is set by the server and will be ignored if provided on config
+     * creation or update.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The most recent time at which the mute config was updated.
+     * This field is set by the server and will be ignored if provided on config
+     * creation or update.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The most recent time at which the mute config was updated.
+     * This field is set by the server and will be ignored if provided on config
+     * creation or update.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object mostRecentEditor_ = ""; + /** + * + * + *
+     * Output only. Email address of the user who last edited the mute config.
+     * This field is set by the server and will be ignored if provided on config
+     * creation or update.
+     * 
+ * + * string most_recent_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The mostRecentEditor. + */ + public java.lang.String getMostRecentEditor() { + java.lang.Object ref = mostRecentEditor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mostRecentEditor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Email address of the user who last edited the mute config.
+     * This field is set by the server and will be ignored if provided on config
+     * creation or update.
+     * 
+ * + * string most_recent_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for mostRecentEditor. + */ + public com.google.protobuf.ByteString getMostRecentEditorBytes() { + java.lang.Object ref = mostRecentEditor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mostRecentEditor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Email address of the user who last edited the mute config.
+     * This field is set by the server and will be ignored if provided on config
+     * creation or update.
+     * 
+ * + * string most_recent_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The mostRecentEditor to set. + * @return This builder for chaining. + */ + public Builder setMostRecentEditor(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mostRecentEditor_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Email address of the user who last edited the mute config.
+     * This field is set by the server and will be ignored if provided on config
+     * creation or update.
+     * 
+ * + * string most_recent_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearMostRecentEditor() { + + mostRecentEditor_ = getDefaultInstance().getMostRecentEditor(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Email address of the user who last edited the mute config.
+     * This field is set by the server and will be ignored if provided on config
+     * creation or update.
+     * 
+ * + * string most_recent_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for mostRecentEditor to set. + * @return This builder for chaining. + */ + public Builder setMostRecentEditorBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mostRecentEditor_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.MuteConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.MuteConfig) + private static final com.google.cloud.securitycenter.v1.MuteConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.MuteConfig(); + } + + public static com.google.cloud.securitycenter.v1.MuteConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MuteConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MuteConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.MuteConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/MuteConfigName.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/MuteConfigName.java new file mode 100644 index 000000000..86134032c --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/MuteConfigName.java @@ -0,0 +1,375 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.securitycenter.v1; + +import com.google.api.core.BetaApi; +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class MuteConfigName implements ResourceName { + private static final PathTemplate ORGANIZATION_MUTE_CONFIG = + PathTemplate.createWithoutUrlEncoding( + "organizations/{organization}/muteConfigs/{mute_config}"); + private static final PathTemplate FOLDER_MUTE_CONFIG = + PathTemplate.createWithoutUrlEncoding("folders/{folder}/muteConfigs/{mute_config}"); + private static final PathTemplate PROJECT_MUTE_CONFIG = + PathTemplate.createWithoutUrlEncoding("projects/{project}/muteConfigs/{mute_config}"); + private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; + private final String organization; + private final String muteConfig; + private final String folder; + private final String project; + + @Deprecated + protected MuteConfigName() { + organization = null; + muteConfig = null; + folder = null; + project = null; + } + + private MuteConfigName(Builder builder) { + organization = Preconditions.checkNotNull(builder.getOrganization()); + muteConfig = Preconditions.checkNotNull(builder.getMuteConfig()); + folder = null; + project = null; + pathTemplate = ORGANIZATION_MUTE_CONFIG; + } + + private MuteConfigName(FolderMuteConfigBuilder builder) { + folder = Preconditions.checkNotNull(builder.getFolder()); + muteConfig = Preconditions.checkNotNull(builder.getMuteConfig()); + organization = null; + project = null; + pathTemplate = FOLDER_MUTE_CONFIG; + } + + private MuteConfigName(ProjectMuteConfigBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + muteConfig = Preconditions.checkNotNull(builder.getMuteConfig()); + organization = null; + folder = null; + pathTemplate = PROJECT_MUTE_CONFIG; + } + + public String getOrganization() { + return organization; + } + + public String getMuteConfig() { + return muteConfig; + } + + public String getFolder() { + return folder; + } + + public String getProject() { + return project; + } + + public static Builder newBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static Builder newOrganizationMuteConfigBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static FolderMuteConfigBuilder newFolderMuteConfigBuilder() { + return new FolderMuteConfigBuilder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static ProjectMuteConfigBuilder newProjectMuteConfigBuilder() { + return new ProjectMuteConfigBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static MuteConfigName of(String organization, String muteConfig) { + return newBuilder().setOrganization(organization).setMuteConfig(muteConfig).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static MuteConfigName ofOrganizationMuteConfigName( + String organization, String muteConfig) { + return newBuilder().setOrganization(organization).setMuteConfig(muteConfig).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static MuteConfigName ofFolderMuteConfigName(String folder, String muteConfig) { + return newFolderMuteConfigBuilder().setFolder(folder).setMuteConfig(muteConfig).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static MuteConfigName ofProjectMuteConfigName(String project, String muteConfig) { + return newProjectMuteConfigBuilder().setProject(project).setMuteConfig(muteConfig).build(); + } + + public static String format(String organization, String muteConfig) { + return newBuilder().setOrganization(organization).setMuteConfig(muteConfig).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatOrganizationMuteConfigName(String organization, String muteConfig) { + return newBuilder().setOrganization(organization).setMuteConfig(muteConfig).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatFolderMuteConfigName(String folder, String muteConfig) { + return newFolderMuteConfigBuilder() + .setFolder(folder) + .setMuteConfig(muteConfig) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectMuteConfigName(String project, String muteConfig) { + return newProjectMuteConfigBuilder() + .setProject(project) + .setMuteConfig(muteConfig) + .build() + .toString(); + } + + public static MuteConfigName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + if (ORGANIZATION_MUTE_CONFIG.matches(formattedString)) { + Map matchMap = ORGANIZATION_MUTE_CONFIG.match(formattedString); + return ofOrganizationMuteConfigName( + matchMap.get("organization"), matchMap.get("mute_config")); + } else if (FOLDER_MUTE_CONFIG.matches(formattedString)) { + Map matchMap = FOLDER_MUTE_CONFIG.match(formattedString); + return ofFolderMuteConfigName(matchMap.get("folder"), matchMap.get("mute_config")); + } else if (PROJECT_MUTE_CONFIG.matches(formattedString)) { + Map matchMap = PROJECT_MUTE_CONFIG.match(formattedString); + return ofProjectMuteConfigName(matchMap.get("project"), matchMap.get("mute_config")); + } + throw new ValidationException("MuteConfigName.parse: formattedString not in valid format"); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (MuteConfigName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return ORGANIZATION_MUTE_CONFIG.matches(formattedString) + || FOLDER_MUTE_CONFIG.matches(formattedString) + || PROJECT_MUTE_CONFIG.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (organization != null) { + fieldMapBuilder.put("organization", organization); + } + if (muteConfig != null) { + fieldMapBuilder.put("mute_config", muteConfig); + } + if (folder != null) { + fieldMapBuilder.put("folder", folder); + } + if (project != null) { + fieldMapBuilder.put("project", project); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + MuteConfigName that = ((MuteConfigName) o); + return Objects.equals(this.organization, that.organization) + && Objects.equals(this.muteConfig, that.muteConfig) + && Objects.equals(this.folder, that.folder) + && Objects.equals(this.project, that.project); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(fixedValue); + h *= 1000003; + h ^= Objects.hashCode(organization); + h *= 1000003; + h ^= Objects.hashCode(muteConfig); + h *= 1000003; + h ^= Objects.hashCode(folder); + h *= 1000003; + h ^= Objects.hashCode(project); + return h; + } + + /** Builder for organizations/{organization}/muteConfigs/{mute_config}. */ + public static class Builder { + private String organization; + private String muteConfig; + + protected Builder() {} + + public String getOrganization() { + return organization; + } + + public String getMuteConfig() { + return muteConfig; + } + + public Builder setOrganization(String organization) { + this.organization = organization; + return this; + } + + public Builder setMuteConfig(String muteConfig) { + this.muteConfig = muteConfig; + return this; + } + + private Builder(MuteConfigName muteConfigName) { + Preconditions.checkArgument( + Objects.equals(muteConfigName.pathTemplate, ORGANIZATION_MUTE_CONFIG), + "toBuilder is only supported when MuteConfigName has the pattern of organizations/{organization}/muteConfigs/{mute_config}"); + this.organization = muteConfigName.organization; + this.muteConfig = muteConfigName.muteConfig; + } + + public MuteConfigName build() { + return new MuteConfigName(this); + } + } + + /** Builder for folders/{folder}/muteConfigs/{mute_config}. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class FolderMuteConfigBuilder { + private String folder; + private String muteConfig; + + protected FolderMuteConfigBuilder() {} + + public String getFolder() { + return folder; + } + + public String getMuteConfig() { + return muteConfig; + } + + public FolderMuteConfigBuilder setFolder(String folder) { + this.folder = folder; + return this; + } + + public FolderMuteConfigBuilder setMuteConfig(String muteConfig) { + this.muteConfig = muteConfig; + return this; + } + + public MuteConfigName build() { + return new MuteConfigName(this); + } + } + + /** Builder for projects/{project}/muteConfigs/{mute_config}. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class ProjectMuteConfigBuilder { + private String project; + private String muteConfig; + + protected ProjectMuteConfigBuilder() {} + + public String getProject() { + return project; + } + + public String getMuteConfig() { + return muteConfig; + } + + public ProjectMuteConfigBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectMuteConfigBuilder setMuteConfig(String muteConfig) { + this.muteConfig = muteConfig; + return this; + } + + public MuteConfigName build() { + return new MuteConfigName(this); + } + } +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/MuteConfigOrBuilder.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/MuteConfigOrBuilder.java new file mode 100644 index 000000000..211745f97 --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/MuteConfigOrBuilder.java @@ -0,0 +1,284 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/mute_config.proto + +package com.google.cloud.securitycenter.v1; + +public interface MuteConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.MuteConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * This field will be ignored if provided on config creation. Format
+   * "organizations/{organization}/muteConfigs/{mute_config}"
+   * "folders/{folder}/muteConfigs/{mute_config}"
+   * "projects/{project}/muteConfigs/{mute_config}"
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * This field will be ignored if provided on config creation. Format
+   * "organizations/{organization}/muteConfigs/{mute_config}"
+   * "folders/{folder}/muteConfigs/{mute_config}"
+   * "projects/{project}/muteConfigs/{mute_config}"
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The human readable name to be displayed for the mute config.
+   * 
+ * + * string display_name = 2 [deprecated = true]; + * + * @return The displayName. + */ + @java.lang.Deprecated + java.lang.String getDisplayName(); + /** + * + * + *
+   * The human readable name to be displayed for the mute config.
+   * 
+ * + * string display_name = 2 [deprecated = true]; + * + * @return The bytes for displayName. + */ + @java.lang.Deprecated + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * A description of the mute config.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * A description of the mute config.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Required. An expression that defines the filter to apply across create/update events
+   * of findings. While creating a filter string, be mindful of the
+   * scope in which the mute configuration is being created. E.g., If a filter
+   * contains project = X but is created under the project = Y scope, it might
+   * not match any findings.
+   * The following field and operator combinations are supported:
+   * * severity: `=`, `:`
+   * * category: `=`, `:`
+   * * resource.name: `=`, `:`
+   * * resource.project_name: `=`, `:`
+   * * resource.project_display_name: `=`, `:`
+   * * resource.folders.resource_folder: `=`, `:`
+   * * resource.parent_name: `=`, `:`
+   * * resource.parent_display_name: `=`, `:`
+   * * resource.type: `=`, `:`
+   * * finding_class: `=`, `:`
+   * * indicator.ip_addresses: `=`, `:`
+   * * indicator.domains: `=`, `:`
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Required. An expression that defines the filter to apply across create/update events
+   * of findings. While creating a filter string, be mindful of the
+   * scope in which the mute configuration is being created. E.g., If a filter
+   * contains project = X but is created under the project = Y scope, it might
+   * not match any findings.
+   * The following field and operator combinations are supported:
+   * * severity: `=`, `:`
+   * * category: `=`, `:`
+   * * resource.name: `=`, `:`
+   * * resource.project_name: `=`, `:`
+   * * resource.project_display_name: `=`, `:`
+   * * resource.folders.resource_folder: `=`, `:`
+   * * resource.parent_name: `=`, `:`
+   * * resource.parent_display_name: `=`, `:`
+   * * resource.type: `=`, `:`
+   * * finding_class: `=`, `:`
+   * * indicator.ip_addresses: `=`, `:`
+   * * indicator.domains: `=`, `:`
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Output only. The time at which the mute config was created.
+   * This field is set by the server and will be ignored if provided on config
+   * creation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time at which the mute config was created.
+   * This field is set by the server and will be ignored if provided on config
+   * creation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time at which the mute config was created.
+   * This field is set by the server and will be ignored if provided on config
+   * creation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The most recent time at which the mute config was updated.
+   * This field is set by the server and will be ignored if provided on config
+   * creation or update.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The most recent time at which the mute config was updated.
+   * This field is set by the server and will be ignored if provided on config
+   * creation or update.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The most recent time at which the mute config was updated.
+   * This field is set by the server and will be ignored if provided on config
+   * creation or update.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Email address of the user who last edited the mute config.
+   * This field is set by the server and will be ignored if provided on config
+   * creation or update.
+   * 
+ * + * string most_recent_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The mostRecentEditor. + */ + java.lang.String getMostRecentEditor(); + /** + * + * + *
+   * Output only. Email address of the user who last edited the mute config.
+   * This field is set by the server and will be ignored if provided on config
+   * creation or update.
+   * 
+ * + * string most_recent_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for mostRecentEditor. + */ + com.google.protobuf.ByteString getMostRecentEditorBytes(); +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/MuteConfigProto.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/MuteConfigProto.java new file mode 100644 index 000000000..8be8b6bb1 --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/MuteConfigProto.java @@ -0,0 +1,103 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/mute_config.proto + +package com.google.cloud.securitycenter.v1; + +public final class MuteConfigProto { + private MuteConfigProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v1_MuteConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v1_MuteConfig_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n0google/cloud/securitycenter/v1/mute_co" + + "nfig.proto\022\036google.cloud.securitycenter." + + "v1\032\037google/api/field_behavior.proto\032\031goo" + + "gle/api/resource.proto\032\037google/protobuf/" + + "timestamp.proto\032\034google/api/annotations." + + "proto\"\256\003\n\nMuteConfig\022\014\n\004name\030\001 \001(\t\022\030\n\014di" + + "splay_name\030\002 \001(\tB\002\030\001\022\023\n\013description\030\003 \001(" + + "\t\022\023\n\006filter\030\004 \001(\tB\003\340A\002\0224\n\013create_time\030\005 " + + "\001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n\013" + + "update_time\030\006 \001(\0132\032.google.protobuf.Time" + + "stampB\003\340A\003\022\037\n\022most_recent_editor\030\007 \001(\tB\003" + + "\340A\003:\300\001\352A\274\001\n(securitycenter.googleapis.co" + + "m/MuteConfig\0226organizations/{organizatio" + + "n}/muteConfigs/{mute_config}\022*folders/{f" + + "older}/muteConfigs/{mute_config}\022,projec" + + "ts/{project}/muteConfigs/{mute_config}B\353" + + "\001\n\"com.google.cloud.securitycenter.v1B\017M" + + "uteConfigProtoP\001ZLgoogle.golang.org/genp" + + "roto/googleapis/cloud/securitycenter/v1;" + + "securitycenter\252\002\036Google.Cloud.SecurityCe" + + "nter.V1\312\002\036Google\\Cloud\\SecurityCenter\\V1" + + "\352\002!Google::Cloud::SecurityCenter::V1b\006pr" + + "oto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_securitycenter_v1_MuteConfig_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_securitycenter_v1_MuteConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v1_MuteConfig_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "Description", + "Filter", + "CreateTime", + "UpdateTime", + "MostRecentEditor", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Resource.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Resource.java index 3ab447856..dc0cc5466 100644 --- a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Resource.java +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Resource.java @@ -45,6 +45,7 @@ private Resource() { parentDisplayName_ = ""; type_ = ""; folders_ = java.util.Collections.emptyList(); + displayName_ = ""; } @java.lang.Override @@ -130,6 +131,13 @@ private Resource( com.google.cloud.securitycenter.v1.Folder.parser(), extensionRegistry)); break; } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -552,6 +560,55 @@ public com.google.cloud.securitycenter.v1.FolderOrBuilder getFoldersOrBuilder(in return folders_.get(index); } + public static final int DISPLAY_NAME_FIELD_NUMBER = 8; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * The human readable name of the resource.
+   * 
+ * + * string display_name = 8; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * The human readable name of the resource.
+   * 
+ * + * string display_name = 8; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -587,6 +644,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < folders_.size(); i++) { output.writeMessage(7, folders_.get(i)); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, displayName_); + } unknownFields.writeTo(output); } @@ -617,6 +677,9 @@ public int getSerializedSize() { for (int i = 0; i < folders_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, folders_.get(i)); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, displayName_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -640,6 +703,7 @@ public boolean equals(final java.lang.Object obj) { if (!getParentDisplayName().equals(other.getParentDisplayName())) return false; if (!getType().equals(other.getType())) return false; if (!getFoldersList().equals(other.getFoldersList())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -667,6 +731,8 @@ public int hashCode() { hash = (37 * hash) + FOLDERS_FIELD_NUMBER; hash = (53 * hash) + getFoldersList().hashCode(); } + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -832,6 +898,8 @@ public Builder clear() { } else { foldersBuilder_.clear(); } + displayName_ = ""; + return this; } @@ -875,6 +943,7 @@ public com.google.cloud.securitycenter.v1.Resource buildPartial() { } else { result.folders_ = foldersBuilder_.build(); } + result.displayName_ = displayName_; onBuilt(); return result; } @@ -975,6 +1044,10 @@ public Builder mergeFrom(com.google.cloud.securitycenter.v1.Resource other) { } } } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -2068,6 +2141,112 @@ public com.google.cloud.securitycenter.v1.Folder.Builder addFoldersBuilder(int i return foldersBuilder_; } + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * The human readable name of the resource.
+     * 
+ * + * string display_name = 8; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The human readable name of the resource.
+     * 
+ * + * string display_name = 8; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The human readable name of the resource.
+     * 
+ * + * string display_name = 8; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The human readable name of the resource.
+     * 
+ * + * string display_name = 8; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The human readable name of the resource.
+     * 
+ * + * string display_name = 8; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ResourceOrBuilder.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ResourceOrBuilder.java index e19b5c40a..28ca71bf6 100644 --- a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ResourceOrBuilder.java +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ResourceOrBuilder.java @@ -246,4 +246,29 @@ public interface ResourceOrBuilder * */ com.google.cloud.securitycenter.v1.FolderOrBuilder getFoldersOrBuilder(int index); + + /** + * + * + *
+   * The human readable name of the resource.
+   * 
+ * + * string display_name = 8; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * The human readable name of the resource.
+   * 
+ * + * string display_name = 8; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); } diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ResourceProto.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ResourceProto.java index 911af3330..888ef5872 100644 --- a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ResourceProto.java +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ResourceProto.java @@ -44,18 +44,19 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "e.proto\022\036google.cloud.securitycenter.v1\032" + "\037google/api/field_behavior.proto\032+google" + "/cloud/securitycenter/v1/folder.proto\032\034g" - + "oogle/api/annotations.proto\"\300\001\n\010Resource" + + "oogle/api/annotations.proto\"\326\001\n\010Resource" + "\022\014\n\004name\030\001 \001(\t\022\017\n\007project\030\002 \001(\t\022\034\n\024proje" + "ct_display_name\030\003 \001(\t\022\016\n\006parent\030\004 \001(\t\022\033\n" + "\023parent_display_name\030\005 \001(\t\022\014\n\004type\030\006 \001(\t" + "\022<\n\007folders\030\007 \003(\0132&.google.cloud.securit" - + "ycenter.v1.FolderB\003\340A\003B\351\001\n\"com.google.cl" - + "oud.securitycenter.v1B\rResourceProtoP\001ZL" - + "google.golang.org/genproto/googleapis/cl" - + "oud/securitycenter/v1;securitycenter\252\002\036G" - + "oogle.Cloud.SecurityCenter.V1\312\002\036Google\\C" - + "loud\\SecurityCenter\\V1\352\002!Google::Cloud::" - + "SecurityCenter::V1b\006proto3" + + "ycenter.v1.FolderB\003\340A\003\022\024\n\014display_name\030\010" + + " \001(\tB\351\001\n\"com.google.cloud.securitycenter" + + ".v1B\rResourceProtoP\001ZLgoogle.golang.org/" + + "genproto/googleapis/cloud/securitycenter" + + "/v1;securitycenter\252\002\036Google.Cloud.Securi" + + "tyCenter.V1\312\002\036Google\\Cloud\\SecurityCente" + + "r\\V1\352\002!Google::Cloud::SecurityCenter::V1" + + "b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -78,6 +79,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ParentDisplayName", "Type", "Folders", + "DisplayName", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecuritycenterService.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecuritycenterService.java index 741cc1fd8..aa4d5d849 100644 --- a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecuritycenterService.java +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecuritycenterService.java @@ -27,10 +27,22 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v1_BulkMuteFindingsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v1_BulkMuteFindingsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v1_BulkMuteFindingsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v1_BulkMuteFindingsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_securitycenter_v1_CreateFindingRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_securitycenter_v1_CreateFindingRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v1_CreateMuteConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v1_CreateMuteConfigRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_securitycenter_v1_CreateNotificationConfigRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -39,10 +51,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_securitycenter_v1_CreateSourceRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_securitycenter_v1_CreateSourceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v1_DeleteMuteConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v1_DeleteMuteConfigRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_securitycenter_v1_DeleteNotificationConfigRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_securitycenter_v1_DeleteNotificationConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v1_GetMuteConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v1_GetMuteConfigRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_securitycenter_v1_GetNotificationConfigRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -79,6 +99,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_securitycenter_v1_GroupResult_PropertiesEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_securitycenter_v1_GroupResult_PropertiesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v1_ListMuteConfigsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v1_ListMuteConfigsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v1_ListMuteConfigsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v1_ListMuteConfigsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_securitycenter_v1_ListNotificationConfigsRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -127,14 +155,26 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_securitycenter_v1_SetFindingStateRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_securitycenter_v1_SetFindingStateRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v1_SetMuteRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v1_SetMuteRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_securitycenter_v1_RunAssetDiscoveryRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_securitycenter_v1_RunAssetDiscoveryRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v1_UpdateExternalSystemRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v1_UpdateExternalSystemRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_securitycenter_v1_UpdateFindingRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_securitycenter_v1_UpdateFindingRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v1_UpdateMuteConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v1_UpdateMuteConfigRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_securitycenter_v1_UpdateNotificationConfigRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -168,314 +208,412 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "pi/client.proto\032\037google/api/field_behavi" + "or.proto\032\031google/api/resource.proto\032*goo" + "gle/cloud/securitycenter/v1/asset.proto\032" - + ",google/cloud/securitycenter/v1/finding." - + "proto\032+google/cloud/securitycenter/v1/fo" - + "lder.proto\0328google/cloud/securitycenter/" - + "v1/notification_config.proto\032:google/clo" - + "ud/securitycenter/v1/organization_settin" - + "gs.proto\0323google/cloud/securitycenter/v1" - + "/security_marks.proto\032+google/cloud/secu" - + "ritycenter/v1/source.proto\032\036google/iam/v" - + "1/iam_policy.proto\032\032google/iam/v1/policy" - + ".proto\032#google/longrunning/operations.pr" - + "oto\032\036google/protobuf/duration.proto\032\033goo" - + "gle/protobuf/empty.proto\032 google/protobu" - + "f/field_mask.proto\032\034google/protobuf/stru" - + "ct.proto\032\037google/protobuf/timestamp.prot" - + "o\"\254\001\n\024CreateFindingRequest\022<\n\006parent\030\001 \001" - + "(\tB,\340A\002\372A&\n$securitycenter.googleapis.co" - + "m/Source\022\027\n\nfinding_id\030\002 \001(\tB\003\340A\002\022=\n\007fin" - + "ding\030\003 \001(\0132\'.google.cloud.securitycenter" - + ".v1.FindingB\003\340A\002\"\331\001\n\037CreateNotificationC" - + "onfigRequest\022H\n\006parent\030\001 \001(\tB8\340A\002\372A2\n0cl" + + "4google/cloud/securitycenter/v1/external" + + "_system.proto\032,google/cloud/securitycent" + + "er/v1/finding.proto\032+google/cloud/securi" + + "tycenter/v1/folder.proto\0320google/cloud/s" + + "ecuritycenter/v1/mute_config.proto\0328goog" + + "le/cloud/securitycenter/v1/notification_" + + "config.proto\032:google/cloud/securitycente" + + "r/v1/organization_settings.proto\0323google" + + "/cloud/securitycenter/v1/security_marks." + + "proto\032+google/cloud/securitycenter/v1/so" + + "urce.proto\032\036google/iam/v1/iam_policy.pro" + + "to\032\032google/iam/v1/policy.proto\032#google/l" + + "ongrunning/operations.proto\032\036google/prot" + + "obuf/duration.proto\032\033google/protobuf/emp" + + "ty.proto\032 google/protobuf/field_mask.pro" + + "to\032\034google/protobuf/struct.proto\032\037google" + + "/protobuf/timestamp.proto\"a\n\027BulkMuteFin" + + "dingsRequest\022\031\n\006parent\030\001 \001(\tB\t\340A\002\372A\003\n\001*\022" + + "\016\n\006filter\030\002 \001(\t\022\033\n\017mute_annotation\030\003 \001(\t" + + "B\002\030\001\"\032\n\030BulkMuteFindingsResponse\"\254\001\n\024Cre" + + "ateFindingRequest\022<\n\006parent\030\001 \001(\tB,\340A\002\372A" + + "&\n$securitycenter.googleapis.com/Source\022" + + "\027\n\nfinding_id\030\002 \001(\tB\003\340A\002\022=\n\007finding\030\003 \001(" + + "\0132\'.google.cloud.securitycenter.v1.Findi" + + "ngB\003\340A\002\"\276\001\n\027CreateMuteConfigRequest\022@\n\006p" + + "arent\030\001 \001(\tB0\340A\002\372A*\022(securitycenter.goog" + + "leapis.com/MuteConfig\022D\n\013mute_config\030\002 \001" + + "(\0132*.google.cloud.securitycenter.v1.Mute" + + "ConfigB\003\340A\002\022\033\n\016mute_config_id\030\003 \001(\tB\003\340A\002" + + "\"\331\001\n\037CreateNotificationConfigRequest\022H\n\006" + + "parent\030\001 \001(\tB8\340A\002\372A2\n0cloudresourcemanag" + + "er.googleapis.com/Organization\022\026\n\tconfig" + + "_id\030\002 \001(\tB\003\340A\002\022T\n\023notification_config\030\003 " + + "\001(\01322.google.cloud.securitycenter.v1.Not" + + "ificationConfigB\003\340A\002\"\234\001\n\023CreateSourceReq" + + "uest\022H\n\006parent\030\001 \001(\tB8\340A\002\372A2\n0cloudresou" + + "rcemanager.googleapis.com/Organization\022;" + + "\n\006source\030\002 \001(\0132&.google.cloud.securityce" + + "nter.v1.SourceB\003\340A\002\"Y\n\027DeleteMuteConfigR" + + "equest\022>\n\004name\030\001 \001(\tB0\340A\002\372A*\n(securityce" + + "nter.googleapis.com/MuteConfig\"i\n\037Delete" + + "NotificationConfigRequest\022F\n\004name\030\001 \001(\tB" + + "8\340A\002\372A2\n0securitycenter.googleapis.com/N" + + "otificationConfig\"V\n\024GetMuteConfigReques" + + "t\022>\n\004name\030\001 \001(\tB0\340A\002\372A*\n(securitycenter." + + "googleapis.com/MuteConfig\"f\n\034GetNotifica" + + "tionConfigRequest\022F\n\004name\030\001 \001(\tB8\340A\002\372A2\n" + + "0securitycenter.googleapis.com/Notificat" + + "ionConfig\"j\n\036GetOrganizationSettingsRequ" + + "est\022H\n\004name\030\001 \001(\tB:\340A\002\372A4\n2securitycente" + + "r.googleapis.com/OrganizationSettings\"N\n" + + "\020GetSourceRequest\022:\n\004name\030\001 \001(\tB,\340A\002\372A&\n" + + "$securitycenter.googleapis.com/Source\"\203\002" + + "\n\022GroupAssetsRequest\022;\n\006parent\030\001 \001(\tB+\340A" + + "\002\372A%\022#securitycenter.googleapis.com/Asse" + + "t\022\016\n\006filter\030\002 \001(\t\022\025\n\010group_by\030\003 \001(\tB\003\340A\002" + + "\0223\n\020compare_duration\030\004 \001(\0132\031.google.prot" + + "obuf.Duration\022-\n\tread_time\030\005 \001(\0132\032.googl" + + "e.protobuf.Timestamp\022\022\n\npage_token\030\007 \001(\t" + + "\022\021\n\tpage_size\030\010 \001(\005\"\270\001\n\023GroupAssetsRespo" + + "nse\022E\n\020group_by_results\030\001 \003(\0132+.google.c" + + "loud.securitycenter.v1.GroupResult\022-\n\tre" + + "ad_time\030\002 \001(\0132\032.google.protobuf.Timestam" + + "p\022\027\n\017next_page_token\030\003 \001(\t\022\022\n\ntotal_size" + + "\030\004 \001(\005\"\206\002\n\024GroupFindingsRequest\022<\n\006paren" + + "t\030\001 \001(\tB,\340A\002\372A&\n$securitycenter.googleap" + + "is.com/Source\022\016\n\006filter\030\002 \001(\t\022\025\n\010group_b" + + "y\030\003 \001(\tB\003\340A\002\022-\n\tread_time\030\004 \001(\0132\032.google" + + ".protobuf.Timestamp\0223\n\020compare_duration\030" + + "\005 \001(\0132\031.google.protobuf.Duration\022\022\n\npage" + + "_token\030\007 \001(\t\022\021\n\tpage_size\030\010 \001(\005\"\272\001\n\025Grou" + + "pFindingsResponse\022E\n\020group_by_results\030\001 " + + "\003(\0132+.google.cloud.securitycenter.v1.Gro" + + "upResult\022-\n\tread_time\030\002 \001(\0132\032.google.pro" + + "tobuf.Timestamp\022\027\n\017next_page_token\030\003 \001(\t" + + "\022\022\n\ntotal_size\030\004 \001(\005\"\270\001\n\013GroupResult\022O\n\n" + + "properties\030\001 \003(\0132;.google.cloud.security" + + "center.v1.GroupResult.PropertiesEntry\022\r\n" + + "\005count\030\002 \001(\003\032I\n\017PropertiesEntry\022\013\n\003key\030\001" + + " \001(\t\022%\n\005value\030\002 \001(\0132\026.google.protobuf.Va" + + "lue:\0028\001\"\201\001\n\026ListMuteConfigsRequest\022@\n\006pa" + + "rent\030\001 \001(\tB0\340A\002\372A*\022(securitycenter.googl" + + "eapis.com/MuteConfig\022\021\n\tpage_size\030\002 \001(\005\022" + + "\022\n\npage_token\030\003 \001(\t\"t\n\027ListMuteConfigsRe" + + "sponse\022@\n\014mute_configs\030\001 \003(\0132*.google.cl" + + "oud.securitycenter.v1.MuteConfig\022\027\n\017next" + + "_page_token\030\002 \001(\t\"\221\001\n\036ListNotificationCo" + + "nfigsRequest\022H\n\006parent\030\001 \001(\tB8\340A\002\372A2\n0cl" + "oudresourcemanager.googleapis.com/Organi" - + "zation\022\026\n\tconfig_id\030\002 \001(\tB\003\340A\002\022T\n\023notifi" - + "cation_config\030\003 \001(\01322.google.cloud.secur" - + "itycenter.v1.NotificationConfigB\003\340A\002\"\234\001\n" - + "\023CreateSourceRequest\022H\n\006parent\030\001 \001(\tB8\340A" - + "\002\372A2\n0cloudresourcemanager.googleapis.co" - + "m/Organization\022;\n\006source\030\002 \001(\0132&.google." - + "cloud.securitycenter.v1.SourceB\003\340A\002\"i\n\037D" - + "eleteNotificationConfigRequest\022F\n\004name\030\001" - + " \001(\tB8\340A\002\372A2\n0securitycenter.googleapis." - + "com/NotificationConfig\"f\n\034GetNotificatio" - + "nConfigRequest\022F\n\004name\030\001 \001(\tB8\340A\002\372A2\n0se" - + "curitycenter.googleapis.com/Notification" - + "Config\"j\n\036GetOrganizationSettingsRequest" - + "\022H\n\004name\030\001 \001(\tB:\340A\002\372A4\n2securitycenter.g" - + "oogleapis.com/OrganizationSettings\"N\n\020Ge" - + "tSourceRequest\022:\n\004name\030\001 \001(\tB,\340A\002\372A&\n$se" - + "curitycenter.googleapis.com/Source\"\203\002\n\022G" - + "roupAssetsRequest\022;\n\006parent\030\001 \001(\tB+\340A\002\372A" - + "%\022#securitycenter.googleapis.com/Asset\022\016" - + "\n\006filter\030\002 \001(\t\022\025\n\010group_by\030\003 \001(\tB\003\340A\002\0223\n" - + "\020compare_duration\030\004 \001(\0132\031.google.protobu" - + "f.Duration\022-\n\tread_time\030\005 \001(\0132\032.google.p" - + "rotobuf.Timestamp\022\022\n\npage_token\030\007 \001(\t\022\021\n" - + "\tpage_size\030\010 \001(\005\"\270\001\n\023GroupAssetsResponse" - + "\022E\n\020group_by_results\030\001 \003(\0132+.google.clou" - + "d.securitycenter.v1.GroupResult\022-\n\tread_" - + "time\030\002 \001(\0132\032.google.protobuf.Timestamp\022\027" - + "\n\017next_page_token\030\003 \001(\t\022\022\n\ntotal_size\030\004 " - + "\001(\005\"\206\002\n\024GroupFindingsRequest\022<\n\006parent\030\001" - + " \001(\tB,\340A\002\372A&\n$securitycenter.googleapis." - + "com/Source\022\016\n\006filter\030\002 \001(\t\022\025\n\010group_by\030\003" - + " \001(\tB\003\340A\002\022-\n\tread_time\030\004 \001(\0132\032.google.pr" - + "otobuf.Timestamp\0223\n\020compare_duration\030\005 \001" - + "(\0132\031.google.protobuf.Duration\022\022\n\npage_to" - + "ken\030\007 \001(\t\022\021\n\tpage_size\030\010 \001(\005\"\272\001\n\025GroupFi" - + "ndingsResponse\022E\n\020group_by_results\030\001 \003(\013" - + "2+.google.cloud.securitycenter.v1.GroupR" - + "esult\022-\n\tread_time\030\002 \001(\0132\032.google.protob" - + "uf.Timestamp\022\027\n\017next_page_token\030\003 \001(\t\022\022\n" - + "\ntotal_size\030\004 \001(\005\"\270\001\n\013GroupResult\022O\n\npro" - + "perties\030\001 \003(\0132;.google.cloud.securitycen" - + "ter.v1.GroupResult.PropertiesEntry\022\r\n\005co" - + "unt\030\002 \001(\003\032I\n\017PropertiesEntry\022\013\n\003key\030\001 \001(" - + "\t\022%\n\005value\030\002 \001(\0132\026.google.protobuf.Value" - + ":\0028\001\"\221\001\n\036ListNotificationConfigsRequest\022" - + "H\n\006parent\030\001 \001(\tB8\340A\002\372A2\n0cloudresourcema" - + "nager.googleapis.com/Organization\022\022\n\npag" - + "e_token\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\"\214\001\n\037Lis" - + "tNotificationConfigsResponse\022P\n\024notifica" - + "tion_configs\030\001 \003(\01322.google.cloud.securi" - + "tycenter.v1.NotificationConfig\022\027\n\017next_p" - + "age_token\030\002 \001(\t\"y\n\022ListSourcesRequest\022<\n" - + "\006parent\030\001 \001(\tB,\340A\002\372A&\022$securitycenter.go" - + "ogleapis.com/Source\022\022\n\npage_token\030\002 \001(\t\022" - + "\021\n\tpage_size\030\007 \001(\005\"g\n\023ListSourcesRespons" - + "e\0227\n\007sources\030\001 \003(\0132&.google.cloud.securi" - + "tycenter.v1.Source\022\027\n\017next_page_token\030\002 " - + "\001(\t\"\255\002\n\021ListAssetsRequest\022;\n\006parent\030\001 \001(" - + "\tB+\340A\002\372A%\022#securitycenter.googleapis.com" - + "/Asset\022\016\n\006filter\030\002 \001(\t\022\020\n\010order_by\030\003 \001(\t" - + "\022-\n\tread_time\030\004 \001(\0132\032.google.protobuf.Ti" - + "mestamp\0223\n\020compare_duration\030\005 \001(\0132\031.goog" - + "le.protobuf.Duration\022.\n\nfield_mask\030\007 \001(\013" - + "2\032.google.protobuf.FieldMask\022\022\n\npage_tok" - + "en\030\010 \001(\t\022\021\n\tpage_size\030\t \001(\005\"\303\003\n\022ListAsse" - + "tsResponse\022`\n\023list_assets_results\030\001 \003(\0132" - + "C.google.cloud.securitycenter.v1.ListAss" - + "etsResponse.ListAssetsResult\022-\n\tread_tim" - + "e\030\002 \001(\0132\032.google.protobuf.Timestamp\022\027\n\017n" - + "ext_page_token\030\003 \001(\t\022\022\n\ntotal_size\030\004 \001(\005" - + "\032\356\001\n\020ListAssetsResult\0224\n\005asset\030\001 \001(\0132%.g" - + "oogle.cloud.securitycenter.v1.Asset\022e\n\014s" - + "tate_change\030\002 \001(\0162O.google.cloud.securit" - + "ycenter.v1.ListAssetsResponse.ListAssets" - + "Result.StateChange\"=\n\013StateChange\022\n\n\006UNU" - + "SED\020\000\022\t\n\005ADDED\020\001\022\013\n\007REMOVED\020\002\022\n\n\006ACTIVE\020" - + "\003\"\260\002\n\023ListFindingsRequest\022<\n\006parent\030\001 \001(" - + "\tB,\340A\002\372A&\n$securitycenter.googleapis.com" - + "/Source\022\016\n\006filter\030\002 \001(\t\022\020\n\010order_by\030\003 \001(" - + "\t\022-\n\tread_time\030\004 \001(\0132\032.google.protobuf.T" - + "imestamp\0223\n\020compare_duration\030\005 \001(\0132\031.goo" - + "gle.protobuf.Duration\022.\n\nfield_mask\030\007 \001(" - + "\0132\032.google.protobuf.FieldMask\022\022\n\npage_to" - + "ken\030\010 \001(\t\022\021\n\tpage_size\030\t \001(\005\"\210\006\n\024ListFin" - + "dingsResponse\022f\n\025list_findings_results\030\001" - + " \003(\0132G.google.cloud.securitycenter.v1.Li" - + "stFindingsResponse.ListFindingsResult\022-\n" - + "\tread_time\030\002 \001(\0132\032.google.protobuf.Times" - + "tamp\022\027\n\017next_page_token\030\003 \001(\t\022\022\n\ntotal_s" - + "ize\030\004 \001(\005\032\253\004\n\022ListFindingsResult\0228\n\007find" - + "ing\030\001 \001(\0132\'.google.cloud.securitycenter." - + "v1.Finding\022i\n\014state_change\030\002 \001(\0162S.googl" - + "e.cloud.securitycenter.v1.ListFindingsRe" - + "sponse.ListFindingsResult.StateChange\022g\n" - + "\010resource\030\003 \001(\0132P.google.cloud.securityc" - + "enter.v1.ListFindingsResponse.ListFindin" - + "gsResult.ResourceB\003\340A\003\032\267\001\n\010Resource\022\014\n\004n" - + "ame\030\001 \001(\t\022\024\n\014project_name\030\002 \001(\t\022\034\n\024proje" - + "ct_display_name\030\003 \001(\t\022\023\n\013parent_name\030\004 \001" - + "(\t\022\033\n\023parent_display_name\030\005 \001(\t\0227\n\007folde" - + "rs\030\007 \003(\0132&.google.cloud.securitycenter.v" - + "1.Folder\"M\n\013StateChange\022\n\n\006UNUSED\020\000\022\013\n\007C" - + "HANGED\020\001\022\r\n\tUNCHANGED\020\002\022\t\n\005ADDED\020\003\022\013\n\007RE" - + "MOVED\020\004\"\315\001\n\026SetFindingStateRequest\022;\n\004na" - + "me\030\001 \001(\tB-\340A\002\372A\'\n%securitycenter.googlea" - + "pis.com/Finding\022A\n\005state\030\002 \001(\0162-.google." - + "cloud.securitycenter.v1.Finding.StateB\003\340" - + "A\002\0223\n\nstart_time\030\003 \001(\0132\032.google.protobuf" - + ".TimestampB\003\340A\002\"d\n\030RunAssetDiscoveryRequ" - + "est\022H\n\006parent\030\001 \001(\tB8\340A\002\372A2\n0cloudresour" - + "cemanager.googleapis.com/Organization\"\206\001" - + "\n\024UpdateFindingRequest\022=\n\007finding\030\001 \001(\0132" - + "\'.google.cloud.securitycenter.v1.Finding" - + "B\003\340A\002\022/\n\013update_mask\030\002 \001(\0132\032.google.prot" - + "obuf.FieldMask\"\250\001\n\037UpdateNotificationCon" - + "figRequest\022T\n\023notification_config\030\001 \001(\0132" - + "2.google.cloud.securitycenter.v1.Notific" - + "ationConfigB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132\032." - + "google.protobuf.FieldMask\"\256\001\n!UpdateOrga" - + "nizationSettingsRequest\022X\n\025organization_" - + "settings\030\001 \001(\01324.google.cloud.securityce" - + "nter.v1.OrganizationSettingsB\003\340A\002\022/\n\013upd" - + "ate_mask\030\002 \001(\0132\032.google.protobuf.FieldMa" - + "sk\"\203\001\n\023UpdateSourceRequest\022;\n\006source\030\001 \001" - + "(\0132&.google.cloud.securitycenter.v1.Sour" - + "ceB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132\032.google.pr" - + "otobuf.FieldMask\"\311\001\n\032UpdateSecurityMarks" - + "Request\022J\n\016security_marks\030\001 \001(\0132-.google" - + ".cloud.securitycenter.v1.SecurityMarksB\003" - + "\340A\002\022/\n\013update_mask\030\002 \001(\0132\032.google.protob" - + "uf.FieldMask\022.\n\nstart_time\030\003 \001(\0132\032.googl" - + "e.protobuf.Timestamp2\307.\n\016SecurityCenter\022" - + "\261\001\n\014CreateSource\0223.google.cloud.security" - + "center.v1.CreateSourceRequest\032&.google.c" - + "loud.securitycenter.v1.Source\"D\202\323\344\223\002.\"$/" - + "v1/{parent=organizations/*}/sources:\006sou" - + "rce\332A\rparent,source\022\314\001\n\rCreateFinding\0224." - + "google.cloud.securitycenter.v1.CreateFin" - + "dingRequest\032\'.google.cloud.securitycente" - + "r.v1.Finding\"\\\202\323\344\223\002:\"//v1/{parent=organi" - + "zations/*/sources/*}/findings:\007finding\332A" - + "\031parent,finding_id,finding\022\243\002\n\030CreateNot" - + "ificationConfig\022?.google.cloud.securityc" - + "enter.v1.CreateNotificationConfigRequest" - + "\0322.google.cloud.securitycenter.v1.Notifi" - + "cationConfig\"\221\001\202\323\344\223\002G\"0/v1/{parent=organ" - + "izations/*}/notificationConfigs:\023notific" - + "ation_config\332A$parent,config_id,notifica" - + "tion_config\332A\032parent,notification_config" - + "\022\264\001\n\030DeleteNotificationConfig\022?.google.c" - + "loud.securitycenter.v1.DeleteNotificatio" - + "nConfigRequest\032\026.google.protobuf.Empty\"?" - + "\202\323\344\223\0022*0/v1/{name=organizations/*/notifi" - + "cationConfigs/*}\332A\004name\022\226\001\n\014GetIamPolicy" - + "\022\".google.iam.v1.GetIamPolicyRequest\032\025.g" - + "oogle.iam.v1.Policy\"K\202\323\344\223\002:\"5/v1/{resour" - + "ce=organizations/*/sources/*}:getIamPoli" - + "cy:\001*\332A\010resource\022\312\001\n\025GetNotificationConf" - + "ig\022<.google.cloud.securitycenter.v1.GetN" - + "otificationConfigRequest\0322.google.cloud." - + "securitycenter.v1.NotificationConfig\"?\202\323" - + "\344\223\0022\0220/v1/{name=organizations/*/notifica" - + "tionConfigs/*}\332A\004name\022\317\001\n\027GetOrganizatio" - + "nSettings\022>.google.cloud.securitycenter." - + "v1.GetOrganizationSettingsRequest\0324.goog" - + "le.cloud.securitycenter.v1.OrganizationS" - + "ettings\">\202\323\344\223\0021\022//v1/{name=organizations" - + "/*/organizationSettings}\332A\004name\022\232\001\n\tGetS" - + "ource\0220.google.cloud.securitycenter.v1.G" - + "etSourceRequest\032&.google.cloud.securityc" - + "enter.v1.Source\"3\202\323\344\223\002&\022$/v1/{name=organ" - + "izations/*/sources/*}\332A\004name\022\203\002\n\013GroupAs" - + "sets\0222.google.cloud.securitycenter.v1.Gr" - + "oupAssetsRequest\0323.google.cloud.security" - + "center.v1.GroupAssetsResponse\"\212\001\202\323\344\223\002\203\001\"" - + ")/v1/{parent=organizations/*}/assets:gro" - + "up:\001*Z(\"#/v1/{parent=folders/*}/assets:g" - + "roup:\001*Z)\"$/v1/{parent=projects/*}/asset" - + "s:group:\001*\022\277\002\n\rGroupFindings\0224.google.cl" - + "oud.securitycenter.v1.GroupFindingsReque" - + "st\0325.google.cloud.securitycenter.v1.Grou" - + "pFindingsResponse\"\300\001\202\323\344\223\002\247\001\"5/v1/{parent" - + "=organizations/*/sources/*}/findings:gro" - + "up:\001*Z4\"//v1/{parent=folders/*/sources/*" - + "}/findings:group:\001*Z5\"0/v1/{parent=proje" - + "cts/*/sources/*}/findings:group:\001*\332A\017par" - + "ent,group_by\022\343\001\n\nListAssets\0221.google.clo" - + "ud.securitycenter.v1.ListAssetsRequest\0322" - + ".google.cloud.securitycenter.v1.ListAsse" - + "tsResponse\"n\202\323\344\223\002h\022#/v1/{parent=organiza" - + "tions/*}/assetsZ\037\022\035/v1/{parent=folders/*" - + "}/assetsZ \022\036/v1/{parent=projects/*}/asse" - + "ts\022\217\002\n\014ListFindings\0223.google.cloud.secur" - + "itycenter.v1.ListFindingsRequest\0324.googl" - + "e.cloud.securitycenter.v1.ListFindingsRe" - + "sponse\"\223\001\202\323\344\223\002\214\001\022//v1/{parent=organizati" - + "ons/*/sources/*}/findingsZ+\022)/v1/{parent" - + "=folders/*/sources/*}/findingsZ,\022*/v1/{p" - + "arent=projects/*/sources/*}/findings\022\335\001\n" - + "\027ListNotificationConfigs\022>.google.cloud." - + "securitycenter.v1.ListNotificationConfig" - + "sRequest\032?.google.cloud.securitycenter.v" - + "1.ListNotificationConfigsResponse\"A\202\323\344\223\002" - + "2\0220/v1/{parent=organizations/*}/notifica" - + "tionConfigs\332A\006parent\022\362\001\n\013ListSources\0222.g" - + "oogle.cloud.securitycenter.v1.ListSource" - + "sRequest\0323.google.cloud.securitycenter.v" - + "1.ListSourcesResponse\"z\202\323\344\223\002k\022$/v1/{pare" - + "nt=organizations/*}/sourcesZ \022\036/v1/{pare" - + "nt=folders/*}/sourcesZ!\022\037/v1/{parent=pro" - + "jects/*}/sources\332A\006parent\022\207\002\n\021RunAssetDi" - + "scovery\0228.google.cloud.securitycenter.v1" - + ".RunAssetDiscoveryRequest\032\035.google.longr" - + "unning.Operation\"\230\001\202\323\344\223\0025\"0/v1/{parent=o" - + "rganizations/*}/assets:runDiscovery:\001*\332A" - + "\006parent\312AQ\n8google.cloud.securitycenter." - + "v1.RunAssetDiscoveryResponse\022\025google.pro" - + "tobuf.Empty\022\304\002\n\017SetFindingState\0226.google" - + ".cloud.securitycenter.v1.SetFindingState" - + "Request\032\'.google.cloud.securitycenter.v1" - + ".Finding\"\317\001\202\323\344\223\002\260\001\"8/v1/{name=organizati" - + "ons/*/sources/*/findings/*}:setState:\001*Z" - + "7\"2/v1/{name=folders/*/sources/*/finding" - + "s/*}:setState:\001*Z8\"3/v1/{name=projects/*" - + "/sources/*/findings/*}:setState:\001*\332A\025nam" - + "e,state,start_time\022\235\001\n\014SetIamPolicy\022\".go" - + "ogle.iam.v1.SetIamPolicyRequest\032\025.google" - + ".iam.v1.Policy\"R\202\323\344\223\002:\"5/v1/{resource=or" - + "ganizations/*/sources/*}:setIamPolicy:\001*" - + "\332A\017resource,policy\022\310\001\n\022TestIamPermission" - + "s\022(.google.iam.v1.TestIamPermissionsRequ" - + "est\032).google.iam.v1.TestIamPermissionsRe" - + "sponse\"]\202\323\344\223\002@\";/v1/{resource=organizati" - + "ons/*/sources/*}:testIamPermissions:\001*\332A" - + "\024resource,permissions\022\301\002\n\rUpdateFinding\022" - + "4.google.cloud.securitycenter.v1.UpdateF" - + "indingRequest\032\'.google.cloud.securitycen" - + "ter.v1.Finding\"\320\001\202\323\344\223\002\277\00127/v1/{finding.n" - + "ame=organizations/*/sources/*/findings/*" - + "}:\007findingZ<21/v1/{finding.name=folders/" - + "*/sources/*/findings/*}:\007findingZ=22/v1/" - + "{finding.name=projects/*/sources/*/findi" - + "ngs/*}:\007finding\332A\007finding\022\253\002\n\030UpdateNoti" - + "ficationConfig\022?.google.cloud.securityce" - + "nter.v1.UpdateNotificationConfigRequest\032" - + "2.google.cloud.securitycenter.v1.Notific" - + "ationConfig\"\231\001\202\323\344\223\002[2D/v1/{notification_" - + "config.name=organizations/*/notification" - + "Configs/*}:\023notification_config\332A\023notifi" - + "cation_config\332A\037notification_config,upda" - + "te_mask\022\223\002\n\032UpdateOrganizationSettings\022A" - + ".google.cloud.securitycenter.v1.UpdateOr" - + "ganizationSettingsRequest\0324.google.cloud" - + ".securitycenter.v1.OrganizationSettings\"" - + "|\202\323\344\223\002^2E/v1/{organization_settings.name" - + "=organizations/*/organizationSettings}:\025" - + "organization_settings\332A\025organization_set" - + "tings\022\261\001\n\014UpdateSource\0223.google.cloud.se" - + "curitycenter.v1.UpdateSourceRequest\032&.go" - + "ogle.cloud.securitycenter.v1.Source\"D\202\323\344" - + "\223\00252+/v1/{source.name=organizations/*/so" - + "urces/*}:\006source\332A\006source\022\237\005\n\023UpdateSecu" - + "rityMarks\022:.google.cloud.securitycenter." - + "v1.UpdateSecurityMarksRequest\032-.google.c" - + "loud.securitycenter.v1.SecurityMarks\"\234\004\202" - + "\323\344\223\002\204\0042@/v1/{security_marks.name=organiz" - + "ations/*/assets/*/securityMarks}:\016securi" - + "ty_marksZL2:/v1/{security_marks.name=fol" - + "ders/*/assets/*/securityMarks}:\016security" - + "_marksZM2;/v1/{security_marks.name=proje" - + "cts/*/assets/*/securityMarks}:\016security_" - + "marksZ^2L/v1/{security_marks.name=organi" - + "zations/*/sources/*/findings/*/securityM" - + "arks}:\016security_marksZX2F/v1/{security_m" - + "arks.name=folders/*/sources/*/findings/*" - + "/securityMarks}:\016security_marksZY2G/v1/{" - + "security_marks.name=projects/*/sources/*" - + "/findings/*/securityMarks}:\016security_mar" - + "ks\332A\016security_marks\032Q\312A\035securitycenter.g" - + "oogleapis.com\322A.https://www.googleapis.c" - + "om/auth/cloud-platformB\332\001\n\"com.google.cl" - + "oud.securitycenter.v1P\001ZLgoogle.golang.o" - + "rg/genproto/googleapis/cloud/securitycen" - + "ter/v1;securitycenter\252\002\036Google.Cloud.Sec" - + "urityCenter.V1\312\002\036Google\\Cloud\\SecurityCe" - + "nter\\V1\352\002!Google::Cloud::SecurityCenter:" - + ":V1P\000b\006proto3" + + "zation\022\022\n\npage_token\030\002 \001(\t\022\021\n\tpage_size\030" + + "\003 \001(\005\"\214\001\n\037ListNotificationConfigsRespons" + + "e\022P\n\024notification_configs\030\001 \003(\01322.google" + + ".cloud.securitycenter.v1.NotificationCon" + + "fig\022\027\n\017next_page_token\030\002 \001(\t\"y\n\022ListSour" + + "cesRequest\022<\n\006parent\030\001 \001(\tB,\340A\002\372A&\022$secu" + + "ritycenter.googleapis.com/Source\022\022\n\npage" + + "_token\030\002 \001(\t\022\021\n\tpage_size\030\007 \001(\005\"g\n\023ListS" + + "ourcesResponse\0227\n\007sources\030\001 \003(\0132&.google" + + ".cloud.securitycenter.v1.Source\022\027\n\017next_" + + "page_token\030\002 \001(\t\"\255\002\n\021ListAssetsRequest\022;" + + "\n\006parent\030\001 \001(\tB+\340A\002\372A%\022#securitycenter.g" + + "oogleapis.com/Asset\022\016\n\006filter\030\002 \001(\t\022\020\n\010o" + + "rder_by\030\003 \001(\t\022-\n\tread_time\030\004 \001(\0132\032.googl" + + "e.protobuf.Timestamp\0223\n\020compare_duration" + + "\030\005 \001(\0132\031.google.protobuf.Duration\022.\n\nfie" + + "ld_mask\030\007 \001(\0132\032.google.protobuf.FieldMas" + + "k\022\022\n\npage_token\030\010 \001(\t\022\021\n\tpage_size\030\t \001(\005" + + "\"\303\003\n\022ListAssetsResponse\022`\n\023list_assets_r" + + "esults\030\001 \003(\0132C.google.cloud.securitycent" + + "er.v1.ListAssetsResponse.ListAssetsResul" + + "t\022-\n\tread_time\030\002 \001(\0132\032.google.protobuf.T" + + "imestamp\022\027\n\017next_page_token\030\003 \001(\t\022\022\n\ntot" + + "al_size\030\004 \001(\005\032\356\001\n\020ListAssetsResult\0224\n\005as" + + "set\030\001 \001(\0132%.google.cloud.securitycenter." + + "v1.Asset\022e\n\014state_change\030\002 \001(\0162O.google." + + "cloud.securitycenter.v1.ListAssetsRespon" + + "se.ListAssetsResult.StateChange\"=\n\013State" + + "Change\022\n\n\006UNUSED\020\000\022\t\n\005ADDED\020\001\022\013\n\007REMOVED" + + "\020\002\022\n\n\006ACTIVE\020\003\"\260\002\n\023ListFindingsRequest\022<" + + "\n\006parent\030\001 \001(\tB,\340A\002\372A&\n$securitycenter.g" + + "oogleapis.com/Source\022\016\n\006filter\030\002 \001(\t\022\020\n\010" + + "order_by\030\003 \001(\t\022-\n\tread_time\030\004 \001(\0132\032.goog" + + "le.protobuf.Timestamp\0223\n\020compare_duratio" + + "n\030\005 \001(\0132\031.google.protobuf.Duration\022.\n\nfi" + + "eld_mask\030\007 \001(\0132\032.google.protobuf.FieldMa" + + "sk\022\022\n\npage_token\030\010 \001(\t\022\021\n\tpage_size\030\t \001(" + + "\005\"\254\006\n\024ListFindingsResponse\022f\n\025list_findi" + + "ngs_results\030\001 \003(\0132G.google.cloud.securit" + + "ycenter.v1.ListFindingsResponse.ListFind" + + "ingsResult\022-\n\tread_time\030\002 \001(\0132\032.google.p" + + "rotobuf.Timestamp\022\027\n\017next_page_token\030\003 \001" + + "(\t\022\022\n\ntotal_size\030\004 \001(\005\032\317\004\n\022ListFindingsR" + + "esult\0228\n\007finding\030\001 \001(\0132\'.google.cloud.se" + + "curitycenter.v1.Finding\022i\n\014state_change\030" + + "\002 \001(\0162S.google.cloud.securitycenter.v1.L" + + "istFindingsResponse.ListFindingsResult.S" + + "tateChange\022g\n\010resource\030\003 \001(\0132P.google.cl" + + "oud.securitycenter.v1.ListFindingsRespon" + + "se.ListFindingsResult.ResourceB\003\340A\003\032\333\001\n\010" + + "Resource\022\014\n\004name\030\001 \001(\t\022\024\n\014project_name\030\002" + + " \001(\t\022\034\n\024project_display_name\030\003 \001(\t\022\023\n\013pa" + + "rent_name\030\004 \001(\t\022\033\n\023parent_display_name\030\005" + + " \001(\t\022\014\n\004type\030\006 \001(\t\0227\n\007folders\030\007 \003(\0132&.go" + + "ogle.cloud.securitycenter.v1.Folder\022\024\n\014d" + + "isplay_name\030\010 \001(\t\"M\n\013StateChange\022\n\n\006UNUS" + + "ED\020\000\022\013\n\007CHANGED\020\001\022\r\n\tUNCHANGED\020\002\022\t\n\005ADDE" + + "D\020\003\022\013\n\007REMOVED\020\004\"\315\001\n\026SetFindingStateRequ" + + "est\022;\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%securitycente" + + "r.googleapis.com/Finding\022A\n\005state\030\002 \001(\0162" + + "-.google.cloud.securitycenter.v1.Finding" + + ".StateB\003\340A\002\0223\n\nstart_time\030\003 \001(\0132\032.google" + + ".protobuf.TimestampB\003\340A\002\"\216\001\n\016SetMuteRequ" + + "est\022;\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%securitycente" + + "r.googleapis.com/Finding\022?\n\004mute\030\002 \001(\0162," + + ".google.cloud.securitycenter.v1.Finding." + + "MuteB\003\340A\002\"d\n\030RunAssetDiscoveryRequest\022H\n" + + "\006parent\030\001 \001(\tB8\340A\002\372A2\n0cloudresourcemana" + + "ger.googleapis.com/Organization\"\234\001\n\033Upda" + + "teExternalSystemRequest\022L\n\017external_syst" + + "em\030\001 \001(\0132..google.cloud.securitycenter.v" + + "1.ExternalSystemB\003\340A\002\022/\n\013update_mask\030\002 \001" + + "(\0132\032.google.protobuf.FieldMask\"\206\001\n\024Updat" + + "eFindingRequest\022=\n\007finding\030\001 \001(\0132\'.googl" + + "e.cloud.securitycenter.v1.FindingB\003\340A\002\022/" + + "\n\013update_mask\030\002 \001(\0132\032.google.protobuf.Fi" + + "eldMask\"\220\001\n\027UpdateMuteConfigRequest\022D\n\013m" + + "ute_config\030\001 \001(\0132*.google.cloud.security" + + "center.v1.MuteConfigB\003\340A\002\022/\n\013update_mask" + + "\030\002 \001(\0132\032.google.protobuf.FieldMask\"\250\001\n\037U" + + "pdateNotificationConfigRequest\022T\n\023notifi" + + "cation_config\030\001 \001(\01322.google.cloud.secur" + + "itycenter.v1.NotificationConfigB\003\340A\002\022/\n\013" + + "update_mask\030\002 \001(\0132\032.google.protobuf.Fiel" + + "dMask\"\256\001\n!UpdateOrganizationSettingsRequ" + + "est\022X\n\025organization_settings\030\001 \001(\01324.goo" + + "gle.cloud.securitycenter.v1.Organization" + + "SettingsB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132\032.goo" + + "gle.protobuf.FieldMask\"\203\001\n\023UpdateSourceR" + + "equest\022;\n\006source\030\001 \001(\0132&.google.cloud.se" + + "curitycenter.v1.SourceB\003\340A\002\022/\n\013update_ma" + + "sk\030\002 \001(\0132\032.google.protobuf.FieldMask\"\311\001\n" + + "\032UpdateSecurityMarksRequest\022J\n\016security_" + + "marks\030\001 \001(\0132-.google.cloud.securitycente" + + "r.v1.SecurityMarksB\003\340A\002\022/\n\013update_mask\030\002" + + " \001(\0132\032.google.protobuf.FieldMask\022.\n\nstar" + + "t_time\030\003 \001(\0132\032.google.protobuf.Timestamp" + + "2\330B\n\016SecurityCenter\022\342\002\n\020BulkMuteFindings" + + "\0227.google.cloud.securitycenter.v1.BulkMu" + + "teFindingsRequest\032\035.google.longrunning.O" + + "peration\"\365\001\202\323\344\223\002\222\001\"./v1/{parent=organiza" + + "tions/*}/findings:bulkMute:\001*Z-\"(/v1/{pa" + + "rent=folders/*}/findings:bulkMute:\001*Z.\")" + + "/v1/{parent=projects/*}/findings:bulkMut" + + "e:\001*\332A\006parent\312AP\n7google.cloud.securityc" + + "enter.v1.BulkMuteFindingsResponse\022\025googl" + + "e.protobuf.Empty\022\261\001\n\014CreateSource\0223.goog" + + "le.cloud.securitycenter.v1.CreateSourceR" + + "equest\032&.google.cloud.securitycenter.v1." + + "Source\"D\202\323\344\223\002.\"$/v1/{parent=organization" + + "s/*}/sources:\006source\332A\rparent,source\022\314\001\n" + + "\rCreateFinding\0224.google.cloud.securityce" + + "nter.v1.CreateFindingRequest\032\'.google.cl" + + "oud.securitycenter.v1.Finding\"\\\202\323\344\223\002:\"//" + + "v1/{parent=organizations/*/sources/*}/fi" + + "ndings:\007finding\332A\031parent,finding_id,find" + + "ing\022\330\002\n\020CreateMuteConfig\0227.google.cloud." + + "securitycenter.v1.CreateMuteConfigReques" + + "t\032*.google.cloud.securitycenter.v1.MuteC" + + "onfig\"\336\001\202\323\344\223\002\236\001\"(/v1/{parent=organizatio" + + "ns/*}/muteConfigs:\013mute_configZ1\"\"/v1/{p" + + "arent=folders/*}/muteConfigs:\013mute_confi" + + "gZ2\"#/v1/{parent=projects/*}/muteConfigs" + + ":\013mute_config\332A\022parent,mute_config\332A!par" + + "ent,mute_config,mute_config_id\022\243\002\n\030Creat" + + "eNotificationConfig\022?.google.cloud.secur" + + "itycenter.v1.CreateNotificationConfigReq" + + "uest\0322.google.cloud.securitycenter.v1.No" + + "tificationConfig\"\221\001\202\323\344\223\002G\"0/v1/{parent=o" + + "rganizations/*}/notificationConfigs:\023not" + + "ification_config\332A$parent,config_id,noti" + + "fication_config\332A\032parent,notification_co" + + "nfig\022\352\001\n\020DeleteMuteConfig\0227.google.cloud" + + ".securitycenter.v1.DeleteMuteConfigReque" + + "st\032\026.google.protobuf.Empty\"\204\001\202\323\344\223\002w*(/v1" + + "/{name=organizations/*/muteConfigs/*}Z$*" + + "\"/v1/{name=folders/*/muteConfigs/*}Z%*#/" + + "v1/{name=projects/*/muteConfigs/*}\332A\004nam" + + "e\022\264\001\n\030DeleteNotificationConfig\022?.google." + + "cloud.securitycenter.v1.DeleteNotificati" + + "onConfigRequest\032\026.google.protobuf.Empty\"" + + "?\202\323\344\223\0022*0/v1/{name=organizations/*/notif" + + "icationConfigs/*}\332A\004name\022\226\001\n\014GetIamPolic" + + "y\022\".google.iam.v1.GetIamPolicyRequest\032\025." + + "google.iam.v1.Policy\"K\202\323\344\223\002:\"5/v1/{resou" + + "rce=organizations/*/sources/*}:getIamPol" + + "icy:\001*\332A\010resource\022\370\001\n\rGetMuteConfig\0224.go" + + "ogle.cloud.securitycenter.v1.GetMuteConf" + + "igRequest\032*.google.cloud.securitycenter." + + "v1.MuteConfig\"\204\001\202\323\344\223\002w\022(/v1/{name=organi" + + "zations/*/muteConfigs/*}Z$\022\"/v1/{name=fo" + + "lders/*/muteConfigs/*}Z%\022#/v1/{name=proj" + + "ects/*/muteConfigs/*}\332A\004name\022\312\001\n\025GetNoti" + + "ficationConfig\022<.google.cloud.securityce" + + "nter.v1.GetNotificationConfigRequest\0322.g" + + "oogle.cloud.securitycenter.v1.Notificati" + + "onConfig\"?\202\323\344\223\0022\0220/v1/{name=organization" + + "s/*/notificationConfigs/*}\332A\004name\022\317\001\n\027Ge" + + "tOrganizationSettings\022>.google.cloud.sec" + + "uritycenter.v1.GetOrganizationSettingsRe" + + "quest\0324.google.cloud.securitycenter.v1.O" + + "rganizationSettings\">\202\323\344\223\0021\022//v1/{name=o" + + "rganizations/*/organizationSettings}\332A\004n" + + "ame\022\232\001\n\tGetSource\0220.google.cloud.securit" + + "ycenter.v1.GetSourceRequest\032&.google.clo" + + "ud.securitycenter.v1.Source\"3\202\323\344\223\002&\022$/v1" + + "/{name=organizations/*/sources/*}\332A\004name" + + "\022\203\002\n\013GroupAssets\0222.google.cloud.security" + + "center.v1.GroupAssetsRequest\0323.google.cl" + + "oud.securitycenter.v1.GroupAssetsRespons" + + "e\"\212\001\202\323\344\223\002\203\001\")/v1/{parent=organizations/*" + + "}/assets:group:\001*Z(\"#/v1/{parent=folders" + + "/*}/assets:group:\001*Z)\"$/v1/{parent=proje" + + "cts/*}/assets:group:\001*\022\277\002\n\rGroupFindings" + + "\0224.google.cloud.securitycenter.v1.GroupF" + + "indingsRequest\0325.google.cloud.securityce" + + "nter.v1.GroupFindingsResponse\"\300\001\202\323\344\223\002\247\001\"" + + "5/v1/{parent=organizations/*/sources/*}/" + + "findings:group:\001*Z4\"//v1/{parent=folders" + + "/*/sources/*}/findings:group:\001*Z5\"0/v1/{" + + "parent=projects/*/sources/*}/findings:gr" + + "oup:\001*\332A\017parent,group_by\022\343\001\n\nListAssets\022" + + "1.google.cloud.securitycenter.v1.ListAss" + + "etsRequest\0322.google.cloud.securitycenter" + + ".v1.ListAssetsResponse\"n\202\323\344\223\002h\022#/v1/{par" + + "ent=organizations/*}/assetsZ\037\022\035/v1/{pare" + + "nt=folders/*}/assetsZ \022\036/v1/{parent=proj" + + "ects/*}/assets\022\217\002\n\014ListFindings\0223.google" + + ".cloud.securitycenter.v1.ListFindingsReq" + + "uest\0324.google.cloud.securitycenter.v1.Li" + + "stFindingsResponse\"\223\001\202\323\344\223\002\214\001\022//v1/{paren" + + "t=organizations/*/sources/*}/findingsZ+\022" + + ")/v1/{parent=folders/*/sources/*}/findin" + + "gsZ,\022*/v1/{parent=projects/*/sources/*}/" + + "findings\022\213\002\n\017ListMuteConfigs\0226.google.cl" + + "oud.securitycenter.v1.ListMuteConfigsReq" + + "uest\0327.google.cloud.securitycenter.v1.Li" + + "stMuteConfigsResponse\"\206\001\202\323\344\223\002w\022(/v1/{par" + + "ent=organizations/*}/muteConfigsZ$\022\"/v1/" + + "{parent=folders/*}/muteConfigsZ%\022#/v1/{p" + + "arent=projects/*}/muteConfigs\332A\006parent\022\335" + + "\001\n\027ListNotificationConfigs\022>.google.clou" + + "d.securitycenter.v1.ListNotificationConf" + + "igsRequest\032?.google.cloud.securitycenter" + + ".v1.ListNotificationConfigsResponse\"A\202\323\344" + + "\223\0022\0220/v1/{parent=organizations/*}/notifi" + + "cationConfigs\332A\006parent\022\362\001\n\013ListSources\0222" + + ".google.cloud.securitycenter.v1.ListSour" + + "cesRequest\0323.google.cloud.securitycenter" + + ".v1.ListSourcesResponse\"z\202\323\344\223\002k\022$/v1/{pa" + + "rent=organizations/*}/sourcesZ \022\036/v1/{pa" + + "rent=folders/*}/sourcesZ!\022\037/v1/{parent=p" + + "rojects/*}/sources\332A\006parent\022\207\002\n\021RunAsset" + + "Discovery\0228.google.cloud.securitycenter." + + "v1.RunAssetDiscoveryRequest\032\035.google.lon" + + "grunning.Operation\"\230\001\202\323\344\223\0025\"0/v1/{parent" + + "=organizations/*}/assets:runDiscovery:\001*" + + "\332A\006parent\312AQ\n8google.cloud.securitycente" + + "r.v1.RunAssetDiscoveryResponse\022\025google.p" + + "rotobuf.Empty\022\304\002\n\017SetFindingState\0226.goog" + + "le.cloud.securitycenter.v1.SetFindingSta" + + "teRequest\032\'.google.cloud.securitycenter." + + "v1.Finding\"\317\001\202\323\344\223\002\260\001\"8/v1/{name=organiza" + + "tions/*/sources/*/findings/*}:setState:\001" + + "*Z7\"2/v1/{name=folders/*/sources/*/findi" + + "ngs/*}:setState:\001*Z8\"3/v1/{name=projects" + + "/*/sources/*/findings/*}:setState:\001*\332A\025n" + + "ame,state,start_time\022\245\002\n\007SetMute\022..googl" + + "e.cloud.securitycenter.v1.SetMuteRequest" + + "\032\'.google.cloud.securitycenter.v1.Findin" + + "g\"\300\001\202\323\344\223\002\255\001\"7/v1/{name=organizations/*/s" + + "ources/*/findings/*}:setMute:\001*Z6\"1/v1/{" + + "name=folders/*/sources/*/findings/*}:set" + + "Mute:\001*Z7\"2/v1/{name=projects/*/sources/" + + "*/findings/*}:setMute:\001*\332A\tname,mute\022\235\001\n" + + "\014SetIamPolicy\022\".google.iam.v1.SetIamPoli" + + "cyRequest\032\025.google.iam.v1.Policy\"R\202\323\344\223\002:" + + "\"5/v1/{resource=organizations/*/sources/" + + "*}:setIamPolicy:\001*\332A\017resource,policy\022\310\001\n" + + "\022TestIamPermissions\022(.google.iam.v1.Test" + + "IamPermissionsRequest\032).google.iam.v1.Te" + + "stIamPermissionsResponse\"]\202\323\344\223\002@\";/v1/{r" + + "esource=organizations/*/sources/*}:testI" + + "amPermissions:\001*\332A\024resource,permissions\022" + + "\320\003\n\024UpdateExternalSystem\022;.google.cloud." + + "securitycenter.v1.UpdateExternalSystemRe" + + "quest\032..google.cloud.securitycenter.v1.E" + + "xternalSystem\"\312\002\202\323\344\223\002\245\0022Q/v1/{external_s" + + "ystem.name=organizations/*/sources/*/fin" + + "dings/*/externalSystems/*}:\017external_sys" + + "temZ^2K/v1/{external_system.name=folders" + + "/*/sources/*/findings/*/externalSystems/" + + "*}:\017external_systemZ_2L/v1/{external_sys" + + "tem.name=projects/*/sources/*/findings/*" + + "/externalSystems/*}:\017external_system\332A\033e" + + "xternal_system,update_mask\022\301\002\n\rUpdateFin" + + "ding\0224.google.cloud.securitycenter.v1.Up" + + "dateFindingRequest\032\'.google.cloud.securi" + + "tycenter.v1.Finding\"\320\001\202\323\344\223\002\277\00127/v1/{find" + + "ing.name=organizations/*/sources/*/findi" + + "ngs/*}:\007findingZ<21/v1/{finding.name=fol" + + "ders/*/sources/*/findings/*}:\007findingZ=2" + + "2/v1/{finding.name=projects/*/sources/*/" + + "findings/*}:\007finding\332A\007finding\022\335\002\n\020Updat" + + "eMuteConfig\0227.google.cloud.securitycente" + + "r.v1.UpdateMuteConfigRequest\032*.google.cl" + + "oud.securitycenter.v1.MuteConfig\"\343\001\202\323\344\223\002" + + "\302\00124/v1/{mute_config.name=organizations/" + + "*/muteConfigs/*}:\013mute_configZ=2./v1/{mu" + + "te_config.name=folders/*/muteConfigs/*}:" + + "\013mute_configZ>2//v1/{mute_config.name=pr" + + "ojects/*/muteConfigs/*}:\013mute_config\332A\027m" + + "ute_config,update_mask\022\253\002\n\030UpdateNotific" + + "ationConfig\022?.google.cloud.securitycente" + + "r.v1.UpdateNotificationConfigRequest\0322.g" + + "oogle.cloud.securitycenter.v1.Notificati" + + "onConfig\"\231\001\202\323\344\223\002[2D/v1/{notification_con" + + "fig.name=organizations/*/notificationCon" + + "figs/*}:\023notification_config\332A\023notificat" + + "ion_config\332A\037notification_config,update_" + + "mask\022\223\002\n\032UpdateOrganizationSettings\022A.go" + + "ogle.cloud.securitycenter.v1.UpdateOrgan" + + "izationSettingsRequest\0324.google.cloud.se" + + "curitycenter.v1.OrganizationSettings\"|\202\323" + + "\344\223\002^2E/v1/{organization_settings.name=or" + + "ganizations/*/organizationSettings}:\025org" + + "anization_settings\332A\025organization_settin" + + "gs\022\261\001\n\014UpdateSource\0223.google.cloud.secur" + + "itycenter.v1.UpdateSourceRequest\032&.googl" + + "e.cloud.securitycenter.v1.Source\"D\202\323\344\223\0025" + + "2+/v1/{source.name=organizations/*/sourc" + + "es/*}:\006source\332A\006source\022\237\005\n\023UpdateSecurit" + + "yMarks\022:.google.cloud.securitycenter.v1." + + "UpdateSecurityMarksRequest\032-.google.clou" + + "d.securitycenter.v1.SecurityMarks\"\234\004\202\323\344\223" + + "\002\204\0042@/v1/{security_marks.name=organizati" + + "ons/*/assets/*/securityMarks}:\016security_" + + "marksZL2:/v1/{security_marks.name=folder" + + "s/*/assets/*/securityMarks}:\016security_ma" + + "rksZM2;/v1/{security_marks.name=projects" + + "/*/assets/*/securityMarks}:\016security_mar" + + "ksZ^2L/v1/{security_marks.name=organizat" + + "ions/*/sources/*/findings/*/securityMark", + "s}:\016security_marksZX2F/v1/{security_mark" + + "s.name=folders/*/sources/*/findings/*/se" + + "curityMarks}:\016security_marksZY2G/v1/{sec" + + "urity_marks.name=projects/*/sources/*/fi" + + "ndings/*/securityMarks}:\016security_marks\332" + + "A\016security_marks\032Q\312A\035securitycenter.goog" + + "leapis.com\322A.https://www.googleapis.com/" + + "auth/cloud-platformB\332\001\n\"com.google.cloud" + + ".securitycenter.v1P\001ZLgoogle.golang.org/" + + "genproto/googleapis/cloud/securitycenter" + + "/v1;securitycenter\252\002\036Google.Cloud.Securi" + + "tyCenter.V1\312\002\036Google\\Cloud\\SecurityCente" + + "r\\V1\352\002!Google::Cloud::SecurityCenter::V1" + + "P\000b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -488,8 +626,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.cloud.securitycenter.v1.AssetOuterClass.getDescriptor(), + com.google.cloud.securitycenter.v1.ExternalSystemProto.getDescriptor(), com.google.cloud.securitycenter.v1.FindingOuterClass.getDescriptor(), com.google.cloud.securitycenter.v1.FolderProto.getDescriptor(), + com.google.cloud.securitycenter.v1.MuteConfigProto.getDescriptor(), com.google.cloud.securitycenter.v1.NotificationConfigProto.getDescriptor(), com.google.cloud.securitycenter.v1.OrganizationSettingsOuterClass.getDescriptor(), com.google.cloud.securitycenter.v1.SecurityMarksOuterClass.getDescriptor(), @@ -503,16 +643,38 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.StructProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), }); - internal_static_google_cloud_securitycenter_v1_CreateFindingRequest_descriptor = + internal_static_google_cloud_securitycenter_v1_BulkMuteFindingsRequest_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_securitycenter_v1_BulkMuteFindingsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v1_BulkMuteFindingsRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "MuteAnnotation", + }); + internal_static_google_cloud_securitycenter_v1_BulkMuteFindingsResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_securitycenter_v1_BulkMuteFindingsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v1_BulkMuteFindingsResponse_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_securitycenter_v1_CreateFindingRequest_descriptor = + getDescriptor().getMessageTypes().get(2); internal_static_google_cloud_securitycenter_v1_CreateFindingRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_CreateFindingRequest_descriptor, new java.lang.String[] { "Parent", "FindingId", "Finding", }); + internal_static_google_cloud_securitycenter_v1_CreateMuteConfigRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_securitycenter_v1_CreateMuteConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v1_CreateMuteConfigRequest_descriptor, + new java.lang.String[] { + "Parent", "MuteConfig", "MuteConfigId", + }); internal_static_google_cloud_securitycenter_v1_CreateNotificationConfigRequest_descriptor = - getDescriptor().getMessageTypes().get(1); + getDescriptor().getMessageTypes().get(4); internal_static_google_cloud_securitycenter_v1_CreateNotificationConfigRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_CreateNotificationConfigRequest_descriptor, @@ -520,23 +682,39 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "ConfigId", "NotificationConfig", }); internal_static_google_cloud_securitycenter_v1_CreateSourceRequest_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageTypes().get(5); internal_static_google_cloud_securitycenter_v1_CreateSourceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_CreateSourceRequest_descriptor, new java.lang.String[] { "Parent", "Source", }); + internal_static_google_cloud_securitycenter_v1_DeleteMuteConfigRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_securitycenter_v1_DeleteMuteConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v1_DeleteMuteConfigRequest_descriptor, + new java.lang.String[] { + "Name", + }); internal_static_google_cloud_securitycenter_v1_DeleteNotificationConfigRequest_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageTypes().get(7); internal_static_google_cloud_securitycenter_v1_DeleteNotificationConfigRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_DeleteNotificationConfigRequest_descriptor, new java.lang.String[] { "Name", }); + internal_static_google_cloud_securitycenter_v1_GetMuteConfigRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_securitycenter_v1_GetMuteConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v1_GetMuteConfigRequest_descriptor, + new java.lang.String[] { + "Name", + }); internal_static_google_cloud_securitycenter_v1_GetNotificationConfigRequest_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(9); internal_static_google_cloud_securitycenter_v1_GetNotificationConfigRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_GetNotificationConfigRequest_descriptor, @@ -544,7 +722,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_securitycenter_v1_GetOrganizationSettingsRequest_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(10); internal_static_google_cloud_securitycenter_v1_GetOrganizationSettingsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_GetOrganizationSettingsRequest_descriptor, @@ -552,7 +730,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_securitycenter_v1_GetSourceRequest_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(11); internal_static_google_cloud_securitycenter_v1_GetSourceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_GetSourceRequest_descriptor, @@ -560,7 +738,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_securitycenter_v1_GroupAssetsRequest_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(12); internal_static_google_cloud_securitycenter_v1_GroupAssetsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_GroupAssetsRequest_descriptor, @@ -568,7 +746,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Filter", "GroupBy", "CompareDuration", "ReadTime", "PageToken", "PageSize", }); internal_static_google_cloud_securitycenter_v1_GroupAssetsResponse_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(13); internal_static_google_cloud_securitycenter_v1_GroupAssetsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_GroupAssetsResponse_descriptor, @@ -576,7 +754,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "GroupByResults", "ReadTime", "NextPageToken", "TotalSize", }); internal_static_google_cloud_securitycenter_v1_GroupFindingsRequest_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(14); internal_static_google_cloud_securitycenter_v1_GroupFindingsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_GroupFindingsRequest_descriptor, @@ -584,7 +762,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Filter", "GroupBy", "ReadTime", "CompareDuration", "PageToken", "PageSize", }); internal_static_google_cloud_securitycenter_v1_GroupFindingsResponse_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(15); internal_static_google_cloud_securitycenter_v1_GroupFindingsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_GroupFindingsResponse_descriptor, @@ -592,7 +770,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "GroupByResults", "ReadTime", "NextPageToken", "TotalSize", }); internal_static_google_cloud_securitycenter_v1_GroupResult_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(16); internal_static_google_cloud_securitycenter_v1_GroupResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_GroupResult_descriptor, @@ -609,8 +787,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_securitycenter_v1_ListMuteConfigsRequest_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_securitycenter_v1_ListMuteConfigsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v1_ListMuteConfigsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_securitycenter_v1_ListMuteConfigsResponse_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_securitycenter_v1_ListMuteConfigsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v1_ListMuteConfigsResponse_descriptor, + new java.lang.String[] { + "MuteConfigs", "NextPageToken", + }); internal_static_google_cloud_securitycenter_v1_ListNotificationConfigsRequest_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(19); internal_static_google_cloud_securitycenter_v1_ListNotificationConfigsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_ListNotificationConfigsRequest_descriptor, @@ -618,7 +812,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageToken", "PageSize", }); internal_static_google_cloud_securitycenter_v1_ListNotificationConfigsResponse_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(20); internal_static_google_cloud_securitycenter_v1_ListNotificationConfigsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_ListNotificationConfigsResponse_descriptor, @@ -626,7 +820,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "NotificationConfigs", "NextPageToken", }); internal_static_google_cloud_securitycenter_v1_ListSourcesRequest_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(21); internal_static_google_cloud_securitycenter_v1_ListSourcesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_ListSourcesRequest_descriptor, @@ -634,7 +828,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageToken", "PageSize", }); internal_static_google_cloud_securitycenter_v1_ListSourcesResponse_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(22); internal_static_google_cloud_securitycenter_v1_ListSourcesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_ListSourcesResponse_descriptor, @@ -642,7 +836,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Sources", "NextPageToken", }); internal_static_google_cloud_securitycenter_v1_ListAssetsRequest_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(23); internal_static_google_cloud_securitycenter_v1_ListAssetsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_ListAssetsRequest_descriptor, @@ -657,7 +851,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "PageSize", }); internal_static_google_cloud_securitycenter_v1_ListAssetsResponse_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(24); internal_static_google_cloud_securitycenter_v1_ListAssetsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_ListAssetsResponse_descriptor, @@ -675,7 +869,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Asset", "StateChange", }); internal_static_google_cloud_securitycenter_v1_ListFindingsRequest_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(25); internal_static_google_cloud_securitycenter_v1_ListFindingsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_ListFindingsRequest_descriptor, @@ -690,7 +884,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "PageSize", }); internal_static_google_cloud_securitycenter_v1_ListFindingsResponse_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(26); internal_static_google_cloud_securitycenter_v1_ListFindingsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_ListFindingsResponse_descriptor, @@ -720,34 +914,60 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ProjectDisplayName", "ParentName", "ParentDisplayName", + "Type", "Folders", + "DisplayName", }); internal_static_google_cloud_securitycenter_v1_SetFindingStateRequest_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(27); internal_static_google_cloud_securitycenter_v1_SetFindingStateRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_SetFindingStateRequest_descriptor, new java.lang.String[] { "Name", "State", "StartTime", }); + internal_static_google_cloud_securitycenter_v1_SetMuteRequest_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_google_cloud_securitycenter_v1_SetMuteRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v1_SetMuteRequest_descriptor, + new java.lang.String[] { + "Name", "Mute", + }); internal_static_google_cloud_securitycenter_v1_RunAssetDiscoveryRequest_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(29); internal_static_google_cloud_securitycenter_v1_RunAssetDiscoveryRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_RunAssetDiscoveryRequest_descriptor, new java.lang.String[] { "Parent", }); + internal_static_google_cloud_securitycenter_v1_UpdateExternalSystemRequest_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_google_cloud_securitycenter_v1_UpdateExternalSystemRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v1_UpdateExternalSystemRequest_descriptor, + new java.lang.String[] { + "ExternalSystem", "UpdateMask", + }); internal_static_google_cloud_securitycenter_v1_UpdateFindingRequest_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(31); internal_static_google_cloud_securitycenter_v1_UpdateFindingRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_UpdateFindingRequest_descriptor, new java.lang.String[] { "Finding", "UpdateMask", }); + internal_static_google_cloud_securitycenter_v1_UpdateMuteConfigRequest_descriptor = + getDescriptor().getMessageTypes().get(32); + internal_static_google_cloud_securitycenter_v1_UpdateMuteConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v1_UpdateMuteConfigRequest_descriptor, + new java.lang.String[] { + "MuteConfig", "UpdateMask", + }); internal_static_google_cloud_securitycenter_v1_UpdateNotificationConfigRequest_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(33); internal_static_google_cloud_securitycenter_v1_UpdateNotificationConfigRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_UpdateNotificationConfigRequest_descriptor, @@ -755,7 +975,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "NotificationConfig", "UpdateMask", }); internal_static_google_cloud_securitycenter_v1_UpdateOrganizationSettingsRequest_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageTypes().get(34); internal_static_google_cloud_securitycenter_v1_UpdateOrganizationSettingsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_UpdateOrganizationSettingsRequest_descriptor, @@ -763,7 +983,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "OrganizationSettings", "UpdateMask", }); internal_static_google_cloud_securitycenter_v1_UpdateSourceRequest_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageTypes().get(35); internal_static_google_cloud_securitycenter_v1_UpdateSourceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_UpdateSourceRequest_descriptor, @@ -771,7 +991,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Source", "UpdateMask", }); internal_static_google_cloud_securitycenter_v1_UpdateSecurityMarksRequest_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageTypes().get(36); internal_static_google_cloud_securitycenter_v1_UpdateSecurityMarksRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_UpdateSecurityMarksRequest_descriptor, @@ -795,8 +1015,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.cloud.securitycenter.v1.AssetOuterClass.getDescriptor(); + com.google.cloud.securitycenter.v1.ExternalSystemProto.getDescriptor(); com.google.cloud.securitycenter.v1.FindingOuterClass.getDescriptor(); com.google.cloud.securitycenter.v1.FolderProto.getDescriptor(); + com.google.cloud.securitycenter.v1.MuteConfigProto.getDescriptor(); com.google.cloud.securitycenter.v1.NotificationConfigProto.getDescriptor(); com.google.cloud.securitycenter.v1.OrganizationSettingsOuterClass.getDescriptor(); com.google.cloud.securitycenter.v1.SecurityMarksOuterClass.getDescriptor(); diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SetMuteRequest.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SetMuteRequest.java new file mode 100644 index 000000000..868ae8fee --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SetMuteRequest.java @@ -0,0 +1,849 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/securitycenter_service.proto + +package com.google.cloud.securitycenter.v1; + +/** + * + * + *
+ * Request message for updating a finding's mute status.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.SetMuteRequest} + */ +public final class SetMuteRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.SetMuteRequest) + SetMuteRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SetMuteRequest.newBuilder() to construct. + private SetMuteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SetMuteRequest() { + name_ = ""; + mute_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SetMuteRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SetMuteRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + mute_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_SetMuteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_SetMuteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.SetMuteRequest.class, + com.google.cloud.securitycenter.v1.SetMuteRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The relative resource name of the finding. See:
+   * https://cloud.google.com/apis/design/resource_names#relative_resource_name
+   * Example:
+   * "organizations/{organization_id}/sources/{source_id}/finding/{finding_id}",
+   * "folders/{folder_id}/sources/{source_id}/finding/{finding_id}",
+   * "projects/{project_id}/sources/{source_id}/finding/{finding_id}".
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The relative resource name of the finding. See:
+   * https://cloud.google.com/apis/design/resource_names#relative_resource_name
+   * Example:
+   * "organizations/{organization_id}/sources/{source_id}/finding/{finding_id}",
+   * "folders/{folder_id}/sources/{source_id}/finding/{finding_id}",
+   * "projects/{project_id}/sources/{source_id}/finding/{finding_id}".
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MUTE_FIELD_NUMBER = 2; + private int mute_; + /** + * + * + *
+   * Required. The desired state of the Mute.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.Finding.Mute mute = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for mute. + */ + @java.lang.Override + public int getMuteValue() { + return mute_; + } + /** + * + * + *
+   * Required. The desired state of the Mute.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.Finding.Mute mute = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The mute. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.Finding.Mute getMute() { + @SuppressWarnings("deprecation") + com.google.cloud.securitycenter.v1.Finding.Mute result = + com.google.cloud.securitycenter.v1.Finding.Mute.valueOf(mute_); + return result == null ? com.google.cloud.securitycenter.v1.Finding.Mute.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (mute_ != com.google.cloud.securitycenter.v1.Finding.Mute.MUTE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, mute_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (mute_ != com.google.cloud.securitycenter.v1.Finding.Mute.MUTE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, mute_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.securitycenter.v1.SetMuteRequest)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v1.SetMuteRequest other = + (com.google.cloud.securitycenter.v1.SetMuteRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (mute_ != other.mute_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + MUTE_FIELD_NUMBER; + hash = (53 * hash) + mute_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v1.SetMuteRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.SetMuteRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.SetMuteRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.SetMuteRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.SetMuteRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.SetMuteRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.SetMuteRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.SetMuteRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.SetMuteRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.SetMuteRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.SetMuteRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.SetMuteRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.securitycenter.v1.SetMuteRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for updating a finding's mute status.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.SetMuteRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.SetMuteRequest) + com.google.cloud.securitycenter.v1.SetMuteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_SetMuteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_SetMuteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.SetMuteRequest.class, + com.google.cloud.securitycenter.v1.SetMuteRequest.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v1.SetMuteRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + mute_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_SetMuteRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.SetMuteRequest getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v1.SetMuteRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.SetMuteRequest build() { + com.google.cloud.securitycenter.v1.SetMuteRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.SetMuteRequest buildPartial() { + com.google.cloud.securitycenter.v1.SetMuteRequest result = + new com.google.cloud.securitycenter.v1.SetMuteRequest(this); + result.name_ = name_; + result.mute_ = mute_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.securitycenter.v1.SetMuteRequest) { + return mergeFrom((com.google.cloud.securitycenter.v1.SetMuteRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v1.SetMuteRequest other) { + if (other == com.google.cloud.securitycenter.v1.SetMuteRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.mute_ != 0) { + setMuteValue(other.getMuteValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.securitycenter.v1.SetMuteRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.securitycenter.v1.SetMuteRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The relative resource name of the finding. See:
+     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
+     * Example:
+     * "organizations/{organization_id}/sources/{source_id}/finding/{finding_id}",
+     * "folders/{folder_id}/sources/{source_id}/finding/{finding_id}",
+     * "projects/{project_id}/sources/{source_id}/finding/{finding_id}".
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The relative resource name of the finding. See:
+     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
+     * Example:
+     * "organizations/{organization_id}/sources/{source_id}/finding/{finding_id}",
+     * "folders/{folder_id}/sources/{source_id}/finding/{finding_id}",
+     * "projects/{project_id}/sources/{source_id}/finding/{finding_id}".
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The relative resource name of the finding. See:
+     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
+     * Example:
+     * "organizations/{organization_id}/sources/{source_id}/finding/{finding_id}",
+     * "folders/{folder_id}/sources/{source_id}/finding/{finding_id}",
+     * "projects/{project_id}/sources/{source_id}/finding/{finding_id}".
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The relative resource name of the finding. See:
+     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
+     * Example:
+     * "organizations/{organization_id}/sources/{source_id}/finding/{finding_id}",
+     * "folders/{folder_id}/sources/{source_id}/finding/{finding_id}",
+     * "projects/{project_id}/sources/{source_id}/finding/{finding_id}".
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The relative resource name of the finding. See:
+     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
+     * Example:
+     * "organizations/{organization_id}/sources/{source_id}/finding/{finding_id}",
+     * "folders/{folder_id}/sources/{source_id}/finding/{finding_id}",
+     * "projects/{project_id}/sources/{source_id}/finding/{finding_id}".
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private int mute_ = 0; + /** + * + * + *
+     * Required. The desired state of the Mute.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.Finding.Mute mute = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for mute. + */ + @java.lang.Override + public int getMuteValue() { + return mute_; + } + /** + * + * + *
+     * Required. The desired state of the Mute.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.Finding.Mute mute = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for mute to set. + * @return This builder for chaining. + */ + public Builder setMuteValue(int value) { + + mute_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The desired state of the Mute.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.Finding.Mute mute = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The mute. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.Finding.Mute getMute() { + @SuppressWarnings("deprecation") + com.google.cloud.securitycenter.v1.Finding.Mute result = + com.google.cloud.securitycenter.v1.Finding.Mute.valueOf(mute_); + return result == null ? com.google.cloud.securitycenter.v1.Finding.Mute.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Required. The desired state of the Mute.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.Finding.Mute mute = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The mute to set. + * @return This builder for chaining. + */ + public Builder setMute(com.google.cloud.securitycenter.v1.Finding.Mute value) { + if (value == null) { + throw new NullPointerException(); + } + + mute_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The desired state of the Mute.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.Finding.Mute mute = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearMute() { + + mute_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.SetMuteRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.SetMuteRequest) + private static final com.google.cloud.securitycenter.v1.SetMuteRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.SetMuteRequest(); + } + + public static com.google.cloud.securitycenter.v1.SetMuteRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SetMuteRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SetMuteRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.SetMuteRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SetMuteRequestOrBuilder.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SetMuteRequestOrBuilder.java new file mode 100644 index 000000000..317dcd3f1 --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SetMuteRequestOrBuilder.java @@ -0,0 +1,93 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/securitycenter_service.proto + +package com.google.cloud.securitycenter.v1; + +public interface SetMuteRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.SetMuteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The relative resource name of the finding. See:
+   * https://cloud.google.com/apis/design/resource_names#relative_resource_name
+   * Example:
+   * "organizations/{organization_id}/sources/{source_id}/finding/{finding_id}",
+   * "folders/{folder_id}/sources/{source_id}/finding/{finding_id}",
+   * "projects/{project_id}/sources/{source_id}/finding/{finding_id}".
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The relative resource name of the finding. See:
+   * https://cloud.google.com/apis/design/resource_names#relative_resource_name
+   * Example:
+   * "organizations/{organization_id}/sources/{source_id}/finding/{finding_id}",
+   * "folders/{folder_id}/sources/{source_id}/finding/{finding_id}",
+   * "projects/{project_id}/sources/{source_id}/finding/{finding_id}".
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The desired state of the Mute.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.Finding.Mute mute = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for mute. + */ + int getMuteValue(); + /** + * + * + *
+   * Required. The desired state of the Mute.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.Finding.Mute mute = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The mute. + */ + com.google.cloud.securitycenter.v1.Finding.Mute getMute(); +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/UpdateExternalSystemRequest.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/UpdateExternalSystemRequest.java new file mode 100644 index 000000000..561b5541c --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/UpdateExternalSystemRequest.java @@ -0,0 +1,1050 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/securitycenter_service.proto + +package com.google.cloud.securitycenter.v1; + +/** + * + * + *
+ * Request message for updating a ExternalSystem resource.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.UpdateExternalSystemRequest} + */ +public final class UpdateExternalSystemRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.UpdateExternalSystemRequest) + UpdateExternalSystemRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateExternalSystemRequest.newBuilder() to construct. + private UpdateExternalSystemRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateExternalSystemRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateExternalSystemRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateExternalSystemRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.securitycenter.v1.ExternalSystem.Builder subBuilder = null; + if (externalSystem_ != null) { + subBuilder = externalSystem_.toBuilder(); + } + externalSystem_ = + input.readMessage( + com.google.cloud.securitycenter.v1.ExternalSystem.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(externalSystem_); + externalSystem_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_UpdateExternalSystemRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_UpdateExternalSystemRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest.class, + com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest.Builder.class); + } + + public static final int EXTERNAL_SYSTEM_FIELD_NUMBER = 1; + private com.google.cloud.securitycenter.v1.ExternalSystem externalSystem_; + /** + * + * + *
+   * Required. The external system resource to update.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.ExternalSystem external_system = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the externalSystem field is set. + */ + @java.lang.Override + public boolean hasExternalSystem() { + return externalSystem_ != null; + } + /** + * + * + *
+   * Required. The external system resource to update.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.ExternalSystem external_system = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The externalSystem. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystem() { + return externalSystem_ == null + ? com.google.cloud.securitycenter.v1.ExternalSystem.getDefaultInstance() + : externalSystem_; + } + /** + * + * + *
+   * Required. The external system resource to update.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.ExternalSystem external_system = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.ExternalSystemOrBuilder getExternalSystemOrBuilder() { + return getExternalSystem(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * The FieldMask to use when updating the external system resource.
+   * If empty all mutable fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * The FieldMask to use when updating the external system resource.
+   * If empty all mutable fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * The FieldMask to use when updating the external system resource.
+   * If empty all mutable fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (externalSystem_ != null) { + output.writeMessage(1, getExternalSystem()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (externalSystem_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getExternalSystem()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest other = + (com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest) obj; + + if (hasExternalSystem() != other.hasExternalSystem()) return false; + if (hasExternalSystem()) { + if (!getExternalSystem().equals(other.getExternalSystem())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasExternalSystem()) { + hash = (37 * hash) + EXTERNAL_SYSTEM_FIELD_NUMBER; + hash = (53 * hash) + getExternalSystem().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for updating a ExternalSystem resource.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.UpdateExternalSystemRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.UpdateExternalSystemRequest) + com.google.cloud.securitycenter.v1.UpdateExternalSystemRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_UpdateExternalSystemRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_UpdateExternalSystemRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest.class, + com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (externalSystemBuilder_ == null) { + externalSystem_ = null; + } else { + externalSystem_ = null; + externalSystemBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_UpdateExternalSystemRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest + getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest build() { + com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest buildPartial() { + com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest result = + new com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest(this); + if (externalSystemBuilder_ == null) { + result.externalSystem_ = externalSystem_; + } else { + result.externalSystem_ = externalSystemBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest) { + return mergeFrom((com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest other) { + if (other + == com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest.getDefaultInstance()) + return this; + if (other.hasExternalSystem()) { + mergeExternalSystem(other.getExternalSystem()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.securitycenter.v1.ExternalSystem externalSystem_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.ExternalSystem, + com.google.cloud.securitycenter.v1.ExternalSystem.Builder, + com.google.cloud.securitycenter.v1.ExternalSystemOrBuilder> + externalSystemBuilder_; + /** + * + * + *
+     * Required. The external system resource to update.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.ExternalSystem external_system = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the externalSystem field is set. + */ + public boolean hasExternalSystem() { + return externalSystemBuilder_ != null || externalSystem_ != null; + } + /** + * + * + *
+     * Required. The external system resource to update.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.ExternalSystem external_system = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The externalSystem. + */ + public com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystem() { + if (externalSystemBuilder_ == null) { + return externalSystem_ == null + ? com.google.cloud.securitycenter.v1.ExternalSystem.getDefaultInstance() + : externalSystem_; + } else { + return externalSystemBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The external system resource to update.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.ExternalSystem external_system = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setExternalSystem(com.google.cloud.securitycenter.v1.ExternalSystem value) { + if (externalSystemBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + externalSystem_ = value; + onChanged(); + } else { + externalSystemBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The external system resource to update.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.ExternalSystem external_system = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setExternalSystem( + com.google.cloud.securitycenter.v1.ExternalSystem.Builder builderForValue) { + if (externalSystemBuilder_ == null) { + externalSystem_ = builderForValue.build(); + onChanged(); + } else { + externalSystemBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The external system resource to update.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.ExternalSystem external_system = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeExternalSystem(com.google.cloud.securitycenter.v1.ExternalSystem value) { + if (externalSystemBuilder_ == null) { + if (externalSystem_ != null) { + externalSystem_ = + com.google.cloud.securitycenter.v1.ExternalSystem.newBuilder(externalSystem_) + .mergeFrom(value) + .buildPartial(); + } else { + externalSystem_ = value; + } + onChanged(); + } else { + externalSystemBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The external system resource to update.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.ExternalSystem external_system = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearExternalSystem() { + if (externalSystemBuilder_ == null) { + externalSystem_ = null; + onChanged(); + } else { + externalSystem_ = null; + externalSystemBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The external system resource to update.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.ExternalSystem external_system = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.securitycenter.v1.ExternalSystem.Builder getExternalSystemBuilder() { + + onChanged(); + return getExternalSystemFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The external system resource to update.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.ExternalSystem external_system = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.securitycenter.v1.ExternalSystemOrBuilder getExternalSystemOrBuilder() { + if (externalSystemBuilder_ != null) { + return externalSystemBuilder_.getMessageOrBuilder(); + } else { + return externalSystem_ == null + ? com.google.cloud.securitycenter.v1.ExternalSystem.getDefaultInstance() + : externalSystem_; + } + } + /** + * + * + *
+     * Required. The external system resource to update.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.ExternalSystem external_system = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.ExternalSystem, + com.google.cloud.securitycenter.v1.ExternalSystem.Builder, + com.google.cloud.securitycenter.v1.ExternalSystemOrBuilder> + getExternalSystemFieldBuilder() { + if (externalSystemBuilder_ == null) { + externalSystemBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.ExternalSystem, + com.google.cloud.securitycenter.v1.ExternalSystem.Builder, + com.google.cloud.securitycenter.v1.ExternalSystemOrBuilder>( + getExternalSystem(), getParentForChildren(), isClean()); + externalSystem_ = null; + } + return externalSystemBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * The FieldMask to use when updating the external system resource.
+     * If empty all mutable fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * The FieldMask to use when updating the external system resource.
+     * If empty all mutable fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The FieldMask to use when updating the external system resource.
+     * If empty all mutable fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The FieldMask to use when updating the external system resource.
+     * If empty all mutable fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The FieldMask to use when updating the external system resource.
+     * If empty all mutable fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The FieldMask to use when updating the external system resource.
+     * If empty all mutable fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The FieldMask to use when updating the external system resource.
+     * If empty all mutable fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The FieldMask to use when updating the external system resource.
+     * If empty all mutable fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * The FieldMask to use when updating the external system resource.
+     * If empty all mutable fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.UpdateExternalSystemRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.UpdateExternalSystemRequest) + private static final com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest(); + } + + public static com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateExternalSystemRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateExternalSystemRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/UpdateExternalSystemRequestOrBuilder.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/UpdateExternalSystemRequestOrBuilder.java new file mode 100644 index 000000000..ec7973e53 --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/UpdateExternalSystemRequestOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/securitycenter_service.proto + +package com.google.cloud.securitycenter.v1; + +public interface UpdateExternalSystemRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.UpdateExternalSystemRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The external system resource to update.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.ExternalSystem external_system = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the externalSystem field is set. + */ + boolean hasExternalSystem(); + /** + * + * + *
+   * Required. The external system resource to update.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.ExternalSystem external_system = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The externalSystem. + */ + com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystem(); + /** + * + * + *
+   * Required. The external system resource to update.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.ExternalSystem external_system = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.securitycenter.v1.ExternalSystemOrBuilder getExternalSystemOrBuilder(); + + /** + * + * + *
+   * The FieldMask to use when updating the external system resource.
+   * If empty all mutable fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * The FieldMask to use when updating the external system resource.
+   * If empty all mutable fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * The FieldMask to use when updating the external system resource.
+   * If empty all mutable fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/UpdateMuteConfigRequest.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/UpdateMuteConfigRequest.java new file mode 100644 index 000000000..8670501a3 --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/UpdateMuteConfigRequest.java @@ -0,0 +1,1043 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/securitycenter_service.proto + +package com.google.cloud.securitycenter.v1; + +/** + * + * + *
+ * Request message for updating a mute config.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.UpdateMuteConfigRequest} + */ +public final class UpdateMuteConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.UpdateMuteConfigRequest) + UpdateMuteConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateMuteConfigRequest.newBuilder() to construct. + private UpdateMuteConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateMuteConfigRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateMuteConfigRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateMuteConfigRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.securitycenter.v1.MuteConfig.Builder subBuilder = null; + if (muteConfig_ != null) { + subBuilder = muteConfig_.toBuilder(); + } + muteConfig_ = + input.readMessage( + com.google.cloud.securitycenter.v1.MuteConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(muteConfig_); + muteConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_UpdateMuteConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_UpdateMuteConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest.class, + com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest.Builder.class); + } + + public static final int MUTE_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.securitycenter.v1.MuteConfig muteConfig_; + /** + * + * + *
+   * Required. The mute config being updated.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.MuteConfig mute_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the muteConfig field is set. + */ + @java.lang.Override + public boolean hasMuteConfig() { + return muteConfig_ != null; + } + /** + * + * + *
+   * Required. The mute config being updated.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.MuteConfig mute_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The muteConfig. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.MuteConfig getMuteConfig() { + return muteConfig_ == null + ? com.google.cloud.securitycenter.v1.MuteConfig.getDefaultInstance() + : muteConfig_; + } + /** + * + * + *
+   * Required. The mute config being updated.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.MuteConfig mute_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.MuteConfigOrBuilder getMuteConfigOrBuilder() { + return getMuteConfig(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * The list of fields to be updated.
+   * If empty all mutable fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * The list of fields to be updated.
+   * If empty all mutable fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * The list of fields to be updated.
+   * If empty all mutable fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (muteConfig_ != null) { + output.writeMessage(1, getMuteConfig()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (muteConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getMuteConfig()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest other = + (com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest) obj; + + if (hasMuteConfig() != other.hasMuteConfig()) return false; + if (hasMuteConfig()) { + if (!getMuteConfig().equals(other.getMuteConfig())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasMuteConfig()) { + hash = (37 * hash) + MUTE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getMuteConfig().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for updating a mute config.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.UpdateMuteConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.UpdateMuteConfigRequest) + com.google.cloud.securitycenter.v1.UpdateMuteConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_UpdateMuteConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_UpdateMuteConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest.class, + com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (muteConfigBuilder_ == null) { + muteConfig_ = null; + } else { + muteConfig_ = null; + muteConfigBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_UpdateMuteConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest build() { + com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest buildPartial() { + com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest result = + new com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest(this); + if (muteConfigBuilder_ == null) { + result.muteConfig_ = muteConfig_; + } else { + result.muteConfig_ = muteConfigBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest) { + return mergeFrom((com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest other) { + if (other == com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest.getDefaultInstance()) + return this; + if (other.hasMuteConfig()) { + mergeMuteConfig(other.getMuteConfig()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.securitycenter.v1.MuteConfig muteConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.MuteConfig, + com.google.cloud.securitycenter.v1.MuteConfig.Builder, + com.google.cloud.securitycenter.v1.MuteConfigOrBuilder> + muteConfigBuilder_; + /** + * + * + *
+     * Required. The mute config being updated.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.MuteConfig mute_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the muteConfig field is set. + */ + public boolean hasMuteConfig() { + return muteConfigBuilder_ != null || muteConfig_ != null; + } + /** + * + * + *
+     * Required. The mute config being updated.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.MuteConfig mute_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The muteConfig. + */ + public com.google.cloud.securitycenter.v1.MuteConfig getMuteConfig() { + if (muteConfigBuilder_ == null) { + return muteConfig_ == null + ? com.google.cloud.securitycenter.v1.MuteConfig.getDefaultInstance() + : muteConfig_; + } else { + return muteConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The mute config being updated.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.MuteConfig mute_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMuteConfig(com.google.cloud.securitycenter.v1.MuteConfig value) { + if (muteConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + muteConfig_ = value; + onChanged(); + } else { + muteConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The mute config being updated.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.MuteConfig mute_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMuteConfig( + com.google.cloud.securitycenter.v1.MuteConfig.Builder builderForValue) { + if (muteConfigBuilder_ == null) { + muteConfig_ = builderForValue.build(); + onChanged(); + } else { + muteConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The mute config being updated.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.MuteConfig mute_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeMuteConfig(com.google.cloud.securitycenter.v1.MuteConfig value) { + if (muteConfigBuilder_ == null) { + if (muteConfig_ != null) { + muteConfig_ = + com.google.cloud.securitycenter.v1.MuteConfig.newBuilder(muteConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + muteConfig_ = value; + } + onChanged(); + } else { + muteConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The mute config being updated.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.MuteConfig mute_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearMuteConfig() { + if (muteConfigBuilder_ == null) { + muteConfig_ = null; + onChanged(); + } else { + muteConfig_ = null; + muteConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The mute config being updated.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.MuteConfig mute_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.securitycenter.v1.MuteConfig.Builder getMuteConfigBuilder() { + + onChanged(); + return getMuteConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The mute config being updated.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.MuteConfig mute_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.securitycenter.v1.MuteConfigOrBuilder getMuteConfigOrBuilder() { + if (muteConfigBuilder_ != null) { + return muteConfigBuilder_.getMessageOrBuilder(); + } else { + return muteConfig_ == null + ? com.google.cloud.securitycenter.v1.MuteConfig.getDefaultInstance() + : muteConfig_; + } + } + /** + * + * + *
+     * Required. The mute config being updated.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.MuteConfig mute_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.MuteConfig, + com.google.cloud.securitycenter.v1.MuteConfig.Builder, + com.google.cloud.securitycenter.v1.MuteConfigOrBuilder> + getMuteConfigFieldBuilder() { + if (muteConfigBuilder_ == null) { + muteConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.MuteConfig, + com.google.cloud.securitycenter.v1.MuteConfig.Builder, + com.google.cloud.securitycenter.v1.MuteConfigOrBuilder>( + getMuteConfig(), getParentForChildren(), isClean()); + muteConfig_ = null; + } + return muteConfigBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * The list of fields to be updated.
+     * If empty all mutable fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * The list of fields to be updated.
+     * If empty all mutable fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The list of fields to be updated.
+     * If empty all mutable fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The list of fields to be updated.
+     * If empty all mutable fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The list of fields to be updated.
+     * If empty all mutable fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The list of fields to be updated.
+     * If empty all mutable fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The list of fields to be updated.
+     * If empty all mutable fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The list of fields to be updated.
+     * If empty all mutable fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * The list of fields to be updated.
+     * If empty all mutable fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.UpdateMuteConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.UpdateMuteConfigRequest) + private static final com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest(); + } + + public static com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateMuteConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateMuteConfigRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/UpdateMuteConfigRequestOrBuilder.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/UpdateMuteConfigRequestOrBuilder.java new file mode 100644 index 000000000..0958ce3d1 --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/UpdateMuteConfigRequestOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/securitycenter_service.proto + +package com.google.cloud.securitycenter.v1; + +public interface UpdateMuteConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.UpdateMuteConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The mute config being updated.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.MuteConfig mute_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the muteConfig field is set. + */ + boolean hasMuteConfig(); + /** + * + * + *
+   * Required. The mute config being updated.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.MuteConfig mute_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The muteConfig. + */ + com.google.cloud.securitycenter.v1.MuteConfig getMuteConfig(); + /** + * + * + *
+   * Required. The mute config being updated.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.MuteConfig mute_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.securitycenter.v1.MuteConfigOrBuilder getMuteConfigOrBuilder(); + + /** + * + * + *
+   * The list of fields to be updated.
+   * If empty all mutable fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * The list of fields to be updated.
+   * If empty all mutable fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * The list of fields to be updated.
+   * If empty all mutable fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/external_system.proto b/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/external_system.proto new file mode 100644 index 000000000..b5a99332f --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/external_system.proto @@ -0,0 +1,59 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.securitycenter.v1; + +import "google/api/resource.proto"; +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"; +option java_multiple_files = true; +option java_outer_classname = "ExternalSystemProto"; +option java_package = "com.google.cloud.securitycenter.v1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1"; + +// Representation of third party SIEM/SOAR fields within SCC. +message ExternalSystem { + option (google.api.resource) = { + type: "securitycenter.googleapis.com/ExternalSystem" + pattern: "organizations/{organization}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}" + pattern: "folders/{folder}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}" + pattern: "projects/{project}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}" + }; + + // External System Name e.g. jira, demisto, etc. + // e.g.: `organizations/1234/sources/5678/findings/123456/externalSystems/jira` + // `folders/1234/sources/5678/findings/123456/externalSystems/jira` + // `projects/1234/sources/5678/findings/123456/externalSystems/jira` + string name = 1; + + // References primary/secondary etc assignees in the external system. + repeated string assignees = 2; + + // Identifier that's used to track the given finding in the external system. + string external_uid = 3; + + // Most recent status of the corresponding finding's ticket/tracker in the + // external system. + string status = 4; + + // The most recent time when the corresponding finding's ticket/tracker was + // updated in the external system. + google.protobuf.Timestamp external_system_update_time = 5; +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/finding.proto b/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/finding.proto index e14266b44..5556b5249 100644 --- a/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/finding.proto +++ b/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/finding.proto @@ -18,6 +18,7 @@ package google.cloud.securitycenter.v1; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/securitycenter/v1/external_system.proto"; import "google/cloud/securitycenter/v1/indicator.proto"; import "google/cloud/securitycenter/v1/security_marks.proto"; import "google/cloud/securitycenter/v1/vulnerability.proto"; @@ -119,6 +120,21 @@ message Finding { LOW = 4; } + // Mute state a finding can be in. + enum Mute { + // Unspecified. + MUTE_UNSPECIFIED = 0; + + // Finding has been muted. + MUTED = 1; + + // Finding has been unmuted. + UNMUTED = 2; + + // Finding has never been muted/unmuted. + UNDEFINED = 4; + } + // Represents what kind of Finding it is. enum FindingClass { // Unspecified finding class. @@ -207,6 +223,10 @@ message Finding { // finding. string canonical_name = 14; + // Indicates the mute state of a finding (either unspecified, muted, unmuted + // or undefined). + Mute mute = 15; + // The class of the finding. FindingClass finding_class = 17; @@ -221,4 +241,16 @@ message Finding { // CVE stands for Common Vulnerabilities and Exposures // (https://cve.mitre.org/about/) Vulnerability vulnerability = 20; + + // Output only. The most recent time this finding was muted or unmuted. + google.protobuf.Timestamp mute_update_time = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Third party SIEM/SOAR fields within SCC, contains external system + // information and external system finding fields. + map external_systems = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // First known as mute_annotation. Records additional information about the + // mute operation e.g. mute config that muted the finding, user who muted the + // finding, etc. + string mute_initiator = 28; } diff --git a/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/mute_config.proto b/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/mute_config.proto new file mode 100644 index 000000000..78d63a66b --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/mute_config.proto @@ -0,0 +1,90 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.securitycenter.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/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"; +option java_multiple_files = true; +option java_outer_classname = "MuteConfigProto"; +option java_package = "com.google.cloud.securitycenter.v1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1"; + +// A mute config is a Cloud SCC resource that contains the configuration +// to mute create/update events of findings. +message MuteConfig { + option (google.api.resource) = { + type: "securitycenter.googleapis.com/MuteConfig" + pattern: "organizations/{organization}/muteConfigs/{mute_config}" + pattern: "folders/{folder}/muteConfigs/{mute_config}" + pattern: "projects/{project}/muteConfigs/{mute_config}" + }; + + // This field will be ignored if provided on config creation. Format + // "organizations/{organization}/muteConfigs/{mute_config}" + // "folders/{folder}/muteConfigs/{mute_config}" + // "projects/{project}/muteConfigs/{mute_config}" + string name = 1; + + // The human readable name to be displayed for the mute config. + string display_name = 2 [deprecated = true]; + + // A description of the mute config. + string description = 3; + + // Required. An expression that defines the filter to apply across create/update events + // of findings. While creating a filter string, be mindful of the + // scope in which the mute configuration is being created. E.g., If a filter + // contains project = X but is created under the project = Y scope, it might + // not match any findings. + // + // The following field and operator combinations are supported: + // + // * severity: `=`, `:` + // * category: `=`, `:` + // * resource.name: `=`, `:` + // * resource.project_name: `=`, `:` + // * resource.project_display_name: `=`, `:` + // * resource.folders.resource_folder: `=`, `:` + // * resource.parent_name: `=`, `:` + // * resource.parent_display_name: `=`, `:` + // * resource.type: `=`, `:` + // * finding_class: `=`, `:` + // * indicator.ip_addresses: `=`, `:` + // * indicator.domains: `=`, `:` + string filter = 4 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The time at which the mute config was created. + // This field is set by the server and will be ignored if provided on config + // creation. + google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The most recent time at which the mute config was updated. + // This field is set by the server and will be ignored if provided on config + // creation or update. + google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Email address of the user who last edited the mute config. + // This field is set by the server and will be ignored if provided on config + // creation or update. + string most_recent_editor = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/resource.proto b/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/resource.proto index 494b8bdc5..8377329eb 100644 --- a/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/resource.proto +++ b/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/resource.proto @@ -53,4 +53,7 @@ message Resource { // The first folder is the deepest nested folder, and the last folder is the // folder directly under the Organization. repeated Folder folders = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The human readable name of the resource. + string display_name = 8; } diff --git a/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/securitycenter_service.proto b/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/securitycenter_service.proto index 0392de5ce..9c8446c2f 100644 --- a/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/securitycenter_service.proto +++ b/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/securitycenter_service.proto @@ -22,8 +22,10 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/securitycenter/v1/asset.proto"; +import "google/cloud/securitycenter/v1/external_system.proto"; import "google/cloud/securitycenter/v1/finding.proto"; import "google/cloud/securitycenter/v1/folder.proto"; +import "google/cloud/securitycenter/v1/mute_config.proto"; import "google/cloud/securitycenter/v1/notification_config.proto"; import "google/cloud/securitycenter/v1/organization_settings.proto"; import "google/cloud/securitycenter/v1/security_marks.proto"; @@ -49,6 +51,29 @@ service SecurityCenter { option (google.api.default_host) = "securitycenter.googleapis.com"; option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Kicks off an LRO to bulk mute findings for a parent based on a filter. The + // parent can be either an organization, folder or project. The findings + // matched by the filter will be muted after the LRO is done. + rpc BulkMuteFindings(BulkMuteFindingsRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=organizations/*}/findings:bulkMute" + body: "*" + additional_bindings { + post: "/v1/{parent=folders/*}/findings:bulkMute" + body: "*" + } + additional_bindings { + post: "/v1/{parent=projects/*}/findings:bulkMute" + body: "*" + } + }; + option (google.api.method_signature) = "parent"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.securitycenter.v1.BulkMuteFindingsResponse" + metadata_type: "google.protobuf.Empty" + }; + } + // Creates a source. rpc CreateSource(CreateSourceRequest) returns (Source) { option (google.api.http) = { @@ -68,6 +93,24 @@ service SecurityCenter { option (google.api.method_signature) = "parent,finding_id,finding"; } + // Creates a mute config. + rpc CreateMuteConfig(CreateMuteConfigRequest) returns (MuteConfig) { + option (google.api.http) = { + post: "/v1/{parent=organizations/*}/muteConfigs" + body: "mute_config" + additional_bindings { + post: "/v1/{parent=folders/*}/muteConfigs" + body: "mute_config" + } + additional_bindings { + post: "/v1/{parent=projects/*}/muteConfigs" + body: "mute_config" + } + }; + option (google.api.method_signature) = "parent,mute_config"; + option (google.api.method_signature) = "parent,mute_config,mute_config_id"; + } + // Creates a notification config. rpc CreateNotificationConfig(CreateNotificationConfigRequest) returns (NotificationConfig) { option (google.api.http) = { @@ -78,6 +121,20 @@ service SecurityCenter { option (google.api.method_signature) = "parent,notification_config"; } + // Deletes an existing mute config. + rpc DeleteMuteConfig(DeleteMuteConfigRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=organizations/*/muteConfigs/*}" + additional_bindings { + delete: "/v1/{name=folders/*/muteConfigs/*}" + } + additional_bindings { + delete: "/v1/{name=projects/*/muteConfigs/*}" + } + }; + option (google.api.method_signature) = "name"; + } + // Deletes a notification config. rpc DeleteNotificationConfig(DeleteNotificationConfigRequest) returns (google.protobuf.Empty) { option (google.api.http) = { @@ -95,6 +152,20 @@ service SecurityCenter { option (google.api.method_signature) = "resource"; } + // Gets a mute config. + rpc GetMuteConfig(GetMuteConfigRequest) returns (MuteConfig) { + option (google.api.http) = { + get: "/v1/{name=organizations/*/muteConfigs/*}" + additional_bindings { + get: "/v1/{name=folders/*/muteConfigs/*}" + } + additional_bindings { + get: "/v1/{name=projects/*/muteConfigs/*}" + } + }; + option (google.api.method_signature) = "name"; + } + // Gets a notification config. rpc GetNotificationConfig(GetNotificationConfigRequest) returns (NotificationConfig) { option (google.api.http) = { @@ -188,6 +259,20 @@ service SecurityCenter { }; } + // Lists mute configs. + rpc ListMuteConfigs(ListMuteConfigsRequest) returns (ListMuteConfigsResponse) { + option (google.api.http) = { + get: "/v1/{parent=organizations/*}/muteConfigs" + additional_bindings { + get: "/v1/{parent=folders/*}/muteConfigs" + } + additional_bindings { + get: "/v1/{parent=projects/*}/muteConfigs" + } + }; + option (google.api.method_signature) = "parent"; + } + // Lists notification configs. rpc ListNotificationConfigs(ListNotificationConfigsRequest) returns (ListNotificationConfigsResponse) { option (google.api.http) = { @@ -245,6 +330,23 @@ service SecurityCenter { option (google.api.method_signature) = "name,state,start_time"; } + // Updates the mute state of a finding. + rpc SetMute(SetMuteRequest) returns (Finding) { + option (google.api.http) = { + post: "/v1/{name=organizations/*/sources/*/findings/*}:setMute" + body: "*" + additional_bindings { + post: "/v1/{name=folders/*/sources/*/findings/*}:setMute" + body: "*" + } + additional_bindings { + post: "/v1/{name=projects/*/sources/*/findings/*}:setMute" + body: "*" + } + }; + option (google.api.method_signature) = "name,mute"; + } + // Sets the access control policy on the specified Source. rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { option (google.api.http) = { @@ -263,6 +365,23 @@ service SecurityCenter { option (google.api.method_signature) = "resource,permissions"; } + // Updates external system. This is for a given finding. + rpc UpdateExternalSystem(UpdateExternalSystemRequest) returns (ExternalSystem) { + option (google.api.http) = { + patch: "/v1/{external_system.name=organizations/*/sources/*/findings/*/externalSystems/*}" + body: "external_system" + additional_bindings { + patch: "/v1/{external_system.name=folders/*/sources/*/findings/*/externalSystems/*}" + body: "external_system" + } + additional_bindings { + patch: "/v1/{external_system.name=projects/*/sources/*/findings/*/externalSystems/*}" + body: "external_system" + } + }; + option (google.api.method_signature) = "external_system,update_mask"; + } + // Creates or updates a finding. The corresponding source must exist for a // finding creation to succeed. rpc UpdateFinding(UpdateFindingRequest) returns (Finding) { @@ -281,6 +400,23 @@ service SecurityCenter { option (google.api.method_signature) = "finding"; } + // Updates a mute config. + rpc UpdateMuteConfig(UpdateMuteConfigRequest) returns (MuteConfig) { + option (google.api.http) = { + patch: "/v1/{mute_config.name=organizations/*/muteConfigs/*}" + body: "mute_config" + additional_bindings { + patch: "/v1/{mute_config.name=folders/*/muteConfigs/*}" + body: "mute_config" + } + additional_bindings { + patch: "/v1/{mute_config.name=projects/*/muteConfigs/*}" + body: "mute_config" + } + }; + option (google.api.method_signature) = "mute_config,update_mask"; + } + // // Updates a notification config. The following update // fields are allowed: description, pubsub_topic, streaming_config.filter @@ -341,6 +477,55 @@ service SecurityCenter { } } +// Request message for bulk findings update. +// +// Note: +// 1. If multiple bulk update requests match the same resource, the order in +// which they get executed is not defined. +// 2. Once a bulk operation is started, there is no way to stop it. +message BulkMuteFindingsRequest { + // Required. The parent, at which bulk action needs to be applied. Its format is + // "organizations/[organization_id]", "folders/[folder_id]", + // "projects/[project_id]". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "*" + } + ]; + + // Expression that identifies findings that should be updated. + // The expression is a list of zero or more restrictions combined + // via logical operators `AND` and `OR`. Parentheses are supported, and `OR` + // has higher precedence than `AND`. + // + // Restrictions have the form ` ` and may have a + // `-` character in front of them to indicate negation. The fields map to + // those defined in the corresponding resource. + // + // The supported operators are: + // + // * `=` for all value types. + // * `>`, `<`, `>=`, `<=` for integer values. + // * `:`, meaning substring matching, for strings. + // + // The supported value types are: + // + // * string literals in quotes. + // * integer literals without quotes. + // * boolean literals `true` and `false` without quotes. + string filter = 2; + + // This can be a mute configuration name or any identifier for mute/unmute + // of findings based on the filter. + string mute_annotation = 3 [deprecated = true]; +} + +// The response to a BulkMute request. Contains the LRO information. +message BulkMuteFindingsResponse { + +} + // Request message for creating a finding. message CreateFindingRequest { // Required. Resource name of the new finding's parent. Its format should be @@ -362,6 +547,28 @@ message CreateFindingRequest { Finding finding = 3 [(google.api.field_behavior) = REQUIRED]; } +// Request message for creating a mute config. +message CreateMuteConfigRequest { + // Required. Resource name of the new mute configs's parent. Its format is + // "organizations/[organization_id]", "folders/[folder_id]", or + // "projects/[project_id]". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "securitycenter.googleapis.com/MuteConfig" + } + ]; + + // Required. The mute config being created. + MuteConfig mute_config = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Unique identifier provided by the client within the parent scope. + // It must consist of lower case letters, numbers, and hyphen, with the first + // character a letter, the last a letter or a number, and a 63 character + // maximum. + string mute_config_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + // Request message for creating a notification config. message CreateNotificationConfigRequest { // Required. Resource name of the new notification config's parent. Its format is @@ -400,6 +607,20 @@ message CreateSourceRequest { Source source = 2 [(google.api.field_behavior) = REQUIRED]; } +// Request message for deleting a mute config. +message DeleteMuteConfigRequest { + // Required. Name of the mute config to delete. Its format is + // organizations/{organization}/muteConfigs/{config_id}, + // folders/{folder}/muteConfigs/{config_id}, or + // projects/{project}/muteConfigs/{config_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/MuteConfig" + } + ]; +} + // Request message for deleting a notification config. message DeleteNotificationConfigRequest { // Required. Name of the notification config to delete. Its format is @@ -412,6 +633,20 @@ message DeleteNotificationConfigRequest { ]; } +// Request message for retrieving a mute config. +message GetMuteConfigRequest { + // Required. Name of the mute config to retrieve. Its format is + // organizations/{organization}/muteConfigs/{config_id}, + // folders/{folder}/muteConfigs/{config_id}, or + // projects/{project}/muteConfigs/{config_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/MuteConfig" + } + ]; +} + // Request message for getting a notification config. message GetNotificationConfigRequest { // Required. Name of the notification config to get. Its format is @@ -778,6 +1013,43 @@ message GroupResult { int64 count = 2; } +// Request message for listing mute configs at a given scope e.g. organization, +// folder or project. +message ListMuteConfigsRequest { + // Required. The parent, which owns the collection of mute configs. Its format is + // "organizations/[organization_id]", "folders/[folder_id]", + // "projects/[project_id]". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "securitycenter.googleapis.com/MuteConfig" + } + ]; + + // The maximum number of configs to return. The service may return fewer than + // this value. + // If unspecified, at most 10 configs will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2; + + // A page token, received from a previous `ListMuteConfigs` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListMuteConfigs` must + // match the call that provided the page token. + string page_token = 3; +} + +// Response message for listing mute configs. +message ListMuteConfigsResponse { + // The mute configs from the specified parent. + repeated MuteConfig mute_configs = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + // Request message for listing notification configs. message ListNotificationConfigsRequest { // Required. Name of the organization to list notification configs. @@ -1108,6 +1380,7 @@ message ListFindingsRequest { // * resource.project_display_name: `=`, `:` // * resource.type: `=`, `:` // * resource.folders.resource_folder: `=`, `:` + // * resource.display_name: `=`, `:` string filter = 2; // Expression that defines what fields and order to use for sorting. The @@ -1205,10 +1478,16 @@ message ListFindingsResponse { // The human readable name of resource's parent. string parent_display_name = 5; + // The full resource type of the resource. + string type = 6; + // Contains a Folder message for each folder in the assets ancestry. // The first folder is the deepest nested folder, and the last folder is // the folder directly under the Organization. repeated Folder folders = 7; + + // The human readable name of the resource. + string display_name = 8; } // The change in state of the finding. @@ -1283,6 +1562,25 @@ message SetFindingStateRequest { google.protobuf.Timestamp start_time = 3 [(google.api.field_behavior) = REQUIRED]; } +// Request message for updating a finding's mute status. +message SetMuteRequest { + // Required. The relative resource name of the finding. See: + // https://cloud.google.com/apis/design/resource_names#relative_resource_name + // Example: + // "organizations/{organization_id}/sources/{source_id}/finding/{finding_id}", + // "folders/{folder_id}/sources/{source_id}/finding/{finding_id}", + // "projects/{project_id}/sources/{source_id}/finding/{finding_id}". + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/Finding" + } + ]; + + // Required. The desired state of the Mute. + Finding.Mute mute = 2 [(google.api.field_behavior) = REQUIRED]; +} + // Request message for running asset discovery for an organization. message RunAssetDiscoveryRequest { // Required. Name of the organization to run asset discovery for. Its format is @@ -1295,6 +1593,17 @@ message RunAssetDiscoveryRequest { ]; } +// Request message for updating a ExternalSystem resource. +message UpdateExternalSystemRequest { + // Required. The external system resource to update. + ExternalSystem external_system = 1 [(google.api.field_behavior) = REQUIRED]; + + // The FieldMask to use when updating the external system resource. + // + // If empty all mutable fields will be updated. + google.protobuf.FieldMask update_mask = 2; +} + // Request message for updating or creating a finding. message UpdateFindingRequest { // Required. The finding resource to update or create if it does not already exist. @@ -1315,6 +1624,16 @@ message UpdateFindingRequest { google.protobuf.FieldMask update_mask = 2; } +// Request message for updating a mute config. +message UpdateMuteConfigRequest { + // Required. The mute config being updated. + MuteConfig mute_config = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to be updated. + // If empty all mutable fields will be updated. + google.protobuf.FieldMask update_mask = 2; +} + // Request message for updating a notification config. message UpdateNotificationConfigRequest { // Required. The notification config to update. diff --git a/proto-google-cloud-securitycenter-v1beta1/pom.xml b/proto-google-cloud-securitycenter-v1beta1/pom.xml index 047879a5c..8f97c7760 100644 --- a/proto-google-cloud-securitycenter-v1beta1/pom.xml +++ b/proto-google-cloud-securitycenter-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-securitycenter-v1beta1 - 0.97.0 + 0.98.0 proto-google-cloud-securitycenter-v1beta1 PROTO library for proto-google-cloud-securitycenter-v1beta1 com.google.cloud google-cloud-securitycenter-parent - 2.2.0 + 2.3.0 diff --git a/proto-google-cloud-securitycenter-v1p1beta1/pom.xml b/proto-google-cloud-securitycenter-v1p1beta1/pom.xml index 67157f969..332b2d628 100644 --- a/proto-google-cloud-securitycenter-v1p1beta1/pom.xml +++ b/proto-google-cloud-securitycenter-v1p1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-securitycenter-v1p1beta1 - 0.97.0 + 0.98.0 proto-google-cloud-securitycenter-v1p1beta1 PROTO library for proto-google-cloud-securitycenter-v1p1beta1 com.google.cloud google-cloud-securitycenter-parent - 2.2.0 + 2.3.0 diff --git a/proto-google-cloud-securitycenter-v1p1beta1/src/main/java/com/google/cloud/securitycenter/v1p1beta1/UpdateOrganizationSettingsRequest.java b/proto-google-cloud-securitycenter-v1p1beta1/src/main/java/com/google/cloud/securitycenter/v1p1beta1/UpdateOrganizationSettingsRequest.java index 1b893c660..e1b96385b 100644 --- a/proto-google-cloud-securitycenter-v1p1beta1/src/main/java/com/google/cloud/securitycenter/v1p1beta1/UpdateOrganizationSettingsRequest.java +++ b/proto-google-cloud-securitycenter-v1p1beta1/src/main/java/com/google/cloud/securitycenter/v1p1beta1/UpdateOrganizationSettingsRequest.java @@ -199,7 +199,7 @@ public com.google.cloud.securitycenter.v1p1beta1.OrganizationSettings getOrganiz * *
    * The FieldMask to use when updating the settings resource.
-   *  If empty all mutable fields will be updated.
+   * If empty all mutable fields will be updated.
    * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -215,7 +215,7 @@ public boolean hasUpdateMask() { * *
    * The FieldMask to use when updating the settings resource.
-   *  If empty all mutable fields will be updated.
+   * If empty all mutable fields will be updated.
    * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -231,7 +231,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { * *
    * The FieldMask to use when updating the settings resource.
-   *  If empty all mutable fields will be updated.
+   * If empty all mutable fields will be updated.
    * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -841,7 +841,7 @@ public Builder clearOrganizationSettings() { * *
      * The FieldMask to use when updating the settings resource.
-     *  If empty all mutable fields will be updated.
+     * If empty all mutable fields will be updated.
      * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -856,7 +856,7 @@ public boolean hasUpdateMask() { * *
      * The FieldMask to use when updating the settings resource.
-     *  If empty all mutable fields will be updated.
+     * If empty all mutable fields will be updated.
      * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -877,7 +877,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { * *
      * The FieldMask to use when updating the settings resource.
-     *  If empty all mutable fields will be updated.
+     * If empty all mutable fields will be updated.
      * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -900,7 +900,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { * *
      * The FieldMask to use when updating the settings resource.
-     *  If empty all mutable fields will be updated.
+     * If empty all mutable fields will be updated.
      * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -920,7 +920,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal * *
      * The FieldMask to use when updating the settings resource.
-     *  If empty all mutable fields will be updated.
+     * If empty all mutable fields will be updated.
      * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -945,7 +945,7 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { * *
      * The FieldMask to use when updating the settings resource.
-     *  If empty all mutable fields will be updated.
+     * If empty all mutable fields will be updated.
      * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -966,7 +966,7 @@ public Builder clearUpdateMask() { * *
      * The FieldMask to use when updating the settings resource.
-     *  If empty all mutable fields will be updated.
+     * If empty all mutable fields will be updated.
      * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -981,7 +981,7 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { * *
      * The FieldMask to use when updating the settings resource.
-     *  If empty all mutable fields will be updated.
+     * If empty all mutable fields will be updated.
      * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -1000,7 +1000,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * *
      * The FieldMask to use when updating the settings resource.
-     *  If empty all mutable fields will be updated.
+     * If empty all mutable fields will be updated.
      * 
* * .google.protobuf.FieldMask update_mask = 2; diff --git a/proto-google-cloud-securitycenter-v1p1beta1/src/main/java/com/google/cloud/securitycenter/v1p1beta1/UpdateOrganizationSettingsRequestOrBuilder.java b/proto-google-cloud-securitycenter-v1p1beta1/src/main/java/com/google/cloud/securitycenter/v1p1beta1/UpdateOrganizationSettingsRequestOrBuilder.java index 4f8d8bcc1..5d3c5e3c6 100644 --- a/proto-google-cloud-securitycenter-v1p1beta1/src/main/java/com/google/cloud/securitycenter/v1p1beta1/UpdateOrganizationSettingsRequestOrBuilder.java +++ b/proto-google-cloud-securitycenter-v1p1beta1/src/main/java/com/google/cloud/securitycenter/v1p1beta1/UpdateOrganizationSettingsRequestOrBuilder.java @@ -70,7 +70,7 @@ public interface UpdateOrganizationSettingsRequestOrBuilder * *
    * The FieldMask to use when updating the settings resource.
-   *  If empty all mutable fields will be updated.
+   * If empty all mutable fields will be updated.
    * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -83,7 +83,7 @@ public interface UpdateOrganizationSettingsRequestOrBuilder * *
    * The FieldMask to use when updating the settings resource.
-   *  If empty all mutable fields will be updated.
+   * If empty all mutable fields will be updated.
    * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -96,7 +96,7 @@ public interface UpdateOrganizationSettingsRequestOrBuilder * *
    * The FieldMask to use when updating the settings resource.
-   *  If empty all mutable fields will be updated.
+   * If empty all mutable fields will be updated.
    * 
* * .google.protobuf.FieldMask update_mask = 2; diff --git a/proto-google-cloud-securitycenter-v1p1beta1/src/main/proto/google/cloud/securitycenter/v1p1beta1/securitycenter_service.proto b/proto-google-cloud-securitycenter-v1p1beta1/src/main/proto/google/cloud/securitycenter/v1p1beta1/securitycenter_service.proto index d127dd721..958e69714 100644 --- a/proto-google-cloud-securitycenter-v1p1beta1/src/main/proto/google/cloud/securitycenter/v1p1beta1/securitycenter_service.proto +++ b/proto-google-cloud-securitycenter-v1p1beta1/src/main/proto/google/cloud/securitycenter/v1p1beta1/securitycenter_service.proto @@ -1317,7 +1317,7 @@ message UpdateOrganizationSettingsRequest { // The FieldMask to use when updating the settings resource. // - // If empty all mutable fields will be updated. + // If empty all mutable fields will be updated. google.protobuf.FieldMask update_mask = 2; } diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 395c20547..e92fcf951 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-securitycenter - 2.1.7 + 2.2.0 @@ -42,7 +42,7 @@ com.google.protobuf protobuf-java-util - 3.18.1 + 3.19.1 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 46644b254..b0b90b846 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-securitycenter - 2.1.7 + 2.2.0 @@ -40,7 +40,7 @@ com.google.protobuf protobuf-java-util - 3.18.1 + 3.19.1 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 6c98a3f6d..668f26bb4 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 23.1.0 + 24.0.0 pom import @@ -52,7 +52,7 @@ com.google.protobuf protobuf-java-util - 3.18.1 + 3.19.1 diff --git a/versions.txt b/versions.txt index edd7e97d5..9ccf4fbec 100644 --- a/versions.txt +++ b/versions.txt @@ -1,10 +1,10 @@ # Format: # module:released-version:current-version -google-cloud-securitycenter:2.2.0:2.2.0 -grpc-google-cloud-securitycenter-v1:2.2.0:2.2.0 -grpc-google-cloud-securitycenter-v1beta1:0.97.0:0.97.0 -grpc-google-cloud-securitycenter-v1p1beta1:0.97.0:0.97.0 -proto-google-cloud-securitycenter-v1:2.2.0:2.2.0 -proto-google-cloud-securitycenter-v1beta1:0.97.0:0.97.0 -proto-google-cloud-securitycenter-v1p1beta1:0.97.0:0.97.0 +google-cloud-securitycenter:2.3.0:2.3.0 +grpc-google-cloud-securitycenter-v1:2.3.0:2.3.0 +grpc-google-cloud-securitycenter-v1beta1:0.98.0:0.98.0 +grpc-google-cloud-securitycenter-v1p1beta1:0.98.0:0.98.0 +proto-google-cloud-securitycenter-v1:2.3.0:2.3.0 +proto-google-cloud-securitycenter-v1beta1:0.98.0:0.98.0 +proto-google-cloud-securitycenter-v1p1beta1:0.98.0:0.98.0