diff --git a/java-securitycenter/google-cloud-securitycenter-bom/pom.xml b/java-securitycenter/google-cloud-securitycenter-bom/pom.xml index 942667e18cf4..837132bd2d17 100644 --- a/java-securitycenter/google-cloud-securitycenter-bom/pom.xml +++ b/java-securitycenter/google-cloud-securitycenter-bom/pom.xml @@ -40,6 +40,11 @@ grpc-google-cloud-securitycenter-v1p1beta1 0.140.0-SNAPSHOT + + com.google.api.grpc + grpc-google-cloud-securitycenter-v2 + 2.45.0-SNAPSHOT + com.google.api.grpc proto-google-cloud-securitycenter-v1 @@ -55,6 +60,11 @@ proto-google-cloud-securitycenter-v1p1beta1 0.140.0-SNAPSHOT + + com.google.api.grpc + proto-google-cloud-securitycenter-v2 + 2.45.0-SNAPSHOT + diff --git a/java-securitycenter/google-cloud-securitycenter/pom.xml b/java-securitycenter/google-cloud-securitycenter/pom.xml index 9e36b54ed331..74e0f5212f59 100644 --- a/java-securitycenter/google-cloud-securitycenter/pom.xml +++ b/java-securitycenter/google-cloud-securitycenter/pom.xml @@ -41,6 +41,10 @@ proto-google-common-protos + + com.google.api.grpc + proto-google-cloud-securitycenter-v2 + com.google.api.grpc proto-google-cloud-securitycenter-v1 @@ -90,6 +94,11 @@ grpc-google-cloud-securitycenter-v1 test + + com.google.api.grpc + grpc-google-cloud-securitycenter-v2 + test + com.google.api.grpc grpc-google-cloud-securitycenter-v1beta1 diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterSettings.java b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterSettings.java index a4f57c301e27..3afb5dc6e64d 100644 --- a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterSettings.java +++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterSettings.java @@ -487,7 +487,6 @@ public static Builder newBuilder() { } /** Returns a new REST builder for this class. */ - @BetaApi public static Builder newHttpJsonBuilder() { return Builder.createHttpJsonDefault(); } @@ -529,7 +528,6 @@ private static Builder createDefault() { return new Builder(SecurityCenterStubSettings.newBuilder()); } - @BetaApi private static Builder createHttpJsonDefault() { return new Builder(SecurityCenterStubSettings.newHttpJsonBuilder()); } diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/HttpJsonSecurityCenterCallableFactory.java b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/HttpJsonSecurityCenterCallableFactory.java index db8a444dd557..50258ab0fe51 100644 --- a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/HttpJsonSecurityCenterCallableFactory.java +++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/HttpJsonSecurityCenterCallableFactory.java @@ -16,7 +16,6 @@ package com.google.cloud.securitycenter.v1.stub; -import com.google.api.core.BetaApi; import com.google.api.gax.httpjson.HttpJsonCallSettings; import com.google.api.gax.httpjson.HttpJsonCallableFactory; import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; @@ -41,7 +40,6 @@ *

This class is for advanced usage. */ @Generated("by gapic-generator-java") -@BetaApi public class HttpJsonSecurityCenterCallableFactory implements HttpJsonStubCallableFactory { @@ -73,8 +71,6 @@ public UnaryCallable createBatchingCa httpJsonCallSettings, callSettings, clientContext); } - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") @Override public OperationCallable createOperationCallable( diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/HttpJsonSecurityCenterStub.java b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/HttpJsonSecurityCenterStub.java index 220dfab3876a..4b3f8418706c 100644 --- a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/HttpJsonSecurityCenterStub.java +++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/HttpJsonSecurityCenterStub.java @@ -29,7 +29,6 @@ import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListSourcesPagedResponse; import com.google.api.HttpRule; -import com.google.api.core.BetaApi; import com.google.api.core.InternalApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.core.BackgroundResourceAggregation; @@ -135,7 +134,6 @@ *

This class is for advanced usage and reflects the underlying API directly. */ @Generated("by gapic-generator-java") -@BetaApi public class HttpJsonSecurityCenterStub extends SecurityCenterStub { private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder() diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStubSettings.java b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStubSettings.java index 3c181b5bb012..e9baae7545cc 100644 --- a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStubSettings.java +++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStubSettings.java @@ -2259,8 +2259,6 @@ public Builder applyToAllUnaryMethods( } /** 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; @@ -2480,8 +2478,6 @@ public UnaryCallSettings.Builder getSourceSettings() { } /** Returns the builder for the settings used for calls to runAssetDiscovery. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") public OperationCallSettings.Builder runAssetDiscoveryOperationSettings() { return runAssetDiscoveryOperationSettings; diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1beta1/SecurityCenterSettings.java b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1beta1/SecurityCenterSettings.java index 7063232df40e..c1d982b4f71d 100644 --- a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1beta1/SecurityCenterSettings.java +++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1beta1/SecurityCenterSettings.java @@ -245,7 +245,6 @@ public static Builder newBuilder() { } /** Returns a new REST builder for this class. */ - @BetaApi public static Builder newHttpJsonBuilder() { return Builder.createHttpJsonDefault(); } @@ -287,7 +286,6 @@ private static Builder createDefault() { return new Builder(SecurityCenterStubSettings.newBuilder()); } - @BetaApi private static Builder createHttpJsonDefault() { return new Builder(SecurityCenterStubSettings.newHttpJsonBuilder()); } diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1beta1/stub/HttpJsonSecurityCenterCallableFactory.java b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1beta1/stub/HttpJsonSecurityCenterCallableFactory.java index cdb4a7a16d75..73563afdeb97 100644 --- a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1beta1/stub/HttpJsonSecurityCenterCallableFactory.java +++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1beta1/stub/HttpJsonSecurityCenterCallableFactory.java @@ -73,8 +73,6 @@ public UnaryCallable createBatchingCa httpJsonCallSettings, callSettings, clientContext); } - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") @Override public OperationCallable createOperationCallable( diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1beta1/stub/SecurityCenterStubSettings.java b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1beta1/stub/SecurityCenterStubSettings.java index fdcae930ea96..7c6f682657be 100644 --- a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1beta1/stub/SecurityCenterStubSettings.java +++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1beta1/stub/SecurityCenterStubSettings.java @@ -1113,8 +1113,6 @@ public UnaryCallSettings.Builder getSourceSettings() { } /** Returns the builder for the settings used for calls to runAssetDiscovery. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") public OperationCallSettings.Builder runAssetDiscoveryOperationSettings() { return runAssetDiscoveryOperationSettings; diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1p1beta1/SecurityCenterSettings.java b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1p1beta1/SecurityCenterSettings.java index dbbfb87de650..88671a64c0ea 100644 --- a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1p1beta1/SecurityCenterSettings.java +++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1p1beta1/SecurityCenterSettings.java @@ -279,7 +279,6 @@ public static Builder newBuilder() { } /** Returns a new REST builder for this class. */ - @BetaApi public static Builder newHttpJsonBuilder() { return Builder.createHttpJsonDefault(); } @@ -321,7 +320,6 @@ private static Builder createDefault() { return new Builder(SecurityCenterStubSettings.newBuilder()); } - @BetaApi private static Builder createHttpJsonDefault() { return new Builder(SecurityCenterStubSettings.newHttpJsonBuilder()); } diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1p1beta1/stub/HttpJsonSecurityCenterCallableFactory.java b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1p1beta1/stub/HttpJsonSecurityCenterCallableFactory.java index 8158c164b360..0d889f3b7e75 100644 --- a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1p1beta1/stub/HttpJsonSecurityCenterCallableFactory.java +++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1p1beta1/stub/HttpJsonSecurityCenterCallableFactory.java @@ -73,8 +73,6 @@ public UnaryCallable createBatchingCa httpJsonCallSettings, callSettings, clientContext); } - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") @Override public OperationCallable createOperationCallable( diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1p1beta1/stub/SecurityCenterStubSettings.java b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1p1beta1/stub/SecurityCenterStubSettings.java index 537cd02fc148..06872b380edf 100644 --- a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1p1beta1/stub/SecurityCenterStubSettings.java +++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1p1beta1/stub/SecurityCenterStubSettings.java @@ -1342,8 +1342,6 @@ public UnaryCallSettings.Builder getSourceSettings() { } /** Returns the builder for the settings used for calls to runAssetDiscovery. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") public OperationCallSettings.Builder runAssetDiscoveryOperationSettings() { return runAssetDiscoveryOperationSettings; diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v2/SecurityCenterClient.java b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v2/SecurityCenterClient.java new file mode 100644 index 000000000000..11be8e92335c --- /dev/null +++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v2/SecurityCenterClient.java @@ -0,0 +1,8079 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.securitycenter.v2; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.api.resourcenames.ResourceName; +import com.google.cloud.securitycenter.v2.stub.SecurityCenterStub; +import com.google.cloud.securitycenter.v2.stub.SecurityCenterStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: V2 APIs for Security Center service. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+ *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+ *   List requests = new ArrayList<>();
+ *   BatchCreateResourceValueConfigsResponse response =
+ *       securityCenterClient.batchCreateResourceValueConfigs(parent, requests);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the SecurityCenterClient object to clean up resources such + * as threads. In the example above, try-with-resources is used, which automatically calls close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants

BatchCreateResourceValueConfigs

Creates a ResourceValueConfig for an organization. Maps user's tags to difference resource values for use by the attack path simulation.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • batchCreateResourceValueConfigs(OrganizationName parent, List<CreateResourceValueConfigRequest> requests) + *

  • batchCreateResourceValueConfigs(String parent, List<CreateResourceValueConfigRequest> requests) + *

  • batchCreateResourceValueConfigs(BatchCreateResourceValueConfigsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • batchCreateResourceValueConfigsCallable() + *

+ *

BulkMuteFindings

Kicks off an LRO to bulk mute findings for a parent based on a filter. If no location is specified, findings are muted in global. The parent can be either an organization, folder, or project. The findings matched by the filter will be muted after the LRO is done.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • bulkMuteFindingsAsync(BulkMuteFindingsRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • bulkMuteFindingsAsync(ResourceName parent) + *

  • bulkMuteFindingsAsync(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • bulkMuteFindingsOperationCallable() + *

  • bulkMuteFindingsCallable() + *

+ *

CreateBigQueryExport

Creates a BigQuery export.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createBigQueryExport(CreateBigQueryExportRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createBigQueryExport(FolderLocationName parent, BigQueryExport bigQueryExport, String bigQueryExportId) + *

  • createBigQueryExport(LocationName parent, BigQueryExport bigQueryExport, String bigQueryExportId) + *

  • createBigQueryExport(OrganizationLocationName parent, BigQueryExport bigQueryExport, String bigQueryExportId) + *

  • createBigQueryExport(String parent, BigQueryExport bigQueryExport, String bigQueryExportId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createBigQueryExportCallable() + *

+ *

CreateFinding

Creates a finding in a location. The corresponding source must exist for finding creation to succeed.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createFinding(CreateFindingRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createFinding(SourceName parent, Finding finding, String findingId) + *

  • createFinding(String parent, Finding finding, String findingId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createFindingCallable() + *

+ *

CreateMuteConfig

Creates a mute config.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createMuteConfig(CreateMuteConfigRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createMuteConfig(FolderLocationName parent, MuteConfig muteConfig, String muteConfigId) + *

  • createMuteConfig(FolderName parent, MuteConfig muteConfig, String muteConfigId) + *

  • createMuteConfig(LocationName parent, MuteConfig muteConfig, String muteConfigId) + *

  • createMuteConfig(OrganizationLocationName parent, MuteConfig muteConfig, String muteConfigId) + *

  • createMuteConfig(OrganizationName parent, MuteConfig muteConfig, String muteConfigId) + *

  • createMuteConfig(ProjectName parent, MuteConfig muteConfig, String muteConfigId) + *

  • createMuteConfig(String parent, MuteConfig muteConfig, String muteConfigId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createMuteConfigCallable() + *

+ *

CreateNotificationConfig

Creates a notification config.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createNotificationConfig(CreateNotificationConfigRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createNotificationConfig(FolderLocationName parent, NotificationConfig notificationConfig, String configId) + *

  • createNotificationConfig(LocationName parent, NotificationConfig notificationConfig, String configId) + *

  • createNotificationConfig(OrganizationLocationName parent, NotificationConfig notificationConfig, String configId) + *

  • createNotificationConfig(String parent, NotificationConfig notificationConfig, String configId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createNotificationConfigCallable() + *

+ *

CreateSource

Creates a source.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createSource(CreateSourceRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createSource(OrganizationName parent, Source source) + *

  • createSource(String parent, Source source) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createSourceCallable() + *

+ *

DeleteBigQueryExport

Deletes an existing BigQuery export.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteBigQueryExport(DeleteBigQueryExportRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteBigQueryExport(BigQueryExportName name) + *

  • deleteBigQueryExport(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteBigQueryExportCallable() + *

+ *

DeleteMuteConfig

Deletes an existing mute config. If no location is specified, default is global.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteMuteConfig(DeleteMuteConfigRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteMuteConfig(MuteConfigName name) + *

  • deleteMuteConfig(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteMuteConfigCallable() + *

+ *

DeleteNotificationConfig

Deletes a notification config.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteNotificationConfig(DeleteNotificationConfigRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteNotificationConfig(NotificationConfigName name) + *

  • deleteNotificationConfig(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteNotificationConfigCallable() + *

+ *

DeleteResourceValueConfig

Deletes a ResourceValueConfig.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteResourceValueConfig(DeleteResourceValueConfigRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteResourceValueConfig(ResourceValueConfigName name) + *

  • deleteResourceValueConfig(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteResourceValueConfigCallable() + *

+ *

GetBigQueryExport

Gets a BigQuery export.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getBigQueryExport(GetBigQueryExportRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getBigQueryExport(BigQueryExportName name) + *

  • getBigQueryExport(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getBigQueryExportCallable() + *

+ *

GetSimulation

Get the simulation by name or the latest simulation for the given organization.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getSimulation(GetSimulationRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getSimulation(SimulationName name) + *

  • getSimulation(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getSimulationCallable() + *

+ *

GetValuedResource

Get the valued resource by name

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getValuedResource(GetValuedResourceRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getValuedResource(ValuedResourceName name) + *

  • getValuedResource(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getValuedResourceCallable() + *

+ *

GetIamPolicy

Gets the access control policy on the specified Source.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getIamPolicy(ResourceName resource) + *

  • getIamPolicy(String resource) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getIamPolicyCallable() + *

+ *

GetMuteConfig

Gets a mute config. If no location is specified, default is global.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getMuteConfig(GetMuteConfigRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getMuteConfig(MuteConfigName name) + *

  • getMuteConfig(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getMuteConfigCallable() + *

+ *

GetNotificationConfig

Gets a notification config.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getNotificationConfig(GetNotificationConfigRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getNotificationConfig(NotificationConfigName name) + *

  • getNotificationConfig(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getNotificationConfigCallable() + *

+ *

GetResourceValueConfig

Gets a ResourceValueConfig.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getResourceValueConfig(GetResourceValueConfigRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getResourceValueConfig(ResourceValueConfigName name) + *

  • getResourceValueConfig(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getResourceValueConfigCallable() + *

+ *

GetSource

Gets a source.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getSource(GetSourceRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getSource(SourceName name) + *

  • getSource(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getSourceCallable() + *

+ *

GroupFindings

Filters an organization or source's findings and groups them by their specified properties in a location. If no location is specified, findings are assumed to be in global + *

To group across all sources provide a `-` as the source id. The following list shows some examples: + *

+ `/v2/organizations/{organization_id}/sources/-/findings` + `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` + `/v2/folders/{folder_id}/sources/-/findings` + `/v2/folders/{folder_id}/sources/-/locations/{location_id}/findings` + `/v2/projects/{project_id}/sources/-/findings` + `/v2/projects/{project_id}/sources/-/locations/{location_id}/findings`

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • groupFindings(GroupFindingsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • groupFindings(SourceName parent, String groupBy) + *

  • groupFindings(String parent, String groupBy) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • groupFindingsPagedCallable() + *

  • groupFindingsCallable() + *

+ *

ListAttackPaths

Lists the attack paths for a set of simulation results or valued resources and filter.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listAttackPaths(ListAttackPathsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listAttackPaths(ValuedResourceName parent) + *

  • listAttackPaths(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listAttackPathsPagedCallable() + *

  • listAttackPathsCallable() + *

+ *

ListBigQueryExports

Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports under that level are also returned e.g. if requesting BigQuery exports under a folder, then all BigQuery exports immediately under the folder plus the ones created under the projects within the folder are returned.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listBigQueryExports(ListBigQueryExportsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listBigQueryExports(FolderLocationName parent) + *

  • listBigQueryExports(LocationName parent) + *

  • listBigQueryExports(OrganizationLocationName parent) + *

  • listBigQueryExports(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listBigQueryExportsPagedCallable() + *

  • listBigQueryExportsCallable() + *

+ *

ListFindings

Lists an organization or source's findings. + *

To list across all sources for a given location provide a `-` as the source id. If no location is specified, finding are assumed to be in global. The following list shows some examples: + *

+ `/v2/organizations/{organization_id}/sources/-/findings` + `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings`

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listFindings(ListFindingsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listFindings(SourceName parent) + *

  • listFindings(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listFindingsPagedCallable() + *

  • listFindingsCallable() + *

+ *

ListMuteConfigs

Lists mute configs. If no location is specified, default is global.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listMuteConfigs(ListMuteConfigsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listMuteConfigs(FolderLocationName parent) + *

  • listMuteConfigs(FolderName parent) + *

  • listMuteConfigs(LocationName parent) + *

  • listMuteConfigs(OrganizationLocationName parent) + *

  • listMuteConfigs(OrganizationName parent) + *

  • listMuteConfigs(ProjectName parent) + *

  • listMuteConfigs(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listMuteConfigsPagedCallable() + *

  • listMuteConfigsCallable() + *

+ *

ListNotificationConfigs

Lists notification configs.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listNotificationConfigs(ListNotificationConfigsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listNotificationConfigs(FolderLocationName parent) + *

  • listNotificationConfigs(LocationName parent) + *

  • listNotificationConfigs(OrganizationLocationName parent) + *

  • listNotificationConfigs(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listNotificationConfigsPagedCallable() + *

  • listNotificationConfigsCallable() + *

+ *

ListResourceValueConfigs

Lists all ResourceValueConfigs.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listResourceValueConfigs(ListResourceValueConfigsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listResourceValueConfigs(OrganizationName parent) + *

  • listResourceValueConfigs(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listResourceValueConfigsPagedCallable() + *

  • listResourceValueConfigsCallable() + *

+ *

ListSources

Lists all sources belonging to an organization.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listSources(ListSourcesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listSources(FolderName parent) + *

  • listSources(OrganizationName parent) + *

  • listSources(ProjectName parent) + *

  • listSources(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listSourcesPagedCallable() + *

  • listSourcesCallable() + *

+ *

ListValuedResources

Lists the valued resources for a set of simulation results and filter.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listValuedResources(ListValuedResourcesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listValuedResources(SimulationName parent) + *

  • listValuedResources(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listValuedResourcesPagedCallable() + *

  • listValuedResourcesCallable() + *

+ *

SetFindingState

Updates the state of a finding. If no location is specified, finding is assumed to be in global

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • setFindingState(SetFindingStateRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • setFindingState(FindingName name, Finding.State state) + *

  • setFindingState(String name, Finding.State state) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • setFindingStateCallable() + *

+ *

SetIamPolicy

Sets the access control policy on the specified Source.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • setIamPolicy(ResourceName resource, Policy policy) + *

  • setIamPolicy(String resource, Policy policy) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • setIamPolicyCallable() + *

+ *

SetMute

Updates the mute state of a finding. If no location is specified, finding is assumed to be in global

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • setMute(SetMuteRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • setMute(FindingName name, Finding.Mute mute) + *

  • setMute(String name, Finding.Mute mute) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • setMuteCallable() + *

+ *

TestIamPermissions

Returns the permissions that a caller has on the specified source.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • testIamPermissions(ResourceName resource, List<String> permissions) + *

  • testIamPermissions(String resource, List<String> permissions) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • testIamPermissionsCallable() + *

+ *

UpdateBigQueryExport

Updates a BigQuery export.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateBigQueryExport(UpdateBigQueryExportRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateBigQueryExport(BigQueryExport bigQueryExport, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateBigQueryExportCallable() + *

+ *

UpdateExternalSystem

Updates external system. This is for a given finding. If no location is specified, finding is assumed to be in global

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateExternalSystem(UpdateExternalSystemRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateExternalSystem(ExternalSystem externalSystem, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateExternalSystemCallable() + *

+ *

UpdateFinding

Creates or updates a finding. If no location is specified, finding is assumed to be in global. The corresponding source must exist for a finding creation to succeed.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateFinding(UpdateFindingRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateFinding(Finding finding, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateFindingCallable() + *

+ *

UpdateMuteConfig

Updates a mute config. If no location is specified, default is global.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateMuteConfig(UpdateMuteConfigRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateMuteConfig(MuteConfig muteConfig, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateMuteConfigCallable() + *

+ *

UpdateNotificationConfig

Updates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateNotificationConfig(UpdateNotificationConfigRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateNotificationConfig(NotificationConfig notificationConfig, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateNotificationConfigCallable() + *

+ *

UpdateResourceValueConfig

Updates an existing ResourceValueConfigs with new rules.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateResourceValueConfig(UpdateResourceValueConfigRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateResourceValueConfig(ResourceValueConfig resourceValueConfig, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateResourceValueConfigCallable() + *

+ *

UpdateSecurityMarks

Updates security marks. For Finding Security marks, if no location is specified, finding is assumed to be in global. Assets Security Marks can only be accessed through global endpoint.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateSecurityMarks(UpdateSecurityMarksRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateSecurityMarks(SecurityMarks securityMarks, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateSecurityMarksCallable() + *

+ *

UpdateSource

Updates a source.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateSource(UpdateSourceRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateSource(Source source, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateSourceCallable() + *

+ *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of SecurityCenterSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * SecurityCenterSettings securityCenterSettings =
+ *     SecurityCenterSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * SecurityCenterClient securityCenterClient = SecurityCenterClient.create(securityCenterSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * SecurityCenterSettings securityCenterSettings =
+ *     SecurityCenterSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * SecurityCenterClient securityCenterClient = SecurityCenterClient.create(securityCenterSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * SecurityCenterSettings securityCenterSettings =
+ *     SecurityCenterSettings.newHttpJsonBuilder().build();
+ * SecurityCenterClient securityCenterClient = SecurityCenterClient.create(securityCenterSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class SecurityCenterClient implements BackgroundResource { + private final SecurityCenterSettings settings; + private final SecurityCenterStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of SecurityCenterClient with default settings. */ + public static final SecurityCenterClient create() throws IOException { + return create(SecurityCenterSettings.newBuilder().build()); + } + + /** + * Constructs an instance of SecurityCenterClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final SecurityCenterClient create(SecurityCenterSettings settings) + throws IOException { + return new SecurityCenterClient(settings); + } + + /** + * Constructs an instance of SecurityCenterClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(SecurityCenterSettings). + */ + public static final SecurityCenterClient create(SecurityCenterStub stub) { + return new SecurityCenterClient(stub); + } + + /** + * Constructs an instance of SecurityCenterClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected SecurityCenterClient(SecurityCenterSettings settings) throws IOException { + this.settings = settings; + this.stub = ((SecurityCenterStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected SecurityCenterClient(SecurityCenterStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final SecurityCenterSettings getSettings() { + return settings; + } + + public SecurityCenterStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a ResourceValueConfig for an organization. Maps user's tags to difference resource + * values for use by the attack path simulation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+   *   List requests = new ArrayList<>();
+   *   BatchCreateResourceValueConfigsResponse response =
+   *       securityCenterClient.batchCreateResourceValueConfigs(parent, requests);
+   * }
+   * }
+ * + * @param parent Required. Resource name of the new ResourceValueConfig's parent. The parent field + * in the CreateResourceValueConfigRequest messages must either be empty or match this field. + * @param requests Required. The resource value configs to be created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchCreateResourceValueConfigsResponse batchCreateResourceValueConfigs( + OrganizationName parent, List requests) { + BatchCreateResourceValueConfigsRequest request = + BatchCreateResourceValueConfigsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .addAllRequests(requests) + .build(); + return batchCreateResourceValueConfigs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a ResourceValueConfig for an organization. Maps user's tags to difference resource + * values for use by the attack path simulation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
+   *   List requests = new ArrayList<>();
+   *   BatchCreateResourceValueConfigsResponse response =
+   *       securityCenterClient.batchCreateResourceValueConfigs(parent, requests);
+   * }
+   * }
+ * + * @param parent Required. Resource name of the new ResourceValueConfig's parent. The parent field + * in the CreateResourceValueConfigRequest messages must either be empty or match this field. + * @param requests Required. The resource value configs to be created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchCreateResourceValueConfigsResponse batchCreateResourceValueConfigs( + String parent, List requests) { + BatchCreateResourceValueConfigsRequest request = + BatchCreateResourceValueConfigsRequest.newBuilder() + .setParent(parent) + .addAllRequests(requests) + .build(); + return batchCreateResourceValueConfigs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a ResourceValueConfig for an organization. Maps user's tags to difference resource + * values for use by the attack path simulation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   BatchCreateResourceValueConfigsRequest request =
+   *       BatchCreateResourceValueConfigsRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   BatchCreateResourceValueConfigsResponse response =
+   *       securityCenterClient.batchCreateResourceValueConfigs(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 BatchCreateResourceValueConfigsResponse batchCreateResourceValueConfigs( + BatchCreateResourceValueConfigsRequest request) { + return batchCreateResourceValueConfigsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a ResourceValueConfig for an organization. Maps user's tags to difference resource + * values for use by the attack path simulation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   BatchCreateResourceValueConfigsRequest request =
+   *       BatchCreateResourceValueConfigsRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       securityCenterClient.batchCreateResourceValueConfigsCallable().futureCall(request);
+   *   // Do something.
+   *   BatchCreateResourceValueConfigsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable< + BatchCreateResourceValueConfigsRequest, BatchCreateResourceValueConfigsResponse> + batchCreateResourceValueConfigsCallable() { + return stub.batchCreateResourceValueConfigsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Kicks off an LRO to bulk mute findings for a parent based on a filter. If no location is + * specified, findings are muted in global. 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
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * 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. If no location is + * specified, findings are updated in global. The following list shows some examples: + *

+ `organizations/[organization_id]` + + * `organizations/[organization_id]/locations/[location_id]` + `folders/[folder_id]` + + * `folders/[folder_id]/locations/[location_id]` + `projects/[project_id]` + + * `projects/[project_id]/locations/[location_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. If no location is + * specified, findings are muted in global. 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
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * 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. If no location is + * specified, findings are updated in global. The following list shows some examples: + *

+ `organizations/[organization_id]` + + * `organizations/[organization_id]/locations/[location_id]` + `folders/[folder_id]` + + * `folders/[folder_id]/locations/[location_id]` + `projects/[project_id]` + + * `projects/[project_id]/locations/[location_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. If no location is + * specified, findings are muted in global. 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
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   BulkMuteFindingsRequest request =
+   *       BulkMuteFindingsRequest.newBuilder()
+   *           .setParent(FolderName.of("[FOLDER]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .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. If no location is + * specified, findings are muted in global. 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
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   BulkMuteFindingsRequest request =
+   *       BulkMuteFindingsRequest.newBuilder()
+   *           .setParent(FolderName.of("[FOLDER]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .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. If no location is + * specified, findings are muted in global. 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
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   BulkMuteFindingsRequest request =
+   *       BulkMuteFindingsRequest.newBuilder()
+   *           .setParent(FolderName.of("[FOLDER]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .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 BigQuery export. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]");
+   *   BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build();
+   *   String bigQueryExportId = "bigQueryExportId1024198583";
+   *   BigQueryExport response =
+   *       securityCenterClient.createBigQueryExport(parent, bigQueryExport, bigQueryExportId);
+   * }
+   * }
+ * + * @param parent Required. The name of the parent resource of the new BigQuery export. Its format + * is "organizations/[organization_id]/locations/[location_id]", + * "folders/[folder_id]/locations/[location_id]", or + * "projects/[project_id]/locations/[location_id]". + * @param bigQueryExport Required. The BigQuery export being created. + * @param bigQueryExportId Required. Unique identifier provided by the client within the parent + * scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a + * letter, must end with either a letter or a number, and must be 63 characters or less. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BigQueryExport createBigQueryExport( + FolderLocationName parent, BigQueryExport bigQueryExport, String bigQueryExportId) { + CreateBigQueryExportRequest request = + CreateBigQueryExportRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setBigQueryExport(bigQueryExport) + .setBigQueryExportId(bigQueryExportId) + .build(); + return createBigQueryExport(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a BigQuery export. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build();
+   *   String bigQueryExportId = "bigQueryExportId1024198583";
+   *   BigQueryExport response =
+   *       securityCenterClient.createBigQueryExport(parent, bigQueryExport, bigQueryExportId);
+   * }
+   * }
+ * + * @param parent Required. The name of the parent resource of the new BigQuery export. Its format + * is "organizations/[organization_id]/locations/[location_id]", + * "folders/[folder_id]/locations/[location_id]", or + * "projects/[project_id]/locations/[location_id]". + * @param bigQueryExport Required. The BigQuery export being created. + * @param bigQueryExportId Required. Unique identifier provided by the client within the parent + * scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a + * letter, must end with either a letter or a number, and must be 63 characters or less. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BigQueryExport createBigQueryExport( + LocationName parent, BigQueryExport bigQueryExport, String bigQueryExportId) { + CreateBigQueryExportRequest request = + CreateBigQueryExportRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setBigQueryExport(bigQueryExport) + .setBigQueryExportId(bigQueryExportId) + .build(); + return createBigQueryExport(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a BigQuery export. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+   *   BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build();
+   *   String bigQueryExportId = "bigQueryExportId1024198583";
+   *   BigQueryExport response =
+   *       securityCenterClient.createBigQueryExport(parent, bigQueryExport, bigQueryExportId);
+   * }
+   * }
+ * + * @param parent Required. The name of the parent resource of the new BigQuery export. Its format + * is "organizations/[organization_id]/locations/[location_id]", + * "folders/[folder_id]/locations/[location_id]", or + * "projects/[project_id]/locations/[location_id]". + * @param bigQueryExport Required. The BigQuery export being created. + * @param bigQueryExportId Required. Unique identifier provided by the client within the parent + * scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a + * letter, must end with either a letter or a number, and must be 63 characters or less. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BigQueryExport createBigQueryExport( + OrganizationLocationName parent, BigQueryExport bigQueryExport, String bigQueryExportId) { + CreateBigQueryExportRequest request = + CreateBigQueryExportRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setBigQueryExport(bigQueryExport) + .setBigQueryExportId(bigQueryExportId) + .build(); + return createBigQueryExport(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a BigQuery export. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
+   *   BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build();
+   *   String bigQueryExportId = "bigQueryExportId1024198583";
+   *   BigQueryExport response =
+   *       securityCenterClient.createBigQueryExport(parent, bigQueryExport, bigQueryExportId);
+   * }
+   * }
+ * + * @param parent Required. The name of the parent resource of the new BigQuery export. Its format + * is "organizations/[organization_id]/locations/[location_id]", + * "folders/[folder_id]/locations/[location_id]", or + * "projects/[project_id]/locations/[location_id]". + * @param bigQueryExport Required. The BigQuery export being created. + * @param bigQueryExportId Required. Unique identifier provided by the client within the parent + * scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a + * letter, must end with either a letter or a number, and must be 63 characters or less. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BigQueryExport createBigQueryExport( + String parent, BigQueryExport bigQueryExport, String bigQueryExportId) { + CreateBigQueryExportRequest request = + CreateBigQueryExportRequest.newBuilder() + .setParent(parent) + .setBigQueryExport(bigQueryExport) + .setBigQueryExportId(bigQueryExportId) + .build(); + return createBigQueryExport(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a BigQuery export. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   CreateBigQueryExportRequest request =
+   *       CreateBigQueryExportRequest.newBuilder()
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .setBigQueryExport(BigQueryExport.newBuilder().build())
+   *           .setBigQueryExportId("bigQueryExportId1024198583")
+   *           .build();
+   *   BigQueryExport response = securityCenterClient.createBigQueryExport(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 BigQueryExport createBigQueryExport(CreateBigQueryExportRequest request) { + return createBigQueryExportCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a BigQuery export. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   CreateBigQueryExportRequest request =
+   *       CreateBigQueryExportRequest.newBuilder()
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .setBigQueryExport(BigQueryExport.newBuilder().build())
+   *           .setBigQueryExportId("bigQueryExportId1024198583")
+   *           .build();
+   *   ApiFuture future =
+   *       securityCenterClient.createBigQueryExportCallable().futureCall(request);
+   *   // Do something.
+   *   BigQueryExport response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createBigQueryExportCallable() { + return stub.createBigQueryExportCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a finding in a location. The corresponding source must exist for finding creation to + * succeed. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   SourceName parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]");
+   *   Finding finding = Finding.newBuilder().build();
+   *   String findingId = "findingId439150212";
+   *   Finding response = securityCenterClient.createFinding(parent, finding, findingId);
+   * }
+   * }
+ * + * @param parent Required. Resource name of the new finding's parent. The following list shows + * some examples of the format: + `organizations/[organization_id]/sources/[source_id]` + + * `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` + * @param finding Required. The Finding being created. The name and security_marks will be ignored + * as they are both output only fields on this resource. + * @param findingId Required. Unique identifier provided by the client within the parent scope. It + * must be alphanumeric and less than or equal to 32 characters and greater than 0 characters + * in length. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Finding createFinding(SourceName parent, Finding finding, String findingId) { + CreateFindingRequest request = + CreateFindingRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setFinding(finding) + .setFindingId(findingId) + .build(); + return createFinding(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a finding in a location. The corresponding source must exist for finding creation to + * succeed. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   String parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString();
+   *   Finding finding = Finding.newBuilder().build();
+   *   String findingId = "findingId439150212";
+   *   Finding response = securityCenterClient.createFinding(parent, finding, findingId);
+   * }
+   * }
+ * + * @param parent Required. Resource name of the new finding's parent. The following list shows + * some examples of the format: + `organizations/[organization_id]/sources/[source_id]` + + * `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` + * @param finding Required. The Finding being created. The name and security_marks will be ignored + * as they are both output only fields on this resource. + * @param findingId Required. Unique identifier provided by the client within the parent scope. It + * must be alphanumeric and less than or equal to 32 characters and greater than 0 characters + * in length. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Finding createFinding(String parent, Finding finding, String findingId) { + CreateFindingRequest request = + CreateFindingRequest.newBuilder() + .setParent(parent) + .setFinding(finding) + .setFindingId(findingId) + .build(); + return createFinding(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a finding in a location. The corresponding source must exist for finding creation to + * succeed. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   CreateFindingRequest request =
+   *       CreateFindingRequest.newBuilder()
+   *           .setParent(
+   *               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
+   *           .setFindingId("findingId439150212")
+   *           .setFinding(Finding.newBuilder().build())
+   *           .build();
+   *   Finding response = securityCenterClient.createFinding(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 createFinding(CreateFindingRequest request) { + return createFindingCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a finding in a location. The corresponding source must exist for finding creation to + * succeed. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   CreateFindingRequest request =
+   *       CreateFindingRequest.newBuilder()
+   *           .setParent(
+   *               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
+   *           .setFindingId("findingId439150212")
+   *           .setFinding(Finding.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = securityCenterClient.createFindingCallable().futureCall(request);
+   *   // Do something.
+   *   Finding response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createFindingCallable() { + return stub.createFindingCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a mute config. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]");
+   *   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]/locations/[location_id]", + * "folders/[folder_id]/locations/[location_id]", or + * "projects/[project_id]/locations/[location_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 only lowercase letters, numbers, and hyphens, must start with a letter, + * must end with either a letter or a number, and must be 63 characters or less. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final MuteConfig createMuteConfig( + FolderLocationName 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
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * 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]/locations/[location_id]", + * "folders/[folder_id]/locations/[location_id]", or + * "projects/[project_id]/locations/[location_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 only lowercase letters, numbers, and hyphens, must start with a letter, + * must end with either a letter or a number, and must be 63 characters or less. + * @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
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   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]/locations/[location_id]", + * "folders/[folder_id]/locations/[location_id]", or + * "projects/[project_id]/locations/[location_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 only lowercase letters, numbers, and hyphens, must start with a letter, + * must end with either a letter or a number, and must be 63 characters or less. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final MuteConfig createMuteConfig( + LocationName 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
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+   *   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]/locations/[location_id]", + * "folders/[folder_id]/locations/[location_id]", or + * "projects/[project_id]/locations/[location_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 only lowercase letters, numbers, and hyphens, must start with a letter, + * must end with either a letter or a number, and must be 63 characters or less. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final MuteConfig createMuteConfig( + OrganizationLocationName 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
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * 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]/locations/[location_id]", + * "folders/[folder_id]/locations/[location_id]", or + * "projects/[project_id]/locations/[location_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 only lowercase letters, numbers, and hyphens, must start with a letter, + * must end with either a letter or a number, and must be 63 characters or less. + * @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
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * 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]/locations/[location_id]", + * "folders/[folder_id]/locations/[location_id]", or + * "projects/[project_id]/locations/[location_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 only lowercase letters, numbers, and hyphens, must start with a letter, + * must end with either a letter or a number, and must be 63 characters or less. + * @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
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * 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]/locations/[location_id]", + * "folders/[folder_id]/locations/[location_id]", or + * "projects/[project_id]/locations/[location_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 only lowercase letters, numbers, and hyphens, must start with a letter, + * must end with either a letter or a number, and must be 63 characters or less. + * @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
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * 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
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * 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. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]");
+   *   NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
+   *   String configId = "configId-580140035";
+   *   NotificationConfig response =
+   *       securityCenterClient.createNotificationConfig(parent, notificationConfig, configId);
+   * }
+   * }
+ * + * @param parent Required. Resource name of the new notification config's parent. Its format is + * "organizations/[organization_id]/locations/[location_id]", + * "folders/[folder_id]/locations/[location_id]", or + * "projects/[project_id]/locations/[location_id]". + * @param notificationConfig Required. The notification config being created. The name and the + * service account will be ignored as they are both output only fields on this resource. + * @param configId Required. Unique identifier provided by the client within the parent scope. It + * must be between 1 and 128 characters and contain alphanumeric characters, underscores, or + * hyphens only. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NotificationConfig createNotificationConfig( + FolderLocationName parent, NotificationConfig notificationConfig, String configId) { + CreateNotificationConfigRequest request = + CreateNotificationConfigRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setNotificationConfig(notificationConfig) + .setConfigId(configId) + .build(); + return createNotificationConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a notification config. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
+   *   String configId = "configId-580140035";
+   *   NotificationConfig response =
+   *       securityCenterClient.createNotificationConfig(parent, notificationConfig, configId);
+   * }
+   * }
+ * + * @param parent Required. Resource name of the new notification config's parent. Its format is + * "organizations/[organization_id]/locations/[location_id]", + * "folders/[folder_id]/locations/[location_id]", or + * "projects/[project_id]/locations/[location_id]". + * @param notificationConfig Required. The notification config being created. The name and the + * service account will be ignored as they are both output only fields on this resource. + * @param configId Required. Unique identifier provided by the client within the parent scope. It + * must be between 1 and 128 characters and contain alphanumeric characters, underscores, or + * hyphens only. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NotificationConfig createNotificationConfig( + LocationName parent, NotificationConfig notificationConfig, String configId) { + CreateNotificationConfigRequest request = + CreateNotificationConfigRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setNotificationConfig(notificationConfig) + .setConfigId(configId) + .build(); + return createNotificationConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a notification config. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+   *   NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
+   *   String configId = "configId-580140035";
+   *   NotificationConfig response =
+   *       securityCenterClient.createNotificationConfig(parent, notificationConfig, configId);
+   * }
+   * }
+ * + * @param parent Required. Resource name of the new notification config's parent. Its format is + * "organizations/[organization_id]/locations/[location_id]", + * "folders/[folder_id]/locations/[location_id]", or + * "projects/[project_id]/locations/[location_id]". + * @param notificationConfig Required. The notification config being created. The name and the + * service account will be ignored as they are both output only fields on this resource. + * @param configId Required. Unique identifier provided by the client within the parent scope. It + * must be between 1 and 128 characters and contain alphanumeric characters, underscores, or + * hyphens only. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NotificationConfig createNotificationConfig( + OrganizationLocationName parent, NotificationConfig notificationConfig, String configId) { + CreateNotificationConfigRequest request = + CreateNotificationConfigRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setNotificationConfig(notificationConfig) + .setConfigId(configId) + .build(); + return createNotificationConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a notification config. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
+   *   NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
+   *   String configId = "configId-580140035";
+   *   NotificationConfig response =
+   *       securityCenterClient.createNotificationConfig(parent, notificationConfig, configId);
+   * }
+   * }
+ * + * @param parent Required. Resource name of the new notification config's parent. Its format is + * "organizations/[organization_id]/locations/[location_id]", + * "folders/[folder_id]/locations/[location_id]", or + * "projects/[project_id]/locations/[location_id]". + * @param notificationConfig Required. The notification config being created. The name and the + * service account will be ignored as they are both output only fields on this resource. + * @param configId Required. Unique identifier provided by the client within the parent scope. It + * must be between 1 and 128 characters and contain alphanumeric characters, underscores, or + * hyphens only. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NotificationConfig createNotificationConfig( + String parent, NotificationConfig notificationConfig, String configId) { + CreateNotificationConfigRequest request = + CreateNotificationConfigRequest.newBuilder() + .setParent(parent) + .setNotificationConfig(notificationConfig) + .setConfigId(configId) + .build(); + return createNotificationConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a notification config. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   CreateNotificationConfigRequest request =
+   *       CreateNotificationConfigRequest.newBuilder()
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").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
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   CreateNotificationConfigRequest request =
+   *       CreateNotificationConfigRequest.newBuilder()
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").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. + /** + * Creates a source. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+   *   Source source = Source.newBuilder().build();
+   *   Source response = securityCenterClient.createSource(parent, source);
+   * }
+   * }
+ * + * @param parent Required. Resource name of the new source's parent. Its format should be + * "organizations/[organization_id]". + * @param source Required. The Source being created, only the display_name and description will be + * used. All other fields will be ignored. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Source createSource(OrganizationName parent, Source source) { + CreateSourceRequest request = + CreateSourceRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setSource(source) + .build(); + return createSource(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a source. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
+   *   Source source = Source.newBuilder().build();
+   *   Source response = securityCenterClient.createSource(parent, source);
+   * }
+   * }
+ * + * @param parent Required. Resource name of the new source's parent. Its format should be + * "organizations/[organization_id]". + * @param source Required. The Source being created, only the display_name and description will be + * used. All other fields will be ignored. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Source createSource(String parent, Source source) { + CreateSourceRequest request = + CreateSourceRequest.newBuilder().setParent(parent).setSource(source).build(); + return createSource(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a source. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   CreateSourceRequest request =
+   *       CreateSourceRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setSource(Source.newBuilder().build())
+   *           .build();
+   *   Source response = securityCenterClient.createSource(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 Source createSource(CreateSourceRequest request) { + return createSourceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a source. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   CreateSourceRequest request =
+   *       CreateSourceRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setSource(Source.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = securityCenterClient.createSourceCallable().futureCall(request);
+   *   // Do something.
+   *   Source response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createSourceCallable() { + return stub.createSourceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an existing BigQuery export. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   BigQueryExportName name =
+   *       BigQueryExportName.ofOrganizationLocationExportName(
+   *           "[ORGANIZATION]", "[LOCATION]", "[EXPORT]");
+   *   securityCenterClient.deleteBigQueryExport(name);
+   * }
+   * }
+ * + * @param name Required. The name of the BigQuery export to delete. The following list shows some + * examples of the format: + *

+ `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}` + + * `folders/{folder}/locations/{location}/bigQueryExports/{export_id}` + + * `projects/{project}/locations/{location}/bigQueryExports/{export_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteBigQueryExport(BigQueryExportName name) { + DeleteBigQueryExportRequest request = + DeleteBigQueryExportRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteBigQueryExport(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an existing BigQuery export. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   String name =
+   *       BigQueryExportName.ofOrganizationLocationExportName(
+   *               "[ORGANIZATION]", "[LOCATION]", "[EXPORT]")
+   *           .toString();
+   *   securityCenterClient.deleteBigQueryExport(name);
+   * }
+   * }
+ * + * @param name Required. The name of the BigQuery export to delete. The following list shows some + * examples of the format: + *

+ `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}` + + * `folders/{folder}/locations/{location}/bigQueryExports/{export_id}` + + * `projects/{project}/locations/{location}/bigQueryExports/{export_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteBigQueryExport(String name) { + DeleteBigQueryExportRequest request = + DeleteBigQueryExportRequest.newBuilder().setName(name).build(); + deleteBigQueryExport(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an existing BigQuery export. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   DeleteBigQueryExportRequest request =
+   *       DeleteBigQueryExportRequest.newBuilder()
+   *           .setName(
+   *               BigQueryExportName.ofOrganizationLocationExportName(
+   *                       "[ORGANIZATION]", "[LOCATION]", "[EXPORT]")
+   *                   .toString())
+   *           .build();
+   *   securityCenterClient.deleteBigQueryExport(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 void deleteBigQueryExport(DeleteBigQueryExportRequest request) { + deleteBigQueryExportCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an existing BigQuery export. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   DeleteBigQueryExportRequest request =
+   *       DeleteBigQueryExportRequest.newBuilder()
+   *           .setName(
+   *               BigQueryExportName.ofOrganizationLocationExportName(
+   *                       "[ORGANIZATION]", "[LOCATION]", "[EXPORT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       securityCenterClient.deleteBigQueryExportCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteBigQueryExportCallable() { + return stub.deleteBigQueryExportCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an existing mute config. If no location is specified, default is global. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * 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. The following list shows some examples + * of the format: + *

+ `organizations/{organization}/muteConfigs/{config_id}` + + * `organizations/{organization}/locations/{location}/muteConfigs/{config_id}` + + * `folders/{folder}/muteConfigs/{config_id}` + + * `folders/{folder}/locations/{location}/muteConfigs/{config_id}` + + * `projects/{project}/muteConfigs/{config_id}` + + * `projects/{project}/locations/{location}/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. If no location is specified, default is global. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * 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. The following list shows some examples + * of the format: + *

+ `organizations/{organization}/muteConfigs/{config_id}` + + * `organizations/{organization}/locations/{location}/muteConfigs/{config_id}` + + * `folders/{folder}/muteConfigs/{config_id}` + + * `folders/{folder}/locations/{location}/muteConfigs/{config_id}` + + * `projects/{project}/muteConfigs/{config_id}` + + * `projects/{project}/locations/{location}/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. If no location is specified, default is global. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   DeleteMuteConfigRequest request =
+   *       DeleteMuteConfigRequest.newBuilder()
+   *           .setName(
+   *               MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]")
+   *                   .toString())
+   *           .build();
+   *   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 void deleteMuteConfig(DeleteMuteConfigRequest request) { + deleteMuteConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an existing mute config. If no location is specified, default is global. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   DeleteMuteConfigRequest request =
+   *       DeleteMuteConfigRequest.newBuilder()
+   *           .setName(
+   *               MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = securityCenterClient.deleteMuteConfigCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteMuteConfigCallable() { + return stub.deleteMuteConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a notification config. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   NotificationConfigName name =
+   *       NotificationConfigName.ofOrganizationLocationNotificationConfigName(
+   *           "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]");
+   *   securityCenterClient.deleteNotificationConfig(name);
+   * }
+   * }
+ * + * @param name Required. Name of the notification config to delete. The following list shows some + * examples of the format: + *

+ + * `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]` + + * `folders/[folder_id]/locations/[location_id]notificationConfigs/[config_id]` + + * `projects/[project_id]/locations/[location_id]notificationConfigs/[config_id]` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteNotificationConfig(NotificationConfigName name) { + DeleteNotificationConfigRequest request = + DeleteNotificationConfigRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteNotificationConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a notification config. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   String name =
+   *       NotificationConfigName.ofOrganizationLocationNotificationConfigName(
+   *               "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]")
+   *           .toString();
+   *   securityCenterClient.deleteNotificationConfig(name);
+   * }
+   * }
+ * + * @param name Required. Name of the notification config to delete. The following list shows some + * examples of the format: + *

+ + * `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]` + + * `folders/[folder_id]/locations/[location_id]notificationConfigs/[config_id]` + + * `projects/[project_id]/locations/[location_id]notificationConfigs/[config_id]` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteNotificationConfig(String name) { + DeleteNotificationConfigRequest request = + DeleteNotificationConfigRequest.newBuilder().setName(name).build(); + deleteNotificationConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a notification config. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   DeleteNotificationConfigRequest request =
+   *       DeleteNotificationConfigRequest.newBuilder()
+   *           .setName(
+   *               NotificationConfigName.ofOrganizationLocationNotificationConfigName(
+   *                       "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]")
+   *                   .toString())
+   *           .build();
+   *   securityCenterClient.deleteNotificationConfig(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 void deleteNotificationConfig(DeleteNotificationConfigRequest request) { + deleteNotificationConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a notification config. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   DeleteNotificationConfigRequest request =
+   *       DeleteNotificationConfigRequest.newBuilder()
+   *           .setName(
+   *               NotificationConfigName.ofOrganizationLocationNotificationConfigName(
+   *                       "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       securityCenterClient.deleteNotificationConfigCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteNotificationConfigCallable() { + return stub.deleteNotificationConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a ResourceValueConfig. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ResourceValueConfigName name =
+   *       ResourceValueConfigName.of("[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]");
+   *   securityCenterClient.deleteResourceValueConfig(name);
+   * }
+   * }
+ * + * @param name Required. Name of the ResourceValueConfig to delete + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteResourceValueConfig(ResourceValueConfigName name) { + DeleteResourceValueConfigRequest request = + DeleteResourceValueConfigRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteResourceValueConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a ResourceValueConfig. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   String name =
+   *       ResourceValueConfigName.of("[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]").toString();
+   *   securityCenterClient.deleteResourceValueConfig(name);
+   * }
+   * }
+ * + * @param name Required. Name of the ResourceValueConfig to delete + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteResourceValueConfig(String name) { + DeleteResourceValueConfigRequest request = + DeleteResourceValueConfigRequest.newBuilder().setName(name).build(); + deleteResourceValueConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a ResourceValueConfig. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   DeleteResourceValueConfigRequest request =
+   *       DeleteResourceValueConfigRequest.newBuilder()
+   *           .setName(
+   *               ResourceValueConfigName.of("[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]")
+   *                   .toString())
+   *           .build();
+   *   securityCenterClient.deleteResourceValueConfig(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 void deleteResourceValueConfig(DeleteResourceValueConfigRequest request) { + deleteResourceValueConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a ResourceValueConfig. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   DeleteResourceValueConfigRequest request =
+   *       DeleteResourceValueConfigRequest.newBuilder()
+   *           .setName(
+   *               ResourceValueConfigName.of("[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       securityCenterClient.deleteResourceValueConfigCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteResourceValueConfigCallable() { + return stub.deleteResourceValueConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a BigQuery export. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   BigQueryExportName name =
+   *       BigQueryExportName.ofOrganizationLocationExportName(
+   *           "[ORGANIZATION]", "[LOCATION]", "[EXPORT]");
+   *   BigQueryExport response = securityCenterClient.getBigQueryExport(name);
+   * }
+   * }
+ * + * @param name Required. Name of the BigQuery export to retrieve. The following list shows some + * examples of the format: + *

+ `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}` + + * `folders/{folder}/locations/{location}/bigQueryExports/{export_id}` + + * `projects/{project}locations/{location}//bigQueryExports/{export_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BigQueryExport getBigQueryExport(BigQueryExportName name) { + GetBigQueryExportRequest request = + GetBigQueryExportRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getBigQueryExport(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a BigQuery export. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   String name =
+   *       BigQueryExportName.ofOrganizationLocationExportName(
+   *               "[ORGANIZATION]", "[LOCATION]", "[EXPORT]")
+   *           .toString();
+   *   BigQueryExport response = securityCenterClient.getBigQueryExport(name);
+   * }
+   * }
+ * + * @param name Required. Name of the BigQuery export to retrieve. The following list shows some + * examples of the format: + *

+ `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}` + + * `folders/{folder}/locations/{location}/bigQueryExports/{export_id}` + + * `projects/{project}locations/{location}//bigQueryExports/{export_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BigQueryExport getBigQueryExport(String name) { + GetBigQueryExportRequest request = GetBigQueryExportRequest.newBuilder().setName(name).build(); + return getBigQueryExport(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a BigQuery export. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   GetBigQueryExportRequest request =
+   *       GetBigQueryExportRequest.newBuilder()
+   *           .setName(
+   *               BigQueryExportName.ofOrganizationLocationExportName(
+   *                       "[ORGANIZATION]", "[LOCATION]", "[EXPORT]")
+   *                   .toString())
+   *           .build();
+   *   BigQueryExport response = securityCenterClient.getBigQueryExport(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 BigQueryExport getBigQueryExport(GetBigQueryExportRequest request) { + return getBigQueryExportCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a BigQuery export. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   GetBigQueryExportRequest request =
+   *       GetBigQueryExportRequest.newBuilder()
+   *           .setName(
+   *               BigQueryExportName.ofOrganizationLocationExportName(
+   *                       "[ORGANIZATION]", "[LOCATION]", "[EXPORT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       securityCenterClient.getBigQueryExportCallable().futureCall(request);
+   *   // Do something.
+   *   BigQueryExport response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getBigQueryExportCallable() { + return stub.getBigQueryExportCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the simulation by name or the latest simulation for the given organization. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   SimulationName name = SimulationName.of("[ORGANIZATION]", "[SIMULATION]");
+   *   Simulation response = securityCenterClient.getSimulation(name);
+   * }
+   * }
+ * + * @param name Required. The organization name or simulation name of this simulation + *

Valid format: "organizations/{organization}/simulations/latest" + * "organizations/{organization}/simulations/{simulation}" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Simulation getSimulation(SimulationName name) { + GetSimulationRequest request = + GetSimulationRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getSimulation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the simulation by name or the latest simulation for the given organization. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   String name = SimulationName.of("[ORGANIZATION]", "[SIMULATION]").toString();
+   *   Simulation response = securityCenterClient.getSimulation(name);
+   * }
+   * }
+ * + * @param name Required. The organization name or simulation name of this simulation + *

Valid format: "organizations/{organization}/simulations/latest" + * "organizations/{organization}/simulations/{simulation}" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Simulation getSimulation(String name) { + GetSimulationRequest request = GetSimulationRequest.newBuilder().setName(name).build(); + return getSimulation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the simulation by name or the latest simulation for the given organization. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   GetSimulationRequest request =
+   *       GetSimulationRequest.newBuilder()
+   *           .setName(SimulationName.of("[ORGANIZATION]", "[SIMULATION]").toString())
+   *           .build();
+   *   Simulation response = securityCenterClient.getSimulation(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 Simulation getSimulation(GetSimulationRequest request) { + return getSimulationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the simulation by name or the latest simulation for the given organization. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   GetSimulationRequest request =
+   *       GetSimulationRequest.newBuilder()
+   *           .setName(SimulationName.of("[ORGANIZATION]", "[SIMULATION]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       securityCenterClient.getSimulationCallable().futureCall(request);
+   *   // Do something.
+   *   Simulation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getSimulationCallable() { + return stub.getSimulationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the valued resource by name + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ValuedResourceName name =
+   *       ValuedResourceName.of("[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]");
+   *   ValuedResource response = securityCenterClient.getValuedResource(name);
+   * }
+   * }
+ * + * @param name Required. The name of this valued resource + *

Valid format: + * "organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ValuedResource getValuedResource(ValuedResourceName name) { + GetValuedResourceRequest request = + GetValuedResourceRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getValuedResource(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the valued resource by name + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   String name =
+   *       ValuedResourceName.of("[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]").toString();
+   *   ValuedResource response = securityCenterClient.getValuedResource(name);
+   * }
+   * }
+ * + * @param name Required. The name of this valued resource + *

Valid format: + * "organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ValuedResource getValuedResource(String name) { + GetValuedResourceRequest request = GetValuedResourceRequest.newBuilder().setName(name).build(); + return getValuedResource(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the valued resource by name + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   GetValuedResourceRequest request =
+   *       GetValuedResourceRequest.newBuilder()
+   *           .setName(
+   *               ValuedResourceName.of("[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]")
+   *                   .toString())
+   *           .build();
+   *   ValuedResource response = securityCenterClient.getValuedResource(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 ValuedResource getValuedResource(GetValuedResourceRequest request) { + return getValuedResourceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the valued resource by name + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   GetValuedResourceRequest request =
+   *       GetValuedResourceRequest.newBuilder()
+   *           .setName(
+   *               ValuedResourceName.of("[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       securityCenterClient.getValuedResourceCallable().futureCall(request);
+   *   // Do something.
+   *   ValuedResource response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getValuedResourceCallable() { + return stub.getValuedResourceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy on the specified Source. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]");
+   *   Policy response = securityCenterClient.getIamPolicy(resource);
+   * }
+   * }
+ * + * @param resource REQUIRED: The resource for which the policy is being requested. See the + * operation documentation for the appropriate value for this field. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy getIamPolicy(ResourceName resource) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(resource == null ? null : resource.toString()) + .build(); + return getIamPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy on the specified Source. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   String resource = FolderName.of("[FOLDER]").toString();
+   *   Policy response = securityCenterClient.getIamPolicy(resource);
+   * }
+   * }
+ * + * @param resource REQUIRED: The resource for which the policy is being requested. See the + * operation documentation for the appropriate value for this field. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy getIamPolicy(String resource) { + GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder().setResource(resource).build(); + return getIamPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy on the specified Source. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   Policy response = securityCenterClient.getIamPolicy(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 Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy on the specified Source. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = securityCenterClient.getIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getIamPolicyCallable() { + return stub.getIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a mute config. If no location is specified, default is global. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * 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. The following list shows some + * examples of the format: + *

+ `organizations/{organization}/muteConfigs/{config_id}` + + * `organizations/{organization}/locations/{location}/muteConfigs/{config_id}` + + * `folders/{folder}/muteConfigs/{config_id}` + + * `folders/{folder}/locations/{location}/muteConfigs/{config_id}` + + * `projects/{project}/muteConfigs/{config_id}` + + * `projects/{project}/locations/{location}/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. If no location is specified, default is global. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * 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. The following list shows some + * examples of the format: + *

+ `organizations/{organization}/muteConfigs/{config_id}` + + * `organizations/{organization}/locations/{location}/muteConfigs/{config_id}` + + * `folders/{folder}/muteConfigs/{config_id}` + + * `folders/{folder}/locations/{location}/muteConfigs/{config_id}` + + * `projects/{project}/muteConfigs/{config_id}` + + * `projects/{project}/locations/{location}/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. If no location is specified, default is global. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * 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. If no location is specified, default is global. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * 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. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   NotificationConfigName name =
+   *       NotificationConfigName.ofOrganizationLocationNotificationConfigName(
+   *           "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]");
+   *   NotificationConfig response = securityCenterClient.getNotificationConfig(name);
+   * }
+   * }
+ * + * @param name Required. Name of the notification config to get. The following list shows some + * examples of the format: + *

+ + * `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]` + + * `folders/[folder_id]/locations/[location_id]/notificationConfigs/[config_id]` + + * `projects/[project_id]/locations/[location_id]/notificationConfigs/[config_id]` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NotificationConfig getNotificationConfig(NotificationConfigName name) { + GetNotificationConfigRequest request = + GetNotificationConfigRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getNotificationConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a notification config. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   String name =
+   *       NotificationConfigName.ofOrganizationLocationNotificationConfigName(
+   *               "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]")
+   *           .toString();
+   *   NotificationConfig response = securityCenterClient.getNotificationConfig(name);
+   * }
+   * }
+ * + * @param name Required. Name of the notification config to get. The following list shows some + * examples of the format: + *

+ + * `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]` + + * `folders/[folder_id]/locations/[location_id]/notificationConfigs/[config_id]` + + * `projects/[project_id]/locations/[location_id]/notificationConfigs/[config_id]` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NotificationConfig getNotificationConfig(String name) { + GetNotificationConfigRequest request = + GetNotificationConfigRequest.newBuilder().setName(name).build(); + return getNotificationConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a notification config. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   GetNotificationConfigRequest request =
+   *       GetNotificationConfigRequest.newBuilder()
+   *           .setName(
+   *               NotificationConfigName.ofOrganizationLocationNotificationConfigName(
+   *                       "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]")
+   *                   .toString())
+   *           .build();
+   *   NotificationConfig response = securityCenterClient.getNotificationConfig(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 getNotificationConfig(GetNotificationConfigRequest request) { + return getNotificationConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a notification config. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   GetNotificationConfigRequest request =
+   *       GetNotificationConfigRequest.newBuilder()
+   *           .setName(
+   *               NotificationConfigName.ofOrganizationLocationNotificationConfigName(
+   *                       "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       securityCenterClient.getNotificationConfigCallable().futureCall(request);
+   *   // Do something.
+   *   NotificationConfig response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getNotificationConfigCallable() { + return stub.getNotificationConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a ResourceValueConfig. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ResourceValueConfigName name =
+   *       ResourceValueConfigName.of("[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]");
+   *   ResourceValueConfig response = securityCenterClient.getResourceValueConfig(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource value config to retrieve. Its format is + * organizations/{organization}/resourceValueConfigs/{config_id}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ResourceValueConfig getResourceValueConfig(ResourceValueConfigName name) { + GetResourceValueConfigRequest request = + GetResourceValueConfigRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getResourceValueConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a ResourceValueConfig. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   String name =
+   *       ResourceValueConfigName.of("[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]").toString();
+   *   ResourceValueConfig response = securityCenterClient.getResourceValueConfig(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource value config to retrieve. Its format is + * organizations/{organization}/resourceValueConfigs/{config_id}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ResourceValueConfig getResourceValueConfig(String name) { + GetResourceValueConfigRequest request = + GetResourceValueConfigRequest.newBuilder().setName(name).build(); + return getResourceValueConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a ResourceValueConfig. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   GetResourceValueConfigRequest request =
+   *       GetResourceValueConfigRequest.newBuilder()
+   *           .setName(
+   *               ResourceValueConfigName.of("[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]")
+   *                   .toString())
+   *           .build();
+   *   ResourceValueConfig response = securityCenterClient.getResourceValueConfig(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 ResourceValueConfig getResourceValueConfig(GetResourceValueConfigRequest request) { + return getResourceValueConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a ResourceValueConfig. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   GetResourceValueConfigRequest request =
+   *       GetResourceValueConfigRequest.newBuilder()
+   *           .setName(
+   *               ResourceValueConfigName.of("[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       securityCenterClient.getResourceValueConfigCallable().futureCall(request);
+   *   // Do something.
+   *   ResourceValueConfig response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getResourceValueConfigCallable() { + return stub.getResourceValueConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a source. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   SourceName name = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]");
+   *   Source response = securityCenterClient.getSource(name);
+   * }
+   * }
+ * + * @param name Required. Relative resource name of the source. Its format is + * "organizations/[organization_id]/source/[source_id]". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Source getSource(SourceName name) { + GetSourceRequest request = + GetSourceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getSource(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a source. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   String name = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString();
+   *   Source response = securityCenterClient.getSource(name);
+   * }
+   * }
+ * + * @param name Required. Relative resource name of the source. Its format is + * "organizations/[organization_id]/source/[source_id]". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Source getSource(String name) { + GetSourceRequest request = GetSourceRequest.newBuilder().setName(name).build(); + return getSource(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a source. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   GetSourceRequest request =
+   *       GetSourceRequest.newBuilder()
+   *           .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
+   *           .build();
+   *   Source response = securityCenterClient.getSource(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 Source getSource(GetSourceRequest request) { + return getSourceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a source. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   GetSourceRequest request =
+   *       GetSourceRequest.newBuilder()
+   *           .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
+   *           .build();
+   *   ApiFuture future = securityCenterClient.getSourceCallable().futureCall(request);
+   *   // Do something.
+   *   Source response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getSourceCallable() { + return stub.getSourceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Filters an organization or source's findings and groups them by their specified properties in a + * location. If no location is specified, findings are assumed to be in global + * + *

To group across all sources provide a `-` as the source id. The following list shows some + * examples: + * + *

+ `/v2/organizations/{organization_id}/sources/-/findings` + + * `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` + + * `/v2/folders/{folder_id}/sources/-/findings` + + * `/v2/folders/{folder_id}/sources/-/locations/{location_id}/findings` + + * `/v2/projects/{project_id}/sources/-/findings` + + * `/v2/projects/{project_id}/sources/-/locations/{location_id}/findings` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   SourceName parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]");
+   *   String groupBy = "groupBy293428022";
+   *   for (GroupResult element : securityCenterClient.groupFindings(parent, groupBy).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Name of the source to groupBy. If no location is specified, finding is + * assumed to be in global. The following list shows some examples: + *

+ `organizations/[organization_id]/sources/[source_id]` + + * `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` + + * `folders/[folder_id]/sources/[source_id]` + + * `folders/[folder_id]/sources/[source_id]/locations/[location_id]` + + * `projects/[project_id]/sources/[source_id]` + + * `projects/[project_id]/sources/[source_id]/locations/[location_id]` + *

To groupBy across all sources provide a source_id of `-`. The following list shows some + * examples: + *

+ `organizations/{organization_id}/sources/-` + + * `organizations/{organization_id}/sources/-/locations/[location_id]` + + * `folders/{folder_id}/sources/-` + `folders/{folder_id}/sources/-/locations/[location_id]` + + * `projects/{project_id}/sources/-` + + * `projects/{project_id}/sources/-/locations/[location_id]` + * @param groupBy Required. Expression that defines what assets fields to use for grouping. The + * string value should follow SQL syntax: comma separated list of fields. For example: + * "parent,resource_name". + *

The following fields are supported: + *

    + *
  • resource_name + *
  • category + *
  • state + *
  • parent + *
  • severity + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final GroupFindingsPagedResponse groupFindings(SourceName parent, String groupBy) { + GroupFindingsRequest request = + GroupFindingsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setGroupBy(groupBy) + .build(); + return groupFindings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Filters an organization or source's findings and groups them by their specified properties in a + * location. If no location is specified, findings are assumed to be in global + * + *

To group across all sources provide a `-` as the source id. The following list shows some + * examples: + * + *

+ `/v2/organizations/{organization_id}/sources/-/findings` + + * `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` + + * `/v2/folders/{folder_id}/sources/-/findings` + + * `/v2/folders/{folder_id}/sources/-/locations/{location_id}/findings` + + * `/v2/projects/{project_id}/sources/-/findings` + + * `/v2/projects/{project_id}/sources/-/locations/{location_id}/findings` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   String parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString();
+   *   String groupBy = "groupBy293428022";
+   *   for (GroupResult element : securityCenterClient.groupFindings(parent, groupBy).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Name of the source to groupBy. If no location is specified, finding is + * assumed to be in global. The following list shows some examples: + *

+ `organizations/[organization_id]/sources/[source_id]` + + * `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` + + * `folders/[folder_id]/sources/[source_id]` + + * `folders/[folder_id]/sources/[source_id]/locations/[location_id]` + + * `projects/[project_id]/sources/[source_id]` + + * `projects/[project_id]/sources/[source_id]/locations/[location_id]` + *

To groupBy across all sources provide a source_id of `-`. The following list shows some + * examples: + *

+ `organizations/{organization_id}/sources/-` + + * `organizations/{organization_id}/sources/-/locations/[location_id]` + + * `folders/{folder_id}/sources/-` + `folders/{folder_id}/sources/-/locations/[location_id]` + + * `projects/{project_id}/sources/-` + + * `projects/{project_id}/sources/-/locations/[location_id]` + * @param groupBy Required. Expression that defines what assets fields to use for grouping. The + * string value should follow SQL syntax: comma separated list of fields. For example: + * "parent,resource_name". + *

The following fields are supported: + *

    + *
  • resource_name + *
  • category + *
  • state + *
  • parent + *
  • severity + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final GroupFindingsPagedResponse groupFindings(String parent, String groupBy) { + GroupFindingsRequest request = + GroupFindingsRequest.newBuilder().setParent(parent).setGroupBy(groupBy).build(); + return groupFindings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Filters an organization or source's findings and groups them by their specified properties in a + * location. If no location is specified, findings are assumed to be in global + * + *

To group across all sources provide a `-` as the source id. The following list shows some + * examples: + * + *

+ `/v2/organizations/{organization_id}/sources/-/findings` + + * `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` + + * `/v2/folders/{folder_id}/sources/-/findings` + + * `/v2/folders/{folder_id}/sources/-/locations/{location_id}/findings` + + * `/v2/projects/{project_id}/sources/-/findings` + + * `/v2/projects/{project_id}/sources/-/locations/{location_id}/findings` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   GroupFindingsRequest request =
+   *       GroupFindingsRequest.newBuilder()
+   *           .setParent(
+   *               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setGroupBy("groupBy293428022")
+   *           .setPageToken("pageToken873572522")
+   *           .setPageSize(883849137)
+   *           .build();
+   *   for (GroupResult element : securityCenterClient.groupFindings(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 GroupFindingsPagedResponse groupFindings(GroupFindingsRequest request) { + return groupFindingsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Filters an organization or source's findings and groups them by their specified properties in a + * location. If no location is specified, findings are assumed to be in global + * + *

To group across all sources provide a `-` as the source id. The following list shows some + * examples: + * + *

+ `/v2/organizations/{organization_id}/sources/-/findings` + + * `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` + + * `/v2/folders/{folder_id}/sources/-/findings` + + * `/v2/folders/{folder_id}/sources/-/locations/{location_id}/findings` + + * `/v2/projects/{project_id}/sources/-/findings` + + * `/v2/projects/{project_id}/sources/-/locations/{location_id}/findings` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   GroupFindingsRequest request =
+   *       GroupFindingsRequest.newBuilder()
+   *           .setParent(
+   *               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setGroupBy("groupBy293428022")
+   *           .setPageToken("pageToken873572522")
+   *           .setPageSize(883849137)
+   *           .build();
+   *   ApiFuture future =
+   *       securityCenterClient.groupFindingsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (GroupResult element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + groupFindingsPagedCallable() { + return stub.groupFindingsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Filters an organization or source's findings and groups them by their specified properties in a + * location. If no location is specified, findings are assumed to be in global + * + *

To group across all sources provide a `-` as the source id. The following list shows some + * examples: + * + *

+ `/v2/organizations/{organization_id}/sources/-/findings` + + * `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` + + * `/v2/folders/{folder_id}/sources/-/findings` + + * `/v2/folders/{folder_id}/sources/-/locations/{location_id}/findings` + + * `/v2/projects/{project_id}/sources/-/findings` + + * `/v2/projects/{project_id}/sources/-/locations/{location_id}/findings` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   GroupFindingsRequest request =
+   *       GroupFindingsRequest.newBuilder()
+   *           .setParent(
+   *               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setGroupBy("groupBy293428022")
+   *           .setPageToken("pageToken873572522")
+   *           .setPageSize(883849137)
+   *           .build();
+   *   while (true) {
+   *     GroupFindingsResponse response = securityCenterClient.groupFindingsCallable().call(request);
+   *     for (GroupResult element : response.getGroupByResultsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable groupFindingsCallable() { + return stub.groupFindingsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the attack paths for a set of simulation results or valued resources and filter. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ValuedResourceName parent =
+   *       ValuedResourceName.of("[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]");
+   *   for (AttackPath element : securityCenterClient.listAttackPaths(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Name of parent to list attack paths. + *

Valid formats: "organizations/{organization}", + * "organizations/{organization}/simulations/{simulation}" + * "organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}" + * "organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAttackPathsPagedResponse listAttackPaths(ValuedResourceName parent) { + ListAttackPathsRequest request = + ListAttackPathsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listAttackPaths(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the attack paths for a set of simulation results or valued resources and filter. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   String parent =
+   *       ValuedResourceName.of("[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]").toString();
+   *   for (AttackPath element : securityCenterClient.listAttackPaths(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Name of parent to list attack paths. + *

Valid formats: "organizations/{organization}", + * "organizations/{organization}/simulations/{simulation}" + * "organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}" + * "organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAttackPathsPagedResponse listAttackPaths(String parent) { + ListAttackPathsRequest request = ListAttackPathsRequest.newBuilder().setParent(parent).build(); + return listAttackPaths(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the attack paths for a set of simulation results or valued resources and filter. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ListAttackPathsRequest request =
+   *       ListAttackPathsRequest.newBuilder()
+   *           .setParent(
+   *               ValuedResourceName.of("[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]")
+   *                   .toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageToken("pageToken873572522")
+   *           .setPageSize(883849137)
+   *           .build();
+   *   for (AttackPath element : securityCenterClient.listAttackPaths(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 ListAttackPathsPagedResponse listAttackPaths(ListAttackPathsRequest request) { + return listAttackPathsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the attack paths for a set of simulation results or valued resources and filter. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ListAttackPathsRequest request =
+   *       ListAttackPathsRequest.newBuilder()
+   *           .setParent(
+   *               ValuedResourceName.of("[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]")
+   *                   .toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageToken("pageToken873572522")
+   *           .setPageSize(883849137)
+   *           .build();
+   *   ApiFuture future =
+   *       securityCenterClient.listAttackPathsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (AttackPath element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAttackPathsPagedCallable() { + return stub.listAttackPathsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the attack paths for a set of simulation results or valued resources and filter. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ListAttackPathsRequest request =
+   *       ListAttackPathsRequest.newBuilder()
+   *           .setParent(
+   *               ValuedResourceName.of("[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]")
+   *                   .toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageToken("pageToken873572522")
+   *           .setPageSize(883849137)
+   *           .build();
+   *   while (true) {
+   *     ListAttackPathsResponse response =
+   *         securityCenterClient.listAttackPathsCallable().call(request);
+   *     for (AttackPath element : response.getAttackPathsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAttackPathsCallable() { + return stub.listAttackPathsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports + * under that level are also returned e.g. if requesting BigQuery exports under a folder, then all + * BigQuery exports immediately under the folder plus the ones created under the projects within + * the folder are returned. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]");
+   *   for (BigQueryExport element : securityCenterClient.listBigQueryExports(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns the collection of BigQuery exports. Its format + * is "organizations/[organization_id]/locations/[location_id]", + * "folders/[folder_id]/locations/[location_id]", or + * "projects/[project_id]/locations/[location_id]". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListBigQueryExportsPagedResponse listBigQueryExports(FolderLocationName parent) { + ListBigQueryExportsRequest request = + ListBigQueryExportsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listBigQueryExports(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports + * under that level are also returned e.g. if requesting BigQuery exports under a folder, then all + * BigQuery exports immediately under the folder plus the ones created under the projects within + * the folder are returned. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (BigQueryExport element : securityCenterClient.listBigQueryExports(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns the collection of BigQuery exports. Its format + * is "organizations/[organization_id]/locations/[location_id]", + * "folders/[folder_id]/locations/[location_id]", or + * "projects/[project_id]/locations/[location_id]". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListBigQueryExportsPagedResponse listBigQueryExports(LocationName parent) { + ListBigQueryExportsRequest request = + ListBigQueryExportsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listBigQueryExports(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports + * under that level are also returned e.g. if requesting BigQuery exports under a folder, then all + * BigQuery exports immediately under the folder plus the ones created under the projects within + * the folder are returned. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+   *   for (BigQueryExport element : securityCenterClient.listBigQueryExports(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns the collection of BigQuery exports. Its format + * is "organizations/[organization_id]/locations/[location_id]", + * "folders/[folder_id]/locations/[location_id]", or + * "projects/[project_id]/locations/[location_id]". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListBigQueryExportsPagedResponse listBigQueryExports( + OrganizationLocationName parent) { + ListBigQueryExportsRequest request = + ListBigQueryExportsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listBigQueryExports(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports + * under that level are also returned e.g. if requesting BigQuery exports under a folder, then all + * BigQuery exports immediately under the folder plus the ones created under the projects within + * the folder are returned. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
+   *   for (BigQueryExport element : securityCenterClient.listBigQueryExports(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns the collection of BigQuery exports. Its format + * is "organizations/[organization_id]/locations/[location_id]", + * "folders/[folder_id]/locations/[location_id]", or + * "projects/[project_id]/locations/[location_id]". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListBigQueryExportsPagedResponse listBigQueryExports(String parent) { + ListBigQueryExportsRequest request = + ListBigQueryExportsRequest.newBuilder().setParent(parent).build(); + return listBigQueryExports(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports + * under that level are also returned e.g. if requesting BigQuery exports under a folder, then all + * BigQuery exports immediately under the folder plus the ones created under the projects within + * the folder are returned. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ListBigQueryExportsRequest request =
+   *       ListBigQueryExportsRequest.newBuilder()
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (BigQueryExport element :
+   *       securityCenterClient.listBigQueryExports(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 ListBigQueryExportsPagedResponse listBigQueryExports( + ListBigQueryExportsRequest request) { + return listBigQueryExportsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports + * under that level are also returned e.g. if requesting BigQuery exports under a folder, then all + * BigQuery exports immediately under the folder plus the ones created under the projects within + * the folder are returned. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ListBigQueryExportsRequest request =
+   *       ListBigQueryExportsRequest.newBuilder()
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       securityCenterClient.listBigQueryExportsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (BigQueryExport element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listBigQueryExportsPagedCallable() { + return stub.listBigQueryExportsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports + * under that level are also returned e.g. if requesting BigQuery exports under a folder, then all + * BigQuery exports immediately under the folder plus the ones created under the projects within + * the folder are returned. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ListBigQueryExportsRequest request =
+   *       ListBigQueryExportsRequest.newBuilder()
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListBigQueryExportsResponse response =
+   *         securityCenterClient.listBigQueryExportsCallable().call(request);
+   *     for (BigQueryExport element : response.getBigQueryExportsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listBigQueryExportsCallable() { + return stub.listBigQueryExportsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists an organization or source's findings. + * + *

To list across all sources for a given location provide a `-` as the source id. If no + * location is specified, finding are assumed to be in global. The following list shows some + * examples: + * + *

+ `/v2/organizations/{organization_id}/sources/-/findings` + + * `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   SourceName parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]");
+   *   for (ListFindingsResponse.ListFindingsResult element :
+   *       securityCenterClient.listFindings(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Name of the source the findings belong to. If no location is specified, + * the default is global. The following list shows some examples: + *

+ `organizations/[organization_id]/sources/[source_id]` + + * `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` + + * `folders/[folder_id]/sources/[source_id]` + + * `folders/[folder_id]/sources/[source_id]/locations/[location_id]` + + * `projects/[project_id]/sources/[source_id]` + + * `projects/[project_id]/sources/[source_id]/locations/[location_id]` + *

To list across all sources provide a source_id of `-`. The following list shows some + * examples: + *

+ `organizations/{organization_id}/sources/-` + + * `organizations/{organization_id}/sources/-/locations/{location_id}` + + * `folders/{folder_id}/sources/-` + `folders/{folder_id}/sources/-locations/{location_id}` + + * `projects/{projects_id}/sources/-` + + * `projects/{projects_id}/sources/-/locations/{location_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListFindingsPagedResponse listFindings(SourceName parent) { + ListFindingsRequest request = + ListFindingsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listFindings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists an organization or source's findings. + * + *

To list across all sources for a given location provide a `-` as the source id. If no + * location is specified, finding are assumed to be in global. The following list shows some + * examples: + * + *

+ `/v2/organizations/{organization_id}/sources/-/findings` + + * `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   String parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString();
+   *   for (ListFindingsResponse.ListFindingsResult element :
+   *       securityCenterClient.listFindings(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Name of the source the findings belong to. If no location is specified, + * the default is global. The following list shows some examples: + *

+ `organizations/[organization_id]/sources/[source_id]` + + * `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` + + * `folders/[folder_id]/sources/[source_id]` + + * `folders/[folder_id]/sources/[source_id]/locations/[location_id]` + + * `projects/[project_id]/sources/[source_id]` + + * `projects/[project_id]/sources/[source_id]/locations/[location_id]` + *

To list across all sources provide a source_id of `-`. The following list shows some + * examples: + *

+ `organizations/{organization_id}/sources/-` + + * `organizations/{organization_id}/sources/-/locations/{location_id}` + + * `folders/{folder_id}/sources/-` + `folders/{folder_id}/sources/-locations/{location_id}` + + * `projects/{projects_id}/sources/-` + + * `projects/{projects_id}/sources/-/locations/{location_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListFindingsPagedResponse listFindings(String parent) { + ListFindingsRequest request = ListFindingsRequest.newBuilder().setParent(parent).build(); + return listFindings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists an organization or source's findings. + * + *

To list across all sources for a given location provide a `-` as the source id. If no + * location is specified, finding are assumed to be in global. The following list shows some + * examples: + * + *

+ `/v2/organizations/{organization_id}/sources/-/findings` + + * `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ListFindingsRequest request =
+   *       ListFindingsRequest.newBuilder()
+   *           .setParent(
+   *               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setFieldMask(FieldMask.newBuilder().build())
+   *           .setPageToken("pageToken873572522")
+   *           .setPageSize(883849137)
+   *           .build();
+   *   for (ListFindingsResponse.ListFindingsResult element :
+   *       securityCenterClient.listFindings(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 ListFindingsPagedResponse listFindings(ListFindingsRequest request) { + return listFindingsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists an organization or source's findings. + * + *

To list across all sources for a given location provide a `-` as the source id. If no + * location is specified, finding are assumed to be in global. The following list shows some + * examples: + * + *

+ `/v2/organizations/{organization_id}/sources/-/findings` + + * `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ListFindingsRequest request =
+   *       ListFindingsRequest.newBuilder()
+   *           .setParent(
+   *               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setFieldMask(FieldMask.newBuilder().build())
+   *           .setPageToken("pageToken873572522")
+   *           .setPageSize(883849137)
+   *           .build();
+   *   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 for a given location provide a `-` as the source id. If no + * location is specified, finding are assumed to be in global. The following list shows some + * examples: + * + *

+ `/v2/organizations/{organization_id}/sources/-/findings` + + * `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ListFindingsRequest request =
+   *       ListFindingsRequest.newBuilder()
+   *           .setParent(
+   *               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setFieldMask(FieldMask.newBuilder().build())
+   *           .setPageToken("pageToken873572522")
+   *           .setPageSize(883849137)
+   *           .build();
+   *   while (true) {
+   *     ListFindingsResponse response = securityCenterClient.listFindingsCallable().call(request);
+   *     for (ListFindingsResponse.ListFindingsResult element :
+   *         response.getListFindingsResultsList()) {
+   *       // 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. If no location is specified, default is global. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]");
+   *   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]", + * "organizations/[organization_id]/locations/[location_id]", + * "folders/[folder_id]/locations/[location_id]", + * "projects/[project_id]/locations/[location_id]". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListMuteConfigsPagedResponse listMuteConfigs(FolderLocationName parent) { + ListMuteConfigsRequest request = + ListMuteConfigsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listMuteConfigs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists mute configs. If no location is specified, default is global. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * 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]", + * "organizations/[organization_id]/locations/[location_id]", + * "folders/[folder_id]/locations/[location_id]", + * "projects/[project_id]/locations/[location_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. If no location is specified, default is global. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   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]", + * "organizations/[organization_id]/locations/[location_id]", + * "folders/[folder_id]/locations/[location_id]", + * "projects/[project_id]/locations/[location_id]". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListMuteConfigsPagedResponse listMuteConfigs(LocationName parent) { + ListMuteConfigsRequest request = + ListMuteConfigsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listMuteConfigs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists mute configs. If no location is specified, default is global. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+   *   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]", + * "organizations/[organization_id]/locations/[location_id]", + * "folders/[folder_id]/locations/[location_id]", + * "projects/[project_id]/locations/[location_id]". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListMuteConfigsPagedResponse listMuteConfigs(OrganizationLocationName parent) { + ListMuteConfigsRequest request = + ListMuteConfigsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listMuteConfigs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists mute configs. If no location is specified, default is global. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * 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]", + * "organizations/[organization_id]/locations/[location_id]", + * "folders/[folder_id]/locations/[location_id]", + * "projects/[project_id]/locations/[location_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. If no location is specified, default is global. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * 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]", + * "organizations/[organization_id]/locations/[location_id]", + * "folders/[folder_id]/locations/[location_id]", + * "projects/[project_id]/locations/[location_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. If no location is specified, default is global. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * 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]", + * "organizations/[organization_id]/locations/[location_id]", + * "folders/[folder_id]/locations/[location_id]", + * "projects/[project_id]/locations/[location_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. If no location is specified, default is global. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * 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. If no location is specified, default is global. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * 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 (MuteConfig element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listMuteConfigsPagedCallable() { + return stub.listMuteConfigsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists mute configs. If no location is specified, default is global. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ListMuteConfigsRequest request =
+   *       ListMuteConfigsRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListMuteConfigsResponse response =
+   *         securityCenterClient.listMuteConfigsCallable().call(request);
+   *     for (MuteConfig element : response.getMuteConfigsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listMuteConfigsCallable() { + return stub.listMuteConfigsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists notification configs. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]");
+   *   for (NotificationConfig element :
+   *       securityCenterClient.listNotificationConfigs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The name of the parent in which to list the notification + * configurations. Its format is "organizations/[organization_id]/locations/[location_id]", + * "folders/[folder_id]/locations/[location_id]", or + * "projects/[project_id]/locations/[location_id]". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNotificationConfigsPagedResponse listNotificationConfigs( + FolderLocationName parent) { + ListNotificationConfigsRequest request = + ListNotificationConfigsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listNotificationConfigs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists notification configs. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (NotificationConfig element :
+   *       securityCenterClient.listNotificationConfigs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The name of the parent in which to list the notification + * configurations. Its format is "organizations/[organization_id]/locations/[location_id]", + * "folders/[folder_id]/locations/[location_id]", or + * "projects/[project_id]/locations/[location_id]". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNotificationConfigsPagedResponse listNotificationConfigs(LocationName parent) { + ListNotificationConfigsRequest request = + ListNotificationConfigsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listNotificationConfigs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists notification configs. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+   *   for (NotificationConfig element :
+   *       securityCenterClient.listNotificationConfigs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The name of the parent in which to list the notification + * configurations. Its format is "organizations/[organization_id]/locations/[location_id]", + * "folders/[folder_id]/locations/[location_id]", or + * "projects/[project_id]/locations/[location_id]". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNotificationConfigsPagedResponse listNotificationConfigs( + OrganizationLocationName parent) { + ListNotificationConfigsRequest request = + ListNotificationConfigsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listNotificationConfigs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists notification configs. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
+   *   for (NotificationConfig element :
+   *       securityCenterClient.listNotificationConfigs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The name of the parent in which to list the notification + * configurations. Its format is "organizations/[organization_id]/locations/[location_id]", + * "folders/[folder_id]/locations/[location_id]", or + * "projects/[project_id]/locations/[location_id]". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNotificationConfigsPagedResponse listNotificationConfigs(String parent) { + ListNotificationConfigsRequest request = + ListNotificationConfigsRequest.newBuilder().setParent(parent).build(); + return listNotificationConfigs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists notification configs. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ListNotificationConfigsRequest request =
+   *       ListNotificationConfigsRequest.newBuilder()
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .setPageToken("pageToken873572522")
+   *           .setPageSize(883849137)
+   *           .build();
+   *   for (NotificationConfig element :
+   *       securityCenterClient.listNotificationConfigs(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 ListNotificationConfigsPagedResponse listNotificationConfigs( + ListNotificationConfigsRequest request) { + return listNotificationConfigsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists notification configs. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ListNotificationConfigsRequest request =
+   *       ListNotificationConfigsRequest.newBuilder()
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .setPageToken("pageToken873572522")
+   *           .setPageSize(883849137)
+   *           .build();
+   *   ApiFuture future =
+   *       securityCenterClient.listNotificationConfigsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (NotificationConfig element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listNotificationConfigsPagedCallable() { + return stub.listNotificationConfigsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists notification configs. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ListNotificationConfigsRequest request =
+   *       ListNotificationConfigsRequest.newBuilder()
+   *           .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
+   *           .setPageToken("pageToken873572522")
+   *           .setPageSize(883849137)
+   *           .build();
+   *   while (true) {
+   *     ListNotificationConfigsResponse response =
+   *         securityCenterClient.listNotificationConfigsCallable().call(request);
+   *     for (NotificationConfig element : response.getNotificationConfigsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listNotificationConfigsCallable() { + return stub.listNotificationConfigsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all ResourceValueConfigs. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+   *   for (ResourceValueConfig element :
+   *       securityCenterClient.listResourceValueConfigs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns the collection of resource value configs. Its + * format is "organizations/[organization_id]" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListResourceValueConfigsPagedResponse listResourceValueConfigs( + OrganizationName parent) { + ListResourceValueConfigsRequest request = + ListResourceValueConfigsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listResourceValueConfigs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all ResourceValueConfigs. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
+   *   for (ResourceValueConfig element :
+   *       securityCenterClient.listResourceValueConfigs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns the collection of resource value configs. Its + * format is "organizations/[organization_id]" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListResourceValueConfigsPagedResponse listResourceValueConfigs(String parent) { + ListResourceValueConfigsRequest request = + ListResourceValueConfigsRequest.newBuilder().setParent(parent).build(); + return listResourceValueConfigs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all ResourceValueConfigs. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ListResourceValueConfigsRequest request =
+   *       ListResourceValueConfigsRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (ResourceValueConfig element :
+   *       securityCenterClient.listResourceValueConfigs(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 ListResourceValueConfigsPagedResponse listResourceValueConfigs( + ListResourceValueConfigsRequest request) { + return listResourceValueConfigsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all ResourceValueConfigs. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ListResourceValueConfigsRequest request =
+   *       ListResourceValueConfigsRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       securityCenterClient.listResourceValueConfigsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (ResourceValueConfig element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listResourceValueConfigsPagedCallable() { + return stub.listResourceValueConfigsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all ResourceValueConfigs. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ListResourceValueConfigsRequest request =
+   *       ListResourceValueConfigsRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListResourceValueConfigsResponse response =
+   *         securityCenterClient.listResourceValueConfigsCallable().call(request);
+   *     for (ResourceValueConfig element : response.getResourceValueConfigsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listResourceValueConfigsCallable() { + return stub.listResourceValueConfigsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all sources belonging to an organization. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   FolderName parent = FolderName.of("[FOLDER]");
+   *   for (Source element : securityCenterClient.listSources(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Resource name of the parent of sources to list. Its format should be + * "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSourcesPagedResponse listSources(FolderName parent) { + ListSourcesRequest request = + ListSourcesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listSources(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all sources belonging to an organization. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+   *   for (Source element : securityCenterClient.listSources(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Resource name of the parent of sources to list. Its format should be + * "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSourcesPagedResponse listSources(OrganizationName parent) { + ListSourcesRequest request = + ListSourcesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listSources(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all sources belonging to an organization. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   for (Source element : securityCenterClient.listSources(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Resource name of the parent of sources to list. Its format should be + * "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSourcesPagedResponse listSources(ProjectName parent) { + ListSourcesRequest request = + ListSourcesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listSources(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all sources belonging to an organization. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
+   *   for (Source element : securityCenterClient.listSources(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Resource name of the parent of sources to list. Its format should be + * "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSourcesPagedResponse listSources(String parent) { + ListSourcesRequest request = ListSourcesRequest.newBuilder().setParent(parent).build(); + return listSources(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all sources belonging to an organization. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ListSourcesRequest request =
+   *       ListSourcesRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setPageToken("pageToken873572522")
+   *           .setPageSize(883849137)
+   *           .build();
+   *   for (Source element : securityCenterClient.listSources(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 ListSourcesPagedResponse listSources(ListSourcesRequest request) { + return listSourcesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all sources belonging to an organization. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ListSourcesRequest request =
+   *       ListSourcesRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setPageToken("pageToken873572522")
+   *           .setPageSize(883849137)
+   *           .build();
+   *   ApiFuture future =
+   *       securityCenterClient.listSourcesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Source element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listSourcesPagedCallable() { + return stub.listSourcesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all sources belonging to an organization. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ListSourcesRequest request =
+   *       ListSourcesRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setPageToken("pageToken873572522")
+   *           .setPageSize(883849137)
+   *           .build();
+   *   while (true) {
+   *     ListSourcesResponse response = securityCenterClient.listSourcesCallable().call(request);
+   *     for (Source element : response.getSourcesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listSourcesCallable() { + return stub.listSourcesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the valued resources for a set of simulation results and filter. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   SimulationName parent = SimulationName.of("[ORGANIZATION]", "[SIMULATION]");
+   *   for (ValuedResource element : securityCenterClient.listValuedResources(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Name of parent to list exposed resources. + *

Valid formats: "organizations/{organization}", + * "organizations/{organization}/simulations/{simulation}" + * "organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListValuedResourcesPagedResponse listValuedResources(SimulationName parent) { + ListValuedResourcesRequest request = + ListValuedResourcesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listValuedResources(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the valued resources for a set of simulation results and filter. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   String parent = SimulationName.of("[ORGANIZATION]", "[SIMULATION]").toString();
+   *   for (ValuedResource element : securityCenterClient.listValuedResources(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Name of parent to list exposed resources. + *

Valid formats: "organizations/{organization}", + * "organizations/{organization}/simulations/{simulation}" + * "organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListValuedResourcesPagedResponse listValuedResources(String parent) { + ListValuedResourcesRequest request = + ListValuedResourcesRequest.newBuilder().setParent(parent).build(); + return listValuedResources(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the valued resources for a set of simulation results and filter. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ListValuedResourcesRequest request =
+   *       ListValuedResourcesRequest.newBuilder()
+   *           .setParent(SimulationName.of("[ORGANIZATION]", "[SIMULATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageToken("pageToken873572522")
+   *           .setPageSize(883849137)
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (ValuedResource element :
+   *       securityCenterClient.listValuedResources(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 ListValuedResourcesPagedResponse listValuedResources( + ListValuedResourcesRequest request) { + return listValuedResourcesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the valued resources for a set of simulation results and filter. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ListValuedResourcesRequest request =
+   *       ListValuedResourcesRequest.newBuilder()
+   *           .setParent(SimulationName.of("[ORGANIZATION]", "[SIMULATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageToken("pageToken873572522")
+   *           .setPageSize(883849137)
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       securityCenterClient.listValuedResourcesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (ValuedResource element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listValuedResourcesPagedCallable() { + return stub.listValuedResourcesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the valued resources for a set of simulation results and filter. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ListValuedResourcesRequest request =
+   *       ListValuedResourcesRequest.newBuilder()
+   *           .setParent(SimulationName.of("[ORGANIZATION]", "[SIMULATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageToken("pageToken873572522")
+   *           .setPageSize(883849137)
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListValuedResourcesResponse response =
+   *         securityCenterClient.listValuedResourcesCallable().call(request);
+   *     for (ValuedResource element : response.getValuedResourcesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listValuedResourcesCallable() { + return stub.listValuedResourcesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the state of a finding. If no location is specified, finding is assumed to be in global + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   FindingName name =
+   *       FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]", "[SOURCE]", "[FINDING]");
+   *   Finding.State state = Finding.State.forNumber(0);
+   *   Finding response = securityCenterClient.setFindingState(name, state);
+   * }
+   * }
+ * + * @param name Required. The [relative resource + * name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the + * finding. If no location is specified, finding is assumed to be in global. The following + * list shows some examples: + *

+ `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` + + * `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + * + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + + * `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + + * `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + + * `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + * @param state Required. The desired State of the finding. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Finding setFindingState(FindingName name, Finding.State state) { + SetFindingStateRequest request = + SetFindingStateRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setState(state) + .build(); + return setFindingState(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the state of a finding. If no location is specified, finding is assumed to be in global + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   String name =
+   *       FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]", "[SOURCE]", "[FINDING]")
+   *           .toString();
+   *   Finding.State state = Finding.State.forNumber(0);
+   *   Finding response = securityCenterClient.setFindingState(name, state);
+   * }
+   * }
+ * + * @param name Required. The [relative resource + * name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the + * finding. If no location is specified, finding is assumed to be in global. The following + * list shows some examples: + *

+ `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` + + * `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + * + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + + * `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + + * `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + + * `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + * @param state Required. The desired State of the finding. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Finding setFindingState(String name, Finding.State state) { + SetFindingStateRequest request = + SetFindingStateRequest.newBuilder().setName(name).setState(state).build(); + return setFindingState(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the state of a finding. If no location is specified, finding is assumed to be in global + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   SetFindingStateRequest request =
+   *       SetFindingStateRequest.newBuilder()
+   *           .setName(
+   *               FindingName.ofOrganizationSourceFindingName(
+   *                       "[ORGANIZATION]", "[SOURCE]", "[FINDING]")
+   *                   .toString())
+   *           .build();
+   *   Finding response = securityCenterClient.setFindingState(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 setFindingState(SetFindingStateRequest request) { + return setFindingStateCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the state of a finding. If no location is specified, finding is assumed to be in global + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   SetFindingStateRequest request =
+   *       SetFindingStateRequest.newBuilder()
+   *           .setName(
+   *               FindingName.ofOrganizationSourceFindingName(
+   *                       "[ORGANIZATION]", "[SOURCE]", "[FINDING]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       securityCenterClient.setFindingStateCallable().futureCall(request);
+   *   // Do something.
+   *   Finding response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable setFindingStateCallable() { + return stub.setFindingStateCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified Source. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]");
+   *   Policy policy = Policy.newBuilder().build();
+   *   Policy response = securityCenterClient.setIamPolicy(resource, policy);
+   * }
+   * }
+ * + * @param resource REQUIRED: The resource for which the policy is being specified. See the + * operation documentation for the appropriate value for this field. + * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the + * policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud + * Platform services (such as Projects) might reject them. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy setIamPolicy(ResourceName resource, Policy policy) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(resource == null ? null : resource.toString()) + .setPolicy(policy) + .build(); + return setIamPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified Source. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   String resource = FolderName.of("[FOLDER]").toString();
+   *   Policy policy = Policy.newBuilder().build();
+   *   Policy response = securityCenterClient.setIamPolicy(resource, policy);
+   * }
+   * }
+ * + * @param resource REQUIRED: The resource for which the policy is being specified. See the + * operation documentation for the appropriate value for this field. + * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the + * policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud + * Platform services (such as Projects) might reject them. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy setIamPolicy(String resource, Policy policy) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder().setResource(resource).setPolicy(policy).build(); + return setIamPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified Source. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Policy response = securityCenterClient.setIamPolicy(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 Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified Source. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = securityCenterClient.setIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable setIamPolicyCallable() { + return stub.setIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the mute state of a finding. If no location is specified, finding is assumed to be in + * global + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * 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](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the + * finding. If no location is specified, finding is assumed to be in global. The following + * list shows some examples: + *

+ `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` + + * `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + * + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + + * `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + + * `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + + * `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{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. If no location is specified, finding is assumed to be in + * global + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * 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](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the + * finding. If no location is specified, finding is assumed to be in global. The following + * list shows some examples: + *

+ `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` + + * `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + * + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + + * `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + + * `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + + * `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{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. If no location is specified, finding is assumed to be in + * global + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * 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. If no location is specified, finding is assumed to be in + * global + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * 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. + /** + * Returns the permissions that a caller has on the specified source. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]");
+   *   List permissions = new ArrayList<>();
+   *   TestIamPermissionsResponse response =
+   *       securityCenterClient.testIamPermissions(resource, permissions);
+   * }
+   * }
+ * + * @param resource REQUIRED: The resource for which the policy detail is being requested. See the + * operation documentation for the appropriate value for this field. + * @param permissions The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestIamPermissionsResponse testIamPermissions( + ResourceName resource, List permissions) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(resource == null ? null : resource.toString()) + .addAllPermissions(permissions) + .build(); + return testIamPermissions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the permissions that a caller has on the specified source. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   String resource = FolderName.of("[FOLDER]").toString();
+   *   List permissions = new ArrayList<>();
+   *   TestIamPermissionsResponse response =
+   *       securityCenterClient.testIamPermissions(resource, permissions);
+   * }
+   * }
+ * + * @param resource REQUIRED: The resource for which the policy detail is being requested. See the + * operation documentation for the appropriate value for this field. + * @param permissions The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestIamPermissionsResponse testIamPermissions( + String resource, List permissions) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(resource) + .addAllPermissions(permissions) + .build(); + return testIamPermissions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the permissions that a caller has on the specified source. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   TestIamPermissionsResponse response = securityCenterClient.testIamPermissions(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 TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the permissions that a caller has on the specified source. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       securityCenterClient.testIamPermissionsCallable().futureCall(request);
+   *   // Do something.
+   *   TestIamPermissionsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + testIamPermissionsCallable() { + return stub.testIamPermissionsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a BigQuery export. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   BigQueryExport response =
+   *       securityCenterClient.updateBigQueryExport(bigQueryExport, updateMask);
+   * }
+   * }
+ * + * @param bigQueryExport Required. The BigQuery export 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 BigQueryExport updateBigQueryExport( + BigQueryExport bigQueryExport, FieldMask updateMask) { + UpdateBigQueryExportRequest request = + UpdateBigQueryExportRequest.newBuilder() + .setBigQueryExport(bigQueryExport) + .setUpdateMask(updateMask) + .build(); + return updateBigQueryExport(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a BigQuery export. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   UpdateBigQueryExportRequest request =
+   *       UpdateBigQueryExportRequest.newBuilder()
+   *           .setBigQueryExport(BigQueryExport.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   BigQueryExport response = securityCenterClient.updateBigQueryExport(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 BigQueryExport updateBigQueryExport(UpdateBigQueryExportRequest request) { + return updateBigQueryExportCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a BigQuery export. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   UpdateBigQueryExportRequest request =
+   *       UpdateBigQueryExportRequest.newBuilder()
+   *           .setBigQueryExport(BigQueryExport.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       securityCenterClient.updateBigQueryExportCallable().futureCall(request);
+   *   // Do something.
+   *   BigQueryExport response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateBigQueryExportCallable() { + return stub.updateBigQueryExportCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates external system. This is for a given finding. If no location is specified, finding is + * assumed to be in global + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * 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. If no location is specified, finding is + * assumed to be in global + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * 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. If no location is specified, finding is + * assumed to be in global + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * 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. If no location is specified, finding is assumed to be in global. + * The corresponding source must exist for a finding creation to succeed. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   Finding finding = Finding.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Finding response = securityCenterClient.updateFinding(finding, updateMask);
+   * }
+   * }
+ * + * @param finding Required. The finding resource to update or create if it does not already exist. + * parent, security_marks, and update_time will be ignored. + *

In the case of creation, the finding id portion of the name must be alphanumeric and + * less than or equal to 32 characters and greater than 0 characters in length. + * @param updateMask The FieldMask to use when updating the finding resource. This field should + * not be specified when creating a finding. + *

When updating a finding, an empty mask is treated as updating all mutable fields and + * replacing source_properties. Individual source_properties can be added/updated by using + * "source_properties.<property key>" in the field mask. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Finding updateFinding(Finding finding, FieldMask updateMask) { + UpdateFindingRequest request = + UpdateFindingRequest.newBuilder().setFinding(finding).setUpdateMask(updateMask).build(); + return updateFinding(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates or updates a finding. If no location is specified, finding is assumed to be in global. + * The corresponding source must exist for a finding creation to succeed. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   UpdateFindingRequest request =
+   *       UpdateFindingRequest.newBuilder()
+   *           .setFinding(Finding.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Finding response = securityCenterClient.updateFinding(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 updateFinding(UpdateFindingRequest request) { + return updateFindingCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates or updates a finding. If no location is specified, finding is assumed to be in global. + * The corresponding source must exist for a finding creation to succeed. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   UpdateFindingRequest request =
+   *       UpdateFindingRequest.newBuilder()
+   *           .setFinding(Finding.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = securityCenterClient.updateFindingCallable().futureCall(request);
+   *   // Do something.
+   *   Finding response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateFindingCallable() { + return stub.updateFindingCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a mute config. If no location is specified, default is global. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * 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. If no location is specified, default is global. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * 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. If no location is specified, default is global. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * 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, + * pubsub_topic, streaming_config.filter + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   NotificationConfig response =
+   *       securityCenterClient.updateNotificationConfig(notificationConfig, updateMask);
+   * }
+   * }
+ * + * @param notificationConfig Required. The notification config to update. + * @param updateMask The FieldMask to use when updating the notification config. + *

If empty all mutable fields will be updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NotificationConfig updateNotificationConfig( + NotificationConfig notificationConfig, FieldMask updateMask) { + UpdateNotificationConfigRequest request = + UpdateNotificationConfigRequest.newBuilder() + .setNotificationConfig(notificationConfig) + .setUpdateMask(updateMask) + .build(); + return updateNotificationConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a notification config. The following update fields are allowed: description, + * pubsub_topic, streaming_config.filter + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   UpdateNotificationConfigRequest request =
+   *       UpdateNotificationConfigRequest.newBuilder()
+   *           .setNotificationConfig(NotificationConfig.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   NotificationConfig response = securityCenterClient.updateNotificationConfig(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 updateNotificationConfig( + UpdateNotificationConfigRequest request) { + return updateNotificationConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a notification config. The following update fields are allowed: description, + * pubsub_topic, streaming_config.filter + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   UpdateNotificationConfigRequest request =
+   *       UpdateNotificationConfigRequest.newBuilder()
+   *           .setNotificationConfig(NotificationConfig.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       securityCenterClient.updateNotificationConfigCallable().futureCall(request);
+   *   // Do something.
+   *   NotificationConfig response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateNotificationConfigCallable() { + return stub.updateNotificationConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an existing ResourceValueConfigs with new rules. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ResourceValueConfig resourceValueConfig = ResourceValueConfig.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   ResourceValueConfig response =
+   *       securityCenterClient.updateResourceValueConfig(resourceValueConfig, updateMask);
+   * }
+   * }
+ * + * @param resourceValueConfig Required. The resource value 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 ResourceValueConfig updateResourceValueConfig( + ResourceValueConfig resourceValueConfig, FieldMask updateMask) { + UpdateResourceValueConfigRequest request = + UpdateResourceValueConfigRequest.newBuilder() + .setResourceValueConfig(resourceValueConfig) + .setUpdateMask(updateMask) + .build(); + return updateResourceValueConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an existing ResourceValueConfigs with new rules. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   UpdateResourceValueConfigRequest request =
+   *       UpdateResourceValueConfigRequest.newBuilder()
+   *           .setResourceValueConfig(ResourceValueConfig.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ResourceValueConfig response = securityCenterClient.updateResourceValueConfig(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 ResourceValueConfig updateResourceValueConfig( + UpdateResourceValueConfigRequest request) { + return updateResourceValueConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an existing ResourceValueConfigs with new rules. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   UpdateResourceValueConfigRequest request =
+   *       UpdateResourceValueConfigRequest.newBuilder()
+   *           .setResourceValueConfig(ResourceValueConfig.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       securityCenterClient.updateResourceValueConfigCallable().futureCall(request);
+   *   // Do something.
+   *   ResourceValueConfig response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateResourceValueConfigCallable() { + return stub.updateResourceValueConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates security marks. For Finding Security marks, if no location is specified, finding is + * assumed to be in global. Assets Security Marks can only be accessed through global endpoint. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   SecurityMarks securityMarks = SecurityMarks.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   SecurityMarks response = securityCenterClient.updateSecurityMarks(securityMarks, updateMask);
+   * }
+   * }
+ * + * @param securityMarks Required. The security marks resource to update. + * @param updateMask The FieldMask to use when updating the security marks resource. + *

The field mask must not contain duplicate fields. If empty or set to "marks", all marks + * will be replaced. Individual marks can be updated using "marks.<mark_key>". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SecurityMarks updateSecurityMarks( + SecurityMarks securityMarks, FieldMask updateMask) { + UpdateSecurityMarksRequest request = + UpdateSecurityMarksRequest.newBuilder() + .setSecurityMarks(securityMarks) + .setUpdateMask(updateMask) + .build(); + return updateSecurityMarks(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates security marks. For Finding Security marks, if no location is specified, finding is + * assumed to be in global. Assets Security Marks can only be accessed through global endpoint. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   UpdateSecurityMarksRequest request =
+   *       UpdateSecurityMarksRequest.newBuilder()
+   *           .setSecurityMarks(SecurityMarks.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   SecurityMarks response = securityCenterClient.updateSecurityMarks(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 SecurityMarks updateSecurityMarks(UpdateSecurityMarksRequest request) { + return updateSecurityMarksCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates security marks. For Finding Security marks, if no location is specified, finding is + * assumed to be in global. Assets Security Marks can only be accessed through global endpoint. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   UpdateSecurityMarksRequest request =
+   *       UpdateSecurityMarksRequest.newBuilder()
+   *           .setSecurityMarks(SecurityMarks.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       securityCenterClient.updateSecurityMarksCallable().futureCall(request);
+   *   // Do something.
+   *   SecurityMarks response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateSecurityMarksCallable() { + return stub.updateSecurityMarksCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a source. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   Source source = Source.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Source response = securityCenterClient.updateSource(source, updateMask);
+   * }
+   * }
+ * + * @param source Required. The source resource to update. + * @param updateMask The FieldMask to use when updating the source resource. + *

If empty all mutable fields will be updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Source updateSource(Source source, FieldMask updateMask) { + UpdateSourceRequest request = + UpdateSourceRequest.newBuilder().setSource(source).setUpdateMask(updateMask).build(); + return updateSource(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a source. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   UpdateSourceRequest request =
+   *       UpdateSourceRequest.newBuilder()
+   *           .setSource(Source.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Source response = securityCenterClient.updateSource(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 Source updateSource(UpdateSourceRequest request) { + return updateSourceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a source. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   UpdateSourceRequest request =
+   *       UpdateSourceRequest.newBuilder()
+   *           .setSource(Source.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = securityCenterClient.updateSourceCallable().futureCall(request);
+   *   // Do something.
+   *   Source response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateSourceCallable() { + return stub.updateSourceCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class GroupFindingsPagedResponse + extends AbstractPagedListResponse< + GroupFindingsRequest, + GroupFindingsResponse, + GroupResult, + GroupFindingsPage, + GroupFindingsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + GroupFindingsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new GroupFindingsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private GroupFindingsPagedResponse(GroupFindingsPage page) { + super(page, GroupFindingsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class GroupFindingsPage + extends AbstractPage< + GroupFindingsRequest, GroupFindingsResponse, GroupResult, GroupFindingsPage> { + + private GroupFindingsPage( + PageContext context, + GroupFindingsResponse response) { + super(context, response); + } + + private static GroupFindingsPage createEmptyPage() { + return new GroupFindingsPage(null, null); + } + + @Override + protected GroupFindingsPage createPage( + PageContext context, + GroupFindingsResponse response) { + return new GroupFindingsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class GroupFindingsFixedSizeCollection + extends AbstractFixedSizeCollection< + GroupFindingsRequest, + GroupFindingsResponse, + GroupResult, + GroupFindingsPage, + GroupFindingsFixedSizeCollection> { + + private GroupFindingsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static GroupFindingsFixedSizeCollection createEmptyCollection() { + return new GroupFindingsFixedSizeCollection(null, 0); + } + + @Override + protected GroupFindingsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new GroupFindingsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListAttackPathsPagedResponse + extends AbstractPagedListResponse< + ListAttackPathsRequest, + ListAttackPathsResponse, + AttackPath, + ListAttackPathsPage, + ListAttackPathsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAttackPathsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListAttackPathsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListAttackPathsPagedResponse(ListAttackPathsPage page) { + super(page, ListAttackPathsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAttackPathsPage + extends AbstractPage< + ListAttackPathsRequest, ListAttackPathsResponse, AttackPath, ListAttackPathsPage> { + + private ListAttackPathsPage( + PageContext context, + ListAttackPathsResponse response) { + super(context, response); + } + + private static ListAttackPathsPage createEmptyPage() { + return new ListAttackPathsPage(null, null); + } + + @Override + protected ListAttackPathsPage createPage( + PageContext context, + ListAttackPathsResponse response) { + return new ListAttackPathsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAttackPathsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAttackPathsRequest, + ListAttackPathsResponse, + AttackPath, + ListAttackPathsPage, + ListAttackPathsFixedSizeCollection> { + + private ListAttackPathsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAttackPathsFixedSizeCollection createEmptyCollection() { + return new ListAttackPathsFixedSizeCollection(null, 0); + } + + @Override + protected ListAttackPathsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListAttackPathsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListBigQueryExportsPagedResponse + extends AbstractPagedListResponse< + ListBigQueryExportsRequest, + ListBigQueryExportsResponse, + BigQueryExport, + ListBigQueryExportsPage, + ListBigQueryExportsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListBigQueryExportsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListBigQueryExportsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListBigQueryExportsPagedResponse(ListBigQueryExportsPage page) { + super(page, ListBigQueryExportsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListBigQueryExportsPage + extends AbstractPage< + ListBigQueryExportsRequest, + ListBigQueryExportsResponse, + BigQueryExport, + ListBigQueryExportsPage> { + + private ListBigQueryExportsPage( + PageContext + context, + ListBigQueryExportsResponse response) { + super(context, response); + } + + private static ListBigQueryExportsPage createEmptyPage() { + return new ListBigQueryExportsPage(null, null); + } + + @Override + protected ListBigQueryExportsPage createPage( + PageContext + context, + ListBigQueryExportsResponse response) { + return new ListBigQueryExportsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListBigQueryExportsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListBigQueryExportsRequest, + ListBigQueryExportsResponse, + BigQueryExport, + ListBigQueryExportsPage, + ListBigQueryExportsFixedSizeCollection> { + + private ListBigQueryExportsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListBigQueryExportsFixedSizeCollection createEmptyCollection() { + return new ListBigQueryExportsFixedSizeCollection(null, 0); + } + + @Override + protected ListBigQueryExportsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListBigQueryExportsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListFindingsPagedResponse + extends AbstractPagedListResponse< + ListFindingsRequest, + ListFindingsResponse, + ListFindingsResponse.ListFindingsResult, + ListFindingsPage, + ListFindingsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListFindingsRequest, ListFindingsResponse, ListFindingsResponse.ListFindingsResult> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListFindingsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListFindingsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListFindingsPagedResponse(ListFindingsPage page) { + super(page, ListFindingsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListFindingsPage + extends AbstractPage< + ListFindingsRequest, + ListFindingsResponse, + ListFindingsResponse.ListFindingsResult, + ListFindingsPage> { + + private ListFindingsPage( + PageContext< + ListFindingsRequest, ListFindingsResponse, ListFindingsResponse.ListFindingsResult> + context, + ListFindingsResponse response) { + super(context, response); + } + + private static ListFindingsPage createEmptyPage() { + return new ListFindingsPage(null, null); + } + + @Override + protected ListFindingsPage createPage( + PageContext< + ListFindingsRequest, ListFindingsResponse, ListFindingsResponse.ListFindingsResult> + context, + ListFindingsResponse response) { + return new ListFindingsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListFindingsRequest, ListFindingsResponse, ListFindingsResponse.ListFindingsResult> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListFindingsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListFindingsRequest, + ListFindingsResponse, + ListFindingsResponse.ListFindingsResult, + ListFindingsPage, + ListFindingsFixedSizeCollection> { + + private ListFindingsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListFindingsFixedSizeCollection createEmptyCollection() { + return new ListFindingsFixedSizeCollection(null, 0); + } + + @Override + protected ListFindingsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListFindingsFixedSizeCollection(pages, collectionSize); + } + } + + 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, + ListNotificationConfigsResponse, + NotificationConfig, + ListNotificationConfigsPage, + ListNotificationConfigsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListNotificationConfigsRequest, ListNotificationConfigsResponse, NotificationConfig> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListNotificationConfigsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListNotificationConfigsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListNotificationConfigsPagedResponse(ListNotificationConfigsPage page) { + super(page, ListNotificationConfigsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListNotificationConfigsPage + extends AbstractPage< + ListNotificationConfigsRequest, + ListNotificationConfigsResponse, + NotificationConfig, + ListNotificationConfigsPage> { + + private ListNotificationConfigsPage( + PageContext< + ListNotificationConfigsRequest, ListNotificationConfigsResponse, NotificationConfig> + context, + ListNotificationConfigsResponse response) { + super(context, response); + } + + private static ListNotificationConfigsPage createEmptyPage() { + return new ListNotificationConfigsPage(null, null); + } + + @Override + protected ListNotificationConfigsPage createPage( + PageContext< + ListNotificationConfigsRequest, ListNotificationConfigsResponse, NotificationConfig> + context, + ListNotificationConfigsResponse response) { + return new ListNotificationConfigsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListNotificationConfigsRequest, ListNotificationConfigsResponse, NotificationConfig> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListNotificationConfigsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListNotificationConfigsRequest, + ListNotificationConfigsResponse, + NotificationConfig, + ListNotificationConfigsPage, + ListNotificationConfigsFixedSizeCollection> { + + private ListNotificationConfigsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListNotificationConfigsFixedSizeCollection createEmptyCollection() { + return new ListNotificationConfigsFixedSizeCollection(null, 0); + } + + @Override + protected ListNotificationConfigsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListNotificationConfigsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListResourceValueConfigsPagedResponse + extends AbstractPagedListResponse< + ListResourceValueConfigsRequest, + ListResourceValueConfigsResponse, + ResourceValueConfig, + ListResourceValueConfigsPage, + ListResourceValueConfigsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListResourceValueConfigsRequest, + ListResourceValueConfigsResponse, + ResourceValueConfig> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListResourceValueConfigsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListResourceValueConfigsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListResourceValueConfigsPagedResponse(ListResourceValueConfigsPage page) { + super(page, ListResourceValueConfigsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListResourceValueConfigsPage + extends AbstractPage< + ListResourceValueConfigsRequest, + ListResourceValueConfigsResponse, + ResourceValueConfig, + ListResourceValueConfigsPage> { + + private ListResourceValueConfigsPage( + PageContext< + ListResourceValueConfigsRequest, + ListResourceValueConfigsResponse, + ResourceValueConfig> + context, + ListResourceValueConfigsResponse response) { + super(context, response); + } + + private static ListResourceValueConfigsPage createEmptyPage() { + return new ListResourceValueConfigsPage(null, null); + } + + @Override + protected ListResourceValueConfigsPage createPage( + PageContext< + ListResourceValueConfigsRequest, + ListResourceValueConfigsResponse, + ResourceValueConfig> + context, + ListResourceValueConfigsResponse response) { + return new ListResourceValueConfigsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListResourceValueConfigsRequest, + ListResourceValueConfigsResponse, + ResourceValueConfig> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListResourceValueConfigsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListResourceValueConfigsRequest, + ListResourceValueConfigsResponse, + ResourceValueConfig, + ListResourceValueConfigsPage, + ListResourceValueConfigsFixedSizeCollection> { + + private ListResourceValueConfigsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListResourceValueConfigsFixedSizeCollection createEmptyCollection() { + return new ListResourceValueConfigsFixedSizeCollection(null, 0); + } + + @Override + protected ListResourceValueConfigsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListResourceValueConfigsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListSourcesPagedResponse + extends AbstractPagedListResponse< + ListSourcesRequest, + ListSourcesResponse, + Source, + ListSourcesPage, + ListSourcesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListSourcesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListSourcesPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListSourcesPagedResponse(ListSourcesPage page) { + super(page, ListSourcesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListSourcesPage + extends AbstractPage { + + private ListSourcesPage( + PageContext context, + ListSourcesResponse response) { + super(context, response); + } + + private static ListSourcesPage createEmptyPage() { + return new ListSourcesPage(null, null); + } + + @Override + protected ListSourcesPage createPage( + PageContext context, + ListSourcesResponse response) { + return new ListSourcesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListSourcesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListSourcesRequest, + ListSourcesResponse, + Source, + ListSourcesPage, + ListSourcesFixedSizeCollection> { + + private ListSourcesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListSourcesFixedSizeCollection createEmptyCollection() { + return new ListSourcesFixedSizeCollection(null, 0); + } + + @Override + protected ListSourcesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListSourcesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListValuedResourcesPagedResponse + extends AbstractPagedListResponse< + ListValuedResourcesRequest, + ListValuedResourcesResponse, + ValuedResource, + ListValuedResourcesPage, + ListValuedResourcesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListValuedResourcesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListValuedResourcesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListValuedResourcesPagedResponse(ListValuedResourcesPage page) { + super(page, ListValuedResourcesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListValuedResourcesPage + extends AbstractPage< + ListValuedResourcesRequest, + ListValuedResourcesResponse, + ValuedResource, + ListValuedResourcesPage> { + + private ListValuedResourcesPage( + PageContext + context, + ListValuedResourcesResponse response) { + super(context, response); + } + + private static ListValuedResourcesPage createEmptyPage() { + return new ListValuedResourcesPage(null, null); + } + + @Override + protected ListValuedResourcesPage createPage( + PageContext + context, + ListValuedResourcesResponse response) { + return new ListValuedResourcesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListValuedResourcesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListValuedResourcesRequest, + ListValuedResourcesResponse, + ValuedResource, + ListValuedResourcesPage, + ListValuedResourcesFixedSizeCollection> { + + private ListValuedResourcesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListValuedResourcesFixedSizeCollection createEmptyCollection() { + return new ListValuedResourcesFixedSizeCollection(null, 0); + } + + @Override + protected ListValuedResourcesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListValuedResourcesFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v2/SecurityCenterSettings.java b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v2/SecurityCenterSettings.java new file mode 100644 index 000000000000..592ca59c7579 --- /dev/null +++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v2/SecurityCenterSettings.java @@ -0,0 +1,704 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.securitycenter.v2; + +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.GroupFindingsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListAttackPathsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListBigQueryExportsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListFindingsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListMuteConfigsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListNotificationConfigsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListResourceValueConfigsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListSourcesPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListValuedResourcesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.securitycenter.v2.stub.SecurityCenterStubSettings; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link SecurityCenterClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (securitycenter.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of batchCreateResourceValueConfigs to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * SecurityCenterSettings.Builder securityCenterSettingsBuilder =
+ *     SecurityCenterSettings.newBuilder();
+ * securityCenterSettingsBuilder
+ *     .batchCreateResourceValueConfigsSettings()
+ *     .setRetrySettings(
+ *         securityCenterSettingsBuilder
+ *             .batchCreateResourceValueConfigsSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * SecurityCenterSettings securityCenterSettings = securityCenterSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class SecurityCenterSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to batchCreateResourceValueConfigs. */ + public UnaryCallSettings< + BatchCreateResourceValueConfigsRequest, BatchCreateResourceValueConfigsResponse> + batchCreateResourceValueConfigsSettings() { + return ((SecurityCenterStubSettings) getStubSettings()) + .batchCreateResourceValueConfigsSettings(); + } + + /** 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 createBigQueryExport. */ + public UnaryCallSettings + createBigQueryExportSettings() { + return ((SecurityCenterStubSettings) getStubSettings()).createBigQueryExportSettings(); + } + + /** Returns the object with the settings used for calls to createFinding. */ + 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 createSource. */ + public UnaryCallSettings createSourceSettings() { + return ((SecurityCenterStubSettings) getStubSettings()).createSourceSettings(); + } + + /** Returns the object with the settings used for calls to deleteBigQueryExport. */ + public UnaryCallSettings deleteBigQueryExportSettings() { + return ((SecurityCenterStubSettings) getStubSettings()).deleteBigQueryExportSettings(); + } + + /** 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() { + return ((SecurityCenterStubSettings) getStubSettings()).deleteNotificationConfigSettings(); + } + + /** Returns the object with the settings used for calls to deleteResourceValueConfig. */ + public UnaryCallSettings + deleteResourceValueConfigSettings() { + return ((SecurityCenterStubSettings) getStubSettings()).deleteResourceValueConfigSettings(); + } + + /** Returns the object with the settings used for calls to getBigQueryExport. */ + public UnaryCallSettings getBigQueryExportSettings() { + return ((SecurityCenterStubSettings) getStubSettings()).getBigQueryExportSettings(); + } + + /** Returns the object with the settings used for calls to getSimulation. */ + public UnaryCallSettings getSimulationSettings() { + return ((SecurityCenterStubSettings) getStubSettings()).getSimulationSettings(); + } + + /** Returns the object with the settings used for calls to getValuedResource. */ + public UnaryCallSettings getValuedResourceSettings() { + return ((SecurityCenterStubSettings) getStubSettings()).getValuedResourceSettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + 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() { + return ((SecurityCenterStubSettings) getStubSettings()).getNotificationConfigSettings(); + } + + /** Returns the object with the settings used for calls to getResourceValueConfig. */ + public UnaryCallSettings + getResourceValueConfigSettings() { + return ((SecurityCenterStubSettings) getStubSettings()).getResourceValueConfigSettings(); + } + + /** Returns the object with the settings used for calls to getSource. */ + public UnaryCallSettings getSourceSettings() { + return ((SecurityCenterStubSettings) getStubSettings()).getSourceSettings(); + } + + /** Returns the object with the settings used for calls to groupFindings. */ + public PagedCallSettings + groupFindingsSettings() { + return ((SecurityCenterStubSettings) getStubSettings()).groupFindingsSettings(); + } + + /** Returns the object with the settings used for calls to listAttackPaths. */ + public PagedCallSettings< + ListAttackPathsRequest, ListAttackPathsResponse, ListAttackPathsPagedResponse> + listAttackPathsSettings() { + return ((SecurityCenterStubSettings) getStubSettings()).listAttackPathsSettings(); + } + + /** Returns the object with the settings used for calls to listBigQueryExports. */ + public PagedCallSettings< + ListBigQueryExportsRequest, ListBigQueryExportsResponse, ListBigQueryExportsPagedResponse> + listBigQueryExportsSettings() { + return ((SecurityCenterStubSettings) getStubSettings()).listBigQueryExportsSettings(); + } + + /** Returns the object with the settings used for calls to listFindings. */ + public PagedCallSettings + listFindingsSettings() { + 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, + ListNotificationConfigsResponse, + ListNotificationConfigsPagedResponse> + listNotificationConfigsSettings() { + return ((SecurityCenterStubSettings) getStubSettings()).listNotificationConfigsSettings(); + } + + /** Returns the object with the settings used for calls to listResourceValueConfigs. */ + public PagedCallSettings< + ListResourceValueConfigsRequest, + ListResourceValueConfigsResponse, + ListResourceValueConfigsPagedResponse> + listResourceValueConfigsSettings() { + return ((SecurityCenterStubSettings) getStubSettings()).listResourceValueConfigsSettings(); + } + + /** Returns the object with the settings used for calls to listSources. */ + public PagedCallSettings + listSourcesSettings() { + return ((SecurityCenterStubSettings) getStubSettings()).listSourcesSettings(); + } + + /** Returns the object with the settings used for calls to listValuedResources. */ + public PagedCallSettings< + ListValuedResourcesRequest, ListValuedResourcesResponse, ListValuedResourcesPagedResponse> + listValuedResourcesSettings() { + return ((SecurityCenterStubSettings) getStubSettings()).listValuedResourcesSettings(); + } + + /** Returns the object with the settings used for calls to setFindingState. */ + public UnaryCallSettings setFindingStateSettings() { + return ((SecurityCenterStubSettings) getStubSettings()).setFindingStateSettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((SecurityCenterStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** 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 testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return ((SecurityCenterStubSettings) getStubSettings()).testIamPermissionsSettings(); + } + + /** Returns the object with the settings used for calls to updateBigQueryExport. */ + public UnaryCallSettings + updateBigQueryExportSettings() { + return ((SecurityCenterStubSettings) getStubSettings()).updateBigQueryExportSettings(); + } + + /** 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() { + return ((SecurityCenterStubSettings) getStubSettings()).updateNotificationConfigSettings(); + } + + /** Returns the object with the settings used for calls to updateResourceValueConfig. */ + public UnaryCallSettings + updateResourceValueConfigSettings() { + return ((SecurityCenterStubSettings) getStubSettings()).updateResourceValueConfigSettings(); + } + + /** Returns the object with the settings used for calls to updateSecurityMarks. */ + public UnaryCallSettings + updateSecurityMarksSettings() { + return ((SecurityCenterStubSettings) getStubSettings()).updateSecurityMarksSettings(); + } + + /** Returns the object with the settings used for calls to updateSource. */ + public UnaryCallSettings updateSourceSettings() { + return ((SecurityCenterStubSettings) getStubSettings()).updateSourceSettings(); + } + + public static final SecurityCenterSettings create(SecurityCenterStubSettings stub) + throws IOException { + return new SecurityCenterSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return SecurityCenterStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return SecurityCenterStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return SecurityCenterStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return SecurityCenterStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return SecurityCenterStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return SecurityCenterStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return SecurityCenterStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return SecurityCenterStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected SecurityCenterSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for SecurityCenterSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(SecurityCenterStubSettings.newBuilder(clientContext)); + } + + protected Builder(SecurityCenterSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(SecurityCenterStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(SecurityCenterStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(SecurityCenterStubSettings.newHttpJsonBuilder()); + } + + public SecurityCenterStubSettings.Builder getStubSettingsBuilder() { + return ((SecurityCenterStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to batchCreateResourceValueConfigs. */ + public UnaryCallSettings.Builder< + BatchCreateResourceValueConfigsRequest, BatchCreateResourceValueConfigsResponse> + batchCreateResourceValueConfigsSettings() { + return getStubSettingsBuilder().batchCreateResourceValueConfigsSettings(); + } + + /** 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 createBigQueryExport. */ + public UnaryCallSettings.Builder + createBigQueryExportSettings() { + return getStubSettingsBuilder().createBigQueryExportSettings(); + } + + /** Returns the builder for the settings used for calls to createFinding. */ + public UnaryCallSettings.Builder createFindingSettings() { + 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 createSource. */ + public UnaryCallSettings.Builder createSourceSettings() { + return getStubSettingsBuilder().createSourceSettings(); + } + + /** Returns the builder for the settings used for calls to deleteBigQueryExport. */ + public UnaryCallSettings.Builder + deleteBigQueryExportSettings() { + return getStubSettingsBuilder().deleteBigQueryExportSettings(); + } + + /** 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() { + return getStubSettingsBuilder().deleteNotificationConfigSettings(); + } + + /** Returns the builder for the settings used for calls to deleteResourceValueConfig. */ + public UnaryCallSettings.Builder + deleteResourceValueConfigSettings() { + return getStubSettingsBuilder().deleteResourceValueConfigSettings(); + } + + /** Returns the builder for the settings used for calls to getBigQueryExport. */ + public UnaryCallSettings.Builder + getBigQueryExportSettings() { + return getStubSettingsBuilder().getBigQueryExportSettings(); + } + + /** Returns the builder for the settings used for calls to getSimulation. */ + public UnaryCallSettings.Builder getSimulationSettings() { + return getStubSettingsBuilder().getSimulationSettings(); + } + + /** Returns the builder for the settings used for calls to getValuedResource. */ + public UnaryCallSettings.Builder + getValuedResourceSettings() { + return getStubSettingsBuilder().getValuedResourceSettings(); + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + 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() { + return getStubSettingsBuilder().getNotificationConfigSettings(); + } + + /** Returns the builder for the settings used for calls to getResourceValueConfig. */ + public UnaryCallSettings.Builder + getResourceValueConfigSettings() { + return getStubSettingsBuilder().getResourceValueConfigSettings(); + } + + /** Returns the builder for the settings used for calls to getSource. */ + public UnaryCallSettings.Builder getSourceSettings() { + return getStubSettingsBuilder().getSourceSettings(); + } + + /** Returns the builder for the settings used for calls to groupFindings. */ + public PagedCallSettings.Builder< + GroupFindingsRequest, GroupFindingsResponse, GroupFindingsPagedResponse> + groupFindingsSettings() { + return getStubSettingsBuilder().groupFindingsSettings(); + } + + /** Returns the builder for the settings used for calls to listAttackPaths. */ + public PagedCallSettings.Builder< + ListAttackPathsRequest, ListAttackPathsResponse, ListAttackPathsPagedResponse> + listAttackPathsSettings() { + return getStubSettingsBuilder().listAttackPathsSettings(); + } + + /** Returns the builder for the settings used for calls to listBigQueryExports. */ + public PagedCallSettings.Builder< + ListBigQueryExportsRequest, + ListBigQueryExportsResponse, + ListBigQueryExportsPagedResponse> + listBigQueryExportsSettings() { + return getStubSettingsBuilder().listBigQueryExportsSettings(); + } + + /** Returns the builder for the settings used for calls to listFindings. */ + public PagedCallSettings.Builder< + ListFindingsRequest, ListFindingsResponse, ListFindingsPagedResponse> + listFindingsSettings() { + 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, + ListNotificationConfigsResponse, + ListNotificationConfigsPagedResponse> + listNotificationConfigsSettings() { + return getStubSettingsBuilder().listNotificationConfigsSettings(); + } + + /** Returns the builder for the settings used for calls to listResourceValueConfigs. */ + public PagedCallSettings.Builder< + ListResourceValueConfigsRequest, + ListResourceValueConfigsResponse, + ListResourceValueConfigsPagedResponse> + listResourceValueConfigsSettings() { + return getStubSettingsBuilder().listResourceValueConfigsSettings(); + } + + /** Returns the builder for the settings used for calls to listSources. */ + public PagedCallSettings.Builder< + ListSourcesRequest, ListSourcesResponse, ListSourcesPagedResponse> + listSourcesSettings() { + return getStubSettingsBuilder().listSourcesSettings(); + } + + /** Returns the builder for the settings used for calls to listValuedResources. */ + public PagedCallSettings.Builder< + ListValuedResourcesRequest, + ListValuedResourcesResponse, + ListValuedResourcesPagedResponse> + listValuedResourcesSettings() { + return getStubSettingsBuilder().listValuedResourcesSettings(); + } + + /** Returns the builder for the settings used for calls to setFindingState. */ + public UnaryCallSettings.Builder setFindingStateSettings() { + return getStubSettingsBuilder().setFindingStateSettings(); + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return getStubSettingsBuilder().setIamPolicySettings(); + } + + /** 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 testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return getStubSettingsBuilder().testIamPermissionsSettings(); + } + + /** Returns the builder for the settings used for calls to updateBigQueryExport. */ + public UnaryCallSettings.Builder + updateBigQueryExportSettings() { + return getStubSettingsBuilder().updateBigQueryExportSettings(); + } + + /** 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() { + return getStubSettingsBuilder().updateNotificationConfigSettings(); + } + + /** Returns the builder for the settings used for calls to updateResourceValueConfig. */ + public UnaryCallSettings.Builder + updateResourceValueConfigSettings() { + return getStubSettingsBuilder().updateResourceValueConfigSettings(); + } + + /** Returns the builder for the settings used for calls to updateSecurityMarks. */ + public UnaryCallSettings.Builder + updateSecurityMarksSettings() { + return getStubSettingsBuilder().updateSecurityMarksSettings(); + } + + /** Returns the builder for the settings used for calls to updateSource. */ + public UnaryCallSettings.Builder updateSourceSettings() { + return getStubSettingsBuilder().updateSourceSettings(); + } + + @Override + public SecurityCenterSettings build() throws IOException { + return new SecurityCenterSettings(this); + } + } +} diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v2/gapic_metadata.json b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v2/gapic_metadata.json new file mode 100644 index 000000000000..2447e5139a07 --- /dev/null +++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v2/gapic_metadata.json @@ -0,0 +1,138 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.securitycenter.v2", + "libraryPackage": "com.google.cloud.securitycenter.v2", + "services": { + "SecurityCenter": { + "clients": { + "grpc": { + "libraryClient": "SecurityCenterClient", + "rpcs": { + "BatchCreateResourceValueConfigs": { + "methods": ["batchCreateResourceValueConfigs", "batchCreateResourceValueConfigs", "batchCreateResourceValueConfigs", "batchCreateResourceValueConfigsCallable"] + }, + "BulkMuteFindings": { + "methods": ["bulkMuteFindingsAsync", "bulkMuteFindingsAsync", "bulkMuteFindingsAsync", "bulkMuteFindingsOperationCallable", "bulkMuteFindingsCallable"] + }, + "CreateBigQueryExport": { + "methods": ["createBigQueryExport", "createBigQueryExport", "createBigQueryExport", "createBigQueryExport", "createBigQueryExport", "createBigQueryExportCallable"] + }, + "CreateFinding": { + "methods": ["createFinding", "createFinding", "createFinding", "createFindingCallable"] + }, + "CreateMuteConfig": { + "methods": ["createMuteConfig", "createMuteConfig", "createMuteConfig", "createMuteConfig", "createMuteConfig", "createMuteConfig", "createMuteConfig", "createMuteConfig", "createMuteConfigCallable"] + }, + "CreateNotificationConfig": { + "methods": ["createNotificationConfig", "createNotificationConfig", "createNotificationConfig", "createNotificationConfig", "createNotificationConfig", "createNotificationConfigCallable"] + }, + "CreateSource": { + "methods": ["createSource", "createSource", "createSource", "createSourceCallable"] + }, + "DeleteBigQueryExport": { + "methods": ["deleteBigQueryExport", "deleteBigQueryExport", "deleteBigQueryExport", "deleteBigQueryExportCallable"] + }, + "DeleteMuteConfig": { + "methods": ["deleteMuteConfig", "deleteMuteConfig", "deleteMuteConfig", "deleteMuteConfigCallable"] + }, + "DeleteNotificationConfig": { + "methods": ["deleteNotificationConfig", "deleteNotificationConfig", "deleteNotificationConfig", "deleteNotificationConfigCallable"] + }, + "DeleteResourceValueConfig": { + "methods": ["deleteResourceValueConfig", "deleteResourceValueConfig", "deleteResourceValueConfig", "deleteResourceValueConfigCallable"] + }, + "GetBigQueryExport": { + "methods": ["getBigQueryExport", "getBigQueryExport", "getBigQueryExport", "getBigQueryExportCallable"] + }, + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicy", "getIamPolicy", "getIamPolicyCallable"] + }, + "GetMuteConfig": { + "methods": ["getMuteConfig", "getMuteConfig", "getMuteConfig", "getMuteConfigCallable"] + }, + "GetNotificationConfig": { + "methods": ["getNotificationConfig", "getNotificationConfig", "getNotificationConfig", "getNotificationConfigCallable"] + }, + "GetResourceValueConfig": { + "methods": ["getResourceValueConfig", "getResourceValueConfig", "getResourceValueConfig", "getResourceValueConfigCallable"] + }, + "GetSimulation": { + "methods": ["getSimulation", "getSimulation", "getSimulation", "getSimulationCallable"] + }, + "GetSource": { + "methods": ["getSource", "getSource", "getSource", "getSourceCallable"] + }, + "GetValuedResource": { + "methods": ["getValuedResource", "getValuedResource", "getValuedResource", "getValuedResourceCallable"] + }, + "GroupFindings": { + "methods": ["groupFindings", "groupFindings", "groupFindings", "groupFindingsPagedCallable", "groupFindingsCallable"] + }, + "ListAttackPaths": { + "methods": ["listAttackPaths", "listAttackPaths", "listAttackPaths", "listAttackPathsPagedCallable", "listAttackPathsCallable"] + }, + "ListBigQueryExports": { + "methods": ["listBigQueryExports", "listBigQueryExports", "listBigQueryExports", "listBigQueryExports", "listBigQueryExports", "listBigQueryExportsPagedCallable", "listBigQueryExportsCallable"] + }, + "ListFindings": { + "methods": ["listFindings", "listFindings", "listFindings", "listFindingsPagedCallable", "listFindingsCallable"] + }, + "ListMuteConfigs": { + "methods": ["listMuteConfigs", "listMuteConfigs", "listMuteConfigs", "listMuteConfigs", "listMuteConfigs", "listMuteConfigs", "listMuteConfigs", "listMuteConfigs", "listMuteConfigsPagedCallable", "listMuteConfigsCallable"] + }, + "ListNotificationConfigs": { + "methods": ["listNotificationConfigs", "listNotificationConfigs", "listNotificationConfigs", "listNotificationConfigs", "listNotificationConfigs", "listNotificationConfigsPagedCallable", "listNotificationConfigsCallable"] + }, + "ListResourceValueConfigs": { + "methods": ["listResourceValueConfigs", "listResourceValueConfigs", "listResourceValueConfigs", "listResourceValueConfigsPagedCallable", "listResourceValueConfigsCallable"] + }, + "ListSources": { + "methods": ["listSources", "listSources", "listSources", "listSources", "listSources", "listSourcesPagedCallable", "listSourcesCallable"] + }, + "ListValuedResources": { + "methods": ["listValuedResources", "listValuedResources", "listValuedResources", "listValuedResourcesPagedCallable", "listValuedResourcesCallable"] + }, + "SetFindingState": { + "methods": ["setFindingState", "setFindingState", "setFindingState", "setFindingStateCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicy", "setIamPolicy", "setIamPolicyCallable"] + }, + "SetMute": { + "methods": ["setMute", "setMute", "setMute", "setMuteCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissions", "testIamPermissions", "testIamPermissionsCallable"] + }, + "UpdateBigQueryExport": { + "methods": ["updateBigQueryExport", "updateBigQueryExport", "updateBigQueryExportCallable"] + }, + "UpdateExternalSystem": { + "methods": ["updateExternalSystem", "updateExternalSystem", "updateExternalSystemCallable"] + }, + "UpdateFinding": { + "methods": ["updateFinding", "updateFinding", "updateFindingCallable"] + }, + "UpdateMuteConfig": { + "methods": ["updateMuteConfig", "updateMuteConfig", "updateMuteConfigCallable"] + }, + "UpdateNotificationConfig": { + "methods": ["updateNotificationConfig", "updateNotificationConfig", "updateNotificationConfigCallable"] + }, + "UpdateResourceValueConfig": { + "methods": ["updateResourceValueConfig", "updateResourceValueConfig", "updateResourceValueConfigCallable"] + }, + "UpdateSecurityMarks": { + "methods": ["updateSecurityMarks", "updateSecurityMarks", "updateSecurityMarksCallable"] + }, + "UpdateSource": { + "methods": ["updateSource", "updateSource", "updateSourceCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v2/package-info.java b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v2/package-info.java new file mode 100644 index 000000000000..b56fad698cec --- /dev/null +++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v2/package-info.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * A client to Security Command Center API + * + *

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

======================= SecurityCenterClient ======================= + * + *

Service Description: V2 APIs for Security Center service. + * + *

Sample for SecurityCenterClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+ *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+ *   List requests = new ArrayList<>();
+ *   BatchCreateResourceValueConfigsResponse response =
+ *       securityCenterClient.batchCreateResourceValueConfigs(parent, requests);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.securitycenter.v2; + +import javax.annotation.Generated; diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v2/stub/GrpcSecurityCenterCallableFactory.java b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v2/stub/GrpcSecurityCenterCallableFactory.java new file mode 100644 index 000000000000..aae719093172 --- /dev/null +++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v2/stub/GrpcSecurityCenterCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.securitycenter.v2.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the SecurityCenter service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcSecurityCenterCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v2/stub/GrpcSecurityCenterStub.java b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v2/stub/GrpcSecurityCenterStub.java new file mode 100644 index 000000000000..bc1bf24cebac --- /dev/null +++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v2/stub/GrpcSecurityCenterStub.java @@ -0,0 +1,1679 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.securitycenter.v2.stub; + +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.GroupFindingsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListAttackPathsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListBigQueryExportsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListFindingsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListMuteConfigsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListNotificationConfigsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListResourceValueConfigsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListSourcesPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListValuedResourcesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.api.pathtemplate.PathTemplate; +import com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest; +import com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse; +import com.google.cloud.securitycenter.v2.BigQueryExport; +import com.google.cloud.securitycenter.v2.BulkMuteFindingsRequest; +import com.google.cloud.securitycenter.v2.BulkMuteFindingsResponse; +import com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest; +import com.google.cloud.securitycenter.v2.CreateFindingRequest; +import com.google.cloud.securitycenter.v2.CreateMuteConfigRequest; +import com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest; +import com.google.cloud.securitycenter.v2.CreateSourceRequest; +import com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest; +import com.google.cloud.securitycenter.v2.DeleteMuteConfigRequest; +import com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest; +import com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest; +import com.google.cloud.securitycenter.v2.ExternalSystem; +import com.google.cloud.securitycenter.v2.Finding; +import com.google.cloud.securitycenter.v2.GetBigQueryExportRequest; +import com.google.cloud.securitycenter.v2.GetMuteConfigRequest; +import com.google.cloud.securitycenter.v2.GetNotificationConfigRequest; +import com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest; +import com.google.cloud.securitycenter.v2.GetSimulationRequest; +import com.google.cloud.securitycenter.v2.GetSourceRequest; +import com.google.cloud.securitycenter.v2.GetValuedResourceRequest; +import com.google.cloud.securitycenter.v2.GroupFindingsRequest; +import com.google.cloud.securitycenter.v2.GroupFindingsResponse; +import com.google.cloud.securitycenter.v2.ListAttackPathsRequest; +import com.google.cloud.securitycenter.v2.ListAttackPathsResponse; +import com.google.cloud.securitycenter.v2.ListBigQueryExportsRequest; +import com.google.cloud.securitycenter.v2.ListBigQueryExportsResponse; +import com.google.cloud.securitycenter.v2.ListFindingsRequest; +import com.google.cloud.securitycenter.v2.ListFindingsResponse; +import com.google.cloud.securitycenter.v2.ListMuteConfigsRequest; +import com.google.cloud.securitycenter.v2.ListMuteConfigsResponse; +import com.google.cloud.securitycenter.v2.ListNotificationConfigsRequest; +import com.google.cloud.securitycenter.v2.ListNotificationConfigsResponse; +import com.google.cloud.securitycenter.v2.ListResourceValueConfigsRequest; +import com.google.cloud.securitycenter.v2.ListResourceValueConfigsResponse; +import com.google.cloud.securitycenter.v2.ListSourcesRequest; +import com.google.cloud.securitycenter.v2.ListSourcesResponse; +import com.google.cloud.securitycenter.v2.ListValuedResourcesRequest; +import com.google.cloud.securitycenter.v2.ListValuedResourcesResponse; +import com.google.cloud.securitycenter.v2.MuteConfig; +import com.google.cloud.securitycenter.v2.NotificationConfig; +import com.google.cloud.securitycenter.v2.ResourceValueConfig; +import com.google.cloud.securitycenter.v2.SecurityMarks; +import com.google.cloud.securitycenter.v2.SetFindingStateRequest; +import com.google.cloud.securitycenter.v2.SetMuteRequest; +import com.google.cloud.securitycenter.v2.Simulation; +import com.google.cloud.securitycenter.v2.Source; +import com.google.cloud.securitycenter.v2.UpdateBigQueryExportRequest; +import com.google.cloud.securitycenter.v2.UpdateExternalSystemRequest; +import com.google.cloud.securitycenter.v2.UpdateFindingRequest; +import com.google.cloud.securitycenter.v2.UpdateMuteConfigRequest; +import com.google.cloud.securitycenter.v2.UpdateNotificationConfigRequest; +import com.google.cloud.securitycenter.v2.UpdateResourceValueConfigRequest; +import com.google.cloud.securitycenter.v2.UpdateSecurityMarksRequest; +import com.google.cloud.securitycenter.v2.UpdateSourceRequest; +import com.google.cloud.securitycenter.v2.ValuedResource; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the SecurityCenter service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcSecurityCenterStub extends SecurityCenterStub { + private static final MethodDescriptor< + BatchCreateResourceValueConfigsRequest, BatchCreateResourceValueConfigsResponse> + batchCreateResourceValueConfigsMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.securitycenter.v2.SecurityCenter/BatchCreateResourceValueConfigs") + .setRequestMarshaller( + ProtoUtils.marshaller( + BatchCreateResourceValueConfigsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller( + BatchCreateResourceValueConfigsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + bulkMuteFindingsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/BulkMuteFindings") + .setRequestMarshaller( + ProtoUtils.marshaller(BulkMuteFindingsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createBigQueryExportMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.securitycenter.v2.SecurityCenter/CreateBigQueryExport") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateBigQueryExportRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(BigQueryExport.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createFindingMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/CreateFinding") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateFindingRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Finding.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createMuteConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/CreateMuteConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateMuteConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(MuteConfig.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createNotificationConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.securitycenter.v2.SecurityCenter/CreateNotificationConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateNotificationConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(NotificationConfig.getDefaultInstance())) + .build(); + + private static final MethodDescriptor createSourceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/CreateSource") + .setRequestMarshaller(ProtoUtils.marshaller(CreateSourceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Source.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteBigQueryExportMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.securitycenter.v2.SecurityCenter/DeleteBigQueryExport") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteBigQueryExportRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteMuteConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/DeleteMuteConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteMuteConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteNotificationConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.securitycenter.v2.SecurityCenter/DeleteNotificationConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteNotificationConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteResourceValueConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.securitycenter.v2.SecurityCenter/DeleteResourceValueConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteResourceValueConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getBigQueryExportMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/GetBigQueryExport") + .setRequestMarshaller( + ProtoUtils.marshaller(GetBigQueryExportRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(BigQueryExport.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getSimulationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/GetSimulation") + .setRequestMarshaller( + ProtoUtils.marshaller(GetSimulationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Simulation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getValuedResourceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/GetValuedResource") + .setRequestMarshaller( + ProtoUtils.marshaller(GetValuedResourceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ValuedResource.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/GetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getMuteConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/GetMuteConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(GetMuteConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(MuteConfig.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getNotificationConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.securitycenter.v2.SecurityCenter/GetNotificationConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(GetNotificationConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(NotificationConfig.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getResourceValueConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.securitycenter.v2.SecurityCenter/GetResourceValueConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(GetResourceValueConfigRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ResourceValueConfig.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getSourceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/GetSource") + .setRequestMarshaller(ProtoUtils.marshaller(GetSourceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Source.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + groupFindingsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/GroupFindings") + .setRequestMarshaller( + ProtoUtils.marshaller(GroupFindingsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(GroupFindingsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listAttackPathsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/ListAttackPaths") + .setRequestMarshaller( + ProtoUtils.marshaller(ListAttackPathsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListAttackPathsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listBigQueryExportsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.securitycenter.v2.SecurityCenter/ListBigQueryExports") + .setRequestMarshaller( + ProtoUtils.marshaller(ListBigQueryExportsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListBigQueryExportsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listFindingsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/ListFindings") + .setRequestMarshaller(ProtoUtils.marshaller(ListFindingsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListFindingsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listMuteConfigsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/ListMuteConfigs") + .setRequestMarshaller( + ProtoUtils.marshaller(ListMuteConfigsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListMuteConfigsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + ListNotificationConfigsRequest, ListNotificationConfigsResponse> + listNotificationConfigsMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.securitycenter.v2.SecurityCenter/ListNotificationConfigs") + .setRequestMarshaller( + ProtoUtils.marshaller(ListNotificationConfigsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListNotificationConfigsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + ListResourceValueConfigsRequest, ListResourceValueConfigsResponse> + listResourceValueConfigsMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.securitycenter.v2.SecurityCenter/ListResourceValueConfigs") + .setRequestMarshaller( + ProtoUtils.marshaller(ListResourceValueConfigsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListResourceValueConfigsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listSourcesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/ListSources") + .setRequestMarshaller(ProtoUtils.marshaller(ListSourcesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListSourcesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listValuedResourcesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.securitycenter.v2.SecurityCenter/ListValuedResources") + .setRequestMarshaller( + ProtoUtils.marshaller(ListValuedResourcesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListValuedResourcesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + setFindingStateMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/SetFindingState") + .setRequestMarshaller( + ProtoUtils.marshaller(SetFindingStateRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Finding.getDefaultInstance())) + .build(); + + private static final MethodDescriptor setIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/SetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor setMuteMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/SetMute") + .setRequestMarshaller(ProtoUtils.marshaller(SetMuteRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Finding.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + testIamPermissionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/TestIamPermissions") + .setRequestMarshaller( + ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateBigQueryExportMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.securitycenter.v2.SecurityCenter/UpdateBigQueryExport") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateBigQueryExportRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(BigQueryExport.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateExternalSystemMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.securitycenter.v2.SecurityCenter/UpdateExternalSystem") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateExternalSystemRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ExternalSystem.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateFindingMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/UpdateFinding") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateFindingRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Finding.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateMuteConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/UpdateMuteConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateMuteConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(MuteConfig.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateNotificationConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.securitycenter.v2.SecurityCenter/UpdateNotificationConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateNotificationConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(NotificationConfig.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateResourceValueConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.securitycenter.v2.SecurityCenter/UpdateResourceValueConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateResourceValueConfigRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ResourceValueConfig.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateSecurityMarksMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.securitycenter.v2.SecurityCenter/UpdateSecurityMarks") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateSecurityMarksRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(SecurityMarks.getDefaultInstance())) + .build(); + + private static final MethodDescriptor updateSourceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/UpdateSource") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateSourceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Source.getDefaultInstance())) + .build(); + + private final UnaryCallable< + BatchCreateResourceValueConfigsRequest, BatchCreateResourceValueConfigsResponse> + batchCreateResourceValueConfigsCallable; + private final UnaryCallable bulkMuteFindingsCallable; + private final OperationCallable + bulkMuteFindingsOperationCallable; + private final UnaryCallable + createBigQueryExportCallable; + private final UnaryCallable createFindingCallable; + private final UnaryCallable createMuteConfigCallable; + private final UnaryCallable + createNotificationConfigCallable; + private final UnaryCallable createSourceCallable; + private final UnaryCallable deleteBigQueryExportCallable; + private final UnaryCallable deleteMuteConfigCallable; + private final UnaryCallable + deleteNotificationConfigCallable; + private final UnaryCallable + deleteResourceValueConfigCallable; + private final UnaryCallable getBigQueryExportCallable; + private final UnaryCallable getSimulationCallable; + private final UnaryCallable getValuedResourceCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable getMuteConfigCallable; + private final UnaryCallable + getNotificationConfigCallable; + private final UnaryCallable + getResourceValueConfigCallable; + private final UnaryCallable getSourceCallable; + private final UnaryCallable groupFindingsCallable; + private final UnaryCallable + groupFindingsPagedCallable; + private final UnaryCallable + listAttackPathsCallable; + private final UnaryCallable + listAttackPathsPagedCallable; + private final UnaryCallable + listBigQueryExportsCallable; + private final UnaryCallable + listBigQueryExportsPagedCallable; + private final UnaryCallable listFindingsCallable; + private final UnaryCallable + listFindingsPagedCallable; + private final UnaryCallable + listMuteConfigsCallable; + private final UnaryCallable + listMuteConfigsPagedCallable; + private final UnaryCallable + listNotificationConfigsCallable; + private final UnaryCallable + listNotificationConfigsPagedCallable; + private final UnaryCallable + listResourceValueConfigsCallable; + private final UnaryCallable< + ListResourceValueConfigsRequest, ListResourceValueConfigsPagedResponse> + listResourceValueConfigsPagedCallable; + private final UnaryCallable listSourcesCallable; + private final UnaryCallable + listSourcesPagedCallable; + private final UnaryCallable + listValuedResourcesCallable; + private final UnaryCallable + listValuedResourcesPagedCallable; + private final UnaryCallable setFindingStateCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable setMuteCallable; + private final UnaryCallable + testIamPermissionsCallable; + private final UnaryCallable + updateBigQueryExportCallable; + private final UnaryCallable + updateExternalSystemCallable; + private final UnaryCallable updateFindingCallable; + private final UnaryCallable updateMuteConfigCallable; + private final UnaryCallable + updateNotificationConfigCallable; + private final UnaryCallable + updateResourceValueConfigCallable; + private final UnaryCallable + updateSecurityMarksCallable; + private final UnaryCallable updateSourceCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + private static final PathTemplate CREATE_MUTE_CONFIG_0_PATH_TEMPLATE = + PathTemplate.create("projects/*/locations/{location=*}"); + private static final PathTemplate CREATE_MUTE_CONFIG_1_PATH_TEMPLATE = + PathTemplate.create("organizations/*/locations/{location=*}"); + private static final PathTemplate CREATE_MUTE_CONFIG_2_PATH_TEMPLATE = + PathTemplate.create("folders/*/locations/{location=*}"); + private static final PathTemplate DELETE_MUTE_CONFIG_0_PATH_TEMPLATE = + PathTemplate.create("projects/*/locations/{location=*}/muteConfigs/*"); + private static final PathTemplate DELETE_MUTE_CONFIG_1_PATH_TEMPLATE = + PathTemplate.create("organizations/*/locations/{location=*}/muteConfigs/*"); + private static final PathTemplate DELETE_MUTE_CONFIG_2_PATH_TEMPLATE = + PathTemplate.create("folders/*/locations/{location=*}/muteConfigs/*"); + private static final PathTemplate GET_MUTE_CONFIG_0_PATH_TEMPLATE = + PathTemplate.create("projects/*/locations/{location=*}/muteConfigs/*"); + private static final PathTemplate GET_MUTE_CONFIG_1_PATH_TEMPLATE = + PathTemplate.create("organizations/*/locations/{location=*}/muteConfigs/*"); + private static final PathTemplate GET_MUTE_CONFIG_2_PATH_TEMPLATE = + PathTemplate.create("folders/*/locations/{location=*}/muteConfigs/*"); + private static final PathTemplate LIST_MUTE_CONFIGS_0_PATH_TEMPLATE = + PathTemplate.create("projects/*/locations/{location=*}/muteConfigs"); + private static final PathTemplate LIST_MUTE_CONFIGS_1_PATH_TEMPLATE = + PathTemplate.create("organizations/*/locations/{location=*}/muteConfigs"); + private static final PathTemplate LIST_MUTE_CONFIGS_2_PATH_TEMPLATE = + PathTemplate.create("folders/*/locations/{location=*}/muteConfigs"); + private static final PathTemplate UPDATE_MUTE_CONFIG_0_PATH_TEMPLATE = + PathTemplate.create("projects/*/locations/{location=*}/muteConfigs/*"); + private static final PathTemplate UPDATE_MUTE_CONFIG_1_PATH_TEMPLATE = + PathTemplate.create("organizations/*/locations/{location=*}/muteConfigs/*"); + private static final PathTemplate UPDATE_MUTE_CONFIG_2_PATH_TEMPLATE = + PathTemplate.create("folders/*/locations/{location=*}/muteConfigs/*"); + + public static final GrpcSecurityCenterStub create(SecurityCenterStubSettings settings) + throws IOException { + return new GrpcSecurityCenterStub(settings, ClientContext.create(settings)); + } + + public static final GrpcSecurityCenterStub create(ClientContext clientContext) + throws IOException { + return new GrpcSecurityCenterStub( + SecurityCenterStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcSecurityCenterStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcSecurityCenterStub( + SecurityCenterStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcSecurityCenterStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcSecurityCenterStub(SecurityCenterStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcSecurityCenterCallableFactory()); + } + + /** + * Constructs an instance of GrpcSecurityCenterStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcSecurityCenterStub( + SecurityCenterStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings< + BatchCreateResourceValueConfigsRequest, BatchCreateResourceValueConfigsResponse> + batchCreateResourceValueConfigsTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(batchCreateResourceValueConfigsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings bulkMuteFindingsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(bulkMuteFindingsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + createBigQueryExportTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createBigQueryExportMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings createFindingTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createFindingMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings createMuteConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createMuteConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getParent(), "location", CREATE_MUTE_CONFIG_0_PATH_TEMPLATE); + builder.add(request.getParent(), "location", CREATE_MUTE_CONFIG_1_PATH_TEMPLATE); + builder.add(request.getParent(), "location", CREATE_MUTE_CONFIG_2_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + GrpcCallSettings + createNotificationConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createNotificationConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings createSourceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createSourceMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteBigQueryExportTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteBigQueryExportMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteMuteConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteMuteConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getName(), "location", DELETE_MUTE_CONFIG_0_PATH_TEMPLATE); + builder.add(request.getName(), "location", DELETE_MUTE_CONFIG_1_PATH_TEMPLATE); + builder.add(request.getName(), "location", DELETE_MUTE_CONFIG_2_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + GrpcCallSettings + deleteNotificationConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteNotificationConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + deleteResourceValueConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteResourceValueConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getBigQueryExportTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getBigQueryExportMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getSimulationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getSimulationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getValuedResourceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getValuedResourceMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + GrpcCallSettings getMuteConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getMuteConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getName(), "location", GET_MUTE_CONFIG_0_PATH_TEMPLATE); + builder.add(request.getName(), "location", GET_MUTE_CONFIG_1_PATH_TEMPLATE); + builder.add(request.getName(), "location", GET_MUTE_CONFIG_2_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + GrpcCallSettings + getNotificationConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getNotificationConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + getResourceValueConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getResourceValueConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getSourceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getSourceMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings groupFindingsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(groupFindingsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listAttackPathsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listAttackPathsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listBigQueryExportsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listBigQueryExportsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings listFindingsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listFindingsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listMuteConfigsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listMuteConfigsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + request.getParent(), "location", LIST_MUTE_CONFIGS_0_PATH_TEMPLATE); + builder.add( + request.getParent(), "location", LIST_MUTE_CONFIGS_1_PATH_TEMPLATE); + builder.add( + request.getParent(), "location", LIST_MUTE_CONFIGS_2_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + GrpcCallSettings + listNotificationConfigsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listNotificationConfigsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listResourceValueConfigsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listResourceValueConfigsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings listSourcesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listSourcesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listValuedResourcesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listValuedResourcesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings setFindingStateTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setFindingStateMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings setIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + GrpcCallSettings setMuteTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setMuteMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + testIamPermissionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + GrpcCallSettings + updateBigQueryExportTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateBigQueryExportMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "big_query_export.name", + String.valueOf(request.getBigQueryExport().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + updateExternalSystemTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateExternalSystemMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "external_system.name", + String.valueOf(request.getExternalSystem().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateFindingTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateFindingMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("finding.name", String.valueOf(request.getFinding().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateMuteConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateMuteConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + if (request.getMuteConfig() != null) { + builder.add( + request.getMuteConfig().getName(), + "location", + UPDATE_MUTE_CONFIG_0_PATH_TEMPLATE); + } + if (request.getMuteConfig() != null) { + builder.add( + request.getMuteConfig().getName(), + "location", + UPDATE_MUTE_CONFIG_1_PATH_TEMPLATE); + } + if (request.getMuteConfig() != null) { + builder.add( + request.getMuteConfig().getName(), + "location", + UPDATE_MUTE_CONFIG_2_PATH_TEMPLATE); + } + return builder.build(); + }) + .build(); + GrpcCallSettings + updateNotificationConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateNotificationConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "notification_config.name", + String.valueOf(request.getNotificationConfig().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + updateResourceValueConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateResourceValueConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "resource_value_config.name", + String.valueOf(request.getResourceValueConfig().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + updateSecurityMarksTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateSecurityMarksMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "security_marks.name", + String.valueOf(request.getSecurityMarks().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateSourceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateSourceMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("source.name", String.valueOf(request.getSource().getName())); + return builder.build(); + }) + .build(); + + this.batchCreateResourceValueConfigsCallable = + callableFactory.createUnaryCallable( + batchCreateResourceValueConfigsTransportSettings, + settings.batchCreateResourceValueConfigsSettings(), + clientContext); + this.bulkMuteFindingsCallable = + callableFactory.createUnaryCallable( + bulkMuteFindingsTransportSettings, settings.bulkMuteFindingsSettings(), clientContext); + this.bulkMuteFindingsOperationCallable = + callableFactory.createOperationCallable( + bulkMuteFindingsTransportSettings, + settings.bulkMuteFindingsOperationSettings(), + clientContext, + operationsStub); + this.createBigQueryExportCallable = + callableFactory.createUnaryCallable( + createBigQueryExportTransportSettings, + settings.createBigQueryExportSettings(), + 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.createSourceCallable = + callableFactory.createUnaryCallable( + createSourceTransportSettings, settings.createSourceSettings(), clientContext); + this.deleteBigQueryExportCallable = + callableFactory.createUnaryCallable( + deleteBigQueryExportTransportSettings, + settings.deleteBigQueryExportSettings(), + clientContext); + this.deleteMuteConfigCallable = + callableFactory.createUnaryCallable( + deleteMuteConfigTransportSettings, settings.deleteMuteConfigSettings(), clientContext); + this.deleteNotificationConfigCallable = + callableFactory.createUnaryCallable( + deleteNotificationConfigTransportSettings, + settings.deleteNotificationConfigSettings(), + clientContext); + this.deleteResourceValueConfigCallable = + callableFactory.createUnaryCallable( + deleteResourceValueConfigTransportSettings, + settings.deleteResourceValueConfigSettings(), + clientContext); + this.getBigQueryExportCallable = + callableFactory.createUnaryCallable( + getBigQueryExportTransportSettings, + settings.getBigQueryExportSettings(), + clientContext); + this.getSimulationCallable = + callableFactory.createUnaryCallable( + getSimulationTransportSettings, settings.getSimulationSettings(), clientContext); + this.getValuedResourceCallable = + callableFactory.createUnaryCallable( + getValuedResourceTransportSettings, + settings.getValuedResourceSettings(), + clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.getMuteConfigCallable = + callableFactory.createUnaryCallable( + getMuteConfigTransportSettings, settings.getMuteConfigSettings(), clientContext); + this.getNotificationConfigCallable = + callableFactory.createUnaryCallable( + getNotificationConfigTransportSettings, + settings.getNotificationConfigSettings(), + clientContext); + this.getResourceValueConfigCallable = + callableFactory.createUnaryCallable( + getResourceValueConfigTransportSettings, + settings.getResourceValueConfigSettings(), + clientContext); + this.getSourceCallable = + callableFactory.createUnaryCallable( + getSourceTransportSettings, settings.getSourceSettings(), clientContext); + this.groupFindingsCallable = + callableFactory.createUnaryCallable( + groupFindingsTransportSettings, settings.groupFindingsSettings(), clientContext); + this.groupFindingsPagedCallable = + callableFactory.createPagedCallable( + groupFindingsTransportSettings, settings.groupFindingsSettings(), clientContext); + this.listAttackPathsCallable = + callableFactory.createUnaryCallable( + listAttackPathsTransportSettings, settings.listAttackPathsSettings(), clientContext); + this.listAttackPathsPagedCallable = + callableFactory.createPagedCallable( + listAttackPathsTransportSettings, settings.listAttackPathsSettings(), clientContext); + this.listBigQueryExportsCallable = + callableFactory.createUnaryCallable( + listBigQueryExportsTransportSettings, + settings.listBigQueryExportsSettings(), + clientContext); + this.listBigQueryExportsPagedCallable = + callableFactory.createPagedCallable( + listBigQueryExportsTransportSettings, + settings.listBigQueryExportsSettings(), + clientContext); + this.listFindingsCallable = + callableFactory.createUnaryCallable( + listFindingsTransportSettings, settings.listFindingsSettings(), clientContext); + 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, + settings.listNotificationConfigsSettings(), + clientContext); + this.listNotificationConfigsPagedCallable = + callableFactory.createPagedCallable( + listNotificationConfigsTransportSettings, + settings.listNotificationConfigsSettings(), + clientContext); + this.listResourceValueConfigsCallable = + callableFactory.createUnaryCallable( + listResourceValueConfigsTransportSettings, + settings.listResourceValueConfigsSettings(), + clientContext); + this.listResourceValueConfigsPagedCallable = + callableFactory.createPagedCallable( + listResourceValueConfigsTransportSettings, + settings.listResourceValueConfigsSettings(), + clientContext); + this.listSourcesCallable = + callableFactory.createUnaryCallable( + listSourcesTransportSettings, settings.listSourcesSettings(), clientContext); + this.listSourcesPagedCallable = + callableFactory.createPagedCallable( + listSourcesTransportSettings, settings.listSourcesSettings(), clientContext); + this.listValuedResourcesCallable = + callableFactory.createUnaryCallable( + listValuedResourcesTransportSettings, + settings.listValuedResourcesSettings(), + clientContext); + this.listValuedResourcesPagedCallable = + callableFactory.createPagedCallable( + listValuedResourcesTransportSettings, + settings.listValuedResourcesSettings(), + clientContext); + this.setFindingStateCallable = + callableFactory.createUnaryCallable( + setFindingStateTransportSettings, settings.setFindingStateSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.setMuteCallable = + callableFactory.createUnaryCallable( + setMuteTransportSettings, settings.setMuteSettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + this.updateBigQueryExportCallable = + callableFactory.createUnaryCallable( + updateBigQueryExportTransportSettings, + settings.updateBigQueryExportSettings(), + 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, + settings.updateNotificationConfigSettings(), + clientContext); + this.updateResourceValueConfigCallable = + callableFactory.createUnaryCallable( + updateResourceValueConfigTransportSettings, + settings.updateResourceValueConfigSettings(), + clientContext); + this.updateSecurityMarksCallable = + callableFactory.createUnaryCallable( + updateSecurityMarksTransportSettings, + settings.updateSecurityMarksSettings(), + clientContext); + this.updateSourceCallable = + callableFactory.createUnaryCallable( + updateSourceTransportSettings, settings.updateSourceSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable< + BatchCreateResourceValueConfigsRequest, BatchCreateResourceValueConfigsResponse> + batchCreateResourceValueConfigsCallable() { + return batchCreateResourceValueConfigsCallable; + } + + @Override + public UnaryCallable bulkMuteFindingsCallable() { + return bulkMuteFindingsCallable; + } + + @Override + public OperationCallable + bulkMuteFindingsOperationCallable() { + return bulkMuteFindingsOperationCallable; + } + + @Override + public UnaryCallable createBigQueryExportCallable() { + return createBigQueryExportCallable; + } + + @Override + public UnaryCallable createFindingCallable() { + return createFindingCallable; + } + + @Override + public UnaryCallable createMuteConfigCallable() { + return createMuteConfigCallable; + } + + @Override + public UnaryCallable + createNotificationConfigCallable() { + return createNotificationConfigCallable; + } + + @Override + public UnaryCallable createSourceCallable() { + return createSourceCallable; + } + + @Override + public UnaryCallable deleteBigQueryExportCallable() { + return deleteBigQueryExportCallable; + } + + @Override + public UnaryCallable deleteMuteConfigCallable() { + return deleteMuteConfigCallable; + } + + @Override + public UnaryCallable deleteNotificationConfigCallable() { + return deleteNotificationConfigCallable; + } + + @Override + public UnaryCallable + deleteResourceValueConfigCallable() { + return deleteResourceValueConfigCallable; + } + + @Override + public UnaryCallable getBigQueryExportCallable() { + return getBigQueryExportCallable; + } + + @Override + public UnaryCallable getSimulationCallable() { + return getSimulationCallable; + } + + @Override + public UnaryCallable getValuedResourceCallable() { + return getValuedResourceCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable getMuteConfigCallable() { + return getMuteConfigCallable; + } + + @Override + public UnaryCallable + getNotificationConfigCallable() { + return getNotificationConfigCallable; + } + + @Override + public UnaryCallable + getResourceValueConfigCallable() { + return getResourceValueConfigCallable; + } + + @Override + public UnaryCallable getSourceCallable() { + return getSourceCallable; + } + + @Override + public UnaryCallable groupFindingsCallable() { + return groupFindingsCallable; + } + + @Override + public UnaryCallable + groupFindingsPagedCallable() { + return groupFindingsPagedCallable; + } + + @Override + public UnaryCallable listAttackPathsCallable() { + return listAttackPathsCallable; + } + + @Override + public UnaryCallable + listAttackPathsPagedCallable() { + return listAttackPathsPagedCallable; + } + + @Override + public UnaryCallable + listBigQueryExportsCallable() { + return listBigQueryExportsCallable; + } + + @Override + public UnaryCallable + listBigQueryExportsPagedCallable() { + return listBigQueryExportsPagedCallable; + } + + @Override + public UnaryCallable listFindingsCallable() { + return listFindingsCallable; + } + + @Override + public UnaryCallable listFindingsPagedCallable() { + return listFindingsPagedCallable; + } + + @Override + public UnaryCallable listMuteConfigsCallable() { + return listMuteConfigsCallable; + } + + @Override + public UnaryCallable + listMuteConfigsPagedCallable() { + return listMuteConfigsPagedCallable; + } + + @Override + public UnaryCallable + listNotificationConfigsCallable() { + return listNotificationConfigsCallable; + } + + @Override + public UnaryCallable + listNotificationConfigsPagedCallable() { + return listNotificationConfigsPagedCallable; + } + + @Override + public UnaryCallable + listResourceValueConfigsCallable() { + return listResourceValueConfigsCallable; + } + + @Override + public UnaryCallable + listResourceValueConfigsPagedCallable() { + return listResourceValueConfigsPagedCallable; + } + + @Override + public UnaryCallable listSourcesCallable() { + return listSourcesCallable; + } + + @Override + public UnaryCallable listSourcesPagedCallable() { + return listSourcesPagedCallable; + } + + @Override + public UnaryCallable + listValuedResourcesCallable() { + return listValuedResourcesCallable; + } + + @Override + public UnaryCallable + listValuedResourcesPagedCallable() { + return listValuedResourcesPagedCallable; + } + + @Override + public UnaryCallable setFindingStateCallable() { + return setFindingStateCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable setMuteCallable() { + return setMuteCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @Override + public UnaryCallable updateBigQueryExportCallable() { + return updateBigQueryExportCallable; + } + + @Override + public UnaryCallable updateExternalSystemCallable() { + return updateExternalSystemCallable; + } + + @Override + public UnaryCallable updateFindingCallable() { + return updateFindingCallable; + } + + @Override + public UnaryCallable updateMuteConfigCallable() { + return updateMuteConfigCallable; + } + + @Override + public UnaryCallable + updateNotificationConfigCallable() { + return updateNotificationConfigCallable; + } + + @Override + public UnaryCallable + updateResourceValueConfigCallable() { + return updateResourceValueConfigCallable; + } + + @Override + public UnaryCallable updateSecurityMarksCallable() { + return updateSecurityMarksCallable; + } + + @Override + public UnaryCallable updateSourceCallable() { + return updateSourceCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v2/stub/HttpJsonSecurityCenterCallableFactory.java b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v2/stub/HttpJsonSecurityCenterCallableFactory.java new file mode 100644 index 000000000000..3ac73374e64b --- /dev/null +++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v2/stub/HttpJsonSecurityCenterCallableFactory.java @@ -0,0 +1,101 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.securitycenter.v2.stub; + +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the SecurityCenter service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class HttpJsonSecurityCenterCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v2/stub/HttpJsonSecurityCenterStub.java b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v2/stub/HttpJsonSecurityCenterStub.java new file mode 100644 index 000000000000..34a36543201b --- /dev/null +++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v2/stub/HttpJsonSecurityCenterStub.java @@ -0,0 +1,3009 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.securitycenter.v2.stub; + +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.GroupFindingsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListAttackPathsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListBigQueryExportsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListFindingsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListMuteConfigsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListNotificationConfigsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListResourceValueConfigsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListSourcesPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListValuedResourcesPagedResponse; + +import com.google.api.HttpRule; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.api.pathtemplate.PathTemplate; +import com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest; +import com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse; +import com.google.cloud.securitycenter.v2.BigQueryExport; +import com.google.cloud.securitycenter.v2.BulkMuteFindingsRequest; +import com.google.cloud.securitycenter.v2.BulkMuteFindingsResponse; +import com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest; +import com.google.cloud.securitycenter.v2.CreateFindingRequest; +import com.google.cloud.securitycenter.v2.CreateMuteConfigRequest; +import com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest; +import com.google.cloud.securitycenter.v2.CreateSourceRequest; +import com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest; +import com.google.cloud.securitycenter.v2.DeleteMuteConfigRequest; +import com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest; +import com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest; +import com.google.cloud.securitycenter.v2.ExternalSystem; +import com.google.cloud.securitycenter.v2.Finding; +import com.google.cloud.securitycenter.v2.GetBigQueryExportRequest; +import com.google.cloud.securitycenter.v2.GetMuteConfigRequest; +import com.google.cloud.securitycenter.v2.GetNotificationConfigRequest; +import com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest; +import com.google.cloud.securitycenter.v2.GetSimulationRequest; +import com.google.cloud.securitycenter.v2.GetSourceRequest; +import com.google.cloud.securitycenter.v2.GetValuedResourceRequest; +import com.google.cloud.securitycenter.v2.GroupFindingsRequest; +import com.google.cloud.securitycenter.v2.GroupFindingsResponse; +import com.google.cloud.securitycenter.v2.ListAttackPathsRequest; +import com.google.cloud.securitycenter.v2.ListAttackPathsResponse; +import com.google.cloud.securitycenter.v2.ListBigQueryExportsRequest; +import com.google.cloud.securitycenter.v2.ListBigQueryExportsResponse; +import com.google.cloud.securitycenter.v2.ListFindingsRequest; +import com.google.cloud.securitycenter.v2.ListFindingsResponse; +import com.google.cloud.securitycenter.v2.ListMuteConfigsRequest; +import com.google.cloud.securitycenter.v2.ListMuteConfigsResponse; +import com.google.cloud.securitycenter.v2.ListNotificationConfigsRequest; +import com.google.cloud.securitycenter.v2.ListNotificationConfigsResponse; +import com.google.cloud.securitycenter.v2.ListResourceValueConfigsRequest; +import com.google.cloud.securitycenter.v2.ListResourceValueConfigsResponse; +import com.google.cloud.securitycenter.v2.ListSourcesRequest; +import com.google.cloud.securitycenter.v2.ListSourcesResponse; +import com.google.cloud.securitycenter.v2.ListValuedResourcesRequest; +import com.google.cloud.securitycenter.v2.ListValuedResourcesResponse; +import com.google.cloud.securitycenter.v2.MuteConfig; +import com.google.cloud.securitycenter.v2.NotificationConfig; +import com.google.cloud.securitycenter.v2.ResourceValueConfig; +import com.google.cloud.securitycenter.v2.SecurityMarks; +import com.google.cloud.securitycenter.v2.SetFindingStateRequest; +import com.google.cloud.securitycenter.v2.SetMuteRequest; +import com.google.cloud.securitycenter.v2.Simulation; +import com.google.cloud.securitycenter.v2.Source; +import com.google.cloud.securitycenter.v2.UpdateBigQueryExportRequest; +import com.google.cloud.securitycenter.v2.UpdateExternalSystemRequest; +import com.google.cloud.securitycenter.v2.UpdateFindingRequest; +import com.google.cloud.securitycenter.v2.UpdateMuteConfigRequest; +import com.google.cloud.securitycenter.v2.UpdateNotificationConfigRequest; +import com.google.cloud.securitycenter.v2.UpdateResourceValueConfigRequest; +import com.google.cloud.securitycenter.v2.UpdateSecurityMarksRequest; +import com.google.cloud.securitycenter.v2.UpdateSourceRequest; +import com.google.cloud.securitycenter.v2.ValuedResource; +import com.google.common.collect.ImmutableMap; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the SecurityCenter service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class HttpJsonSecurityCenterStub extends SecurityCenterStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(Empty.getDescriptor()) + .add(BulkMuteFindingsResponse.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor< + BatchCreateResourceValueConfigsRequest, BatchCreateResourceValueConfigsResponse> + batchCreateResourceValueConfigsMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() + .setFullMethodName( + "google.cloud.securitycenter.v2.SecurityCenter/BatchCreateResourceValueConfigs") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=organizations/*}/resourceValueConfigs:batchCreate", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance( + BatchCreateResourceValueConfigsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + bulkMuteFindingsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/BulkMuteFindings") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=organizations/*}/findings:bulkMute", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v2/{parent=organizations/*/locations/*}/findings:bulkMute", + "/v2/{parent=folders/*}/findings:bulkMute", + "/v2/{parent=folders/*/locations/*}/findings:bulkMute", + "/v2/{parent=projects/*}/findings:bulkMute", + "/v2/{parent=projects/*/locations/*}/findings:bulkMute") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (BulkMuteFindingsRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + createBigQueryExportMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.securitycenter.v2.SecurityCenter/CreateBigQueryExport") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=organizations/*/locations/*}/bigQueryExports", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v2/{parent=folders/*/locations/*}/bigQueryExports", + "/v2/{parent=projects/*/locations/*}/bigQueryExports") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "bigQueryExportId", request.getBigQueryExportId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("bigQueryExport", request.getBigQueryExport(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(BigQueryExport.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createFindingMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/CreateFinding") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=organizations/*/sources/*/locations/*}/findings", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths("/v2/{parent=organizations/*/sources/*}/findings") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "findingId", request.getFindingId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("finding", request.getFinding(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Finding.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createMuteConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/CreateMuteConfig") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=organizations/*/locations/*}/muteConfigs", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v2/{parent=folders/*/locations/*}/muteConfigs", + "/v2/{parent=projects/*/locations/*}/muteConfigs", + "/v2/{parent=organizations/*}/muteConfigs", + "/v2/{parent=folders/*}/muteConfigs", + "/v2/{parent=projects/*}/muteConfigs") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "muteConfigId", request.getMuteConfigId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("muteConfig", request.getMuteConfig(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(MuteConfig.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createNotificationConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.securitycenter.v2.SecurityCenter/CreateNotificationConfig") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=organizations/*/locations/*}/notificationConfigs", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v2/{parent=folders/*/locations/*}/notificationConfigs", + "/v2/{parent=projects/*/locations/*}/notificationConfigs") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "configId", request.getConfigId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "notificationConfig", request.getNotificationConfig(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(NotificationConfig.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createSourceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/CreateSource") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=organizations/*}/sources", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("source", request.getSource(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Source.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteBigQueryExportMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.securitycenter.v2.SecurityCenter/DeleteBigQueryExport") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=organizations/*/locations/*/bigQueryExports/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v2/{name=folders/*/locations/*/bigQueryExports/*}", + "/v2/{name=projects/*/locations/*/bigQueryExports/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteMuteConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/DeleteMuteConfig") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=organizations/*/muteConfigs/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v2/{name=organizations/*/locations/*/muteConfigs/*}", + "/v2/{name=folders/*/muteConfigs/*}", + "/v2/{name=folders/*/locations/*/muteConfigs/*}", + "/v2/{name=projects/*/muteConfigs/*}", + "/v2/{name=projects/*/locations/*/muteConfigs/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteNotificationConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.securitycenter.v2.SecurityCenter/DeleteNotificationConfig") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=organizations/*/locations/*/notificationConfigs/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v2/{name=folders/*/locations/*/notificationConfigs/*}", + "/v2/{name=projects/*/locations/*/notificationConfigs/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteResourceValueConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.securitycenter.v2.SecurityCenter/DeleteResourceValueConfig") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=organizations/*/resourceValueConfigs/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getBigQueryExportMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/GetBigQueryExport") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=organizations/*/locations/*/bigQueryExports/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v2/{name=folders/*/locations/*/bigQueryExports/*}", + "/v2/{name=projects/*/locations/*/bigQueryExports/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(BigQueryExport.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getSimulationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/GetSimulation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=organizations/*/simulations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Simulation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getValuedResourceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/GetValuedResource") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=organizations/*/simulations/*/valuedResources/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ValuedResource.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getIamPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/GetIamPolicy") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{resource=organizations/*/sources/*}:getIamPolicy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearResource().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getMuteConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/GetMuteConfig") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=organizations/*/muteConfigs/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v2/{name=organizations/*/locations/*/muteConfigs/*}", + "/v2/{name=folders/*/muteConfigs/*}", + "/v2/{name=folders/*/locations/*/muteConfigs/*}", + "/v2/{name=projects/*/muteConfigs/*}", + "/v2/{name=projects/*/locations/*/muteConfigs/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(MuteConfig.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getNotificationConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.securitycenter.v2.SecurityCenter/GetNotificationConfig") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=organizations/*/locations/*/notificationConfigs/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v2/{name=folders/*/locations/*/notificationConfigs/*}", + "/v2/{name=projects/*/locations/*/notificationConfigs/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(NotificationConfig.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getResourceValueConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.securitycenter.v2.SecurityCenter/GetResourceValueConfig") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=organizations/*/resourceValueConfigs/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ResourceValueConfig.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getSourceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/GetSource") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=organizations/*/sources/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Source.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + groupFindingsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/GroupFindings") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=organizations/*/sources/*}/findings:group", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v2/{parent=organizations/*/sources/*/locations/*}/findings:group", + "/v2/{parent=folders/*/sources/*}/findings:group", + "/v2/{parent=folders/*/sources/*/locations/*}/findings:group", + "/v2/{parent=projects/*/sources/*}/findings:group", + "/v2/{parent=projects/*/sources/*/locations/*}/findings:group") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(GroupFindingsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listAttackPathsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/ListAttackPaths") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=organizations/*/simulations/*}/attackPaths", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v2/{parent=organizations/*/simulations/*/valuedResources/*}/attackPaths", + "/v2/{parent=organizations/*/simulations/*/attackExposureResults/*}/attackPaths") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListAttackPathsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listBigQueryExportsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.securitycenter.v2.SecurityCenter/ListBigQueryExports") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=organizations/*/locations/*}/bigQueryExports", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v2/{parent=folders/*/locations/*}/bigQueryExports", + "/v2/{parent=projects/*/locations/*}/bigQueryExports") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListBigQueryExportsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listFindingsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/ListFindings") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=organizations/*/sources/*}/findings", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v2/{parent=organizations/*/sources/*/locations/*}/findings", + "/v2/{parent=folders/*/sources/*}/findings", + "/v2/{parent=folders/*/sources/*/locations/*}/findings", + "/v2/{parent=projects/*/sources/*}/findings", + "/v2/{parent=projects/*/sources/*/locations/*}/findings") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "fieldMask", request.getFieldMask()); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListFindingsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listMuteConfigsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/ListMuteConfigs") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=organizations/*}/muteConfigs", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v2/{parent=organizations/*/locations/*}/muteConfigs", + "/v2/{parent=folders/*}/muteConfigs", + "/v2/{parent=folders/*/locations/*}/muteConfigs", + "/v2/{parent=projects/*}/muteConfigs", + "/v2/{parent=projects/*/locations/*}/muteConfigs") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListMuteConfigsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListNotificationConfigsRequest, ListNotificationConfigsResponse> + listNotificationConfigsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.securitycenter.v2.SecurityCenter/ListNotificationConfigs") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=organizations/*/locations/*}/notificationConfigs", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v2/{parent=folders/*/locations/*}/notificationConfigs", + "/v2/{parent=projects/*/locations/*}/notificationConfigs") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListNotificationConfigsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListResourceValueConfigsRequest, ListResourceValueConfigsResponse> + listResourceValueConfigsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.securitycenter.v2.SecurityCenter/ListResourceValueConfigs") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=organizations/*}/resourceValueConfigs", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListResourceValueConfigsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listSourcesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/ListSources") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=organizations/*}/sources", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v2/{parent=folders/*}/sources", "/v2/{parent=projects/*}/sources") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListSourcesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listValuedResourcesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.securitycenter.v2.SecurityCenter/ListValuedResources") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=organizations/*/simulations/*}/valuedResources", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v2/{parent=organizations/*/simulations/*/attackExposureResults/*}/valuedResources") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListValuedResourcesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + setFindingStateMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/SetFindingState") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=organizations/*/sources/*/findings/*}:setState", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v2/{name=organizations/*/sources/*/locations/*/findings/*}:setState", + "/v2/{name=folders/*/sources/*/findings/*}:setState", + "/v2/{name=folders/*/sources/*/locations/*/findings/*}:setState", + "/v2/{name=projects/*/sources/*/findings/*}:setState", + "/v2/{name=projects/*/sources/*/locations/*/findings/*}:setState") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Finding.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + setIamPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/SetIamPolicy") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{resource=organizations/*/sources/*}:setIamPolicy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearResource().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor setMuteMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/SetMute") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=organizations/*/sources/*/findings/*}:setMute", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v2/{name=organizations/*/sources/*/locations/*/findings/*}:setMute", + "/v2/{name=folders/*/sources/*/findings/*}:setMute", + "/v2/{name=folders/*/sources/*/locations/*/findings/*}:setMute", + "/v2/{name=projects/*/sources/*/findings/*}:setMute", + "/v2/{name=projects/*/sources/*/locations/*/findings/*}:setMute") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Finding.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + testIamPermissionsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/TestIamPermissions") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{resource=organizations/*/sources/*}:testIamPermissions", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearResource().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(TestIamPermissionsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateBigQueryExportMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.securitycenter.v2.SecurityCenter/UpdateBigQueryExport") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{bigQueryExport.name=organizations/*/locations/*/bigQueryExports/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, + "bigQueryExport.name", + request.getBigQueryExport().getName()); + return fields; + }) + .setAdditionalPaths( + "/v2/{bigQueryExport.name=folders/*/locations/*/bigQueryExports/*}", + "/v2/{bigQueryExport.name=projects/*/locations/*/bigQueryExports/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("bigQueryExport", request.getBigQueryExport(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(BigQueryExport.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateExternalSystemMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.securitycenter.v2.SecurityCenter/UpdateExternalSystem") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{externalSystem.name=organizations/*/sources/*/findings/*/externalSystems/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, + "externalSystem.name", + request.getExternalSystem().getName()); + return fields; + }) + .setAdditionalPaths( + "/v2/{externalSystem.name=organizations/*/sources/*/locations/*/findings/*/externalSystems/*}", + "/v2/{externalSystem.name=folders/*/sources/*/findings/*/externalSystems/*}", + "/v2/{externalSystem.name=folders/*/sources/*/locations/*/findings/*/externalSystems/*}", + "/v2/{externalSystem.name=projects/*/sources/*/findings/*/externalSystems/*}", + "/v2/{externalSystem.name=projects/*/sources/*/locations/*/findings/*/externalSystems/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("externalSystem", request.getExternalSystem(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ExternalSystem.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateFindingMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/UpdateFinding") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{finding.name=organizations/*/sources/*/findings/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "finding.name", request.getFinding().getName()); + return fields; + }) + .setAdditionalPaths( + "/v2/{finding.name=organizations/*/sources/*/locations/*/findings/*}", + "/v2/{finding.name=folders/*/sources/*/findings/*}", + "/v2/{finding.name=folders/*/sources/*/locations/*/findings/*}", + "/v2/{finding.name=projects/*/sources/*/findings/*}", + "/v2/{finding.name=projects/*/sources/*/locations/*/findings/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("finding", request.getFinding(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Finding.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateMuteConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/UpdateMuteConfig") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{muteConfig.name=organizations/*/muteConfigs/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "muteConfig.name", request.getMuteConfig().getName()); + return fields; + }) + .setAdditionalPaths( + "/v2/{muteConfig.name=organizations/*/locations/*/muteConfigs/*}", + "/v2/{muteConfig.name=folders/*/muteConfigs/*}", + "/v2/{muteConfig.name=folders/*/locations/*/muteConfigs/*}", + "/v2/{muteConfig.name=projects/*/muteConfigs/*}", + "/v2/{muteConfig.name=projects/*/locations/*/muteConfigs/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("muteConfig", request.getMuteConfig(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(MuteConfig.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateNotificationConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.securitycenter.v2.SecurityCenter/UpdateNotificationConfig") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{notificationConfig.name=organizations/*/locations/*/notificationConfigs/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, + "notificationConfig.name", + request.getNotificationConfig().getName()); + return fields; + }) + .setAdditionalPaths( + "/v2/{notificationConfig.name=folders/*/locations/*/notificationConfigs/*}", + "/v2/{notificationConfig.name=projects/*/locations/*/notificationConfigs/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "notificationConfig", request.getNotificationConfig(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(NotificationConfig.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateResourceValueConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.securitycenter.v2.SecurityCenter/UpdateResourceValueConfig") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{resourceValueConfig.name=organizations/*/resourceValueConfigs/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, + "resourceValueConfig.name", + request.getResourceValueConfig().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "resourceValueConfig", + request.getResourceValueConfig(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ResourceValueConfig.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateSecurityMarksMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.securitycenter.v2.SecurityCenter/UpdateSecurityMarks") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{securityMarks.name=organizations/*/sources/*/findings/*/securityMarks}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "securityMarks.name", request.getSecurityMarks().getName()); + return fields; + }) + .setAdditionalPaths( + "/v2/{securityMarks.name=organizations/*/assets/*/securityMarks}", + "/v2/{securityMarks.name=organizations/*/sources/*/locations/*/findings/*/securityMarks}", + "/v2/{securityMarks.name=folders/*/sources/*/findings/*/securityMarks}", + "/v2/{securityMarks.name=folders/*/assets/*/securityMarks}", + "/v2/{securityMarks.name=folders/*/sources/*/locations/*/findings/*/securityMarks}", + "/v2/{securityMarks.name=projects/*/sources/*/findings/*/securityMarks}", + "/v2/{securityMarks.name=projects/*/assets/*/securityMarks}", + "/v2/{securityMarks.name=projects/*/sources/*/locations/*/findings/*/securityMarks}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("securityMarks", request.getSecurityMarks(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SecurityMarks.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateSourceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.securitycenter.v2.SecurityCenter/UpdateSource") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{source.name=organizations/*/sources/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "source.name", request.getSource().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("source", request.getSource(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Source.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable< + BatchCreateResourceValueConfigsRequest, BatchCreateResourceValueConfigsResponse> + batchCreateResourceValueConfigsCallable; + private final UnaryCallable bulkMuteFindingsCallable; + private final OperationCallable + bulkMuteFindingsOperationCallable; + private final UnaryCallable + createBigQueryExportCallable; + private final UnaryCallable createFindingCallable; + private final UnaryCallable createMuteConfigCallable; + private final UnaryCallable + createNotificationConfigCallable; + private final UnaryCallable createSourceCallable; + private final UnaryCallable deleteBigQueryExportCallable; + private final UnaryCallable deleteMuteConfigCallable; + private final UnaryCallable + deleteNotificationConfigCallable; + private final UnaryCallable + deleteResourceValueConfigCallable; + private final UnaryCallable getBigQueryExportCallable; + private final UnaryCallable getSimulationCallable; + private final UnaryCallable getValuedResourceCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable getMuteConfigCallable; + private final UnaryCallable + getNotificationConfigCallable; + private final UnaryCallable + getResourceValueConfigCallable; + private final UnaryCallable getSourceCallable; + private final UnaryCallable groupFindingsCallable; + private final UnaryCallable + groupFindingsPagedCallable; + private final UnaryCallable + listAttackPathsCallable; + private final UnaryCallable + listAttackPathsPagedCallable; + private final UnaryCallable + listBigQueryExportsCallable; + private final UnaryCallable + listBigQueryExportsPagedCallable; + private final UnaryCallable listFindingsCallable; + private final UnaryCallable + listFindingsPagedCallable; + private final UnaryCallable + listMuteConfigsCallable; + private final UnaryCallable + listMuteConfigsPagedCallable; + private final UnaryCallable + listNotificationConfigsCallable; + private final UnaryCallable + listNotificationConfigsPagedCallable; + private final UnaryCallable + listResourceValueConfigsCallable; + private final UnaryCallable< + ListResourceValueConfigsRequest, ListResourceValueConfigsPagedResponse> + listResourceValueConfigsPagedCallable; + private final UnaryCallable listSourcesCallable; + private final UnaryCallable + listSourcesPagedCallable; + private final UnaryCallable + listValuedResourcesCallable; + private final UnaryCallable + listValuedResourcesPagedCallable; + private final UnaryCallable setFindingStateCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable setMuteCallable; + private final UnaryCallable + testIamPermissionsCallable; + private final UnaryCallable + updateBigQueryExportCallable; + private final UnaryCallable + updateExternalSystemCallable; + private final UnaryCallable updateFindingCallable; + private final UnaryCallable updateMuteConfigCallable; + private final UnaryCallable + updateNotificationConfigCallable; + private final UnaryCallable + updateResourceValueConfigCallable; + private final UnaryCallable + updateSecurityMarksCallable; + private final UnaryCallable updateSourceCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + private static final PathTemplate CREATE_MUTE_CONFIG_0_PATH_TEMPLATE = + PathTemplate.create("projects/*/locations/{location=*}"); + private static final PathTemplate CREATE_MUTE_CONFIG_1_PATH_TEMPLATE = + PathTemplate.create("organizations/*/locations/{location=*}"); + private static final PathTemplate CREATE_MUTE_CONFIG_2_PATH_TEMPLATE = + PathTemplate.create("folders/*/locations/{location=*}"); + private static final PathTemplate DELETE_MUTE_CONFIG_0_PATH_TEMPLATE = + PathTemplate.create("projects/*/locations/{location=*}/muteConfigs/*"); + private static final PathTemplate DELETE_MUTE_CONFIG_1_PATH_TEMPLATE = + PathTemplate.create("organizations/*/locations/{location=*}/muteConfigs/*"); + private static final PathTemplate DELETE_MUTE_CONFIG_2_PATH_TEMPLATE = + PathTemplate.create("folders/*/locations/{location=*}/muteConfigs/*"); + private static final PathTemplate GET_MUTE_CONFIG_0_PATH_TEMPLATE = + PathTemplate.create("projects/*/locations/{location=*}/muteConfigs/*"); + private static final PathTemplate GET_MUTE_CONFIG_1_PATH_TEMPLATE = + PathTemplate.create("organizations/*/locations/{location=*}/muteConfigs/*"); + private static final PathTemplate GET_MUTE_CONFIG_2_PATH_TEMPLATE = + PathTemplate.create("folders/*/locations/{location=*}/muteConfigs/*"); + private static final PathTemplate LIST_MUTE_CONFIGS_0_PATH_TEMPLATE = + PathTemplate.create("projects/*/locations/{location=*}/muteConfigs"); + private static final PathTemplate LIST_MUTE_CONFIGS_1_PATH_TEMPLATE = + PathTemplate.create("organizations/*/locations/{location=*}/muteConfigs"); + private static final PathTemplate LIST_MUTE_CONFIGS_2_PATH_TEMPLATE = + PathTemplate.create("folders/*/locations/{location=*}/muteConfigs"); + private static final PathTemplate UPDATE_MUTE_CONFIG_0_PATH_TEMPLATE = + PathTemplate.create("projects/*/locations/{location=*}/muteConfigs/*"); + private static final PathTemplate UPDATE_MUTE_CONFIG_1_PATH_TEMPLATE = + PathTemplate.create("organizations/*/locations/{location=*}/muteConfigs/*"); + private static final PathTemplate UPDATE_MUTE_CONFIG_2_PATH_TEMPLATE = + PathTemplate.create("folders/*/locations/{location=*}/muteConfigs/*"); + + public static final HttpJsonSecurityCenterStub create(SecurityCenterStubSettings settings) + throws IOException { + return new HttpJsonSecurityCenterStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonSecurityCenterStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonSecurityCenterStub( + SecurityCenterStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonSecurityCenterStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonSecurityCenterStub( + SecurityCenterStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonSecurityCenterStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonSecurityCenterStub( + SecurityCenterStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonSecurityCenterCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonSecurityCenterStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonSecurityCenterStub( + SecurityCenterStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost("/v2/{name=organizations/*/operations/*}:cancel") + .build()) + .put( + "google.longrunning.Operations.DeleteOperation", + HttpRule.newBuilder() + .setDelete("/v2/{name=organizations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder().setGet("/v2/{name=organizations/*/operations/*}").build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder().setGet("/v2/{name=organizations/*/operations}").build()) + .build()); + + HttpJsonCallSettings< + BatchCreateResourceValueConfigsRequest, BatchCreateResourceValueConfigsResponse> + batchCreateResourceValueConfigsTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(batchCreateResourceValueConfigsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings bulkMuteFindingsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(bulkMuteFindingsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + createBigQueryExportTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createBigQueryExportMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createFindingTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createFindingMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createMuteConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createMuteConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getParent(), "location", CREATE_MUTE_CONFIG_0_PATH_TEMPLATE); + builder.add(request.getParent(), "location", CREATE_MUTE_CONFIG_1_PATH_TEMPLATE); + builder.add(request.getParent(), "location", CREATE_MUTE_CONFIG_2_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + createNotificationConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createNotificationConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createSourceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createSourceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteBigQueryExportTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteBigQueryExportMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteMuteConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteMuteConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getName(), "location", DELETE_MUTE_CONFIG_0_PATH_TEMPLATE); + builder.add(request.getName(), "location", DELETE_MUTE_CONFIG_1_PATH_TEMPLATE); + builder.add(request.getName(), "location", DELETE_MUTE_CONFIG_2_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + deleteNotificationConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteNotificationConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + deleteResourceValueConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteResourceValueConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + getBigQueryExportTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getBigQueryExportMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getSimulationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getSimulationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + getValuedResourceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getValuedResourceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getIamPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getMuteConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getMuteConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getName(), "location", GET_MUTE_CONFIG_0_PATH_TEMPLATE); + builder.add(request.getName(), "location", GET_MUTE_CONFIG_1_PATH_TEMPLATE); + builder.add(request.getName(), "location", GET_MUTE_CONFIG_2_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + getNotificationConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getNotificationConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + getResourceValueConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getResourceValueConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getSourceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getSourceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + groupFindingsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(groupFindingsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listAttackPathsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listAttackPathsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listBigQueryExportsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listBigQueryExportsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings listFindingsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listFindingsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listMuteConfigsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listMuteConfigsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + request.getParent(), "location", LIST_MUTE_CONFIGS_0_PATH_TEMPLATE); + builder.add( + request.getParent(), "location", LIST_MUTE_CONFIGS_1_PATH_TEMPLATE); + builder.add( + request.getParent(), "location", LIST_MUTE_CONFIGS_2_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listNotificationConfigsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listNotificationConfigsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listResourceValueConfigsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listResourceValueConfigsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings listSourcesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listSourcesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listValuedResourcesTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listValuedResourcesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings setFindingStateTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(setFindingStateMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings setIamPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings setMuteTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(setMuteMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + testIamPermissionsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + updateBigQueryExportTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateBigQueryExportMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "big_query_export.name", + String.valueOf(request.getBigQueryExport().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + updateExternalSystemTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateExternalSystemMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "external_system.name", + String.valueOf(request.getExternalSystem().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateFindingTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateFindingMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("finding.name", String.valueOf(request.getFinding().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateMuteConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateMuteConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + if (request.getMuteConfig() != null) { + builder.add( + request.getMuteConfig().getName(), + "location", + UPDATE_MUTE_CONFIG_0_PATH_TEMPLATE); + } + if (request.getMuteConfig() != null) { + builder.add( + request.getMuteConfig().getName(), + "location", + UPDATE_MUTE_CONFIG_1_PATH_TEMPLATE); + } + if (request.getMuteConfig() != null) { + builder.add( + request.getMuteConfig().getName(), + "location", + UPDATE_MUTE_CONFIG_2_PATH_TEMPLATE); + } + return builder.build(); + }) + .build(); + HttpJsonCallSettings + updateNotificationConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateNotificationConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "notification_config.name", + String.valueOf(request.getNotificationConfig().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + updateResourceValueConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateResourceValueConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "resource_value_config.name", + String.valueOf(request.getResourceValueConfig().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + updateSecurityMarksTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateSecurityMarksMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "security_marks.name", + String.valueOf(request.getSecurityMarks().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateSourceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateSourceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("source.name", String.valueOf(request.getSource().getName())); + return builder.build(); + }) + .build(); + + this.batchCreateResourceValueConfigsCallable = + callableFactory.createUnaryCallable( + batchCreateResourceValueConfigsTransportSettings, + settings.batchCreateResourceValueConfigsSettings(), + clientContext); + this.bulkMuteFindingsCallable = + callableFactory.createUnaryCallable( + bulkMuteFindingsTransportSettings, settings.bulkMuteFindingsSettings(), clientContext); + this.bulkMuteFindingsOperationCallable = + callableFactory.createOperationCallable( + bulkMuteFindingsTransportSettings, + settings.bulkMuteFindingsOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.createBigQueryExportCallable = + callableFactory.createUnaryCallable( + createBigQueryExportTransportSettings, + settings.createBigQueryExportSettings(), + 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.createSourceCallable = + callableFactory.createUnaryCallable( + createSourceTransportSettings, settings.createSourceSettings(), clientContext); + this.deleteBigQueryExportCallable = + callableFactory.createUnaryCallable( + deleteBigQueryExportTransportSettings, + settings.deleteBigQueryExportSettings(), + clientContext); + this.deleteMuteConfigCallable = + callableFactory.createUnaryCallable( + deleteMuteConfigTransportSettings, settings.deleteMuteConfigSettings(), clientContext); + this.deleteNotificationConfigCallable = + callableFactory.createUnaryCallable( + deleteNotificationConfigTransportSettings, + settings.deleteNotificationConfigSettings(), + clientContext); + this.deleteResourceValueConfigCallable = + callableFactory.createUnaryCallable( + deleteResourceValueConfigTransportSettings, + settings.deleteResourceValueConfigSettings(), + clientContext); + this.getBigQueryExportCallable = + callableFactory.createUnaryCallable( + getBigQueryExportTransportSettings, + settings.getBigQueryExportSettings(), + clientContext); + this.getSimulationCallable = + callableFactory.createUnaryCallable( + getSimulationTransportSettings, settings.getSimulationSettings(), clientContext); + this.getValuedResourceCallable = + callableFactory.createUnaryCallable( + getValuedResourceTransportSettings, + settings.getValuedResourceSettings(), + clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.getMuteConfigCallable = + callableFactory.createUnaryCallable( + getMuteConfigTransportSettings, settings.getMuteConfigSettings(), clientContext); + this.getNotificationConfigCallable = + callableFactory.createUnaryCallable( + getNotificationConfigTransportSettings, + settings.getNotificationConfigSettings(), + clientContext); + this.getResourceValueConfigCallable = + callableFactory.createUnaryCallable( + getResourceValueConfigTransportSettings, + settings.getResourceValueConfigSettings(), + clientContext); + this.getSourceCallable = + callableFactory.createUnaryCallable( + getSourceTransportSettings, settings.getSourceSettings(), clientContext); + this.groupFindingsCallable = + callableFactory.createUnaryCallable( + groupFindingsTransportSettings, settings.groupFindingsSettings(), clientContext); + this.groupFindingsPagedCallable = + callableFactory.createPagedCallable( + groupFindingsTransportSettings, settings.groupFindingsSettings(), clientContext); + this.listAttackPathsCallable = + callableFactory.createUnaryCallable( + listAttackPathsTransportSettings, settings.listAttackPathsSettings(), clientContext); + this.listAttackPathsPagedCallable = + callableFactory.createPagedCallable( + listAttackPathsTransportSettings, settings.listAttackPathsSettings(), clientContext); + this.listBigQueryExportsCallable = + callableFactory.createUnaryCallable( + listBigQueryExportsTransportSettings, + settings.listBigQueryExportsSettings(), + clientContext); + this.listBigQueryExportsPagedCallable = + callableFactory.createPagedCallable( + listBigQueryExportsTransportSettings, + settings.listBigQueryExportsSettings(), + clientContext); + this.listFindingsCallable = + callableFactory.createUnaryCallable( + listFindingsTransportSettings, settings.listFindingsSettings(), clientContext); + 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, + settings.listNotificationConfigsSettings(), + clientContext); + this.listNotificationConfigsPagedCallable = + callableFactory.createPagedCallable( + listNotificationConfigsTransportSettings, + settings.listNotificationConfigsSettings(), + clientContext); + this.listResourceValueConfigsCallable = + callableFactory.createUnaryCallable( + listResourceValueConfigsTransportSettings, + settings.listResourceValueConfigsSettings(), + clientContext); + this.listResourceValueConfigsPagedCallable = + callableFactory.createPagedCallable( + listResourceValueConfigsTransportSettings, + settings.listResourceValueConfigsSettings(), + clientContext); + this.listSourcesCallable = + callableFactory.createUnaryCallable( + listSourcesTransportSettings, settings.listSourcesSettings(), clientContext); + this.listSourcesPagedCallable = + callableFactory.createPagedCallable( + listSourcesTransportSettings, settings.listSourcesSettings(), clientContext); + this.listValuedResourcesCallable = + callableFactory.createUnaryCallable( + listValuedResourcesTransportSettings, + settings.listValuedResourcesSettings(), + clientContext); + this.listValuedResourcesPagedCallable = + callableFactory.createPagedCallable( + listValuedResourcesTransportSettings, + settings.listValuedResourcesSettings(), + clientContext); + this.setFindingStateCallable = + callableFactory.createUnaryCallable( + setFindingStateTransportSettings, settings.setFindingStateSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.setMuteCallable = + callableFactory.createUnaryCallable( + setMuteTransportSettings, settings.setMuteSettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + this.updateBigQueryExportCallable = + callableFactory.createUnaryCallable( + updateBigQueryExportTransportSettings, + settings.updateBigQueryExportSettings(), + 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, + settings.updateNotificationConfigSettings(), + clientContext); + this.updateResourceValueConfigCallable = + callableFactory.createUnaryCallable( + updateResourceValueConfigTransportSettings, + settings.updateResourceValueConfigSettings(), + clientContext); + this.updateSecurityMarksCallable = + callableFactory.createUnaryCallable( + updateSecurityMarksTransportSettings, + settings.updateSecurityMarksSettings(), + clientContext); + this.updateSourceCallable = + callableFactory.createUnaryCallable( + updateSourceTransportSettings, settings.updateSourceSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(batchCreateResourceValueConfigsMethodDescriptor); + methodDescriptors.add(bulkMuteFindingsMethodDescriptor); + methodDescriptors.add(createBigQueryExportMethodDescriptor); + methodDescriptors.add(createFindingMethodDescriptor); + methodDescriptors.add(createMuteConfigMethodDescriptor); + methodDescriptors.add(createNotificationConfigMethodDescriptor); + methodDescriptors.add(createSourceMethodDescriptor); + methodDescriptors.add(deleteBigQueryExportMethodDescriptor); + methodDescriptors.add(deleteMuteConfigMethodDescriptor); + methodDescriptors.add(deleteNotificationConfigMethodDescriptor); + methodDescriptors.add(deleteResourceValueConfigMethodDescriptor); + methodDescriptors.add(getBigQueryExportMethodDescriptor); + methodDescriptors.add(getSimulationMethodDescriptor); + methodDescriptors.add(getValuedResourceMethodDescriptor); + methodDescriptors.add(getIamPolicyMethodDescriptor); + methodDescriptors.add(getMuteConfigMethodDescriptor); + methodDescriptors.add(getNotificationConfigMethodDescriptor); + methodDescriptors.add(getResourceValueConfigMethodDescriptor); + methodDescriptors.add(getSourceMethodDescriptor); + methodDescriptors.add(groupFindingsMethodDescriptor); + methodDescriptors.add(listAttackPathsMethodDescriptor); + methodDescriptors.add(listBigQueryExportsMethodDescriptor); + methodDescriptors.add(listFindingsMethodDescriptor); + methodDescriptors.add(listMuteConfigsMethodDescriptor); + methodDescriptors.add(listNotificationConfigsMethodDescriptor); + methodDescriptors.add(listResourceValueConfigsMethodDescriptor); + methodDescriptors.add(listSourcesMethodDescriptor); + methodDescriptors.add(listValuedResourcesMethodDescriptor); + methodDescriptors.add(setFindingStateMethodDescriptor); + methodDescriptors.add(setIamPolicyMethodDescriptor); + methodDescriptors.add(setMuteMethodDescriptor); + methodDescriptors.add(testIamPermissionsMethodDescriptor); + methodDescriptors.add(updateBigQueryExportMethodDescriptor); + methodDescriptors.add(updateExternalSystemMethodDescriptor); + methodDescriptors.add(updateFindingMethodDescriptor); + methodDescriptors.add(updateMuteConfigMethodDescriptor); + methodDescriptors.add(updateNotificationConfigMethodDescriptor); + methodDescriptors.add(updateResourceValueConfigMethodDescriptor); + methodDescriptors.add(updateSecurityMarksMethodDescriptor); + methodDescriptors.add(updateSourceMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable< + BatchCreateResourceValueConfigsRequest, BatchCreateResourceValueConfigsResponse> + batchCreateResourceValueConfigsCallable() { + return batchCreateResourceValueConfigsCallable; + } + + @Override + public UnaryCallable bulkMuteFindingsCallable() { + return bulkMuteFindingsCallable; + } + + @Override + public OperationCallable + bulkMuteFindingsOperationCallable() { + return bulkMuteFindingsOperationCallable; + } + + @Override + public UnaryCallable createBigQueryExportCallable() { + return createBigQueryExportCallable; + } + + @Override + public UnaryCallable createFindingCallable() { + return createFindingCallable; + } + + @Override + public UnaryCallable createMuteConfigCallable() { + return createMuteConfigCallable; + } + + @Override + public UnaryCallable + createNotificationConfigCallable() { + return createNotificationConfigCallable; + } + + @Override + public UnaryCallable createSourceCallable() { + return createSourceCallable; + } + + @Override + public UnaryCallable deleteBigQueryExportCallable() { + return deleteBigQueryExportCallable; + } + + @Override + public UnaryCallable deleteMuteConfigCallable() { + return deleteMuteConfigCallable; + } + + @Override + public UnaryCallable deleteNotificationConfigCallable() { + return deleteNotificationConfigCallable; + } + + @Override + public UnaryCallable + deleteResourceValueConfigCallable() { + return deleteResourceValueConfigCallable; + } + + @Override + public UnaryCallable getBigQueryExportCallable() { + return getBigQueryExportCallable; + } + + @Override + public UnaryCallable getSimulationCallable() { + return getSimulationCallable; + } + + @Override + public UnaryCallable getValuedResourceCallable() { + return getValuedResourceCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable getMuteConfigCallable() { + return getMuteConfigCallable; + } + + @Override + public UnaryCallable + getNotificationConfigCallable() { + return getNotificationConfigCallable; + } + + @Override + public UnaryCallable + getResourceValueConfigCallable() { + return getResourceValueConfigCallable; + } + + @Override + public UnaryCallable getSourceCallable() { + return getSourceCallable; + } + + @Override + public UnaryCallable groupFindingsCallable() { + return groupFindingsCallable; + } + + @Override + public UnaryCallable + groupFindingsPagedCallable() { + return groupFindingsPagedCallable; + } + + @Override + public UnaryCallable listAttackPathsCallable() { + return listAttackPathsCallable; + } + + @Override + public UnaryCallable + listAttackPathsPagedCallable() { + return listAttackPathsPagedCallable; + } + + @Override + public UnaryCallable + listBigQueryExportsCallable() { + return listBigQueryExportsCallable; + } + + @Override + public UnaryCallable + listBigQueryExportsPagedCallable() { + return listBigQueryExportsPagedCallable; + } + + @Override + public UnaryCallable listFindingsCallable() { + return listFindingsCallable; + } + + @Override + public UnaryCallable listFindingsPagedCallable() { + return listFindingsPagedCallable; + } + + @Override + public UnaryCallable listMuteConfigsCallable() { + return listMuteConfigsCallable; + } + + @Override + public UnaryCallable + listMuteConfigsPagedCallable() { + return listMuteConfigsPagedCallable; + } + + @Override + public UnaryCallable + listNotificationConfigsCallable() { + return listNotificationConfigsCallable; + } + + @Override + public UnaryCallable + listNotificationConfigsPagedCallable() { + return listNotificationConfigsPagedCallable; + } + + @Override + public UnaryCallable + listResourceValueConfigsCallable() { + return listResourceValueConfigsCallable; + } + + @Override + public UnaryCallable + listResourceValueConfigsPagedCallable() { + return listResourceValueConfigsPagedCallable; + } + + @Override + public UnaryCallable listSourcesCallable() { + return listSourcesCallable; + } + + @Override + public UnaryCallable listSourcesPagedCallable() { + return listSourcesPagedCallable; + } + + @Override + public UnaryCallable + listValuedResourcesCallable() { + return listValuedResourcesCallable; + } + + @Override + public UnaryCallable + listValuedResourcesPagedCallable() { + return listValuedResourcesPagedCallable; + } + + @Override + public UnaryCallable setFindingStateCallable() { + return setFindingStateCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable setMuteCallable() { + return setMuteCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @Override + public UnaryCallable updateBigQueryExportCallable() { + return updateBigQueryExportCallable; + } + + @Override + public UnaryCallable updateExternalSystemCallable() { + return updateExternalSystemCallable; + } + + @Override + public UnaryCallable updateFindingCallable() { + return updateFindingCallable; + } + + @Override + public UnaryCallable updateMuteConfigCallable() { + return updateMuteConfigCallable; + } + + @Override + public UnaryCallable + updateNotificationConfigCallable() { + return updateNotificationConfigCallable; + } + + @Override + public UnaryCallable + updateResourceValueConfigCallable() { + return updateResourceValueConfigCallable; + } + + @Override + public UnaryCallable updateSecurityMarksCallable() { + return updateSecurityMarksCallable; + } + + @Override + public UnaryCallable updateSourceCallable() { + return updateSourceCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v2/stub/SecurityCenterStub.java b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v2/stub/SecurityCenterStub.java new file mode 100644 index 000000000000..6f741234e06e --- /dev/null +++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v2/stub/SecurityCenterStub.java @@ -0,0 +1,343 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.securitycenter.v2.stub; + +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.GroupFindingsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListAttackPathsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListBigQueryExportsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListFindingsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListMuteConfigsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListNotificationConfigsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListResourceValueConfigsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListSourcesPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListValuedResourcesPagedResponse; + +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.v2.BatchCreateResourceValueConfigsRequest; +import com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse; +import com.google.cloud.securitycenter.v2.BigQueryExport; +import com.google.cloud.securitycenter.v2.BulkMuteFindingsRequest; +import com.google.cloud.securitycenter.v2.BulkMuteFindingsResponse; +import com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest; +import com.google.cloud.securitycenter.v2.CreateFindingRequest; +import com.google.cloud.securitycenter.v2.CreateMuteConfigRequest; +import com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest; +import com.google.cloud.securitycenter.v2.CreateSourceRequest; +import com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest; +import com.google.cloud.securitycenter.v2.DeleteMuteConfigRequest; +import com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest; +import com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest; +import com.google.cloud.securitycenter.v2.ExternalSystem; +import com.google.cloud.securitycenter.v2.Finding; +import com.google.cloud.securitycenter.v2.GetBigQueryExportRequest; +import com.google.cloud.securitycenter.v2.GetMuteConfigRequest; +import com.google.cloud.securitycenter.v2.GetNotificationConfigRequest; +import com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest; +import com.google.cloud.securitycenter.v2.GetSimulationRequest; +import com.google.cloud.securitycenter.v2.GetSourceRequest; +import com.google.cloud.securitycenter.v2.GetValuedResourceRequest; +import com.google.cloud.securitycenter.v2.GroupFindingsRequest; +import com.google.cloud.securitycenter.v2.GroupFindingsResponse; +import com.google.cloud.securitycenter.v2.ListAttackPathsRequest; +import com.google.cloud.securitycenter.v2.ListAttackPathsResponse; +import com.google.cloud.securitycenter.v2.ListBigQueryExportsRequest; +import com.google.cloud.securitycenter.v2.ListBigQueryExportsResponse; +import com.google.cloud.securitycenter.v2.ListFindingsRequest; +import com.google.cloud.securitycenter.v2.ListFindingsResponse; +import com.google.cloud.securitycenter.v2.ListMuteConfigsRequest; +import com.google.cloud.securitycenter.v2.ListMuteConfigsResponse; +import com.google.cloud.securitycenter.v2.ListNotificationConfigsRequest; +import com.google.cloud.securitycenter.v2.ListNotificationConfigsResponse; +import com.google.cloud.securitycenter.v2.ListResourceValueConfigsRequest; +import com.google.cloud.securitycenter.v2.ListResourceValueConfigsResponse; +import com.google.cloud.securitycenter.v2.ListSourcesRequest; +import com.google.cloud.securitycenter.v2.ListSourcesResponse; +import com.google.cloud.securitycenter.v2.ListValuedResourcesRequest; +import com.google.cloud.securitycenter.v2.ListValuedResourcesResponse; +import com.google.cloud.securitycenter.v2.MuteConfig; +import com.google.cloud.securitycenter.v2.NotificationConfig; +import com.google.cloud.securitycenter.v2.ResourceValueConfig; +import com.google.cloud.securitycenter.v2.SecurityMarks; +import com.google.cloud.securitycenter.v2.SetFindingStateRequest; +import com.google.cloud.securitycenter.v2.SetMuteRequest; +import com.google.cloud.securitycenter.v2.Simulation; +import com.google.cloud.securitycenter.v2.Source; +import com.google.cloud.securitycenter.v2.UpdateBigQueryExportRequest; +import com.google.cloud.securitycenter.v2.UpdateExternalSystemRequest; +import com.google.cloud.securitycenter.v2.UpdateFindingRequest; +import com.google.cloud.securitycenter.v2.UpdateMuteConfigRequest; +import com.google.cloud.securitycenter.v2.UpdateNotificationConfigRequest; +import com.google.cloud.securitycenter.v2.UpdateResourceValueConfigRequest; +import com.google.cloud.securitycenter.v2.UpdateSecurityMarksRequest; +import com.google.cloud.securitycenter.v2.UpdateSourceRequest; +import com.google.cloud.securitycenter.v2.ValuedResource; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the SecurityCenter service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class SecurityCenterStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable< + BatchCreateResourceValueConfigsRequest, BatchCreateResourceValueConfigsResponse> + batchCreateResourceValueConfigsCallable() { + throw new UnsupportedOperationException( + "Not implemented: batchCreateResourceValueConfigsCallable()"); + } + + public OperationCallable + bulkMuteFindingsOperationCallable() { + throw new UnsupportedOperationException("Not implemented: bulkMuteFindingsOperationCallable()"); + } + + public UnaryCallable bulkMuteFindingsCallable() { + throw new UnsupportedOperationException("Not implemented: bulkMuteFindingsCallable()"); + } + + public UnaryCallable createBigQueryExportCallable() { + throw new UnsupportedOperationException("Not implemented: createBigQueryExportCallable()"); + } + + 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 createSourceCallable() { + throw new UnsupportedOperationException("Not implemented: createSourceCallable()"); + } + + public UnaryCallable deleteBigQueryExportCallable() { + throw new UnsupportedOperationException("Not implemented: deleteBigQueryExportCallable()"); + } + + public UnaryCallable deleteMuteConfigCallable() { + throw new UnsupportedOperationException("Not implemented: deleteMuteConfigCallable()"); + } + + public UnaryCallable deleteNotificationConfigCallable() { + throw new UnsupportedOperationException("Not implemented: deleteNotificationConfigCallable()"); + } + + public UnaryCallable + deleteResourceValueConfigCallable() { + throw new UnsupportedOperationException("Not implemented: deleteResourceValueConfigCallable()"); + } + + public UnaryCallable getBigQueryExportCallable() { + throw new UnsupportedOperationException("Not implemented: getBigQueryExportCallable()"); + } + + public UnaryCallable getSimulationCallable() { + throw new UnsupportedOperationException("Not implemented: getSimulationCallable()"); + } + + public UnaryCallable getValuedResourceCallable() { + throw new UnsupportedOperationException("Not implemented: getValuedResourceCallable()"); + } + + 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()"); + } + + public UnaryCallable + getResourceValueConfigCallable() { + throw new UnsupportedOperationException("Not implemented: getResourceValueConfigCallable()"); + } + + public UnaryCallable getSourceCallable() { + throw new UnsupportedOperationException("Not implemented: getSourceCallable()"); + } + + public UnaryCallable + groupFindingsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: groupFindingsPagedCallable()"); + } + + public UnaryCallable groupFindingsCallable() { + throw new UnsupportedOperationException("Not implemented: groupFindingsCallable()"); + } + + public UnaryCallable + listAttackPathsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listAttackPathsPagedCallable()"); + } + + public UnaryCallable listAttackPathsCallable() { + throw new UnsupportedOperationException("Not implemented: listAttackPathsCallable()"); + } + + public UnaryCallable + listBigQueryExportsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listBigQueryExportsPagedCallable()"); + } + + public UnaryCallable + listBigQueryExportsCallable() { + throw new UnsupportedOperationException("Not implemented: listBigQueryExportsCallable()"); + } + + public UnaryCallable listFindingsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listFindingsPagedCallable()"); + } + + public UnaryCallable listFindingsCallable() { + 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( + "Not implemented: listNotificationConfigsPagedCallable()"); + } + + public UnaryCallable + listNotificationConfigsCallable() { + throw new UnsupportedOperationException("Not implemented: listNotificationConfigsCallable()"); + } + + public UnaryCallable + listResourceValueConfigsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listResourceValueConfigsPagedCallable()"); + } + + public UnaryCallable + listResourceValueConfigsCallable() { + throw new UnsupportedOperationException("Not implemented: listResourceValueConfigsCallable()"); + } + + public UnaryCallable listSourcesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listSourcesPagedCallable()"); + } + + public UnaryCallable listSourcesCallable() { + throw new UnsupportedOperationException("Not implemented: listSourcesCallable()"); + } + + public UnaryCallable + listValuedResourcesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listValuedResourcesPagedCallable()"); + } + + public UnaryCallable + listValuedResourcesCallable() { + throw new UnsupportedOperationException("Not implemented: listValuedResourcesCallable()"); + } + + public UnaryCallable setFindingStateCallable() { + throw new UnsupportedOperationException("Not implemented: setFindingStateCallable()"); + } + + public UnaryCallable setIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); + } + + public UnaryCallable setMuteCallable() { + throw new UnsupportedOperationException("Not implemented: setMuteCallable()"); + } + + public UnaryCallable + testIamPermissionsCallable() { + throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); + } + + public UnaryCallable updateBigQueryExportCallable() { + throw new UnsupportedOperationException("Not implemented: updateBigQueryExportCallable()"); + } + + 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()"); + } + + public UnaryCallable + updateResourceValueConfigCallable() { + throw new UnsupportedOperationException("Not implemented: updateResourceValueConfigCallable()"); + } + + public UnaryCallable updateSecurityMarksCallable() { + throw new UnsupportedOperationException("Not implemented: updateSecurityMarksCallable()"); + } + + public UnaryCallable updateSourceCallable() { + throw new UnsupportedOperationException("Not implemented: updateSourceCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v2/stub/SecurityCenterStubSettings.java b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v2/stub/SecurityCenterStubSettings.java new file mode 100644 index 000000000000..29305417643b --- /dev/null +++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v2/stub/SecurityCenterStubSettings.java @@ -0,0 +1,2043 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.securitycenter.v2.stub; + +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.GroupFindingsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListAttackPathsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListBigQueryExportsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListFindingsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListMuteConfigsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListNotificationConfigsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListResourceValueConfigsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListSourcesPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListValuedResourcesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +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.v2.AttackPath; +import com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest; +import com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse; +import com.google.cloud.securitycenter.v2.BigQueryExport; +import com.google.cloud.securitycenter.v2.BulkMuteFindingsRequest; +import com.google.cloud.securitycenter.v2.BulkMuteFindingsResponse; +import com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest; +import com.google.cloud.securitycenter.v2.CreateFindingRequest; +import com.google.cloud.securitycenter.v2.CreateMuteConfigRequest; +import com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest; +import com.google.cloud.securitycenter.v2.CreateSourceRequest; +import com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest; +import com.google.cloud.securitycenter.v2.DeleteMuteConfigRequest; +import com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest; +import com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest; +import com.google.cloud.securitycenter.v2.ExternalSystem; +import com.google.cloud.securitycenter.v2.Finding; +import com.google.cloud.securitycenter.v2.GetBigQueryExportRequest; +import com.google.cloud.securitycenter.v2.GetMuteConfigRequest; +import com.google.cloud.securitycenter.v2.GetNotificationConfigRequest; +import com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest; +import com.google.cloud.securitycenter.v2.GetSimulationRequest; +import com.google.cloud.securitycenter.v2.GetSourceRequest; +import com.google.cloud.securitycenter.v2.GetValuedResourceRequest; +import com.google.cloud.securitycenter.v2.GroupFindingsRequest; +import com.google.cloud.securitycenter.v2.GroupFindingsResponse; +import com.google.cloud.securitycenter.v2.GroupResult; +import com.google.cloud.securitycenter.v2.ListAttackPathsRequest; +import com.google.cloud.securitycenter.v2.ListAttackPathsResponse; +import com.google.cloud.securitycenter.v2.ListBigQueryExportsRequest; +import com.google.cloud.securitycenter.v2.ListBigQueryExportsResponse; +import com.google.cloud.securitycenter.v2.ListFindingsRequest; +import com.google.cloud.securitycenter.v2.ListFindingsResponse; +import com.google.cloud.securitycenter.v2.ListMuteConfigsRequest; +import com.google.cloud.securitycenter.v2.ListMuteConfigsResponse; +import com.google.cloud.securitycenter.v2.ListNotificationConfigsRequest; +import com.google.cloud.securitycenter.v2.ListNotificationConfigsResponse; +import com.google.cloud.securitycenter.v2.ListResourceValueConfigsRequest; +import com.google.cloud.securitycenter.v2.ListResourceValueConfigsResponse; +import com.google.cloud.securitycenter.v2.ListSourcesRequest; +import com.google.cloud.securitycenter.v2.ListSourcesResponse; +import com.google.cloud.securitycenter.v2.ListValuedResourcesRequest; +import com.google.cloud.securitycenter.v2.ListValuedResourcesResponse; +import com.google.cloud.securitycenter.v2.MuteConfig; +import com.google.cloud.securitycenter.v2.NotificationConfig; +import com.google.cloud.securitycenter.v2.ResourceValueConfig; +import com.google.cloud.securitycenter.v2.SecurityMarks; +import com.google.cloud.securitycenter.v2.SetFindingStateRequest; +import com.google.cloud.securitycenter.v2.SetMuteRequest; +import com.google.cloud.securitycenter.v2.Simulation; +import com.google.cloud.securitycenter.v2.Source; +import com.google.cloud.securitycenter.v2.UpdateBigQueryExportRequest; +import com.google.cloud.securitycenter.v2.UpdateExternalSystemRequest; +import com.google.cloud.securitycenter.v2.UpdateFindingRequest; +import com.google.cloud.securitycenter.v2.UpdateMuteConfigRequest; +import com.google.cloud.securitycenter.v2.UpdateNotificationConfigRequest; +import com.google.cloud.securitycenter.v2.UpdateResourceValueConfigRequest; +import com.google.cloud.securitycenter.v2.UpdateSecurityMarksRequest; +import com.google.cloud.securitycenter.v2.UpdateSourceRequest; +import com.google.cloud.securitycenter.v2.ValuedResource; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link SecurityCenterStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (securitycenter.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of batchCreateResourceValueConfigs to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * SecurityCenterStubSettings.Builder securityCenterSettingsBuilder =
+ *     SecurityCenterStubSettings.newBuilder();
+ * securityCenterSettingsBuilder
+ *     .batchCreateResourceValueConfigsSettings()
+ *     .setRetrySettings(
+ *         securityCenterSettingsBuilder
+ *             .batchCreateResourceValueConfigsSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * SecurityCenterStubSettings securityCenterSettings = securityCenterSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class SecurityCenterStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings< + BatchCreateResourceValueConfigsRequest, BatchCreateResourceValueConfigsResponse> + batchCreateResourceValueConfigsSettings; + private final UnaryCallSettings bulkMuteFindingsSettings; + private final OperationCallSettings + bulkMuteFindingsOperationSettings; + private final UnaryCallSettings + createBigQueryExportSettings; + private final UnaryCallSettings createFindingSettings; + private final UnaryCallSettings createMuteConfigSettings; + private final UnaryCallSettings + createNotificationConfigSettings; + private final UnaryCallSettings createSourceSettings; + private final UnaryCallSettings deleteBigQueryExportSettings; + private final UnaryCallSettings deleteMuteConfigSettings; + private final UnaryCallSettings + deleteNotificationConfigSettings; + private final UnaryCallSettings + deleteResourceValueConfigSettings; + private final UnaryCallSettings + getBigQueryExportSettings; + private final UnaryCallSettings getSimulationSettings; + private final UnaryCallSettings + getValuedResourceSettings; + private final UnaryCallSettings getIamPolicySettings; + private final UnaryCallSettings getMuteConfigSettings; + private final UnaryCallSettings + getNotificationConfigSettings; + private final UnaryCallSettings + getResourceValueConfigSettings; + private final UnaryCallSettings getSourceSettings; + private final PagedCallSettings< + GroupFindingsRequest, GroupFindingsResponse, GroupFindingsPagedResponse> + groupFindingsSettings; + private final PagedCallSettings< + ListAttackPathsRequest, ListAttackPathsResponse, ListAttackPathsPagedResponse> + listAttackPathsSettings; + private final PagedCallSettings< + ListBigQueryExportsRequest, ListBigQueryExportsResponse, ListBigQueryExportsPagedResponse> + listBigQueryExportsSettings; + private final PagedCallSettings< + ListFindingsRequest, ListFindingsResponse, ListFindingsPagedResponse> + listFindingsSettings; + private final PagedCallSettings< + ListMuteConfigsRequest, ListMuteConfigsResponse, ListMuteConfigsPagedResponse> + listMuteConfigsSettings; + private final PagedCallSettings< + ListNotificationConfigsRequest, + ListNotificationConfigsResponse, + ListNotificationConfigsPagedResponse> + listNotificationConfigsSettings; + private final PagedCallSettings< + ListResourceValueConfigsRequest, + ListResourceValueConfigsResponse, + ListResourceValueConfigsPagedResponse> + listResourceValueConfigsSettings; + private final PagedCallSettings + listSourcesSettings; + private final PagedCallSettings< + ListValuedResourcesRequest, ListValuedResourcesResponse, ListValuedResourcesPagedResponse> + listValuedResourcesSettings; + private final UnaryCallSettings setFindingStateSettings; + private final UnaryCallSettings setIamPolicySettings; + private final UnaryCallSettings setMuteSettings; + private final UnaryCallSettings + testIamPermissionsSettings; + private final UnaryCallSettings + updateBigQueryExportSettings; + private final UnaryCallSettings + updateExternalSystemSettings; + private final UnaryCallSettings updateFindingSettings; + private final UnaryCallSettings updateMuteConfigSettings; + private final UnaryCallSettings + updateNotificationConfigSettings; + private final UnaryCallSettings + updateResourceValueConfigSettings; + private final UnaryCallSettings + updateSecurityMarksSettings; + private final UnaryCallSettings updateSourceSettings; + + private static final PagedListDescriptor + GROUP_FINDINGS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public GroupFindingsRequest injectToken(GroupFindingsRequest payload, String token) { + return GroupFindingsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public GroupFindingsRequest injectPageSize(GroupFindingsRequest payload, int pageSize) { + return GroupFindingsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(GroupFindingsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(GroupFindingsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(GroupFindingsResponse payload) { + return payload.getGroupByResultsList() == null + ? ImmutableList.of() + : payload.getGroupByResultsList(); + } + }; + + private static final PagedListDescriptor< + ListAttackPathsRequest, ListAttackPathsResponse, AttackPath> + LIST_ATTACK_PATHS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAttackPathsRequest injectToken( + ListAttackPathsRequest payload, String token) { + return ListAttackPathsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListAttackPathsRequest injectPageSize( + ListAttackPathsRequest payload, int pageSize) { + return ListAttackPathsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListAttackPathsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAttackPathsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListAttackPathsResponse payload) { + return payload.getAttackPathsList() == null + ? ImmutableList.of() + : payload.getAttackPathsList(); + } + }; + + private static final PagedListDescriptor< + ListBigQueryExportsRequest, ListBigQueryExportsResponse, BigQueryExport> + LIST_BIG_QUERY_EXPORTS_PAGE_STR_DESC = + new PagedListDescriptor< + ListBigQueryExportsRequest, ListBigQueryExportsResponse, BigQueryExport>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListBigQueryExportsRequest injectToken( + ListBigQueryExportsRequest payload, String token) { + return ListBigQueryExportsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListBigQueryExportsRequest injectPageSize( + ListBigQueryExportsRequest payload, int pageSize) { + return ListBigQueryExportsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListBigQueryExportsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListBigQueryExportsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListBigQueryExportsResponse payload) { + return payload.getBigQueryExportsList() == null + ? ImmutableList.of() + : payload.getBigQueryExportsList(); + } + }; + + private static final PagedListDescriptor< + ListFindingsRequest, ListFindingsResponse, ListFindingsResponse.ListFindingsResult> + LIST_FINDINGS_PAGE_STR_DESC = + new PagedListDescriptor< + ListFindingsRequest, + ListFindingsResponse, + ListFindingsResponse.ListFindingsResult>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListFindingsRequest injectToken(ListFindingsRequest payload, String token) { + return ListFindingsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListFindingsRequest injectPageSize(ListFindingsRequest payload, int pageSize) { + return ListFindingsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListFindingsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListFindingsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListFindingsResponse payload) { + return payload.getListFindingsResultsList() == null + ? ImmutableList.of() + : payload.getListFindingsResultsList(); + } + }; + + 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 = + new PagedListDescriptor< + ListNotificationConfigsRequest, + ListNotificationConfigsResponse, + NotificationConfig>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListNotificationConfigsRequest injectToken( + ListNotificationConfigsRequest payload, String token) { + return ListNotificationConfigsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListNotificationConfigsRequest injectPageSize( + ListNotificationConfigsRequest payload, int pageSize) { + return ListNotificationConfigsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListNotificationConfigsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListNotificationConfigsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListNotificationConfigsResponse payload) { + return payload.getNotificationConfigsList() == null + ? ImmutableList.of() + : payload.getNotificationConfigsList(); + } + }; + + private static final PagedListDescriptor< + ListResourceValueConfigsRequest, ListResourceValueConfigsResponse, ResourceValueConfig> + LIST_RESOURCE_VALUE_CONFIGS_PAGE_STR_DESC = + new PagedListDescriptor< + ListResourceValueConfigsRequest, + ListResourceValueConfigsResponse, + ResourceValueConfig>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListResourceValueConfigsRequest injectToken( + ListResourceValueConfigsRequest payload, String token) { + return ListResourceValueConfigsRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListResourceValueConfigsRequest injectPageSize( + ListResourceValueConfigsRequest payload, int pageSize) { + return ListResourceValueConfigsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListResourceValueConfigsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListResourceValueConfigsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListResourceValueConfigsResponse payload) { + return payload.getResourceValueConfigsList() == null + ? ImmutableList.of() + : payload.getResourceValueConfigsList(); + } + }; + + private static final PagedListDescriptor + LIST_SOURCES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListSourcesRequest injectToken(ListSourcesRequest payload, String token) { + return ListSourcesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListSourcesRequest injectPageSize(ListSourcesRequest payload, int pageSize) { + return ListSourcesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListSourcesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListSourcesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListSourcesResponse payload) { + return payload.getSourcesList() == null + ? ImmutableList.of() + : payload.getSourcesList(); + } + }; + + private static final PagedListDescriptor< + ListValuedResourcesRequest, ListValuedResourcesResponse, ValuedResource> + LIST_VALUED_RESOURCES_PAGE_STR_DESC = + new PagedListDescriptor< + ListValuedResourcesRequest, ListValuedResourcesResponse, ValuedResource>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListValuedResourcesRequest injectToken( + ListValuedResourcesRequest payload, String token) { + return ListValuedResourcesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListValuedResourcesRequest injectPageSize( + ListValuedResourcesRequest payload, int pageSize) { + return ListValuedResourcesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListValuedResourcesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListValuedResourcesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListValuedResourcesResponse payload) { + return payload.getValuedResourcesList() == null + ? ImmutableList.of() + : payload.getValuedResourcesList(); + } + }; + + private static final PagedListResponseFactory< + GroupFindingsRequest, GroupFindingsResponse, GroupFindingsPagedResponse> + GROUP_FINDINGS_PAGE_STR_FACT = + new PagedListResponseFactory< + GroupFindingsRequest, GroupFindingsResponse, GroupFindingsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + GroupFindingsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, GROUP_FINDINGS_PAGE_STR_DESC, request, context); + return GroupFindingsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListAttackPathsRequest, ListAttackPathsResponse, ListAttackPathsPagedResponse> + LIST_ATTACK_PATHS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAttackPathsRequest, ListAttackPathsResponse, ListAttackPathsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListAttackPathsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_ATTACK_PATHS_PAGE_STR_DESC, request, context); + return ListAttackPathsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListBigQueryExportsRequest, ListBigQueryExportsResponse, ListBigQueryExportsPagedResponse> + LIST_BIG_QUERY_EXPORTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListBigQueryExportsRequest, + ListBigQueryExportsResponse, + ListBigQueryExportsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListBigQueryExportsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_BIG_QUERY_EXPORTS_PAGE_STR_DESC, request, context); + return ListBigQueryExportsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListFindingsRequest, ListFindingsResponse, ListFindingsPagedResponse> + LIST_FINDINGS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListFindingsRequest, ListFindingsResponse, ListFindingsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListFindingsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListFindingsRequest, + ListFindingsResponse, + ListFindingsResponse.ListFindingsResult> + pageContext = + PageContext.create(callable, LIST_FINDINGS_PAGE_STR_DESC, request, context); + return ListFindingsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + 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, + ListNotificationConfigsPagedResponse> + LIST_NOTIFICATION_CONFIGS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListNotificationConfigsRequest, + ListNotificationConfigsResponse, + ListNotificationConfigsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListNotificationConfigsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListNotificationConfigsRequest, + ListNotificationConfigsResponse, + NotificationConfig> + pageContext = + PageContext.create( + callable, LIST_NOTIFICATION_CONFIGS_PAGE_STR_DESC, request, context); + return ListNotificationConfigsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListResourceValueConfigsRequest, + ListResourceValueConfigsResponse, + ListResourceValueConfigsPagedResponse> + LIST_RESOURCE_VALUE_CONFIGS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListResourceValueConfigsRequest, + ListResourceValueConfigsResponse, + ListResourceValueConfigsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListResourceValueConfigsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListResourceValueConfigsRequest, + ListResourceValueConfigsResponse, + ResourceValueConfig> + pageContext = + PageContext.create( + callable, LIST_RESOURCE_VALUE_CONFIGS_PAGE_STR_DESC, request, context); + return ListResourceValueConfigsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListSourcesRequest, ListSourcesResponse, ListSourcesPagedResponse> + LIST_SOURCES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListSourcesRequest, ListSourcesResponse, ListSourcesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListSourcesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_SOURCES_PAGE_STR_DESC, request, context); + return ListSourcesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListValuedResourcesRequest, ListValuedResourcesResponse, ListValuedResourcesPagedResponse> + LIST_VALUED_RESOURCES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListValuedResourcesRequest, + ListValuedResourcesResponse, + ListValuedResourcesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListValuedResourcesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_VALUED_RESOURCES_PAGE_STR_DESC, request, context); + return ListValuedResourcesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to batchCreateResourceValueConfigs. */ + public UnaryCallSettings< + BatchCreateResourceValueConfigsRequest, BatchCreateResourceValueConfigsResponse> + batchCreateResourceValueConfigsSettings() { + return batchCreateResourceValueConfigsSettings; + } + + /** 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 createBigQueryExport. */ + public UnaryCallSettings + createBigQueryExportSettings() { + return createBigQueryExportSettings; + } + + /** Returns the object with the settings used for calls to createFinding. */ + 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 createSource. */ + public UnaryCallSettings createSourceSettings() { + return createSourceSettings; + } + + /** Returns the object with the settings used for calls to deleteBigQueryExport. */ + public UnaryCallSettings deleteBigQueryExportSettings() { + return deleteBigQueryExportSettings; + } + + /** 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() { + return deleteNotificationConfigSettings; + } + + /** Returns the object with the settings used for calls to deleteResourceValueConfig. */ + public UnaryCallSettings + deleteResourceValueConfigSettings() { + return deleteResourceValueConfigSettings; + } + + /** Returns the object with the settings used for calls to getBigQueryExport. */ + public UnaryCallSettings getBigQueryExportSettings() { + return getBigQueryExportSettings; + } + + /** Returns the object with the settings used for calls to getSimulation. */ + public UnaryCallSettings getSimulationSettings() { + return getSimulationSettings; + } + + /** Returns the object with the settings used for calls to getValuedResource. */ + public UnaryCallSettings getValuedResourceSettings() { + return getValuedResourceSettings; + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + 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() { + return getNotificationConfigSettings; + } + + /** Returns the object with the settings used for calls to getResourceValueConfig. */ + public UnaryCallSettings + getResourceValueConfigSettings() { + return getResourceValueConfigSettings; + } + + /** Returns the object with the settings used for calls to getSource. */ + public UnaryCallSettings getSourceSettings() { + return getSourceSettings; + } + + /** Returns the object with the settings used for calls to groupFindings. */ + public PagedCallSettings + groupFindingsSettings() { + return groupFindingsSettings; + } + + /** Returns the object with the settings used for calls to listAttackPaths. */ + public PagedCallSettings< + ListAttackPathsRequest, ListAttackPathsResponse, ListAttackPathsPagedResponse> + listAttackPathsSettings() { + return listAttackPathsSettings; + } + + /** Returns the object with the settings used for calls to listBigQueryExports. */ + public PagedCallSettings< + ListBigQueryExportsRequest, ListBigQueryExportsResponse, ListBigQueryExportsPagedResponse> + listBigQueryExportsSettings() { + return listBigQueryExportsSettings; + } + + /** Returns the object with the settings used for calls to listFindings. */ + public PagedCallSettings + listFindingsSettings() { + 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, + ListNotificationConfigsResponse, + ListNotificationConfigsPagedResponse> + listNotificationConfigsSettings() { + return listNotificationConfigsSettings; + } + + /** Returns the object with the settings used for calls to listResourceValueConfigs. */ + public PagedCallSettings< + ListResourceValueConfigsRequest, + ListResourceValueConfigsResponse, + ListResourceValueConfigsPagedResponse> + listResourceValueConfigsSettings() { + return listResourceValueConfigsSettings; + } + + /** Returns the object with the settings used for calls to listSources. */ + public PagedCallSettings + listSourcesSettings() { + return listSourcesSettings; + } + + /** Returns the object with the settings used for calls to listValuedResources. */ + public PagedCallSettings< + ListValuedResourcesRequest, ListValuedResourcesResponse, ListValuedResourcesPagedResponse> + listValuedResourcesSettings() { + return listValuedResourcesSettings; + } + + /** Returns the object with the settings used for calls to setFindingState. */ + public UnaryCallSettings setFindingStateSettings() { + return setFindingStateSettings; + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return setIamPolicySettings; + } + + /** 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 testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + /** Returns the object with the settings used for calls to updateBigQueryExport. */ + public UnaryCallSettings + updateBigQueryExportSettings() { + return updateBigQueryExportSettings; + } + + /** 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() { + return updateNotificationConfigSettings; + } + + /** Returns the object with the settings used for calls to updateResourceValueConfig. */ + public UnaryCallSettings + updateResourceValueConfigSettings() { + return updateResourceValueConfigSettings; + } + + /** Returns the object with the settings used for calls to updateSecurityMarks. */ + public UnaryCallSettings + updateSecurityMarksSettings() { + return updateSecurityMarksSettings; + } + + /** Returns the object with the settings used for calls to updateSource. */ + public UnaryCallSettings updateSourceSettings() { + return updateSourceSettings; + } + + public SecurityCenterStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcSecurityCenterStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonSecurityCenterStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the endpoint set by the user or the the service's default endpoint. */ + @Override + public String getEndpoint() { + if (super.getEndpoint() != null) { + return super.getEndpoint(); + } + return getDefaultEndpoint(); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "securitycenter"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "securitycenter.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "securitycenter.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(SecurityCenterStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(SecurityCenterStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return SecurityCenterStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected SecurityCenterStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + batchCreateResourceValueConfigsSettings = + settingsBuilder.batchCreateResourceValueConfigsSettings().build(); + bulkMuteFindingsSettings = settingsBuilder.bulkMuteFindingsSettings().build(); + bulkMuteFindingsOperationSettings = settingsBuilder.bulkMuteFindingsOperationSettings().build(); + createBigQueryExportSettings = settingsBuilder.createBigQueryExportSettings().build(); + createFindingSettings = settingsBuilder.createFindingSettings().build(); + createMuteConfigSettings = settingsBuilder.createMuteConfigSettings().build(); + createNotificationConfigSettings = settingsBuilder.createNotificationConfigSettings().build(); + createSourceSettings = settingsBuilder.createSourceSettings().build(); + deleteBigQueryExportSettings = settingsBuilder.deleteBigQueryExportSettings().build(); + deleteMuteConfigSettings = settingsBuilder.deleteMuteConfigSettings().build(); + deleteNotificationConfigSettings = settingsBuilder.deleteNotificationConfigSettings().build(); + deleteResourceValueConfigSettings = settingsBuilder.deleteResourceValueConfigSettings().build(); + getBigQueryExportSettings = settingsBuilder.getBigQueryExportSettings().build(); + getSimulationSettings = settingsBuilder.getSimulationSettings().build(); + getValuedResourceSettings = settingsBuilder.getValuedResourceSettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + getMuteConfigSettings = settingsBuilder.getMuteConfigSettings().build(); + getNotificationConfigSettings = settingsBuilder.getNotificationConfigSettings().build(); + getResourceValueConfigSettings = settingsBuilder.getResourceValueConfigSettings().build(); + getSourceSettings = settingsBuilder.getSourceSettings().build(); + groupFindingsSettings = settingsBuilder.groupFindingsSettings().build(); + listAttackPathsSettings = settingsBuilder.listAttackPathsSettings().build(); + listBigQueryExportsSettings = settingsBuilder.listBigQueryExportsSettings().build(); + listFindingsSettings = settingsBuilder.listFindingsSettings().build(); + listMuteConfigsSettings = settingsBuilder.listMuteConfigsSettings().build(); + listNotificationConfigsSettings = settingsBuilder.listNotificationConfigsSettings().build(); + listResourceValueConfigsSettings = settingsBuilder.listResourceValueConfigsSettings().build(); + listSourcesSettings = settingsBuilder.listSourcesSettings().build(); + listValuedResourcesSettings = settingsBuilder.listValuedResourcesSettings().build(); + setFindingStateSettings = settingsBuilder.setFindingStateSettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + setMuteSettings = settingsBuilder.setMuteSettings().build(); + testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + updateBigQueryExportSettings = settingsBuilder.updateBigQueryExportSettings().build(); + updateExternalSystemSettings = settingsBuilder.updateExternalSystemSettings().build(); + updateFindingSettings = settingsBuilder.updateFindingSettings().build(); + updateMuteConfigSettings = settingsBuilder.updateMuteConfigSettings().build(); + updateNotificationConfigSettings = settingsBuilder.updateNotificationConfigSettings().build(); + updateResourceValueConfigSettings = settingsBuilder.updateResourceValueConfigSettings().build(); + updateSecurityMarksSettings = settingsBuilder.updateSecurityMarksSettings().build(); + updateSourceSettings = settingsBuilder.updateSourceSettings().build(); + } + + /** Builder for SecurityCenterStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder< + BatchCreateResourceValueConfigsRequest, BatchCreateResourceValueConfigsResponse> + batchCreateResourceValueConfigsSettings; + private final UnaryCallSettings.Builder + bulkMuteFindingsSettings; + private final OperationCallSettings.Builder< + BulkMuteFindingsRequest, BulkMuteFindingsResponse, Empty> + bulkMuteFindingsOperationSettings; + private final UnaryCallSettings.Builder + createBigQueryExportSettings; + private final UnaryCallSettings.Builder createFindingSettings; + private final UnaryCallSettings.Builder + createMuteConfigSettings; + private final UnaryCallSettings.Builder + createNotificationConfigSettings; + private final UnaryCallSettings.Builder createSourceSettings; + private final UnaryCallSettings.Builder + deleteBigQueryExportSettings; + private final UnaryCallSettings.Builder + deleteMuteConfigSettings; + private final UnaryCallSettings.Builder + deleteNotificationConfigSettings; + private final UnaryCallSettings.Builder + deleteResourceValueConfigSettings; + private final UnaryCallSettings.Builder + getBigQueryExportSettings; + private final UnaryCallSettings.Builder getSimulationSettings; + private final UnaryCallSettings.Builder + getValuedResourceSettings; + private final UnaryCallSettings.Builder getIamPolicySettings; + private final UnaryCallSettings.Builder getMuteConfigSettings; + private final UnaryCallSettings.Builder + getNotificationConfigSettings; + private final UnaryCallSettings.Builder + getResourceValueConfigSettings; + private final UnaryCallSettings.Builder getSourceSettings; + private final PagedCallSettings.Builder< + GroupFindingsRequest, GroupFindingsResponse, GroupFindingsPagedResponse> + groupFindingsSettings; + private final PagedCallSettings.Builder< + ListAttackPathsRequest, ListAttackPathsResponse, ListAttackPathsPagedResponse> + listAttackPathsSettings; + private final PagedCallSettings.Builder< + ListBigQueryExportsRequest, + ListBigQueryExportsResponse, + ListBigQueryExportsPagedResponse> + listBigQueryExportsSettings; + private final PagedCallSettings.Builder< + ListFindingsRequest, ListFindingsResponse, ListFindingsPagedResponse> + listFindingsSettings; + private final PagedCallSettings.Builder< + ListMuteConfigsRequest, ListMuteConfigsResponse, ListMuteConfigsPagedResponse> + listMuteConfigsSettings; + private final PagedCallSettings.Builder< + ListNotificationConfigsRequest, + ListNotificationConfigsResponse, + ListNotificationConfigsPagedResponse> + listNotificationConfigsSettings; + private final PagedCallSettings.Builder< + ListResourceValueConfigsRequest, + ListResourceValueConfigsResponse, + ListResourceValueConfigsPagedResponse> + listResourceValueConfigsSettings; + private final PagedCallSettings.Builder< + ListSourcesRequest, ListSourcesResponse, ListSourcesPagedResponse> + listSourcesSettings; + private final PagedCallSettings.Builder< + ListValuedResourcesRequest, + ListValuedResourcesResponse, + ListValuedResourcesPagedResponse> + listValuedResourcesSettings; + private final UnaryCallSettings.Builder + setFindingStateSettings; + private final UnaryCallSettings.Builder setIamPolicySettings; + private final UnaryCallSettings.Builder setMuteSettings; + private final UnaryCallSettings.Builder + testIamPermissionsSettings; + private final UnaryCallSettings.Builder + updateBigQueryExportSettings; + private final UnaryCallSettings.Builder + updateExternalSystemSettings; + private final UnaryCallSettings.Builder updateFindingSettings; + private final UnaryCallSettings.Builder + updateMuteConfigSettings; + private final UnaryCallSettings.Builder + updateNotificationConfigSettings; + private final UnaryCallSettings.Builder + updateResourceValueConfigSettings; + private final UnaryCallSettings.Builder + updateSecurityMarksSettings; + private final UnaryCallSettings.Builder updateSourceSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + batchCreateResourceValueConfigsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + bulkMuteFindingsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + bulkMuteFindingsOperationSettings = OperationCallSettings.newBuilder(); + createBigQueryExportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createFindingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createMuteConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createNotificationConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createSourceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteBigQueryExportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteMuteConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteNotificationConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteResourceValueConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getBigQueryExportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getSimulationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getValuedResourceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getMuteConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getNotificationConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getResourceValueConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getSourceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + groupFindingsSettings = PagedCallSettings.newBuilder(GROUP_FINDINGS_PAGE_STR_FACT); + listAttackPathsSettings = PagedCallSettings.newBuilder(LIST_ATTACK_PATHS_PAGE_STR_FACT); + listBigQueryExportsSettings = + PagedCallSettings.newBuilder(LIST_BIG_QUERY_EXPORTS_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); + listResourceValueConfigsSettings = + PagedCallSettings.newBuilder(LIST_RESOURCE_VALUE_CONFIGS_PAGE_STR_FACT); + listSourcesSettings = PagedCallSettings.newBuilder(LIST_SOURCES_PAGE_STR_FACT); + listValuedResourcesSettings = + PagedCallSettings.newBuilder(LIST_VALUED_RESOURCES_PAGE_STR_FACT); + setFindingStateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setMuteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateBigQueryExportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateExternalSystemSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateFindingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateMuteConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateNotificationConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateResourceValueConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateSecurityMarksSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateSourceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + batchCreateResourceValueConfigsSettings, + bulkMuteFindingsSettings, + createBigQueryExportSettings, + createFindingSettings, + createMuteConfigSettings, + createNotificationConfigSettings, + createSourceSettings, + deleteBigQueryExportSettings, + deleteMuteConfigSettings, + deleteNotificationConfigSettings, + deleteResourceValueConfigSettings, + getBigQueryExportSettings, + getSimulationSettings, + getValuedResourceSettings, + getIamPolicySettings, + getMuteConfigSettings, + getNotificationConfigSettings, + getResourceValueConfigSettings, + getSourceSettings, + groupFindingsSettings, + listAttackPathsSettings, + listBigQueryExportsSettings, + listFindingsSettings, + listMuteConfigsSettings, + listNotificationConfigsSettings, + listResourceValueConfigsSettings, + listSourcesSettings, + listValuedResourcesSettings, + setFindingStateSettings, + setIamPolicySettings, + setMuteSettings, + testIamPermissionsSettings, + updateBigQueryExportSettings, + updateExternalSystemSettings, + updateFindingSettings, + updateMuteConfigSettings, + updateNotificationConfigSettings, + updateResourceValueConfigSettings, + updateSecurityMarksSettings, + updateSourceSettings); + initDefaults(this); + } + + protected Builder(SecurityCenterStubSettings settings) { + super(settings); + + batchCreateResourceValueConfigsSettings = + settings.batchCreateResourceValueConfigsSettings.toBuilder(); + bulkMuteFindingsSettings = settings.bulkMuteFindingsSettings.toBuilder(); + bulkMuteFindingsOperationSettings = settings.bulkMuteFindingsOperationSettings.toBuilder(); + createBigQueryExportSettings = settings.createBigQueryExportSettings.toBuilder(); + createFindingSettings = settings.createFindingSettings.toBuilder(); + createMuteConfigSettings = settings.createMuteConfigSettings.toBuilder(); + createNotificationConfigSettings = settings.createNotificationConfigSettings.toBuilder(); + createSourceSettings = settings.createSourceSettings.toBuilder(); + deleteBigQueryExportSettings = settings.deleteBigQueryExportSettings.toBuilder(); + deleteMuteConfigSettings = settings.deleteMuteConfigSettings.toBuilder(); + deleteNotificationConfigSettings = settings.deleteNotificationConfigSettings.toBuilder(); + deleteResourceValueConfigSettings = settings.deleteResourceValueConfigSettings.toBuilder(); + getBigQueryExportSettings = settings.getBigQueryExportSettings.toBuilder(); + getSimulationSettings = settings.getSimulationSettings.toBuilder(); + getValuedResourceSettings = settings.getValuedResourceSettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + getMuteConfigSettings = settings.getMuteConfigSettings.toBuilder(); + getNotificationConfigSettings = settings.getNotificationConfigSettings.toBuilder(); + getResourceValueConfigSettings = settings.getResourceValueConfigSettings.toBuilder(); + getSourceSettings = settings.getSourceSettings.toBuilder(); + groupFindingsSettings = settings.groupFindingsSettings.toBuilder(); + listAttackPathsSettings = settings.listAttackPathsSettings.toBuilder(); + listBigQueryExportsSettings = settings.listBigQueryExportsSettings.toBuilder(); + listFindingsSettings = settings.listFindingsSettings.toBuilder(); + listMuteConfigsSettings = settings.listMuteConfigsSettings.toBuilder(); + listNotificationConfigsSettings = settings.listNotificationConfigsSettings.toBuilder(); + listResourceValueConfigsSettings = settings.listResourceValueConfigsSettings.toBuilder(); + listSourcesSettings = settings.listSourcesSettings.toBuilder(); + listValuedResourcesSettings = settings.listValuedResourcesSettings.toBuilder(); + setFindingStateSettings = settings.setFindingStateSettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + setMuteSettings = settings.setMuteSettings.toBuilder(); + testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + updateBigQueryExportSettings = settings.updateBigQueryExportSettings.toBuilder(); + updateExternalSystemSettings = settings.updateExternalSystemSettings.toBuilder(); + updateFindingSettings = settings.updateFindingSettings.toBuilder(); + updateMuteConfigSettings = settings.updateMuteConfigSettings.toBuilder(); + updateNotificationConfigSettings = settings.updateNotificationConfigSettings.toBuilder(); + updateResourceValueConfigSettings = settings.updateResourceValueConfigSettings.toBuilder(); + updateSecurityMarksSettings = settings.updateSecurityMarksSettings.toBuilder(); + updateSourceSettings = settings.updateSourceSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + batchCreateResourceValueConfigsSettings, + bulkMuteFindingsSettings, + createBigQueryExportSettings, + createFindingSettings, + createMuteConfigSettings, + createNotificationConfigSettings, + createSourceSettings, + deleteBigQueryExportSettings, + deleteMuteConfigSettings, + deleteNotificationConfigSettings, + deleteResourceValueConfigSettings, + getBigQueryExportSettings, + getSimulationSettings, + getValuedResourceSettings, + getIamPolicySettings, + getMuteConfigSettings, + getNotificationConfigSettings, + getResourceValueConfigSettings, + getSourceSettings, + groupFindingsSettings, + listAttackPathsSettings, + listBigQueryExportsSettings, + listFindingsSettings, + listMuteConfigsSettings, + listNotificationConfigsSettings, + listResourceValueConfigsSettings, + listSourcesSettings, + listValuedResourcesSettings, + setFindingStateSettings, + setIamPolicySettings, + setMuteSettings, + testIamPermissionsSettings, + updateBigQueryExportSettings, + updateExternalSystemSettings, + updateFindingSettings, + updateMuteConfigSettings, + updateNotificationConfigSettings, + updateResourceValueConfigSettings, + updateSecurityMarksSettings, + updateSourceSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .batchCreateResourceValueConfigsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .bulkMuteFindingsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createBigQueryExportSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createFindingSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_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_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createSourceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteBigQueryExportSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_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_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteResourceValueConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getBigQueryExportSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getSimulationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getValuedResourceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_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("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getResourceValueConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getSourceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .groupFindingsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listAttackPathsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listBigQueryExportsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listFindingsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_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("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listResourceValueConfigsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listSourcesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listValuedResourcesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .setFindingStateSettings() + .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_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .setMuteSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .testIamPermissionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateBigQueryExportSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_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_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_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_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateResourceValueConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateSecurityMarksSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateSourceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_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())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to batchCreateResourceValueConfigs. */ + public UnaryCallSettings.Builder< + BatchCreateResourceValueConfigsRequest, BatchCreateResourceValueConfigsResponse> + batchCreateResourceValueConfigsSettings() { + return batchCreateResourceValueConfigsSettings; + } + + /** 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. */ + public OperationCallSettings.Builder + bulkMuteFindingsOperationSettings() { + return bulkMuteFindingsOperationSettings; + } + + /** Returns the builder for the settings used for calls to createBigQueryExport. */ + public UnaryCallSettings.Builder + createBigQueryExportSettings() { + return createBigQueryExportSettings; + } + + /** Returns the builder for the settings used for calls to createFinding. */ + public UnaryCallSettings.Builder createFindingSettings() { + 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 createSource. */ + public UnaryCallSettings.Builder createSourceSettings() { + return createSourceSettings; + } + + /** Returns the builder for the settings used for calls to deleteBigQueryExport. */ + public UnaryCallSettings.Builder + deleteBigQueryExportSettings() { + return deleteBigQueryExportSettings; + } + + /** 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() { + return deleteNotificationConfigSettings; + } + + /** Returns the builder for the settings used for calls to deleteResourceValueConfig. */ + public UnaryCallSettings.Builder + deleteResourceValueConfigSettings() { + return deleteResourceValueConfigSettings; + } + + /** Returns the builder for the settings used for calls to getBigQueryExport. */ + public UnaryCallSettings.Builder + getBigQueryExportSettings() { + return getBigQueryExportSettings; + } + + /** Returns the builder for the settings used for calls to getSimulation. */ + public UnaryCallSettings.Builder getSimulationSettings() { + return getSimulationSettings; + } + + /** Returns the builder for the settings used for calls to getValuedResource. */ + public UnaryCallSettings.Builder + getValuedResourceSettings() { + return getValuedResourceSettings; + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + 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() { + return getNotificationConfigSettings; + } + + /** Returns the builder for the settings used for calls to getResourceValueConfig. */ + public UnaryCallSettings.Builder + getResourceValueConfigSettings() { + return getResourceValueConfigSettings; + } + + /** Returns the builder for the settings used for calls to getSource. */ + public UnaryCallSettings.Builder getSourceSettings() { + return getSourceSettings; + } + + /** Returns the builder for the settings used for calls to groupFindings. */ + public PagedCallSettings.Builder< + GroupFindingsRequest, GroupFindingsResponse, GroupFindingsPagedResponse> + groupFindingsSettings() { + return groupFindingsSettings; + } + + /** Returns the builder for the settings used for calls to listAttackPaths. */ + public PagedCallSettings.Builder< + ListAttackPathsRequest, ListAttackPathsResponse, ListAttackPathsPagedResponse> + listAttackPathsSettings() { + return listAttackPathsSettings; + } + + /** Returns the builder for the settings used for calls to listBigQueryExports. */ + public PagedCallSettings.Builder< + ListBigQueryExportsRequest, + ListBigQueryExportsResponse, + ListBigQueryExportsPagedResponse> + listBigQueryExportsSettings() { + return listBigQueryExportsSettings; + } + + /** Returns the builder for the settings used for calls to listFindings. */ + public PagedCallSettings.Builder< + ListFindingsRequest, ListFindingsResponse, ListFindingsPagedResponse> + listFindingsSettings() { + 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, + ListNotificationConfigsResponse, + ListNotificationConfigsPagedResponse> + listNotificationConfigsSettings() { + return listNotificationConfigsSettings; + } + + /** Returns the builder for the settings used for calls to listResourceValueConfigs. */ + public PagedCallSettings.Builder< + ListResourceValueConfigsRequest, + ListResourceValueConfigsResponse, + ListResourceValueConfigsPagedResponse> + listResourceValueConfigsSettings() { + return listResourceValueConfigsSettings; + } + + /** Returns the builder for the settings used for calls to listSources. */ + public PagedCallSettings.Builder< + ListSourcesRequest, ListSourcesResponse, ListSourcesPagedResponse> + listSourcesSettings() { + return listSourcesSettings; + } + + /** Returns the builder for the settings used for calls to listValuedResources. */ + public PagedCallSettings.Builder< + ListValuedResourcesRequest, + ListValuedResourcesResponse, + ListValuedResourcesPagedResponse> + listValuedResourcesSettings() { + return listValuedResourcesSettings; + } + + /** Returns the builder for the settings used for calls to setFindingState. */ + public UnaryCallSettings.Builder setFindingStateSettings() { + return setFindingStateSettings; + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return setIamPolicySettings; + } + + /** 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 testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + /** Returns the builder for the settings used for calls to updateBigQueryExport. */ + public UnaryCallSettings.Builder + updateBigQueryExportSettings() { + return updateBigQueryExportSettings; + } + + /** 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() { + return updateNotificationConfigSettings; + } + + /** Returns the builder for the settings used for calls to updateResourceValueConfig. */ + public UnaryCallSettings.Builder + updateResourceValueConfigSettings() { + return updateResourceValueConfigSettings; + } + + /** Returns the builder for the settings used for calls to updateSecurityMarks. */ + public UnaryCallSettings.Builder + updateSecurityMarksSettings() { + return updateSecurityMarksSettings; + } + + /** Returns the builder for the settings used for calls to updateSource. */ + public UnaryCallSettings.Builder updateSourceSettings() { + return updateSourceSettings; + } + + /** Returns the endpoint set by the user or the the service's default endpoint. */ + @Override + public String getEndpoint() { + if (super.getEndpoint() != null) { + return super.getEndpoint(); + } + return getDefaultEndpoint(); + } + + @Override + public SecurityCenterStubSettings build() throws IOException { + return new SecurityCenterStubSettings(this); + } + } +} diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/resources/META-INF/native-image/com.google.cloud.securitycenter.v2/reflect-config.json b/java-securitycenter/google-cloud-securitycenter/src/main/resources/META-INF/native-image/com.google.cloud.securitycenter.v2/reflect-config.json new file mode 100644 index 000000000000..b357e3c76eda --- /dev/null +++ b/java-securitycenter/google-cloud-securitycenter/src/main/resources/META-INF/native-image/com.google.cloud.securitycenter.v2/reflect-config.json @@ -0,0 +1,4160 @@ +[ + { + "name": "com.google.api.ClientLibraryDestination", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibraryOrganization", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldBehavior", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.LaunchStage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$History", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Style", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RoutingParameter", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RoutingParameter$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RoutingRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RoutingRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Access", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Access$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Application", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Application$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.AttackExposure", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.AttackExposure$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.AttackExposure$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.AttackPath", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.AttackPath$AttackPathEdge", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.AttackPath$AttackPathEdge$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.AttackPath$AttackPathNode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.AttackPath$AttackPathNode$AttackStepNode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.AttackPath$AttackPathNode$AttackStepNode$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.AttackPath$AttackPathNode$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.AttackPath$AttackPathNode$NodeType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.AttackPath$AttackPathNode$PathNodeAssociatedFinding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.AttackPath$AttackPathNode$PathNodeAssociatedFinding$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.AttackPath$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.BackupDisasterRecovery", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.BackupDisasterRecovery$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.BigQueryExport", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.BigQueryExport$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.BulkMuteFindingsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.BulkMuteFindingsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.BulkMuteFindingsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.BulkMuteFindingsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.CloudDlpDataProfile", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.CloudDlpDataProfile$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.CloudDlpDataProfile$ParentType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.CloudDlpInspection", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.CloudDlpInspection$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.CloudLoggingEntry", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.CloudLoggingEntry$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Compliance", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Compliance$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Connection", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Connection$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Connection$Protocol", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Contact", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Contact$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ContactDetails", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ContactDetails$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Container", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Container$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.CreateFindingRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.CreateFindingRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.CreateMuteConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.CreateMuteConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.CreateSourceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.CreateSourceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Cve", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Cve$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Cve$ExploitationActivity", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Cve$RiskRating", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Cvssv3", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Cvssv3$AttackComplexity", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Cvssv3$AttackVector", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Cvssv3$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Cvssv3$Impact", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Cvssv3$PrivilegesRequired", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Cvssv3$Scope", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Cvssv3$UserInteraction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Database", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Database$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.DeleteMuteConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.DeleteMuteConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.EnvironmentVariable", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.EnvironmentVariable$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ExfilResource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ExfilResource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Exfiltration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Exfiltration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ExternalSystem", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ExternalSystem$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ExternalSystem$TicketInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ExternalSystem$TicketInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.File", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.File$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.File$DiskPath", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.File$DiskPath$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Finding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Finding$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Finding$FindingClass", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Finding$Mute", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Finding$Severity", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Finding$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Geolocation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Geolocation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.GetBigQueryExportRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.GetBigQueryExportRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.GetMuteConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.GetMuteConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.GetNotificationConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.GetNotificationConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.GetSimulationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.GetSimulationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.GetSourceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.GetSourceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.GetValuedResourceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.GetValuedResourceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.GroupFindingsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.GroupFindingsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.GroupFindingsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.GroupFindingsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.GroupResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.GroupResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.IamBinding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.IamBinding$Action", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.IamBinding$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Indicator", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Indicator$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Indicator$ProcessSignature", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Indicator$ProcessSignature$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Indicator$ProcessSignature$MemoryHashSignature", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Indicator$ProcessSignature$MemoryHashSignature$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Indicator$ProcessSignature$MemoryHashSignature$Detection", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Indicator$ProcessSignature$MemoryHashSignature$Detection$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Indicator$ProcessSignature$SignatureType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Indicator$ProcessSignature$YaraRuleSignature", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Indicator$ProcessSignature$YaraRuleSignature$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.KernelRootkit", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.KernelRootkit$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Kubernetes", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Kubernetes$AccessReview", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Kubernetes$AccessReview$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Kubernetes$Binding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Kubernetes$Binding$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Kubernetes$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Kubernetes$Node", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Kubernetes$Node$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Kubernetes$NodePool", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Kubernetes$NodePool$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Kubernetes$Object", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Kubernetes$Object$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Kubernetes$Pod", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Kubernetes$Pod$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Kubernetes$Role", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Kubernetes$Role$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Kubernetes$Role$Kind", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Kubernetes$Subject", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Kubernetes$Subject$AuthType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Kubernetes$Subject$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Label", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Label$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ListAttackPathsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ListAttackPathsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ListAttackPathsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ListAttackPathsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ListBigQueryExportsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ListBigQueryExportsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ListBigQueryExportsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ListBigQueryExportsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ListFindingsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ListFindingsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ListFindingsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ListFindingsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ListFindingsResponse$ListFindingsResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ListFindingsResponse$ListFindingsResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ListFindingsResponse$ListFindingsResult$Resource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ListFindingsResponse$ListFindingsResult$Resource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ListMuteConfigsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ListMuteConfigsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ListMuteConfigsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ListMuteConfigsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ListNotificationConfigsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ListNotificationConfigsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ListNotificationConfigsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ListNotificationConfigsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ListResourceValueConfigsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ListResourceValueConfigsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ListResourceValueConfigsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ListResourceValueConfigsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ListSourcesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ListSourcesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ListSourcesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ListSourcesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ListValuedResourcesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ListValuedResourcesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ListValuedResourcesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ListValuedResourcesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.LoadBalancer", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.LoadBalancer$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.LogEntry", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.LogEntry$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.MitreAttack", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.MitreAttack$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.MitreAttack$Tactic", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.MitreAttack$Technique", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.MuteConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.MuteConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.MuteConfig$MuteConfigType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.NotificationConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.NotificationConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.NotificationConfig$StreamingConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.NotificationConfig$StreamingConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.NotificationMessage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.NotificationMessage$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.OrgPolicy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.OrgPolicy$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Package", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Package$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Process", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Process$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Reference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Reference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Resource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Resource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ResourceValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ResourceValueConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ResourceValueConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ResourceValueConfig$SensitiveDataProtectionMapping", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ResourceValueConfig$SensitiveDataProtectionMapping$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ResourceValueConfigMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ResourceValueConfigMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.SecurityBulletin", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.SecurityBulletin$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.SecurityMarks", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.SecurityMarks$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.SecurityPosture", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.SecurityPosture$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.SecurityPosture$PolicyDriftDetails", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.SecurityPosture$PolicyDriftDetails$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ServiceAccountDelegationInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ServiceAccountDelegationInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.SetFindingStateRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.SetFindingStateRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.SetMuteRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.SetMuteRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Simulation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Simulation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Source", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Source$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.UpdateBigQueryExportRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.UpdateBigQueryExportRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.UpdateExternalSystemRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.UpdateExternalSystemRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.UpdateFindingRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.UpdateFindingRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.UpdateMuteConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.UpdateMuteConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.UpdateNotificationConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.UpdateNotificationConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.UpdateResourceValueConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.UpdateResourceValueConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.UpdateSecurityMarksRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.UpdateSecurityMarksRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.UpdateSourceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.UpdateSourceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ValuedResource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ValuedResource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.ValuedResource$ResourceValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Vulnerability", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v2.Vulnerability$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditConfigDelta", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditConfigDelta$Action", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditConfigDelta$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditLogConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditLogConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditLogConfig$LogType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.Binding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.Binding$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.BindingDelta", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.BindingDelta$Action", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.BindingDelta$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.GetIamPolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.GetIamPolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.GetPolicyOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.GetPolicyOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.Policy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.Policy$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.PolicyDelta", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.PolicyDelta$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.SetIamPolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.SetIamPolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.TestIamPermissionsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.TestIamPermissionsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.TestIamPermissionsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.TestIamPermissionsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$Edition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$VerificationState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnumType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$FieldPresence", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$JsonFormat", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$MessageEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$RepeatedFieldEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Utf8Validation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Label", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$CType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$JSType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionRetention", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionTargetType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$OptimizeMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Semantic", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$IdempotencyLevel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.ListValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.ListValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.NullValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Struct", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Struct$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Value", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Value$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.Expr", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.Expr$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + } +] \ No newline at end of file diff --git a/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v2/MockSecurityCenter.java b/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v2/MockSecurityCenter.java new file mode 100644 index 000000000000..b84cafd255d2 --- /dev/null +++ b/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v2/MockSecurityCenter.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.v2; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockSecurityCenter implements MockGrpcService { + private final MockSecurityCenterImpl serviceImpl; + + public MockSecurityCenter() { + serviceImpl = new MockSecurityCenterImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v2/MockSecurityCenterImpl.java b/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v2/MockSecurityCenterImpl.java new file mode 100644 index 000000000000..90a5f72b090e --- /dev/null +++ b/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v2/MockSecurityCenterImpl.java @@ -0,0 +1,910 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.securitycenter.v2; + +import com.google.api.core.BetaApi; +import com.google.cloud.securitycenter.v2.SecurityCenterGrpc.SecurityCenterImplBase; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockSecurityCenterImpl extends SecurityCenterImplBase { + private List requests; + private Queue responses; + + public MockSecurityCenterImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void batchCreateResourceValueConfigs( + BatchCreateResourceValueConfigsRequest request, + StreamObserver responseObserver) { + java.lang.Object response = responses.poll(); + if (response instanceof BatchCreateResourceValueConfigsResponse) { + requests.add(request); + responseObserver.onNext(((BatchCreateResourceValueConfigsResponse) 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 BatchCreateResourceValueConfigs, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + BatchCreateResourceValueConfigsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void bulkMuteFindings( + BulkMuteFindingsRequest request, StreamObserver responseObserver) { + java.lang.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 createBigQueryExport( + CreateBigQueryExportRequest request, StreamObserver responseObserver) { + java.lang.Object response = responses.poll(); + if (response instanceof BigQueryExport) { + requests.add(request); + responseObserver.onNext(((BigQueryExport) 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 CreateBigQueryExport, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + BigQueryExport.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createFinding( + CreateFindingRequest request, StreamObserver responseObserver) { + java.lang.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 CreateFinding, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Finding.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createMuteConfig( + CreateMuteConfigRequest request, StreamObserver responseObserver) { + java.lang.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, + StreamObserver responseObserver) { + java.lang.Object response = responses.poll(); + if (response instanceof NotificationConfig) { + requests.add(request); + responseObserver.onNext(((NotificationConfig) 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 CreateNotificationConfig, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + NotificationConfig.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createSource(CreateSourceRequest request, StreamObserver responseObserver) { + java.lang.Object response = responses.poll(); + if (response instanceof Source) { + requests.add(request); + responseObserver.onNext(((Source) 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 CreateSource, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Source.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteBigQueryExport( + DeleteBigQueryExportRequest request, StreamObserver responseObserver) { + java.lang.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 DeleteBigQueryExport, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteMuteConfig( + DeleteMuteConfigRequest request, StreamObserver responseObserver) { + java.lang.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) { + java.lang.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 DeleteNotificationConfig, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteResourceValueConfig( + DeleteResourceValueConfigRequest request, StreamObserver responseObserver) { + java.lang.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 DeleteResourceValueConfig, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getBigQueryExport( + GetBigQueryExportRequest request, StreamObserver responseObserver) { + java.lang.Object response = responses.poll(); + if (response instanceof BigQueryExport) { + requests.add(request); + responseObserver.onNext(((BigQueryExport) 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 GetBigQueryExport, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + BigQueryExport.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getSimulation( + GetSimulationRequest request, StreamObserver responseObserver) { + java.lang.Object response = responses.poll(); + if (response instanceof Simulation) { + requests.add(request); + responseObserver.onNext(((Simulation) 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 GetSimulation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Simulation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getValuedResource( + GetValuedResourceRequest request, StreamObserver responseObserver) { + java.lang.Object response = responses.poll(); + if (response instanceof ValuedResource) { + requests.add(request); + responseObserver.onNext(((ValuedResource) 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 GetValuedResource, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ValuedResource.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getIamPolicy(GetIamPolicyRequest request, StreamObserver responseObserver) { + java.lang.Object response = responses.poll(); + if (response instanceof Policy) { + requests.add(request); + responseObserver.onNext(((Policy) 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 GetIamPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Policy.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getMuteConfig( + GetMuteConfigRequest request, StreamObserver responseObserver) { + java.lang.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) { + java.lang.Object response = responses.poll(); + if (response instanceof NotificationConfig) { + requests.add(request); + responseObserver.onNext(((NotificationConfig) 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 GetNotificationConfig, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + NotificationConfig.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getResourceValueConfig( + GetResourceValueConfigRequest request, StreamObserver responseObserver) { + java.lang.Object response = responses.poll(); + if (response instanceof ResourceValueConfig) { + requests.add(request); + responseObserver.onNext(((ResourceValueConfig) 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 GetResourceValueConfig, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ResourceValueConfig.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getSource(GetSourceRequest request, StreamObserver responseObserver) { + java.lang.Object response = responses.poll(); + if (response instanceof Source) { + requests.add(request); + responseObserver.onNext(((Source) 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 GetSource, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Source.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void groupFindings( + GroupFindingsRequest request, StreamObserver responseObserver) { + java.lang.Object response = responses.poll(); + if (response instanceof GroupFindingsResponse) { + requests.add(request); + responseObserver.onNext(((GroupFindingsResponse) 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 GroupFindings, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + GroupFindingsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listAttackPaths( + ListAttackPathsRequest request, StreamObserver responseObserver) { + java.lang.Object response = responses.poll(); + if (response instanceof ListAttackPathsResponse) { + requests.add(request); + responseObserver.onNext(((ListAttackPathsResponse) 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 ListAttackPaths, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListAttackPathsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listBigQueryExports( + ListBigQueryExportsRequest request, + StreamObserver responseObserver) { + java.lang.Object response = responses.poll(); + if (response instanceof ListBigQueryExportsResponse) { + requests.add(request); + responseObserver.onNext(((ListBigQueryExportsResponse) 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 ListBigQueryExports, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListBigQueryExportsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listFindings( + ListFindingsRequest request, StreamObserver responseObserver) { + java.lang.Object response = responses.poll(); + if (response instanceof ListFindingsResponse) { + requests.add(request); + responseObserver.onNext(((ListFindingsResponse) 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 ListFindings, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListFindingsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listMuteConfigs( + ListMuteConfigsRequest request, StreamObserver responseObserver) { + java.lang.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, + StreamObserver responseObserver) { + java.lang.Object response = responses.poll(); + if (response instanceof ListNotificationConfigsResponse) { + requests.add(request); + responseObserver.onNext(((ListNotificationConfigsResponse) 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 ListNotificationConfigs, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListNotificationConfigsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listResourceValueConfigs( + ListResourceValueConfigsRequest request, + StreamObserver responseObserver) { + java.lang.Object response = responses.poll(); + if (response instanceof ListResourceValueConfigsResponse) { + requests.add(request); + responseObserver.onNext(((ListResourceValueConfigsResponse) 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 ListResourceValueConfigs, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListResourceValueConfigsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listSources( + ListSourcesRequest request, StreamObserver responseObserver) { + java.lang.Object response = responses.poll(); + if (response instanceof ListSourcesResponse) { + requests.add(request); + responseObserver.onNext(((ListSourcesResponse) 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 ListSources, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListSourcesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listValuedResources( + ListValuedResourcesRequest request, + StreamObserver responseObserver) { + java.lang.Object response = responses.poll(); + if (response instanceof ListValuedResourcesResponse) { + requests.add(request); + responseObserver.onNext(((ListValuedResourcesResponse) 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 ListValuedResources, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListValuedResourcesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void setFindingState( + SetFindingStateRequest request, StreamObserver responseObserver) { + java.lang.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 SetFindingState, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Finding.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void setIamPolicy(SetIamPolicyRequest request, StreamObserver responseObserver) { + java.lang.Object response = responses.poll(); + if (response instanceof Policy) { + requests.add(request); + responseObserver.onNext(((Policy) 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 SetIamPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Policy.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void setMute(SetMuteRequest request, StreamObserver responseObserver) { + java.lang.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 testIamPermissions( + TestIamPermissionsRequest request, + StreamObserver responseObserver) { + java.lang.Object response = responses.poll(); + if (response instanceof TestIamPermissionsResponse) { + requests.add(request); + responseObserver.onNext(((TestIamPermissionsResponse) 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 TestIamPermissions, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + TestIamPermissionsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateBigQueryExport( + UpdateBigQueryExportRequest request, StreamObserver responseObserver) { + java.lang.Object response = responses.poll(); + if (response instanceof BigQueryExport) { + requests.add(request); + responseObserver.onNext(((BigQueryExport) 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 UpdateBigQueryExport, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + BigQueryExport.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateExternalSystem( + UpdateExternalSystemRequest request, StreamObserver responseObserver) { + java.lang.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) { + java.lang.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 UpdateFinding, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Finding.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateMuteConfig( + UpdateMuteConfigRequest request, StreamObserver responseObserver) { + java.lang.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, + StreamObserver responseObserver) { + java.lang.Object response = responses.poll(); + if (response instanceof NotificationConfig) { + requests.add(request); + responseObserver.onNext(((NotificationConfig) 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 UpdateNotificationConfig, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + NotificationConfig.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateResourceValueConfig( + UpdateResourceValueConfigRequest request, + StreamObserver responseObserver) { + java.lang.Object response = responses.poll(); + if (response instanceof ResourceValueConfig) { + requests.add(request); + responseObserver.onNext(((ResourceValueConfig) 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 UpdateResourceValueConfig, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ResourceValueConfig.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateSecurityMarks( + UpdateSecurityMarksRequest request, StreamObserver responseObserver) { + java.lang.Object response = responses.poll(); + if (response instanceof SecurityMarks) { + requests.add(request); + responseObserver.onNext(((SecurityMarks) 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 UpdateSecurityMarks, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SecurityMarks.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateSource(UpdateSourceRequest request, StreamObserver responseObserver) { + java.lang.Object response = responses.poll(); + if (response instanceof Source) { + requests.add(request); + responseObserver.onNext(((Source) 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 UpdateSource, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Source.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v2/SecurityCenterClientHttpJsonTest.java b/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v2/SecurityCenterClientHttpJsonTest.java new file mode 100644 index 000000000000..888c5c438eed --- /dev/null +++ b/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v2/SecurityCenterClientHttpJsonTest.java @@ -0,0 +1,5272 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.securitycenter.v2; + +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.GroupFindingsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListAttackPathsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListBigQueryExportsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListFindingsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListMuteConfigsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListNotificationConfigsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListResourceValueConfigsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListSourcesPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListValuedResourcesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.api.resourcenames.ResourceName; +import com.google.cloud.securitycenter.v2.stub.HttpJsonSecurityCenterStub; +import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.Policy; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import com.google.protobuf.Value; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class SecurityCenterClientHttpJsonTest { + private static MockHttpService mockService; + private static SecurityCenterClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonSecurityCenterStub.getMethodDescriptors(), + SecurityCenterSettings.getDefaultEndpoint()); + SecurityCenterSettings settings = + SecurityCenterSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + SecurityCenterSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = SecurityCenterClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void batchCreateResourceValueConfigsTest() throws Exception { + BatchCreateResourceValueConfigsResponse expectedResponse = + BatchCreateResourceValueConfigsResponse.newBuilder() + .addAllResourceValueConfigs(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + List requests = new ArrayList<>(); + + BatchCreateResourceValueConfigsResponse actualResponse = + client.batchCreateResourceValueConfigs(parent, requests); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void batchCreateResourceValueConfigsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + List requests = new ArrayList<>(); + client.batchCreateResourceValueConfigs(parent, requests); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchCreateResourceValueConfigsTest2() throws Exception { + BatchCreateResourceValueConfigsResponse expectedResponse = + BatchCreateResourceValueConfigsResponse.newBuilder() + .addAllResourceValueConfigs(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "organizations/organization-8287"; + List requests = new ArrayList<>(); + + BatchCreateResourceValueConfigsResponse actualResponse = + client.batchCreateResourceValueConfigs(parent, requests); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void batchCreateResourceValueConfigsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "organizations/organization-8287"; + List requests = new ArrayList<>(); + client.batchCreateResourceValueConfigs(parent, requests); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void bulkMuteFindingsTest() throws Exception { + BulkMuteFindingsResponse expectedResponse = BulkMuteFindingsResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("bulkMuteFindingsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ResourceName parent = FolderName.of("[FOLDER]"); + + BulkMuteFindingsResponse actualResponse = client.bulkMuteFindingsAsync(parent).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void bulkMuteFindingsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ResourceName parent = FolderName.of("[FOLDER]"); + client.bulkMuteFindingsAsync(parent).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void bulkMuteFindingsTest2() throws Exception { + BulkMuteFindingsResponse expectedResponse = BulkMuteFindingsResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("bulkMuteFindingsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "organizations/organization-8287"; + + BulkMuteFindingsResponse actualResponse = client.bulkMuteFindingsAsync(parent).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void bulkMuteFindingsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "organizations/organization-8287"; + client.bulkMuteFindingsAsync(parent).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createBigQueryExportTest() throws Exception { + BigQueryExport expectedResponse = + BigQueryExport.newBuilder() + .setName( + BigQueryExportName.ofOrganizationLocationExportName( + "[ORGANIZATION]", "[LOCATION]", "[EXPORT]") + .toString()) + .setDescription("description-1724546052") + .setFilter("filter-1274492040") + .setDataset("dataset1443214456") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMostRecentEditor("mostRecentEditor-833861941") + .setPrincipal("principal-1812041682") + .build(); + mockService.addResponse(expectedResponse); + + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); + String bigQueryExportId = "bigQueryExportId1024198583"; + + BigQueryExport actualResponse = + client.createBigQueryExport(parent, bigQueryExport, bigQueryExportId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createBigQueryExportExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); + String bigQueryExportId = "bigQueryExportId1024198583"; + client.createBigQueryExport(parent, bigQueryExport, bigQueryExportId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createBigQueryExportTest2() throws Exception { + BigQueryExport expectedResponse = + BigQueryExport.newBuilder() + .setName( + BigQueryExportName.ofOrganizationLocationExportName( + "[ORGANIZATION]", "[LOCATION]", "[EXPORT]") + .toString()) + .setDescription("description-1724546052") + .setFilter("filter-1274492040") + .setDataset("dataset1443214456") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMostRecentEditor("mostRecentEditor-833861941") + .setPrincipal("principal-1812041682") + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); + String bigQueryExportId = "bigQueryExportId1024198583"; + + BigQueryExport actualResponse = + client.createBigQueryExport(parent, bigQueryExport, bigQueryExportId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createBigQueryExportExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); + String bigQueryExportId = "bigQueryExportId1024198583"; + client.createBigQueryExport(parent, bigQueryExport, bigQueryExportId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createBigQueryExportTest3() throws Exception { + BigQueryExport expectedResponse = + BigQueryExport.newBuilder() + .setName( + BigQueryExportName.ofOrganizationLocationExportName( + "[ORGANIZATION]", "[LOCATION]", "[EXPORT]") + .toString()) + .setDescription("description-1724546052") + .setFilter("filter-1274492040") + .setDataset("dataset1443214456") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMostRecentEditor("mostRecentEditor-833861941") + .setPrincipal("principal-1812041682") + .build(); + mockService.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); + String bigQueryExportId = "bigQueryExportId1024198583"; + + BigQueryExport actualResponse = + client.createBigQueryExport(parent, bigQueryExport, bigQueryExportId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createBigQueryExportExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); + String bigQueryExportId = "bigQueryExportId1024198583"; + client.createBigQueryExport(parent, bigQueryExport, bigQueryExportId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createBigQueryExportTest4() throws Exception { + BigQueryExport expectedResponse = + BigQueryExport.newBuilder() + .setName( + BigQueryExportName.ofOrganizationLocationExportName( + "[ORGANIZATION]", "[LOCATION]", "[EXPORT]") + .toString()) + .setDescription("description-1724546052") + .setFilter("filter-1274492040") + .setDataset("dataset1443214456") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMostRecentEditor("mostRecentEditor-833861941") + .setPrincipal("principal-1812041682") + .build(); + mockService.addResponse(expectedResponse); + + String parent = "organizations/organization-9365/locations/location-9365"; + BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); + String bigQueryExportId = "bigQueryExportId1024198583"; + + BigQueryExport actualResponse = + client.createBigQueryExport(parent, bigQueryExport, bigQueryExportId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createBigQueryExportExceptionTest4() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "organizations/organization-9365/locations/location-9365"; + BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); + String bigQueryExportId = "bigQueryExportId1024198583"; + client.createBigQueryExport(parent, bigQueryExport, bigQueryExportId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createFindingTest() throws Exception { + Finding expectedResponse = + Finding.newBuilder() + .setName( + FindingName.ofOrganizationSourceFindingName( + "[ORGANIZATION]", "[SOURCE]", "[FINDING]") + .toString()) + .setCanonicalName("canonicalName2122381727") + .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()) + .setIndicator(Indicator.newBuilder().build()) + .setVulnerability(Vulnerability.newBuilder().build()) + .setMuteUpdateTime(Timestamp.newBuilder().build()) + .putAllExternalSystems(new HashMap()) + .setMitreAttack(MitreAttack.newBuilder().build()) + .setAccess(Access.newBuilder().build()) + .addAllConnections(new ArrayList()) + .setMuteInitiator("muteInitiator1395645462") + .addAllProcesses(new ArrayList()) + .putAllContacts(new HashMap()) + .addAllCompliances(new ArrayList()) + .setParentDisplayName("parentDisplayName-1523759261") + .setDescription("description-1724546052") + .setExfiltration(Exfiltration.newBuilder().build()) + .addAllIamBindings(new ArrayList()) + .setNextSteps("nextSteps1206138868") + .setModuleName("moduleName-870351081") + .addAllContainers(new ArrayList()) + .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) + .setAttackExposure(AttackExposure.newBuilder().build()) + .addAllFiles(new ArrayList()) + .setCloudDlpInspection(CloudDlpInspection.newBuilder().build()) + .setCloudDlpDataProfile(CloudDlpDataProfile.newBuilder().build()) + .setKernelRootkit(KernelRootkit.newBuilder().build()) + .addAllOrgPolicies(new ArrayList()) + .setApplication(Application.newBuilder().build()) + .setBackupDisasterRecovery(BackupDisasterRecovery.newBuilder().build()) + .setSecurityPosture(SecurityPosture.newBuilder().build()) + .addAllLogEntries(new ArrayList()) + .addAllLoadBalancers(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + SourceName parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); + Finding finding = Finding.newBuilder().build(); + String findingId = "findingId439150212"; + + Finding actualResponse = client.createFinding(parent, finding, findingId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createFindingExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SourceName parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); + Finding finding = Finding.newBuilder().build(); + String findingId = "findingId439150212"; + client.createFinding(parent, finding, findingId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createFindingTest2() throws Exception { + Finding expectedResponse = + Finding.newBuilder() + .setName( + FindingName.ofOrganizationSourceFindingName( + "[ORGANIZATION]", "[SOURCE]", "[FINDING]") + .toString()) + .setCanonicalName("canonicalName2122381727") + .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()) + .setIndicator(Indicator.newBuilder().build()) + .setVulnerability(Vulnerability.newBuilder().build()) + .setMuteUpdateTime(Timestamp.newBuilder().build()) + .putAllExternalSystems(new HashMap()) + .setMitreAttack(MitreAttack.newBuilder().build()) + .setAccess(Access.newBuilder().build()) + .addAllConnections(new ArrayList()) + .setMuteInitiator("muteInitiator1395645462") + .addAllProcesses(new ArrayList()) + .putAllContacts(new HashMap()) + .addAllCompliances(new ArrayList()) + .setParentDisplayName("parentDisplayName-1523759261") + .setDescription("description-1724546052") + .setExfiltration(Exfiltration.newBuilder().build()) + .addAllIamBindings(new ArrayList()) + .setNextSteps("nextSteps1206138868") + .setModuleName("moduleName-870351081") + .addAllContainers(new ArrayList()) + .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) + .setAttackExposure(AttackExposure.newBuilder().build()) + .addAllFiles(new ArrayList()) + .setCloudDlpInspection(CloudDlpInspection.newBuilder().build()) + .setCloudDlpDataProfile(CloudDlpDataProfile.newBuilder().build()) + .setKernelRootkit(KernelRootkit.newBuilder().build()) + .addAllOrgPolicies(new ArrayList()) + .setApplication(Application.newBuilder().build()) + .setBackupDisasterRecovery(BackupDisasterRecovery.newBuilder().build()) + .setSecurityPosture(SecurityPosture.newBuilder().build()) + .addAllLogEntries(new ArrayList()) + .addAllLoadBalancers(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "organizations/organization-5953/sources/source-5953/locations/location-5953"; + Finding finding = Finding.newBuilder().build(); + String findingId = "findingId439150212"; + + Finding actualResponse = client.createFinding(parent, finding, findingId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createFindingExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "organizations/organization-5953/sources/source-5953/locations/location-5953"; + Finding finding = Finding.newBuilder().build(); + String findingId = "findingId439150212"; + client.createFinding(parent, finding, findingId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createMuteConfigTest() throws Exception { + MuteConfig expectedResponse = + MuteConfig.newBuilder() + .setName( + MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") + .toString()) + .setDescription("description-1724546052") + .setFilter("filter-1274492040") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMostRecentEditor("mostRecentEditor-833861941") + .build(); + mockService.addResponse(expectedResponse); + + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + MuteConfig muteConfig = MuteConfig.newBuilder().build(); + String muteConfigId = "muteConfigId1689669942"; + + MuteConfig actualResponse = client.createMuteConfig(parent, muteConfig, muteConfigId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createMuteConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + 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 createMuteConfigTest2() throws Exception { + MuteConfig expectedResponse = + MuteConfig.newBuilder() + .setName( + MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") + .toString()) + .setDescription("description-1724546052") + .setFilter("filter-1274492040") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMostRecentEditor("mostRecentEditor-833861941") + .build(); + mockService.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 = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createMuteConfigExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.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 createMuteConfigTest3() throws Exception { + MuteConfig expectedResponse = + MuteConfig.newBuilder() + .setName( + MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") + .toString()) + .setDescription("description-1724546052") + .setFilter("filter-1274492040") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMostRecentEditor("mostRecentEditor-833861941") + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + MuteConfig muteConfig = MuteConfig.newBuilder().build(); + String muteConfigId = "muteConfigId1689669942"; + + MuteConfig actualResponse = client.createMuteConfig(parent, muteConfig, muteConfigId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createMuteConfigExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + 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 createMuteConfigTest4() throws Exception { + MuteConfig expectedResponse = + MuteConfig.newBuilder() + .setName( + MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") + .toString()) + .setDescription("description-1724546052") + .setFilter("filter-1274492040") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMostRecentEditor("mostRecentEditor-833861941") + .build(); + mockService.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + MuteConfig muteConfig = MuteConfig.newBuilder().build(); + String muteConfigId = "muteConfigId1689669942"; + + MuteConfig actualResponse = client.createMuteConfig(parent, muteConfig, muteConfigId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createMuteConfigExceptionTest4() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + 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 createMuteConfigTest5() throws Exception { + MuteConfig expectedResponse = + MuteConfig.newBuilder() + .setName( + MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") + .toString()) + .setDescription("description-1724546052") + .setFilter("filter-1274492040") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMostRecentEditor("mostRecentEditor-833861941") + .build(); + mockService.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 = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createMuteConfigExceptionTest5() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.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 createMuteConfigTest6() throws Exception { + MuteConfig expectedResponse = + MuteConfig.newBuilder() + .setName( + MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") + .toString()) + .setDescription("description-1724546052") + .setFilter("filter-1274492040") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMostRecentEditor("mostRecentEditor-833861941") + .build(); + mockService.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 = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createMuteConfigExceptionTest6() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.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 createMuteConfigTest7() throws Exception { + MuteConfig expectedResponse = + MuteConfig.newBuilder() + .setName( + MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") + .toString()) + .setDescription("description-1724546052") + .setFilter("filter-1274492040") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMostRecentEditor("mostRecentEditor-833861941") + .build(); + mockService.addResponse(expectedResponse); + + String parent = "organizations/organization-9365/locations/location-9365"; + MuteConfig muteConfig = MuteConfig.newBuilder().build(); + String muteConfigId = "muteConfigId1689669942"; + + MuteConfig actualResponse = client.createMuteConfig(parent, muteConfig, muteConfigId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createMuteConfigExceptionTest7() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "organizations/organization-9365/locations/location-9365"; + 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 = + NotificationConfig.newBuilder() + .setName( + NotificationConfigName.ofOrganizationLocationNotificationConfigName( + "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]") + .toString()) + .setDescription("description-1724546052") + .setPubsubTopic("pubsubTopic255880396") + .setServiceAccount("serviceAccount1079137720") + .build(); + mockService.addResponse(expectedResponse); + + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); + String configId = "configId-580140035"; + + NotificationConfig actualResponse = + client.createNotificationConfig(parent, notificationConfig, configId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createNotificationConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); + String configId = "configId-580140035"; + client.createNotificationConfig(parent, notificationConfig, configId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createNotificationConfigTest2() throws Exception { + NotificationConfig expectedResponse = + NotificationConfig.newBuilder() + .setName( + NotificationConfigName.ofOrganizationLocationNotificationConfigName( + "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]") + .toString()) + .setDescription("description-1724546052") + .setPubsubTopic("pubsubTopic255880396") + .setServiceAccount("serviceAccount1079137720") + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); + String configId = "configId-580140035"; + + NotificationConfig actualResponse = + client.createNotificationConfig(parent, notificationConfig, configId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createNotificationConfigExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); + String configId = "configId-580140035"; + client.createNotificationConfig(parent, notificationConfig, configId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createNotificationConfigTest3() throws Exception { + NotificationConfig expectedResponse = + NotificationConfig.newBuilder() + .setName( + NotificationConfigName.ofOrganizationLocationNotificationConfigName( + "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]") + .toString()) + .setDescription("description-1724546052") + .setPubsubTopic("pubsubTopic255880396") + .setServiceAccount("serviceAccount1079137720") + .build(); + mockService.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); + String configId = "configId-580140035"; + + NotificationConfig actualResponse = + client.createNotificationConfig(parent, notificationConfig, configId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createNotificationConfigExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); + String configId = "configId-580140035"; + client.createNotificationConfig(parent, notificationConfig, configId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createNotificationConfigTest4() throws Exception { + NotificationConfig expectedResponse = + NotificationConfig.newBuilder() + .setName( + NotificationConfigName.ofOrganizationLocationNotificationConfigName( + "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]") + .toString()) + .setDescription("description-1724546052") + .setPubsubTopic("pubsubTopic255880396") + .setServiceAccount("serviceAccount1079137720") + .build(); + mockService.addResponse(expectedResponse); + + String parent = "organizations/organization-9365/locations/location-9365"; + NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); + String configId = "configId-580140035"; + + NotificationConfig actualResponse = + client.createNotificationConfig(parent, notificationConfig, configId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createNotificationConfigExceptionTest4() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "organizations/organization-9365/locations/location-9365"; + NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); + String configId = "configId-580140035"; + client.createNotificationConfig(parent, notificationConfig, configId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createSourceTest() throws Exception { + Source expectedResponse = + Source.newBuilder() + .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCanonicalName("canonicalName2122381727") + .build(); + mockService.addResponse(expectedResponse); + + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + Source source = Source.newBuilder().build(); + + Source actualResponse = client.createSource(parent, source); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createSourceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + Source source = Source.newBuilder().build(); + client.createSource(parent, source); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createSourceTest2() throws Exception { + Source expectedResponse = + Source.newBuilder() + .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCanonicalName("canonicalName2122381727") + .build(); + mockService.addResponse(expectedResponse); + + String parent = "organizations/organization-8287"; + Source source = Source.newBuilder().build(); + + Source actualResponse = client.createSource(parent, source); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createSourceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "organizations/organization-8287"; + Source source = Source.newBuilder().build(); + client.createSource(parent, source); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteBigQueryExportTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + BigQueryExportName name = + BigQueryExportName.ofOrganizationLocationExportName( + "[ORGANIZATION]", "[LOCATION]", "[EXPORT]"); + + client.deleteBigQueryExport(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteBigQueryExportExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BigQueryExportName name = + BigQueryExportName.ofOrganizationLocationExportName( + "[ORGANIZATION]", "[LOCATION]", "[EXPORT]"); + client.deleteBigQueryExport(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteBigQueryExportTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = + "organizations/organization-637/locations/location-637/bigQueryExports/bigQueryExport-637"; + + client.deleteBigQueryExport(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteBigQueryExportExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "organizations/organization-637/locations/location-637/bigQueryExports/bigQueryExport-637"; + client.deleteBigQueryExport(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteMuteConfigTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + MuteConfigName name = + MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]"); + + client.deleteMuteConfig(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteMuteConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.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(); + mockService.addResponse(expectedResponse); + + String name = "organizations/organization-3180/muteConfigs/muteConfig-3180"; + + client.deleteMuteConfig(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteMuteConfigExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "organizations/organization-3180/muteConfigs/muteConfig-3180"; + client.deleteMuteConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteNotificationConfigTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + NotificationConfigName name = + NotificationConfigName.ofOrganizationLocationNotificationConfigName( + "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]"); + + client.deleteNotificationConfig(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteNotificationConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + NotificationConfigName name = + NotificationConfigName.ofOrganizationLocationNotificationConfigName( + "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]"); + client.deleteNotificationConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteNotificationConfigTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = + "organizations/organization-2028/locations/location-2028/notificationConfigs/notificationConfig-2028"; + + client.deleteNotificationConfig(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteNotificationConfigExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "organizations/organization-2028/locations/location-2028/notificationConfigs/notificationConfig-2028"; + client.deleteNotificationConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteResourceValueConfigTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ResourceValueConfigName name = + ResourceValueConfigName.of("[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]"); + + client.deleteResourceValueConfig(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteResourceValueConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ResourceValueConfigName name = + ResourceValueConfigName.of("[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]"); + client.deleteResourceValueConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteResourceValueConfigTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "organizations/organization-3432/resourceValueConfigs/resourceValueConfig-3432"; + + client.deleteResourceValueConfig(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteResourceValueConfigExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "organizations/organization-3432/resourceValueConfigs/resourceValueConfig-3432"; + client.deleteResourceValueConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBigQueryExportTest() throws Exception { + BigQueryExport expectedResponse = + BigQueryExport.newBuilder() + .setName( + BigQueryExportName.ofOrganizationLocationExportName( + "[ORGANIZATION]", "[LOCATION]", "[EXPORT]") + .toString()) + .setDescription("description-1724546052") + .setFilter("filter-1274492040") + .setDataset("dataset1443214456") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMostRecentEditor("mostRecentEditor-833861941") + .setPrincipal("principal-1812041682") + .build(); + mockService.addResponse(expectedResponse); + + BigQueryExportName name = + BigQueryExportName.ofOrganizationLocationExportName( + "[ORGANIZATION]", "[LOCATION]", "[EXPORT]"); + + BigQueryExport actualResponse = client.getBigQueryExport(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getBigQueryExportExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BigQueryExportName name = + BigQueryExportName.ofOrganizationLocationExportName( + "[ORGANIZATION]", "[LOCATION]", "[EXPORT]"); + client.getBigQueryExport(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBigQueryExportTest2() throws Exception { + BigQueryExport expectedResponse = + BigQueryExport.newBuilder() + .setName( + BigQueryExportName.ofOrganizationLocationExportName( + "[ORGANIZATION]", "[LOCATION]", "[EXPORT]") + .toString()) + .setDescription("description-1724546052") + .setFilter("filter-1274492040") + .setDataset("dataset1443214456") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMostRecentEditor("mostRecentEditor-833861941") + .setPrincipal("principal-1812041682") + .build(); + mockService.addResponse(expectedResponse); + + String name = + "organizations/organization-637/locations/location-637/bigQueryExports/bigQueryExport-637"; + + BigQueryExport actualResponse = client.getBigQueryExport(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getBigQueryExportExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "organizations/organization-637/locations/location-637/bigQueryExports/bigQueryExport-637"; + client.getBigQueryExport(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSimulationTest() throws Exception { + Simulation expectedResponse = + Simulation.newBuilder() + .setName(SimulationName.of("[ORGANIZATION]", "[SIMULATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .addAllResourceValueConfigsMetadata(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + SimulationName name = SimulationName.of("[ORGANIZATION]", "[SIMULATION]"); + + Simulation actualResponse = client.getSimulation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getSimulationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SimulationName name = SimulationName.of("[ORGANIZATION]", "[SIMULATION]"); + client.getSimulation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSimulationTest2() throws Exception { + Simulation expectedResponse = + Simulation.newBuilder() + .setName(SimulationName.of("[ORGANIZATION]", "[SIMULATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .addAllResourceValueConfigsMetadata(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "organizations/organization-4328/simulations/simulation-4328"; + + Simulation actualResponse = client.getSimulation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getSimulationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "organizations/organization-4328/simulations/simulation-4328"; + client.getSimulation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getValuedResourceTest() throws Exception { + ValuedResource expectedResponse = + ValuedResource.newBuilder() + .setName( + ValuedResourceName.of("[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]") + .toString()) + .setResource("resource-341064690") + .setResourceType("resourceType-384364440") + .setDisplayName("displayName1714148973") + .setExposedScore(-1375686989) + .addAllResourceValueConfigsUsed(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + ValuedResourceName name = + ValuedResourceName.of("[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]"); + + ValuedResource actualResponse = client.getValuedResource(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getValuedResourceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ValuedResourceName name = + ValuedResourceName.of("[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]"); + client.getValuedResource(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getValuedResourceTest2() throws Exception { + ValuedResource expectedResponse = + ValuedResource.newBuilder() + .setName( + ValuedResourceName.of("[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]") + .toString()) + .setResource("resource-341064690") + .setResourceType("resourceType-384364440") + .setDisplayName("displayName1714148973") + .setExposedScore(-1375686989) + .addAllResourceValueConfigsUsed(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "organizations/organization-7082/simulations/simulation-7082/valuedResources/valuedResource-7082"; + + ValuedResource actualResponse = client.getValuedResource(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getValuedResourceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "organizations/organization-7082/simulations/simulation-7082/valuedResources/valuedResource-7082"; + client.getValuedResource(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()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); + + Policy actualResponse = client.getIamPolicy(resource); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); + 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()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + String resource = "organizations/organization-3393/sources/source-3393"; + + Policy actualResponse = client.getIamPolicy(resource); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getIamPolicyExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String resource = "organizations/organization-3393/sources/source-3393"; + client.getIamPolicy(resource); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMuteConfigTest() throws Exception { + MuteConfig expectedResponse = + MuteConfig.newBuilder() + .setName( + MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") + .toString()) + .setDescription("description-1724546052") + .setFilter("filter-1274492040") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMostRecentEditor("mostRecentEditor-833861941") + .build(); + mockService.addResponse(expectedResponse); + + MuteConfigName name = + MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]"); + + MuteConfig actualResponse = client.getMuteConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getMuteConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + MuteConfigName name = + MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]"); + client.getMuteConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMuteConfigTest2() throws Exception { + MuteConfig expectedResponse = + MuteConfig.newBuilder() + .setName( + MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") + .toString()) + .setDescription("description-1724546052") + .setFilter("filter-1274492040") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMostRecentEditor("mostRecentEditor-833861941") + .build(); + mockService.addResponse(expectedResponse); + + String name = "organizations/organization-3180/muteConfigs/muteConfig-3180"; + + MuteConfig actualResponse = client.getMuteConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getMuteConfigExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "organizations/organization-3180/muteConfigs/muteConfig-3180"; + client.getMuteConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNotificationConfigTest() throws Exception { + NotificationConfig expectedResponse = + NotificationConfig.newBuilder() + .setName( + NotificationConfigName.ofOrganizationLocationNotificationConfigName( + "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]") + .toString()) + .setDescription("description-1724546052") + .setPubsubTopic("pubsubTopic255880396") + .setServiceAccount("serviceAccount1079137720") + .build(); + mockService.addResponse(expectedResponse); + + NotificationConfigName name = + NotificationConfigName.ofOrganizationLocationNotificationConfigName( + "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]"); + + NotificationConfig actualResponse = client.getNotificationConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getNotificationConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + NotificationConfigName name = + NotificationConfigName.ofOrganizationLocationNotificationConfigName( + "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]"); + client.getNotificationConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNotificationConfigTest2() throws Exception { + NotificationConfig expectedResponse = + NotificationConfig.newBuilder() + .setName( + NotificationConfigName.ofOrganizationLocationNotificationConfigName( + "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]") + .toString()) + .setDescription("description-1724546052") + .setPubsubTopic("pubsubTopic255880396") + .setServiceAccount("serviceAccount1079137720") + .build(); + mockService.addResponse(expectedResponse); + + String name = + "organizations/organization-2028/locations/location-2028/notificationConfigs/notificationConfig-2028"; + + NotificationConfig actualResponse = client.getNotificationConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getNotificationConfigExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "organizations/organization-2028/locations/location-2028/notificationConfigs/notificationConfig-2028"; + client.getNotificationConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getResourceValueConfigTest() throws Exception { + ResourceValueConfig expectedResponse = + ResourceValueConfig.newBuilder() + .setName( + ResourceValueConfigName.of("[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]").toString()) + .setResourceValue(ResourceValue.forNumber(0)) + .addAllTagValues(new ArrayList()) + .setResourceType("resourceType-384364440") + .setScope("scope109264468") + .putAllResourceLabelsSelector(new HashMap()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSensitiveDataProtectionMapping( + ResourceValueConfig.SensitiveDataProtectionMapping.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + ResourceValueConfigName name = + ResourceValueConfigName.of("[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]"); + + ResourceValueConfig actualResponse = client.getResourceValueConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getResourceValueConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ResourceValueConfigName name = + ResourceValueConfigName.of("[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]"); + client.getResourceValueConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getResourceValueConfigTest2() throws Exception { + ResourceValueConfig expectedResponse = + ResourceValueConfig.newBuilder() + .setName( + ResourceValueConfigName.of("[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]").toString()) + .setResourceValue(ResourceValue.forNumber(0)) + .addAllTagValues(new ArrayList()) + .setResourceType("resourceType-384364440") + .setScope("scope109264468") + .putAllResourceLabelsSelector(new HashMap()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSensitiveDataProtectionMapping( + ResourceValueConfig.SensitiveDataProtectionMapping.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "organizations/organization-3432/resourceValueConfigs/resourceValueConfig-3432"; + + ResourceValueConfig actualResponse = client.getResourceValueConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getResourceValueConfigExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "organizations/organization-3432/resourceValueConfigs/resourceValueConfig-3432"; + client.getResourceValueConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSourceTest() throws Exception { + Source expectedResponse = + Source.newBuilder() + .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCanonicalName("canonicalName2122381727") + .build(); + mockService.addResponse(expectedResponse); + + SourceName name = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); + + Source actualResponse = client.getSource(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getSourceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SourceName name = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); + client.getSource(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSourceTest2() throws Exception { + Source expectedResponse = + Source.newBuilder() + .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCanonicalName("canonicalName2122381727") + .build(); + mockService.addResponse(expectedResponse); + + String name = "organizations/organization-7292/sources/source-7292"; + + Source actualResponse = client.getSource(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getSourceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "organizations/organization-7292/sources/source-7292"; + client.getSource(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void groupFindingsTest() throws Exception { + GroupResult responsesElement = GroupResult.newBuilder().build(); + GroupFindingsResponse expectedResponse = + GroupFindingsResponse.newBuilder() + .setNextPageToken("") + .addAllGroupByResults(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + SourceName parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); + String groupBy = "groupBy293428022"; + + GroupFindingsPagedResponse pagedListResponse = client.groupFindings(parent, groupBy); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getGroupByResultsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void groupFindingsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SourceName parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); + String groupBy = "groupBy293428022"; + client.groupFindings(parent, groupBy); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void groupFindingsTest2() throws Exception { + GroupResult responsesElement = GroupResult.newBuilder().build(); + GroupFindingsResponse expectedResponse = + GroupFindingsResponse.newBuilder() + .setNextPageToken("") + .addAllGroupByResults(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "organizations/organization-8741/sources/source-8741"; + String groupBy = "groupBy293428022"; + + GroupFindingsPagedResponse pagedListResponse = client.groupFindings(parent, groupBy); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getGroupByResultsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void groupFindingsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "organizations/organization-8741/sources/source-8741"; + String groupBy = "groupBy293428022"; + client.groupFindings(parent, groupBy); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAttackPathsTest() throws Exception { + AttackPath responsesElement = AttackPath.newBuilder().build(); + ListAttackPathsResponse expectedResponse = + ListAttackPathsResponse.newBuilder() + .setNextPageToken("") + .addAllAttackPaths(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ValuedResourceName parent = + ValuedResourceName.of("[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]"); + + ListAttackPathsPagedResponse pagedListResponse = client.listAttackPaths(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAttackPathsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listAttackPathsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ValuedResourceName parent = + ValuedResourceName.of("[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]"); + client.listAttackPaths(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAttackPathsTest2() throws Exception { + AttackPath responsesElement = AttackPath.newBuilder().build(); + ListAttackPathsResponse expectedResponse = + ListAttackPathsResponse.newBuilder() + .setNextPageToken("") + .addAllAttackPaths(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "organizations/organization-6775/simulations/simulation-6775"; + + ListAttackPathsPagedResponse pagedListResponse = client.listAttackPaths(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAttackPathsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listAttackPathsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "organizations/organization-6775/simulations/simulation-6775"; + client.listAttackPaths(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBigQueryExportsTest() throws Exception { + BigQueryExport responsesElement = BigQueryExport.newBuilder().build(); + ListBigQueryExportsResponse expectedResponse = + ListBigQueryExportsResponse.newBuilder() + .setNextPageToken("") + .addAllBigQueryExports(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + + ListBigQueryExportsPagedResponse pagedListResponse = client.listBigQueryExports(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBigQueryExportsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listBigQueryExportsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + client.listBigQueryExports(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBigQueryExportsTest2() throws Exception { + BigQueryExport responsesElement = BigQueryExport.newBuilder().build(); + ListBigQueryExportsResponse expectedResponse = + ListBigQueryExportsResponse.newBuilder() + .setNextPageToken("") + .addAllBigQueryExports(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListBigQueryExportsPagedResponse pagedListResponse = client.listBigQueryExports(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBigQueryExportsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listBigQueryExportsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listBigQueryExports(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBigQueryExportsTest3() throws Exception { + BigQueryExport responsesElement = BigQueryExport.newBuilder().build(); + ListBigQueryExportsResponse expectedResponse = + ListBigQueryExportsResponse.newBuilder() + .setNextPageToken("") + .addAllBigQueryExports(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + + ListBigQueryExportsPagedResponse pagedListResponse = client.listBigQueryExports(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBigQueryExportsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listBigQueryExportsExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + client.listBigQueryExports(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBigQueryExportsTest4() throws Exception { + BigQueryExport responsesElement = BigQueryExport.newBuilder().build(); + ListBigQueryExportsResponse expectedResponse = + ListBigQueryExportsResponse.newBuilder() + .setNextPageToken("") + .addAllBigQueryExports(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "organizations/organization-9365/locations/location-9365"; + + ListBigQueryExportsPagedResponse pagedListResponse = client.listBigQueryExports(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBigQueryExportsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listBigQueryExportsExceptionTest4() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "organizations/organization-9365/locations/location-9365"; + client.listBigQueryExports(parent); + 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(); + mockService.addResponse(expectedResponse); + + SourceName parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); + + ListFindingsPagedResponse pagedListResponse = client.listFindings(parent); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getListFindingsResultsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listFindingsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SourceName parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); + client.listFindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listFindingsTest2() throws Exception { + ListFindingsResponse.ListFindingsResult responsesElement = + ListFindingsResponse.ListFindingsResult.newBuilder().build(); + ListFindingsResponse expectedResponse = + ListFindingsResponse.newBuilder() + .setNextPageToken("") + .addAllListFindingsResults(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "organizations/organization-8741/sources/source-8741"; + + ListFindingsPagedResponse pagedListResponse = client.listFindings(parent); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getListFindingsResultsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listFindingsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "organizations/organization-8741/sources/source-8741"; + client.listFindings(parent); + 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(); + mockService.addResponse(expectedResponse); + + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + + 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 = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listMuteConfigsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + 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(); + mockService.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 = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listMuteConfigsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + FolderName parent = FolderName.of("[FOLDER]"); + 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("") + .addAllMuteConfigs(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + 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 = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listMuteConfigsExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listMuteConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listMuteConfigsTest4() throws Exception { + MuteConfig responsesElement = MuteConfig.newBuilder().build(); + ListMuteConfigsResponse expectedResponse = + ListMuteConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllMuteConfigs(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + + 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 = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listMuteConfigsExceptionTest4() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + client.listMuteConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listMuteConfigsTest5() throws Exception { + MuteConfig responsesElement = MuteConfig.newBuilder().build(); + ListMuteConfigsResponse expectedResponse = + ListMuteConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllMuteConfigs(Arrays.asList(responsesElement)) + .build(); + mockService.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 = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listMuteConfigsExceptionTest5() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + client.listMuteConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listMuteConfigsTest6() throws Exception { + MuteConfig responsesElement = MuteConfig.newBuilder().build(); + ListMuteConfigsResponse expectedResponse = + ListMuteConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllMuteConfigs(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + + 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 = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listMuteConfigsExceptionTest6() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + client.listMuteConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listMuteConfigsTest7() throws Exception { + MuteConfig responsesElement = MuteConfig.newBuilder().build(); + ListMuteConfigsResponse expectedResponse = + ListMuteConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllMuteConfigs(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "organizations/organization-8287"; + + 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 = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listMuteConfigsExceptionTest7() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "organizations/organization-8287"; + client.listMuteConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNotificationConfigsTest() throws Exception { + NotificationConfig responsesElement = NotificationConfig.newBuilder().build(); + ListNotificationConfigsResponse expectedResponse = + ListNotificationConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllNotificationConfigs(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + + ListNotificationConfigsPagedResponse pagedListResponse = client.listNotificationConfigs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNotificationConfigsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listNotificationConfigsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + client.listNotificationConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNotificationConfigsTest2() throws Exception { + NotificationConfig responsesElement = NotificationConfig.newBuilder().build(); + ListNotificationConfigsResponse expectedResponse = + ListNotificationConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllNotificationConfigs(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListNotificationConfigsPagedResponse pagedListResponse = client.listNotificationConfigs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNotificationConfigsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listNotificationConfigsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listNotificationConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNotificationConfigsTest3() throws Exception { + NotificationConfig responsesElement = NotificationConfig.newBuilder().build(); + ListNotificationConfigsResponse expectedResponse = + ListNotificationConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllNotificationConfigs(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + + ListNotificationConfigsPagedResponse pagedListResponse = client.listNotificationConfigs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNotificationConfigsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listNotificationConfigsExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + client.listNotificationConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNotificationConfigsTest4() throws Exception { + NotificationConfig responsesElement = NotificationConfig.newBuilder().build(); + ListNotificationConfigsResponse expectedResponse = + ListNotificationConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllNotificationConfigs(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "organizations/organization-9365/locations/location-9365"; + + ListNotificationConfigsPagedResponse pagedListResponse = client.listNotificationConfigs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNotificationConfigsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listNotificationConfigsExceptionTest4() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "organizations/organization-9365/locations/location-9365"; + client.listNotificationConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listResourceValueConfigsTest() throws Exception { + ResourceValueConfig responsesElement = ResourceValueConfig.newBuilder().build(); + ListResourceValueConfigsResponse expectedResponse = + ListResourceValueConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllResourceValueConfigs(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + + ListResourceValueConfigsPagedResponse pagedListResponse = + client.listResourceValueConfigs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getResourceValueConfigsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listResourceValueConfigsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + client.listResourceValueConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listResourceValueConfigsTest2() throws Exception { + ResourceValueConfig responsesElement = ResourceValueConfig.newBuilder().build(); + ListResourceValueConfigsResponse expectedResponse = + ListResourceValueConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllResourceValueConfigs(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "organizations/organization-8287"; + + ListResourceValueConfigsPagedResponse pagedListResponse = + client.listResourceValueConfigs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getResourceValueConfigsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listResourceValueConfigsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "organizations/organization-8287"; + client.listResourceValueConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSourcesTest() throws Exception { + Source responsesElement = Source.newBuilder().build(); + ListSourcesResponse expectedResponse = + ListSourcesResponse.newBuilder() + .setNextPageToken("") + .addAllSources(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + FolderName parent = FolderName.of("[FOLDER]"); + + ListSourcesPagedResponse pagedListResponse = client.listSources(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSourcesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listSourcesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + FolderName parent = FolderName.of("[FOLDER]"); + client.listSources(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSourcesTest2() throws Exception { + Source responsesElement = Source.newBuilder().build(); + ListSourcesResponse expectedResponse = + ListSourcesResponse.newBuilder() + .setNextPageToken("") + .addAllSources(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + + ListSourcesPagedResponse pagedListResponse = client.listSources(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSourcesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listSourcesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + client.listSources(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSourcesTest3() throws Exception { + Source responsesElement = Source.newBuilder().build(); + ListSourcesResponse expectedResponse = + ListSourcesResponse.newBuilder() + .setNextPageToken("") + .addAllSources(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + + ListSourcesPagedResponse pagedListResponse = client.listSources(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSourcesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listSourcesExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + client.listSources(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSourcesTest4() throws Exception { + Source responsesElement = Source.newBuilder().build(); + ListSourcesResponse expectedResponse = + ListSourcesResponse.newBuilder() + .setNextPageToken("") + .addAllSources(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "organizations/organization-8287"; + + ListSourcesPagedResponse pagedListResponse = client.listSources(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSourcesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listSourcesExceptionTest4() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "organizations/organization-8287"; + client.listSources(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listValuedResourcesTest() throws Exception { + ValuedResource responsesElement = ValuedResource.newBuilder().build(); + ListValuedResourcesResponse expectedResponse = + ListValuedResourcesResponse.newBuilder() + .setNextPageToken("") + .addAllValuedResources(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + SimulationName parent = SimulationName.of("[ORGANIZATION]", "[SIMULATION]"); + + ListValuedResourcesPagedResponse pagedListResponse = client.listValuedResources(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getValuedResourcesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listValuedResourcesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SimulationName parent = SimulationName.of("[ORGANIZATION]", "[SIMULATION]"); + client.listValuedResources(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listValuedResourcesTest2() throws Exception { + ValuedResource responsesElement = ValuedResource.newBuilder().build(); + ListValuedResourcesResponse expectedResponse = + ListValuedResourcesResponse.newBuilder() + .setNextPageToken("") + .addAllValuedResources(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "organizations/organization-6775/simulations/simulation-6775"; + + ListValuedResourcesPagedResponse pagedListResponse = client.listValuedResources(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getValuedResourcesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listValuedResourcesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "organizations/organization-6775/simulations/simulation-6775"; + client.listValuedResources(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setFindingStateTest() throws Exception { + Finding expectedResponse = + Finding.newBuilder() + .setName( + FindingName.ofOrganizationSourceFindingName( + "[ORGANIZATION]", "[SOURCE]", "[FINDING]") + .toString()) + .setCanonicalName("canonicalName2122381727") + .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()) + .setIndicator(Indicator.newBuilder().build()) + .setVulnerability(Vulnerability.newBuilder().build()) + .setMuteUpdateTime(Timestamp.newBuilder().build()) + .putAllExternalSystems(new HashMap()) + .setMitreAttack(MitreAttack.newBuilder().build()) + .setAccess(Access.newBuilder().build()) + .addAllConnections(new ArrayList()) + .setMuteInitiator("muteInitiator1395645462") + .addAllProcesses(new ArrayList()) + .putAllContacts(new HashMap()) + .addAllCompliances(new ArrayList()) + .setParentDisplayName("parentDisplayName-1523759261") + .setDescription("description-1724546052") + .setExfiltration(Exfiltration.newBuilder().build()) + .addAllIamBindings(new ArrayList()) + .setNextSteps("nextSteps1206138868") + .setModuleName("moduleName-870351081") + .addAllContainers(new ArrayList()) + .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) + .setAttackExposure(AttackExposure.newBuilder().build()) + .addAllFiles(new ArrayList()) + .setCloudDlpInspection(CloudDlpInspection.newBuilder().build()) + .setCloudDlpDataProfile(CloudDlpDataProfile.newBuilder().build()) + .setKernelRootkit(KernelRootkit.newBuilder().build()) + .addAllOrgPolicies(new ArrayList()) + .setApplication(Application.newBuilder().build()) + .setBackupDisasterRecovery(BackupDisasterRecovery.newBuilder().build()) + .setSecurityPosture(SecurityPosture.newBuilder().build()) + .addAllLogEntries(new ArrayList()) + .addAllLoadBalancers(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + FindingName name = + FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]", "[SOURCE]", "[FINDING]"); + Finding.State state = Finding.State.forNumber(0); + + Finding actualResponse = client.setFindingState(name, state); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void setFindingStateExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + FindingName name = + FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]", "[SOURCE]", "[FINDING]"); + Finding.State state = Finding.State.forNumber(0); + client.setFindingState(name, state); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setFindingStateTest2() throws Exception { + Finding expectedResponse = + Finding.newBuilder() + .setName( + FindingName.ofOrganizationSourceFindingName( + "[ORGANIZATION]", "[SOURCE]", "[FINDING]") + .toString()) + .setCanonicalName("canonicalName2122381727") + .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()) + .setIndicator(Indicator.newBuilder().build()) + .setVulnerability(Vulnerability.newBuilder().build()) + .setMuteUpdateTime(Timestamp.newBuilder().build()) + .putAllExternalSystems(new HashMap()) + .setMitreAttack(MitreAttack.newBuilder().build()) + .setAccess(Access.newBuilder().build()) + .addAllConnections(new ArrayList()) + .setMuteInitiator("muteInitiator1395645462") + .addAllProcesses(new ArrayList()) + .putAllContacts(new HashMap()) + .addAllCompliances(new ArrayList()) + .setParentDisplayName("parentDisplayName-1523759261") + .setDescription("description-1724546052") + .setExfiltration(Exfiltration.newBuilder().build()) + .addAllIamBindings(new ArrayList()) + .setNextSteps("nextSteps1206138868") + .setModuleName("moduleName-870351081") + .addAllContainers(new ArrayList()) + .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) + .setAttackExposure(AttackExposure.newBuilder().build()) + .addAllFiles(new ArrayList()) + .setCloudDlpInspection(CloudDlpInspection.newBuilder().build()) + .setCloudDlpDataProfile(CloudDlpDataProfile.newBuilder().build()) + .setKernelRootkit(KernelRootkit.newBuilder().build()) + .addAllOrgPolicies(new ArrayList()) + .setApplication(Application.newBuilder().build()) + .setBackupDisasterRecovery(BackupDisasterRecovery.newBuilder().build()) + .setSecurityPosture(SecurityPosture.newBuilder().build()) + .addAllLogEntries(new ArrayList()) + .addAllLoadBalancers(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "organizations/organization-9392/sources/source-9392/findings/finding-9392"; + Finding.State state = Finding.State.forNumber(0); + + Finding actualResponse = client.setFindingState(name, state); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void setFindingStateExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "organizations/organization-9392/sources/source-9392/findings/finding-9392"; + Finding.State state = Finding.State.forNumber(0); + client.setFindingState(name, state); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); + Policy policy = Policy.newBuilder().build(); + + Policy actualResponse = client.setIamPolicy(resource, policy); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); + Policy policy = Policy.newBuilder().build(); + client.setIamPolicy(resource, policy); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest2() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + String resource = "organizations/organization-3393/sources/source-3393"; + Policy policy = Policy.newBuilder().build(); + + Policy actualResponse = client.setIamPolicy(resource, policy); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void setIamPolicyExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String resource = "organizations/organization-3393/sources/source-3393"; + Policy policy = Policy.newBuilder().build(); + client.setIamPolicy(resource, policy); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setMuteTest() throws Exception { + Finding expectedResponse = + Finding.newBuilder() + .setName( + FindingName.ofOrganizationSourceFindingName( + "[ORGANIZATION]", "[SOURCE]", "[FINDING]") + .toString()) + .setCanonicalName("canonicalName2122381727") + .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()) + .setIndicator(Indicator.newBuilder().build()) + .setVulnerability(Vulnerability.newBuilder().build()) + .setMuteUpdateTime(Timestamp.newBuilder().build()) + .putAllExternalSystems(new HashMap()) + .setMitreAttack(MitreAttack.newBuilder().build()) + .setAccess(Access.newBuilder().build()) + .addAllConnections(new ArrayList()) + .setMuteInitiator("muteInitiator1395645462") + .addAllProcesses(new ArrayList()) + .putAllContacts(new HashMap()) + .addAllCompliances(new ArrayList()) + .setParentDisplayName("parentDisplayName-1523759261") + .setDescription("description-1724546052") + .setExfiltration(Exfiltration.newBuilder().build()) + .addAllIamBindings(new ArrayList()) + .setNextSteps("nextSteps1206138868") + .setModuleName("moduleName-870351081") + .addAllContainers(new ArrayList()) + .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) + .setAttackExposure(AttackExposure.newBuilder().build()) + .addAllFiles(new ArrayList()) + .setCloudDlpInspection(CloudDlpInspection.newBuilder().build()) + .setCloudDlpDataProfile(CloudDlpDataProfile.newBuilder().build()) + .setKernelRootkit(KernelRootkit.newBuilder().build()) + .addAllOrgPolicies(new ArrayList()) + .setApplication(Application.newBuilder().build()) + .setBackupDisasterRecovery(BackupDisasterRecovery.newBuilder().build()) + .setSecurityPosture(SecurityPosture.newBuilder().build()) + .addAllLogEntries(new ArrayList()) + .addAllLoadBalancers(new ArrayList()) + .build(); + mockService.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 = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void setMuteExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.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()) + .setCanonicalName("canonicalName2122381727") + .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()) + .setIndicator(Indicator.newBuilder().build()) + .setVulnerability(Vulnerability.newBuilder().build()) + .setMuteUpdateTime(Timestamp.newBuilder().build()) + .putAllExternalSystems(new HashMap()) + .setMitreAttack(MitreAttack.newBuilder().build()) + .setAccess(Access.newBuilder().build()) + .addAllConnections(new ArrayList()) + .setMuteInitiator("muteInitiator1395645462") + .addAllProcesses(new ArrayList()) + .putAllContacts(new HashMap()) + .addAllCompliances(new ArrayList()) + .setParentDisplayName("parentDisplayName-1523759261") + .setDescription("description-1724546052") + .setExfiltration(Exfiltration.newBuilder().build()) + .addAllIamBindings(new ArrayList()) + .setNextSteps("nextSteps1206138868") + .setModuleName("moduleName-870351081") + .addAllContainers(new ArrayList()) + .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) + .setAttackExposure(AttackExposure.newBuilder().build()) + .addAllFiles(new ArrayList()) + .setCloudDlpInspection(CloudDlpInspection.newBuilder().build()) + .setCloudDlpDataProfile(CloudDlpDataProfile.newBuilder().build()) + .setKernelRootkit(KernelRootkit.newBuilder().build()) + .addAllOrgPolicies(new ArrayList()) + .setApplication(Application.newBuilder().build()) + .setBackupDisasterRecovery(BackupDisasterRecovery.newBuilder().build()) + .setSecurityPosture(SecurityPosture.newBuilder().build()) + .addAllLogEntries(new ArrayList()) + .addAllLoadBalancers(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "organizations/organization-9392/sources/source-9392/findings/finding-9392"; + Finding.Mute mute = Finding.Mute.forNumber(0); + + Finding actualResponse = client.setMute(name, mute); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void setMuteExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "organizations/organization-9392/sources/source-9392/findings/finding-9392"; + Finding.Mute mute = Finding.Mute.forNumber(0); + client.setMute(name, mute); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockService.addResponse(expectedResponse); + + ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); + List permissions = new ArrayList<>(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(resource, permissions); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); + List permissions = new ArrayList<>(); + client.testIamPermissions(resource, permissions); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest2() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockService.addResponse(expectedResponse); + + String resource = "organizations/organization-3393/sources/source-3393"; + List permissions = new ArrayList<>(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(resource, permissions); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void testIamPermissionsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String resource = "organizations/organization-3393/sources/source-3393"; + List permissions = new ArrayList<>(); + client.testIamPermissions(resource, permissions); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateBigQueryExportTest() throws Exception { + BigQueryExport expectedResponse = + BigQueryExport.newBuilder() + .setName( + BigQueryExportName.ofOrganizationLocationExportName( + "[ORGANIZATION]", "[LOCATION]", "[EXPORT]") + .toString()) + .setDescription("description-1724546052") + .setFilter("filter-1274492040") + .setDataset("dataset1443214456") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMostRecentEditor("mostRecentEditor-833861941") + .setPrincipal("principal-1812041682") + .build(); + mockService.addResponse(expectedResponse); + + BigQueryExport bigQueryExport = + BigQueryExport.newBuilder() + .setName( + BigQueryExportName.ofOrganizationLocationExportName( + "[ORGANIZATION]", "[LOCATION]", "[EXPORT]") + .toString()) + .setDescription("description-1724546052") + .setFilter("filter-1274492040") + .setDataset("dataset1443214456") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMostRecentEditor("mostRecentEditor-833861941") + .setPrincipal("principal-1812041682") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + BigQueryExport actualResponse = client.updateBigQueryExport(bigQueryExport, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateBigQueryExportExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BigQueryExport bigQueryExport = + BigQueryExport.newBuilder() + .setName( + BigQueryExportName.ofOrganizationLocationExportName( + "[ORGANIZATION]", "[LOCATION]", "[EXPORT]") + .toString()) + .setDescription("description-1724546052") + .setFilter("filter-1274492040") + .setDataset("dataset1443214456") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMostRecentEditor("mostRecentEditor-833861941") + .setPrincipal("principal-1812041682") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateBigQueryExport(bigQueryExport, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected 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()) + .setCaseUri("caseUri554877980") + .setCasePriority("casePriority1589324020") + .setCaseSla(Timestamp.newBuilder().build()) + .setCaseCreateTime(Timestamp.newBuilder().build()) + .setCaseCloseTime(Timestamp.newBuilder().build()) + .setTicketInfo(ExternalSystem.TicketInfo.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + ExternalSystem externalSystem = + ExternalSystem.newBuilder() + .setName( + "organizations/organization-5115/sources/source-5115/findings/finding-5115/externalSystems/externalSystem-5115") + .addAllAssignees(new ArrayList()) + .setExternalUid("externalUid-1153085307") + .setStatus("status-892481550") + .setExternalSystemUpdateTime(Timestamp.newBuilder().build()) + .setCaseUri("caseUri554877980") + .setCasePriority("casePriority1589324020") + .setCaseSla(Timestamp.newBuilder().build()) + .setCaseCreateTime(Timestamp.newBuilder().build()) + .setCaseCloseTime(Timestamp.newBuilder().build()) + .setTicketInfo(ExternalSystem.TicketInfo.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + ExternalSystem actualResponse = client.updateExternalSystem(externalSystem, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateExternalSystemExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ExternalSystem externalSystem = + ExternalSystem.newBuilder() + .setName( + "organizations/organization-5115/sources/source-5115/findings/finding-5115/externalSystems/externalSystem-5115") + .addAllAssignees(new ArrayList()) + .setExternalUid("externalUid-1153085307") + .setStatus("status-892481550") + .setExternalSystemUpdateTime(Timestamp.newBuilder().build()) + .setCaseUri("caseUri554877980") + .setCasePriority("casePriority1589324020") + .setCaseSla(Timestamp.newBuilder().build()) + .setCaseCreateTime(Timestamp.newBuilder().build()) + .setCaseCloseTime(Timestamp.newBuilder().build()) + .setTicketInfo(ExternalSystem.TicketInfo.newBuilder().build()) + .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 = + Finding.newBuilder() + .setName( + FindingName.ofOrganizationSourceFindingName( + "[ORGANIZATION]", "[SOURCE]", "[FINDING]") + .toString()) + .setCanonicalName("canonicalName2122381727") + .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()) + .setIndicator(Indicator.newBuilder().build()) + .setVulnerability(Vulnerability.newBuilder().build()) + .setMuteUpdateTime(Timestamp.newBuilder().build()) + .putAllExternalSystems(new HashMap()) + .setMitreAttack(MitreAttack.newBuilder().build()) + .setAccess(Access.newBuilder().build()) + .addAllConnections(new ArrayList()) + .setMuteInitiator("muteInitiator1395645462") + .addAllProcesses(new ArrayList()) + .putAllContacts(new HashMap()) + .addAllCompliances(new ArrayList()) + .setParentDisplayName("parentDisplayName-1523759261") + .setDescription("description-1724546052") + .setExfiltration(Exfiltration.newBuilder().build()) + .addAllIamBindings(new ArrayList()) + .setNextSteps("nextSteps1206138868") + .setModuleName("moduleName-870351081") + .addAllContainers(new ArrayList()) + .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) + .setAttackExposure(AttackExposure.newBuilder().build()) + .addAllFiles(new ArrayList()) + .setCloudDlpInspection(CloudDlpInspection.newBuilder().build()) + .setCloudDlpDataProfile(CloudDlpDataProfile.newBuilder().build()) + .setKernelRootkit(KernelRootkit.newBuilder().build()) + .addAllOrgPolicies(new ArrayList()) + .setApplication(Application.newBuilder().build()) + .setBackupDisasterRecovery(BackupDisasterRecovery.newBuilder().build()) + .setSecurityPosture(SecurityPosture.newBuilder().build()) + .addAllLogEntries(new ArrayList()) + .addAllLoadBalancers(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + Finding finding = + Finding.newBuilder() + .setName( + FindingName.ofOrganizationSourceFindingName( + "[ORGANIZATION]", "[SOURCE]", "[FINDING]") + .toString()) + .setCanonicalName("canonicalName2122381727") + .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()) + .setIndicator(Indicator.newBuilder().build()) + .setVulnerability(Vulnerability.newBuilder().build()) + .setMuteUpdateTime(Timestamp.newBuilder().build()) + .putAllExternalSystems(new HashMap()) + .setMitreAttack(MitreAttack.newBuilder().build()) + .setAccess(Access.newBuilder().build()) + .addAllConnections(new ArrayList()) + .setMuteInitiator("muteInitiator1395645462") + .addAllProcesses(new ArrayList()) + .putAllContacts(new HashMap()) + .addAllCompliances(new ArrayList()) + .setParentDisplayName("parentDisplayName-1523759261") + .setDescription("description-1724546052") + .setExfiltration(Exfiltration.newBuilder().build()) + .addAllIamBindings(new ArrayList()) + .setNextSteps("nextSteps1206138868") + .setModuleName("moduleName-870351081") + .addAllContainers(new ArrayList()) + .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) + .setAttackExposure(AttackExposure.newBuilder().build()) + .addAllFiles(new ArrayList()) + .setCloudDlpInspection(CloudDlpInspection.newBuilder().build()) + .setCloudDlpDataProfile(CloudDlpDataProfile.newBuilder().build()) + .setKernelRootkit(KernelRootkit.newBuilder().build()) + .addAllOrgPolicies(new ArrayList()) + .setApplication(Application.newBuilder().build()) + .setBackupDisasterRecovery(BackupDisasterRecovery.newBuilder().build()) + .setSecurityPosture(SecurityPosture.newBuilder().build()) + .addAllLogEntries(new ArrayList()) + .addAllLoadBalancers(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Finding actualResponse = client.updateFinding(finding, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateFindingExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Finding finding = + Finding.newBuilder() + .setName( + FindingName.ofOrganizationSourceFindingName( + "[ORGANIZATION]", "[SOURCE]", "[FINDING]") + .toString()) + .setCanonicalName("canonicalName2122381727") + .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()) + .setIndicator(Indicator.newBuilder().build()) + .setVulnerability(Vulnerability.newBuilder().build()) + .setMuteUpdateTime(Timestamp.newBuilder().build()) + .putAllExternalSystems(new HashMap()) + .setMitreAttack(MitreAttack.newBuilder().build()) + .setAccess(Access.newBuilder().build()) + .addAllConnections(new ArrayList()) + .setMuteInitiator("muteInitiator1395645462") + .addAllProcesses(new ArrayList()) + .putAllContacts(new HashMap()) + .addAllCompliances(new ArrayList()) + .setParentDisplayName("parentDisplayName-1523759261") + .setDescription("description-1724546052") + .setExfiltration(Exfiltration.newBuilder().build()) + .addAllIamBindings(new ArrayList()) + .setNextSteps("nextSteps1206138868") + .setModuleName("moduleName-870351081") + .addAllContainers(new ArrayList()) + .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) + .setAttackExposure(AttackExposure.newBuilder().build()) + .addAllFiles(new ArrayList()) + .setCloudDlpInspection(CloudDlpInspection.newBuilder().build()) + .setCloudDlpDataProfile(CloudDlpDataProfile.newBuilder().build()) + .setKernelRootkit(KernelRootkit.newBuilder().build()) + .addAllOrgPolicies(new ArrayList()) + .setApplication(Application.newBuilder().build()) + .setBackupDisasterRecovery(BackupDisasterRecovery.newBuilder().build()) + .setSecurityPosture(SecurityPosture.newBuilder().build()) + .addAllLogEntries(new ArrayList()) + .addAllLoadBalancers(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateFinding(finding, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateMuteConfigTest() throws Exception { + MuteConfig expectedResponse = + MuteConfig.newBuilder() + .setName( + MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") + .toString()) + .setDescription("description-1724546052") + .setFilter("filter-1274492040") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMostRecentEditor("mostRecentEditor-833861941") + .build(); + mockService.addResponse(expectedResponse); + + MuteConfig muteConfig = + MuteConfig.newBuilder() + .setName( + MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") + .toString()) + .setDescription("description-1724546052") + .setFilter("filter-1274492040") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMostRecentEditor("mostRecentEditor-833861941") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + MuteConfig actualResponse = client.updateMuteConfig(muteConfig, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateMuteConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + MuteConfig muteConfig = + MuteConfig.newBuilder() + .setName( + MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") + .toString()) + .setDescription("description-1724546052") + .setFilter("filter-1274492040") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMostRecentEditor("mostRecentEditor-833861941") + .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 = + NotificationConfig.newBuilder() + .setName( + NotificationConfigName.ofOrganizationLocationNotificationConfigName( + "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]") + .toString()) + .setDescription("description-1724546052") + .setPubsubTopic("pubsubTopic255880396") + .setServiceAccount("serviceAccount1079137720") + .build(); + mockService.addResponse(expectedResponse); + + NotificationConfig notificationConfig = + NotificationConfig.newBuilder() + .setName( + NotificationConfigName.ofOrganizationLocationNotificationConfigName( + "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]") + .toString()) + .setDescription("description-1724546052") + .setPubsubTopic("pubsubTopic255880396") + .setServiceAccount("serviceAccount1079137720") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + NotificationConfig actualResponse = + client.updateNotificationConfig(notificationConfig, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateNotificationConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + NotificationConfig notificationConfig = + NotificationConfig.newBuilder() + .setName( + NotificationConfigName.ofOrganizationLocationNotificationConfigName( + "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]") + .toString()) + .setDescription("description-1724546052") + .setPubsubTopic("pubsubTopic255880396") + .setServiceAccount("serviceAccount1079137720") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateNotificationConfig(notificationConfig, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateResourceValueConfigTest() throws Exception { + ResourceValueConfig expectedResponse = + ResourceValueConfig.newBuilder() + .setName( + ResourceValueConfigName.of("[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]").toString()) + .setResourceValue(ResourceValue.forNumber(0)) + .addAllTagValues(new ArrayList()) + .setResourceType("resourceType-384364440") + .setScope("scope109264468") + .putAllResourceLabelsSelector(new HashMap()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSensitiveDataProtectionMapping( + ResourceValueConfig.SensitiveDataProtectionMapping.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + ResourceValueConfig resourceValueConfig = + ResourceValueConfig.newBuilder() + .setName( + ResourceValueConfigName.of("[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]").toString()) + .setResourceValue(ResourceValue.forNumber(0)) + .addAllTagValues(new ArrayList()) + .setResourceType("resourceType-384364440") + .setScope("scope109264468") + .putAllResourceLabelsSelector(new HashMap()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSensitiveDataProtectionMapping( + ResourceValueConfig.SensitiveDataProtectionMapping.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + ResourceValueConfig actualResponse = + client.updateResourceValueConfig(resourceValueConfig, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateResourceValueConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ResourceValueConfig resourceValueConfig = + ResourceValueConfig.newBuilder() + .setName( + ResourceValueConfigName.of("[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]") + .toString()) + .setResourceValue(ResourceValue.forNumber(0)) + .addAllTagValues(new ArrayList()) + .setResourceType("resourceType-384364440") + .setScope("scope109264468") + .putAllResourceLabelsSelector(new HashMap()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSensitiveDataProtectionMapping( + ResourceValueConfig.SensitiveDataProtectionMapping.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateResourceValueConfig(resourceValueConfig, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateSecurityMarksTest() throws Exception { + SecurityMarks expectedResponse = + SecurityMarks.newBuilder() + .setName("name3373707") + .putAllMarks(new HashMap()) + .setCanonicalName("canonicalName2122381727") + .build(); + mockService.addResponse(expectedResponse); + + SecurityMarks securityMarks = + SecurityMarks.newBuilder() + .setName( + "organizations/organization-6153/sources/source-6153/findings/finding-6153/securityMarks") + .putAllMarks(new HashMap()) + .setCanonicalName("canonicalName2122381727") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + SecurityMarks actualResponse = client.updateSecurityMarks(securityMarks, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateSecurityMarksExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SecurityMarks securityMarks = + SecurityMarks.newBuilder() + .setName( + "organizations/organization-6153/sources/source-6153/findings/finding-6153/securityMarks") + .putAllMarks(new HashMap()) + .setCanonicalName("canonicalName2122381727") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateSecurityMarks(securityMarks, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateSourceTest() throws Exception { + Source expectedResponse = + Source.newBuilder() + .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCanonicalName("canonicalName2122381727") + .build(); + mockService.addResponse(expectedResponse); + + Source source = + Source.newBuilder() + .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCanonicalName("canonicalName2122381727") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Source actualResponse = client.updateSource(source, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateSourceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Source source = + Source.newBuilder() + .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCanonicalName("canonicalName2122381727") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateSource(source, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v2/SecurityCenterClientTest.java b/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v2/SecurityCenterClientTest.java new file mode 100644 index 000000000000..59371054c45f --- /dev/null +++ b/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v2/SecurityCenterClientTest.java @@ -0,0 +1,4572 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.securitycenter.v2; + +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.GroupFindingsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListAttackPathsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListBigQueryExportsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListFindingsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListMuteConfigsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListNotificationConfigsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListResourceValueConfigsPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListSourcesPagedResponse; +import static com.google.cloud.securitycenter.v2.SecurityCenterClient.ListValuedResourcesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.resourcenames.ResourceName; +import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import com.google.protobuf.Value; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class SecurityCenterClientTest { + private static MockSecurityCenter mockSecurityCenter; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private SecurityCenterClient client; + + @BeforeClass + public static void startStaticServer() { + mockSecurityCenter = new MockSecurityCenter(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockSecurityCenter)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + SecurityCenterSettings settings = + SecurityCenterSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = SecurityCenterClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void batchCreateResourceValueConfigsTest() throws Exception { + BatchCreateResourceValueConfigsResponse expectedResponse = + BatchCreateResourceValueConfigsResponse.newBuilder() + .addAllResourceValueConfigs(new ArrayList()) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + List requests = new ArrayList<>(); + + BatchCreateResourceValueConfigsResponse actualResponse = + client.batchCreateResourceValueConfigs(parent, requests); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchCreateResourceValueConfigsRequest actualRequest = + ((BatchCreateResourceValueConfigsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(requests, actualRequest.getRequestsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchCreateResourceValueConfigsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + List requests = new ArrayList<>(); + client.batchCreateResourceValueConfigs(parent, requests); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchCreateResourceValueConfigsTest2() throws Exception { + BatchCreateResourceValueConfigsResponse expectedResponse = + BatchCreateResourceValueConfigsResponse.newBuilder() + .addAllResourceValueConfigs(new ArrayList()) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + String parent = "parent-995424086"; + List requests = new ArrayList<>(); + + BatchCreateResourceValueConfigsResponse actualResponse = + client.batchCreateResourceValueConfigs(parent, requests); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchCreateResourceValueConfigsRequest actualRequest = + ((BatchCreateResourceValueConfigsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(requests, actualRequest.getRequestsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchCreateResourceValueConfigsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + String parent = "parent-995424086"; + List requests = new ArrayList<>(); + client.batchCreateResourceValueConfigs(parent, requests); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @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 createBigQueryExportTest() throws Exception { + BigQueryExport expectedResponse = + BigQueryExport.newBuilder() + .setName( + BigQueryExportName.ofOrganizationLocationExportName( + "[ORGANIZATION]", "[LOCATION]", "[EXPORT]") + .toString()) + .setDescription("description-1724546052") + .setFilter("filter-1274492040") + .setDataset("dataset1443214456") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMostRecentEditor("mostRecentEditor-833861941") + .setPrincipal("principal-1812041682") + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); + String bigQueryExportId = "bigQueryExportId1024198583"; + + BigQueryExport actualResponse = + client.createBigQueryExport(parent, bigQueryExport, bigQueryExportId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateBigQueryExportRequest actualRequest = + ((CreateBigQueryExportRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(bigQueryExport, actualRequest.getBigQueryExport()); + Assert.assertEquals(bigQueryExportId, actualRequest.getBigQueryExportId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createBigQueryExportExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); + String bigQueryExportId = "bigQueryExportId1024198583"; + client.createBigQueryExport(parent, bigQueryExport, bigQueryExportId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createBigQueryExportTest2() throws Exception { + BigQueryExport expectedResponse = + BigQueryExport.newBuilder() + .setName( + BigQueryExportName.ofOrganizationLocationExportName( + "[ORGANIZATION]", "[LOCATION]", "[EXPORT]") + .toString()) + .setDescription("description-1724546052") + .setFilter("filter-1274492040") + .setDataset("dataset1443214456") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMostRecentEditor("mostRecentEditor-833861941") + .setPrincipal("principal-1812041682") + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); + String bigQueryExportId = "bigQueryExportId1024198583"; + + BigQueryExport actualResponse = + client.createBigQueryExport(parent, bigQueryExport, bigQueryExportId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateBigQueryExportRequest actualRequest = + ((CreateBigQueryExportRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(bigQueryExport, actualRequest.getBigQueryExport()); + Assert.assertEquals(bigQueryExportId, actualRequest.getBigQueryExportId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createBigQueryExportExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); + String bigQueryExportId = "bigQueryExportId1024198583"; + client.createBigQueryExport(parent, bigQueryExport, bigQueryExportId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createBigQueryExportTest3() throws Exception { + BigQueryExport expectedResponse = + BigQueryExport.newBuilder() + .setName( + BigQueryExportName.ofOrganizationLocationExportName( + "[ORGANIZATION]", "[LOCATION]", "[EXPORT]") + .toString()) + .setDescription("description-1724546052") + .setFilter("filter-1274492040") + .setDataset("dataset1443214456") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMostRecentEditor("mostRecentEditor-833861941") + .setPrincipal("principal-1812041682") + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); + String bigQueryExportId = "bigQueryExportId1024198583"; + + BigQueryExport actualResponse = + client.createBigQueryExport(parent, bigQueryExport, bigQueryExportId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateBigQueryExportRequest actualRequest = + ((CreateBigQueryExportRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(bigQueryExport, actualRequest.getBigQueryExport()); + Assert.assertEquals(bigQueryExportId, actualRequest.getBigQueryExportId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createBigQueryExportExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); + String bigQueryExportId = "bigQueryExportId1024198583"; + client.createBigQueryExport(parent, bigQueryExport, bigQueryExportId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createBigQueryExportTest4() throws Exception { + BigQueryExport expectedResponse = + BigQueryExport.newBuilder() + .setName( + BigQueryExportName.ofOrganizationLocationExportName( + "[ORGANIZATION]", "[LOCATION]", "[EXPORT]") + .toString()) + .setDescription("description-1724546052") + .setFilter("filter-1274492040") + .setDataset("dataset1443214456") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMostRecentEditor("mostRecentEditor-833861941") + .setPrincipal("principal-1812041682") + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + String parent = "parent-995424086"; + BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); + String bigQueryExportId = "bigQueryExportId1024198583"; + + BigQueryExport actualResponse = + client.createBigQueryExport(parent, bigQueryExport, bigQueryExportId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateBigQueryExportRequest actualRequest = + ((CreateBigQueryExportRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(bigQueryExport, actualRequest.getBigQueryExport()); + Assert.assertEquals(bigQueryExportId, actualRequest.getBigQueryExportId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createBigQueryExportExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + String parent = "parent-995424086"; + BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); + String bigQueryExportId = "bigQueryExportId1024198583"; + client.createBigQueryExport(parent, bigQueryExport, bigQueryExportId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createFindingTest() throws Exception { + Finding expectedResponse = + Finding.newBuilder() + .setName( + FindingName.ofOrganizationSourceFindingName( + "[ORGANIZATION]", "[SOURCE]", "[FINDING]") + .toString()) + .setCanonicalName("canonicalName2122381727") + .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()) + .setIndicator(Indicator.newBuilder().build()) + .setVulnerability(Vulnerability.newBuilder().build()) + .setMuteUpdateTime(Timestamp.newBuilder().build()) + .putAllExternalSystems(new HashMap()) + .setMitreAttack(MitreAttack.newBuilder().build()) + .setAccess(Access.newBuilder().build()) + .addAllConnections(new ArrayList()) + .setMuteInitiator("muteInitiator1395645462") + .addAllProcesses(new ArrayList()) + .putAllContacts(new HashMap()) + .addAllCompliances(new ArrayList()) + .setParentDisplayName("parentDisplayName-1523759261") + .setDescription("description-1724546052") + .setExfiltration(Exfiltration.newBuilder().build()) + .addAllIamBindings(new ArrayList()) + .setNextSteps("nextSteps1206138868") + .setModuleName("moduleName-870351081") + .addAllContainers(new ArrayList()) + .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) + .setAttackExposure(AttackExposure.newBuilder().build()) + .addAllFiles(new ArrayList()) + .setCloudDlpInspection(CloudDlpInspection.newBuilder().build()) + .setCloudDlpDataProfile(CloudDlpDataProfile.newBuilder().build()) + .setKernelRootkit(KernelRootkit.newBuilder().build()) + .addAllOrgPolicies(new ArrayList()) + .setApplication(Application.newBuilder().build()) + .setBackupDisasterRecovery(BackupDisasterRecovery.newBuilder().build()) + .setSecurityPosture(SecurityPosture.newBuilder().build()) + .addAllLogEntries(new ArrayList()) + .addAllLoadBalancers(new ArrayList()) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + SourceName parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); + Finding finding = Finding.newBuilder().build(); + String findingId = "findingId439150212"; + + Finding actualResponse = client.createFinding(parent, finding, findingId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateFindingRequest actualRequest = ((CreateFindingRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(finding, actualRequest.getFinding()); + Assert.assertEquals(findingId, actualRequest.getFindingId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createFindingExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + SourceName parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); + Finding finding = Finding.newBuilder().build(); + String findingId = "findingId439150212"; + client.createFinding(parent, finding, findingId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createFindingTest2() throws Exception { + Finding expectedResponse = + Finding.newBuilder() + .setName( + FindingName.ofOrganizationSourceFindingName( + "[ORGANIZATION]", "[SOURCE]", "[FINDING]") + .toString()) + .setCanonicalName("canonicalName2122381727") + .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()) + .setIndicator(Indicator.newBuilder().build()) + .setVulnerability(Vulnerability.newBuilder().build()) + .setMuteUpdateTime(Timestamp.newBuilder().build()) + .putAllExternalSystems(new HashMap()) + .setMitreAttack(MitreAttack.newBuilder().build()) + .setAccess(Access.newBuilder().build()) + .addAllConnections(new ArrayList()) + .setMuteInitiator("muteInitiator1395645462") + .addAllProcesses(new ArrayList()) + .putAllContacts(new HashMap()) + .addAllCompliances(new ArrayList()) + .setParentDisplayName("parentDisplayName-1523759261") + .setDescription("description-1724546052") + .setExfiltration(Exfiltration.newBuilder().build()) + .addAllIamBindings(new ArrayList()) + .setNextSteps("nextSteps1206138868") + .setModuleName("moduleName-870351081") + .addAllContainers(new ArrayList()) + .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) + .setAttackExposure(AttackExposure.newBuilder().build()) + .addAllFiles(new ArrayList()) + .setCloudDlpInspection(CloudDlpInspection.newBuilder().build()) + .setCloudDlpDataProfile(CloudDlpDataProfile.newBuilder().build()) + .setKernelRootkit(KernelRootkit.newBuilder().build()) + .addAllOrgPolicies(new ArrayList()) + .setApplication(Application.newBuilder().build()) + .setBackupDisasterRecovery(BackupDisasterRecovery.newBuilder().build()) + .setSecurityPosture(SecurityPosture.newBuilder().build()) + .addAllLogEntries(new ArrayList()) + .addAllLoadBalancers(new ArrayList()) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + String parent = "parent-995424086"; + Finding finding = Finding.newBuilder().build(); + String findingId = "findingId439150212"; + + Finding actualResponse = client.createFinding(parent, finding, findingId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateFindingRequest actualRequest = ((CreateFindingRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(finding, actualRequest.getFinding()); + Assert.assertEquals(findingId, actualRequest.getFindingId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createFindingExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + String parent = "parent-995424086"; + Finding finding = Finding.newBuilder().build(); + String findingId = "findingId439150212"; + client.createFinding(parent, finding, findingId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createMuteConfigTest() throws Exception { + MuteConfig expectedResponse = + MuteConfig.newBuilder() + .setName( + MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") + .toString()) + .setDescription("description-1724546052") + .setFilter("filter-1274492040") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMostRecentEditor("mostRecentEditor-833861941") + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + 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 createMuteConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + 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 createMuteConfigTest2() throws Exception { + MuteConfig expectedResponse = + MuteConfig.newBuilder() + .setName( + MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") + .toString()) + .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 createMuteConfigExceptionTest2() 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 createMuteConfigTest3() throws Exception { + MuteConfig expectedResponse = + MuteConfig.newBuilder() + .setName( + MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") + .toString()) + .setDescription("description-1724546052") + .setFilter("filter-1274492040") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMostRecentEditor("mostRecentEditor-833861941") + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + 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 createMuteConfigExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + 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 createMuteConfigTest4() throws Exception { + MuteConfig expectedResponse = + MuteConfig.newBuilder() + .setName( + MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") + .toString()) + .setDescription("description-1724546052") + .setFilter("filter-1274492040") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMostRecentEditor("mostRecentEditor-833861941") + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + 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 createMuteConfigExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + 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 createMuteConfigTest5() throws Exception { + MuteConfig expectedResponse = + MuteConfig.newBuilder() + .setName( + MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") + .toString()) + .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 createMuteConfigExceptionTest5() 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 createMuteConfigTest6() throws Exception { + MuteConfig expectedResponse = + MuteConfig.newBuilder() + .setName( + MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") + .toString()) + .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 createMuteConfigExceptionTest6() 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 createMuteConfigTest7() throws Exception { + MuteConfig expectedResponse = + MuteConfig.newBuilder() + .setName( + MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") + .toString()) + .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 createMuteConfigExceptionTest7() 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 = + NotificationConfig.newBuilder() + .setName( + NotificationConfigName.ofOrganizationLocationNotificationConfigName( + "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]") + .toString()) + .setDescription("description-1724546052") + .setPubsubTopic("pubsubTopic255880396") + .setServiceAccount("serviceAccount1079137720") + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); + String configId = "configId-580140035"; + + NotificationConfig actualResponse = + client.createNotificationConfig(parent, notificationConfig, configId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateNotificationConfigRequest actualRequest = + ((CreateNotificationConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(notificationConfig, actualRequest.getNotificationConfig()); + Assert.assertEquals(configId, actualRequest.getConfigId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createNotificationConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); + String configId = "configId-580140035"; + client.createNotificationConfig(parent, notificationConfig, configId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createNotificationConfigTest2() throws Exception { + NotificationConfig expectedResponse = + NotificationConfig.newBuilder() + .setName( + NotificationConfigName.ofOrganizationLocationNotificationConfigName( + "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]") + .toString()) + .setDescription("description-1724546052") + .setPubsubTopic("pubsubTopic255880396") + .setServiceAccount("serviceAccount1079137720") + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); + String configId = "configId-580140035"; + + NotificationConfig actualResponse = + client.createNotificationConfig(parent, notificationConfig, configId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateNotificationConfigRequest actualRequest = + ((CreateNotificationConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(notificationConfig, actualRequest.getNotificationConfig()); + Assert.assertEquals(configId, actualRequest.getConfigId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createNotificationConfigExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); + String configId = "configId-580140035"; + client.createNotificationConfig(parent, notificationConfig, configId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createNotificationConfigTest3() throws Exception { + NotificationConfig expectedResponse = + NotificationConfig.newBuilder() + .setName( + NotificationConfigName.ofOrganizationLocationNotificationConfigName( + "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]") + .toString()) + .setDescription("description-1724546052") + .setPubsubTopic("pubsubTopic255880396") + .setServiceAccount("serviceAccount1079137720") + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); + String configId = "configId-580140035"; + + NotificationConfig actualResponse = + client.createNotificationConfig(parent, notificationConfig, configId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateNotificationConfigRequest actualRequest = + ((CreateNotificationConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(notificationConfig, actualRequest.getNotificationConfig()); + Assert.assertEquals(configId, actualRequest.getConfigId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createNotificationConfigExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); + String configId = "configId-580140035"; + client.createNotificationConfig(parent, notificationConfig, configId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createNotificationConfigTest4() throws Exception { + NotificationConfig expectedResponse = + NotificationConfig.newBuilder() + .setName( + NotificationConfigName.ofOrganizationLocationNotificationConfigName( + "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]") + .toString()) + .setDescription("description-1724546052") + .setPubsubTopic("pubsubTopic255880396") + .setServiceAccount("serviceAccount1079137720") + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + String parent = "parent-995424086"; + NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); + String configId = "configId-580140035"; + + NotificationConfig actualResponse = + client.createNotificationConfig(parent, notificationConfig, configId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateNotificationConfigRequest actualRequest = + ((CreateNotificationConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(notificationConfig, actualRequest.getNotificationConfig()); + Assert.assertEquals(configId, actualRequest.getConfigId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createNotificationConfigExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + String parent = "parent-995424086"; + NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); + String configId = "configId-580140035"; + client.createNotificationConfig(parent, notificationConfig, configId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createSourceTest() throws Exception { + Source expectedResponse = + Source.newBuilder() + .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCanonicalName("canonicalName2122381727") + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + Source source = Source.newBuilder().build(); + + Source actualResponse = client.createSource(parent, source); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateSourceRequest actualRequest = ((CreateSourceRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(source, actualRequest.getSource()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createSourceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + Source source = Source.newBuilder().build(); + client.createSource(parent, source); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createSourceTest2() throws Exception { + Source expectedResponse = + Source.newBuilder() + .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCanonicalName("canonicalName2122381727") + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + String parent = "parent-995424086"; + Source source = Source.newBuilder().build(); + + Source actualResponse = client.createSource(parent, source); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateSourceRequest actualRequest = ((CreateSourceRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(source, actualRequest.getSource()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createSourceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + String parent = "parent-995424086"; + Source source = Source.newBuilder().build(); + client.createSource(parent, source); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteBigQueryExportTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockSecurityCenter.addResponse(expectedResponse); + + BigQueryExportName name = + BigQueryExportName.ofOrganizationLocationExportName( + "[ORGANIZATION]", "[LOCATION]", "[EXPORT]"); + + client.deleteBigQueryExport(name); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteBigQueryExportRequest actualRequest = + ((DeleteBigQueryExportRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteBigQueryExportExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + BigQueryExportName name = + BigQueryExportName.ofOrganizationLocationExportName( + "[ORGANIZATION]", "[LOCATION]", "[EXPORT]"); + client.deleteBigQueryExport(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteBigQueryExportTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockSecurityCenter.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteBigQueryExport(name); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteBigQueryExportRequest actualRequest = + ((DeleteBigQueryExportRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteBigQueryExportExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + String name = "name3373707"; + client.deleteBigQueryExport(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected 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(); + mockSecurityCenter.addResponse(expectedResponse); + + NotificationConfigName name = + NotificationConfigName.ofOrganizationLocationNotificationConfigName( + "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]"); + + client.deleteNotificationConfig(name); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteNotificationConfigRequest actualRequest = + ((DeleteNotificationConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteNotificationConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + NotificationConfigName name = + NotificationConfigName.ofOrganizationLocationNotificationConfigName( + "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]"); + client.deleteNotificationConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteNotificationConfigTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockSecurityCenter.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteNotificationConfig(name); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteNotificationConfigRequest actualRequest = + ((DeleteNotificationConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + 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 deleteResourceValueConfigTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockSecurityCenter.addResponse(expectedResponse); + + ResourceValueConfigName name = + ResourceValueConfigName.of("[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]"); + + client.deleteResourceValueConfig(name); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteResourceValueConfigRequest actualRequest = + ((DeleteResourceValueConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteResourceValueConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + ResourceValueConfigName name = + ResourceValueConfigName.of("[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]"); + client.deleteResourceValueConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteResourceValueConfigTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockSecurityCenter.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteResourceValueConfig(name); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteResourceValueConfigRequest actualRequest = + ((DeleteResourceValueConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteResourceValueConfigExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + String name = "name3373707"; + client.deleteResourceValueConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBigQueryExportTest() throws Exception { + BigQueryExport expectedResponse = + BigQueryExport.newBuilder() + .setName( + BigQueryExportName.ofOrganizationLocationExportName( + "[ORGANIZATION]", "[LOCATION]", "[EXPORT]") + .toString()) + .setDescription("description-1724546052") + .setFilter("filter-1274492040") + .setDataset("dataset1443214456") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMostRecentEditor("mostRecentEditor-833861941") + .setPrincipal("principal-1812041682") + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + BigQueryExportName name = + BigQueryExportName.ofOrganizationLocationExportName( + "[ORGANIZATION]", "[LOCATION]", "[EXPORT]"); + + BigQueryExport actualResponse = client.getBigQueryExport(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetBigQueryExportRequest actualRequest = ((GetBigQueryExportRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getBigQueryExportExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + BigQueryExportName name = + BigQueryExportName.ofOrganizationLocationExportName( + "[ORGANIZATION]", "[LOCATION]", "[EXPORT]"); + client.getBigQueryExport(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBigQueryExportTest2() throws Exception { + BigQueryExport expectedResponse = + BigQueryExport.newBuilder() + .setName( + BigQueryExportName.ofOrganizationLocationExportName( + "[ORGANIZATION]", "[LOCATION]", "[EXPORT]") + .toString()) + .setDescription("description-1724546052") + .setFilter("filter-1274492040") + .setDataset("dataset1443214456") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMostRecentEditor("mostRecentEditor-833861941") + .setPrincipal("principal-1812041682") + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + String name = "name3373707"; + + BigQueryExport actualResponse = client.getBigQueryExport(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetBigQueryExportRequest actualRequest = ((GetBigQueryExportRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getBigQueryExportExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + String name = "name3373707"; + client.getBigQueryExport(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSimulationTest() throws Exception { + Simulation expectedResponse = + Simulation.newBuilder() + .setName(SimulationName.of("[ORGANIZATION]", "[SIMULATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .addAllResourceValueConfigsMetadata(new ArrayList()) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + SimulationName name = SimulationName.of("[ORGANIZATION]", "[SIMULATION]"); + + Simulation actualResponse = client.getSimulation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetSimulationRequest actualRequest = ((GetSimulationRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSimulationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + SimulationName name = SimulationName.of("[ORGANIZATION]", "[SIMULATION]"); + client.getSimulation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSimulationTest2() throws Exception { + Simulation expectedResponse = + Simulation.newBuilder() + .setName(SimulationName.of("[ORGANIZATION]", "[SIMULATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .addAllResourceValueConfigsMetadata(new ArrayList()) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + String name = "name3373707"; + + Simulation actualResponse = client.getSimulation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetSimulationRequest actualRequest = ((GetSimulationRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSimulationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + String name = "name3373707"; + client.getSimulation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getValuedResourceTest() throws Exception { + ValuedResource expectedResponse = + ValuedResource.newBuilder() + .setName( + ValuedResourceName.of("[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]") + .toString()) + .setResource("resource-341064690") + .setResourceType("resourceType-384364440") + .setDisplayName("displayName1714148973") + .setExposedScore(-1375686989) + .addAllResourceValueConfigsUsed(new ArrayList()) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + ValuedResourceName name = + ValuedResourceName.of("[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]"); + + ValuedResource actualResponse = client.getValuedResource(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetValuedResourceRequest actualRequest = ((GetValuedResourceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getValuedResourceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + ValuedResourceName name = + ValuedResourceName.of("[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]"); + client.getValuedResource(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getValuedResourceTest2() throws Exception { + ValuedResource expectedResponse = + ValuedResource.newBuilder() + .setName( + ValuedResourceName.of("[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]") + .toString()) + .setResource("resource-341064690") + .setResourceType("resourceType-384364440") + .setDisplayName("displayName1714148973") + .setExposedScore(-1375686989) + .addAllResourceValueConfigsUsed(new ArrayList()) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + String name = "name3373707"; + + ValuedResource actualResponse = client.getValuedResource(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetValuedResourceRequest actualRequest = ((GetValuedResourceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getValuedResourceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + String name = "name3373707"; + client.getValuedResource(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()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); + + 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 = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); + 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()) + .addAllAuditConfigs(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 resource = "resource-341064690"; + client.getIamPolicy(resource); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMuteConfigTest() throws Exception { + MuteConfig expectedResponse = + MuteConfig.newBuilder() + .setName( + MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") + .toString()) + .setDescription("description-1724546052") + .setFilter("filter-1274492040") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMostRecentEditor("mostRecentEditor-833861941") + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + MuteConfigName name = + MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]"); + + MuteConfig actualResponse = client.getMuteConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetMuteConfigRequest actualRequest = ((GetMuteConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getMuteConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + MuteConfigName name = + MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]"); + client.getMuteConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMuteConfigTest2() throws Exception { + MuteConfig expectedResponse = + MuteConfig.newBuilder() + .setName( + MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") + .toString()) + .setDescription("description-1724546052") + .setFilter("filter-1274492040") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMostRecentEditor("mostRecentEditor-833861941") + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + String name = "name3373707"; + + MuteConfig actualResponse = client.getMuteConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetMuteConfigRequest actualRequest = ((GetMuteConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getMuteConfigExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + String name = "name3373707"; + client.getMuteConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNotificationConfigTest() throws Exception { + NotificationConfig expectedResponse = + NotificationConfig.newBuilder() + .setName( + NotificationConfigName.ofOrganizationLocationNotificationConfigName( + "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]") + .toString()) + .setDescription("description-1724546052") + .setPubsubTopic("pubsubTopic255880396") + .setServiceAccount("serviceAccount1079137720") + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + NotificationConfigName name = + NotificationConfigName.ofOrganizationLocationNotificationConfigName( + "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]"); + + NotificationConfig actualResponse = client.getNotificationConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetNotificationConfigRequest actualRequest = + ((GetNotificationConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getNotificationConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + NotificationConfigName name = + NotificationConfigName.ofOrganizationLocationNotificationConfigName( + "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]"); + client.getNotificationConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNotificationConfigTest2() throws Exception { + NotificationConfig expectedResponse = + NotificationConfig.newBuilder() + .setName( + NotificationConfigName.ofOrganizationLocationNotificationConfigName( + "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]") + .toString()) + .setDescription("description-1724546052") + .setPubsubTopic("pubsubTopic255880396") + .setServiceAccount("serviceAccount1079137720") + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + String name = "name3373707"; + + NotificationConfig actualResponse = client.getNotificationConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetNotificationConfigRequest actualRequest = + ((GetNotificationConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getNotificationConfigExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + String name = "name3373707"; + client.getNotificationConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getResourceValueConfigTest() throws Exception { + ResourceValueConfig expectedResponse = + ResourceValueConfig.newBuilder() + .setName( + ResourceValueConfigName.of("[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]").toString()) + .setResourceValue(ResourceValue.forNumber(0)) + .addAllTagValues(new ArrayList()) + .setResourceType("resourceType-384364440") + .setScope("scope109264468") + .putAllResourceLabelsSelector(new HashMap()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSensitiveDataProtectionMapping( + ResourceValueConfig.SensitiveDataProtectionMapping.newBuilder().build()) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + ResourceValueConfigName name = + ResourceValueConfigName.of("[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]"); + + ResourceValueConfig actualResponse = client.getResourceValueConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetResourceValueConfigRequest actualRequest = + ((GetResourceValueConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getResourceValueConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + ResourceValueConfigName name = + ResourceValueConfigName.of("[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]"); + client.getResourceValueConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getResourceValueConfigTest2() throws Exception { + ResourceValueConfig expectedResponse = + ResourceValueConfig.newBuilder() + .setName( + ResourceValueConfigName.of("[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]").toString()) + .setResourceValue(ResourceValue.forNumber(0)) + .addAllTagValues(new ArrayList()) + .setResourceType("resourceType-384364440") + .setScope("scope109264468") + .putAllResourceLabelsSelector(new HashMap()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSensitiveDataProtectionMapping( + ResourceValueConfig.SensitiveDataProtectionMapping.newBuilder().build()) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + String name = "name3373707"; + + ResourceValueConfig actualResponse = client.getResourceValueConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetResourceValueConfigRequest actualRequest = + ((GetResourceValueConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getResourceValueConfigExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + String name = "name3373707"; + client.getResourceValueConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSourceTest() throws Exception { + Source expectedResponse = + Source.newBuilder() + .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCanonicalName("canonicalName2122381727") + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + SourceName name = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); + + Source actualResponse = client.getSource(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetSourceRequest actualRequest = ((GetSourceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSourceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + SourceName name = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); + client.getSource(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSourceTest2() throws Exception { + Source expectedResponse = + Source.newBuilder() + .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCanonicalName("canonicalName2122381727") + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + String name = "name3373707"; + + Source actualResponse = client.getSource(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetSourceRequest actualRequest = ((GetSourceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSourceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + String name = "name3373707"; + client.getSource(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void groupFindingsTest() throws Exception { + GroupResult responsesElement = GroupResult.newBuilder().build(); + GroupFindingsResponse expectedResponse = + GroupFindingsResponse.newBuilder() + .setNextPageToken("") + .addAllGroupByResults(Arrays.asList(responsesElement)) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + SourceName parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); + String groupBy = "groupBy293428022"; + + GroupFindingsPagedResponse pagedListResponse = client.groupFindings(parent, groupBy); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getGroupByResultsList().get(0), resources.get(0)); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GroupFindingsRequest actualRequest = ((GroupFindingsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(groupBy, actualRequest.getGroupBy()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void groupFindingsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + SourceName parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); + String groupBy = "groupBy293428022"; + client.groupFindings(parent, groupBy); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void groupFindingsTest2() throws Exception { + GroupResult responsesElement = GroupResult.newBuilder().build(); + GroupFindingsResponse expectedResponse = + GroupFindingsResponse.newBuilder() + .setNextPageToken("") + .addAllGroupByResults(Arrays.asList(responsesElement)) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + String parent = "parent-995424086"; + String groupBy = "groupBy293428022"; + + GroupFindingsPagedResponse pagedListResponse = client.groupFindings(parent, groupBy); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getGroupByResultsList().get(0), resources.get(0)); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GroupFindingsRequest actualRequest = ((GroupFindingsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(groupBy, actualRequest.getGroupBy()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void groupFindingsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + String parent = "parent-995424086"; + String groupBy = "groupBy293428022"; + client.groupFindings(parent, groupBy); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAttackPathsTest() throws Exception { + AttackPath responsesElement = AttackPath.newBuilder().build(); + ListAttackPathsResponse expectedResponse = + ListAttackPathsResponse.newBuilder() + .setNextPageToken("") + .addAllAttackPaths(Arrays.asList(responsesElement)) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + ValuedResourceName parent = + ValuedResourceName.of("[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]"); + + ListAttackPathsPagedResponse pagedListResponse = client.listAttackPaths(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAttackPathsList().get(0), resources.get(0)); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAttackPathsRequest actualRequest = ((ListAttackPathsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAttackPathsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + ValuedResourceName parent = + ValuedResourceName.of("[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]"); + client.listAttackPaths(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAttackPathsTest2() throws Exception { + AttackPath responsesElement = AttackPath.newBuilder().build(); + ListAttackPathsResponse expectedResponse = + ListAttackPathsResponse.newBuilder() + .setNextPageToken("") + .addAllAttackPaths(Arrays.asList(responsesElement)) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListAttackPathsPagedResponse pagedListResponse = client.listAttackPaths(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAttackPathsList().get(0), resources.get(0)); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAttackPathsRequest actualRequest = ((ListAttackPathsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAttackPathsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + String parent = "parent-995424086"; + client.listAttackPaths(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBigQueryExportsTest() throws Exception { + BigQueryExport responsesElement = BigQueryExport.newBuilder().build(); + ListBigQueryExportsResponse expectedResponse = + ListBigQueryExportsResponse.newBuilder() + .setNextPageToken("") + .addAllBigQueryExports(Arrays.asList(responsesElement)) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + + ListBigQueryExportsPagedResponse pagedListResponse = client.listBigQueryExports(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBigQueryExportsList().get(0), resources.get(0)); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListBigQueryExportsRequest actualRequest = ((ListBigQueryExportsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listBigQueryExportsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + client.listBigQueryExports(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBigQueryExportsTest2() throws Exception { + BigQueryExport responsesElement = BigQueryExport.newBuilder().build(); + ListBigQueryExportsResponse expectedResponse = + ListBigQueryExportsResponse.newBuilder() + .setNextPageToken("") + .addAllBigQueryExports(Arrays.asList(responsesElement)) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListBigQueryExportsPagedResponse pagedListResponse = client.listBigQueryExports(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBigQueryExportsList().get(0), resources.get(0)); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListBigQueryExportsRequest actualRequest = ((ListBigQueryExportsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listBigQueryExportsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listBigQueryExports(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBigQueryExportsTest3() throws Exception { + BigQueryExport responsesElement = BigQueryExport.newBuilder().build(); + ListBigQueryExportsResponse expectedResponse = + ListBigQueryExportsResponse.newBuilder() + .setNextPageToken("") + .addAllBigQueryExports(Arrays.asList(responsesElement)) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + + ListBigQueryExportsPagedResponse pagedListResponse = client.listBigQueryExports(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBigQueryExportsList().get(0), resources.get(0)); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListBigQueryExportsRequest actualRequest = ((ListBigQueryExportsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listBigQueryExportsExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + client.listBigQueryExports(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBigQueryExportsTest4() throws Exception { + BigQueryExport responsesElement = BigQueryExport.newBuilder().build(); + ListBigQueryExportsResponse expectedResponse = + ListBigQueryExportsResponse.newBuilder() + .setNextPageToken("") + .addAllBigQueryExports(Arrays.asList(responsesElement)) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListBigQueryExportsPagedResponse pagedListResponse = client.listBigQueryExports(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBigQueryExportsList().get(0), resources.get(0)); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListBigQueryExportsRequest actualRequest = ((ListBigQueryExportsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listBigQueryExportsExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + String parent = "parent-995424086"; + client.listBigQueryExports(parent); + 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); + + SourceName parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); + + ListFindingsPagedResponse pagedListResponse = client.listFindings(parent); + + 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(parent.toString(), actualRequest.getParent()); + 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 { + SourceName parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); + client.listFindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listFindingsTest2() throws Exception { + ListFindingsResponse.ListFindingsResult responsesElement = + ListFindingsResponse.ListFindingsResult.newBuilder().build(); + ListFindingsResponse expectedResponse = + ListFindingsResponse.newBuilder() + .setNextPageToken("") + .addAllListFindingsResults(Arrays.asList(responsesElement)) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListFindingsPagedResponse pagedListResponse = client.listFindings(parent); + + 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(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listFindingsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + String parent = "parent-995424086"; + client.listFindings(parent); + 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); + + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + + 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 { + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + 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); + + 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 listMuteConfigsExceptionTest2() 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 listMuteConfigsTest3() throws Exception { + MuteConfig responsesElement = MuteConfig.newBuilder().build(); + ListMuteConfigsResponse expectedResponse = + ListMuteConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllMuteConfigs(Arrays.asList(responsesElement)) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + 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 listMuteConfigsExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listMuteConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listMuteConfigsTest4() throws Exception { + MuteConfig responsesElement = MuteConfig.newBuilder().build(); + ListMuteConfigsResponse expectedResponse = + ListMuteConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllMuteConfigs(Arrays.asList(responsesElement)) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + + 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 listMuteConfigsExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + client.listMuteConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listMuteConfigsTest5() 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 listMuteConfigsExceptionTest5() 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 listMuteConfigsTest6() throws Exception { + MuteConfig responsesElement = MuteConfig.newBuilder().build(); + ListMuteConfigsResponse expectedResponse = + ListMuteConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllMuteConfigs(Arrays.asList(responsesElement)) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + + 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 listMuteConfigsExceptionTest6() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + client.listMuteConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listMuteConfigsTest7() throws Exception { + MuteConfig responsesElement = MuteConfig.newBuilder().build(); + ListMuteConfigsResponse expectedResponse = + ListMuteConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllMuteConfigs(Arrays.asList(responsesElement)) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + 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, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listMuteConfigsExceptionTest7() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + String parent = "parent-995424086"; + client.listMuteConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNotificationConfigsTest() throws Exception { + NotificationConfig responsesElement = NotificationConfig.newBuilder().build(); + ListNotificationConfigsResponse expectedResponse = + ListNotificationConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllNotificationConfigs(Arrays.asList(responsesElement)) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + + ListNotificationConfigsPagedResponse pagedListResponse = client.listNotificationConfigs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNotificationConfigsList().get(0), resources.get(0)); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListNotificationConfigsRequest actualRequest = + ((ListNotificationConfigsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listNotificationConfigsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]"); + client.listNotificationConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNotificationConfigsTest2() throws Exception { + NotificationConfig responsesElement = NotificationConfig.newBuilder().build(); + ListNotificationConfigsResponse expectedResponse = + ListNotificationConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllNotificationConfigs(Arrays.asList(responsesElement)) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListNotificationConfigsPagedResponse pagedListResponse = client.listNotificationConfigs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNotificationConfigsList().get(0), resources.get(0)); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListNotificationConfigsRequest actualRequest = + ((ListNotificationConfigsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listNotificationConfigsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listNotificationConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNotificationConfigsTest3() throws Exception { + NotificationConfig responsesElement = NotificationConfig.newBuilder().build(); + ListNotificationConfigsResponse expectedResponse = + ListNotificationConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllNotificationConfigs(Arrays.asList(responsesElement)) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + + ListNotificationConfigsPagedResponse pagedListResponse = client.listNotificationConfigs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNotificationConfigsList().get(0), resources.get(0)); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListNotificationConfigsRequest actualRequest = + ((ListNotificationConfigsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listNotificationConfigsExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + client.listNotificationConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNotificationConfigsTest4() throws Exception { + NotificationConfig responsesElement = NotificationConfig.newBuilder().build(); + ListNotificationConfigsResponse expectedResponse = + ListNotificationConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllNotificationConfigs(Arrays.asList(responsesElement)) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListNotificationConfigsPagedResponse pagedListResponse = client.listNotificationConfigs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNotificationConfigsList().get(0), resources.get(0)); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListNotificationConfigsRequest actualRequest = + ((ListNotificationConfigsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listNotificationConfigsExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + String parent = "parent-995424086"; + client.listNotificationConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listResourceValueConfigsTest() throws Exception { + ResourceValueConfig responsesElement = ResourceValueConfig.newBuilder().build(); + ListResourceValueConfigsResponse expectedResponse = + ListResourceValueConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllResourceValueConfigs(Arrays.asList(responsesElement)) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + + ListResourceValueConfigsPagedResponse pagedListResponse = + client.listResourceValueConfigs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getResourceValueConfigsList().get(0), resources.get(0)); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListResourceValueConfigsRequest actualRequest = + ((ListResourceValueConfigsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listResourceValueConfigsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + client.listResourceValueConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listResourceValueConfigsTest2() throws Exception { + ResourceValueConfig responsesElement = ResourceValueConfig.newBuilder().build(); + ListResourceValueConfigsResponse expectedResponse = + ListResourceValueConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllResourceValueConfigs(Arrays.asList(responsesElement)) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListResourceValueConfigsPagedResponse pagedListResponse = + client.listResourceValueConfigs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getResourceValueConfigsList().get(0), resources.get(0)); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListResourceValueConfigsRequest actualRequest = + ((ListResourceValueConfigsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listResourceValueConfigsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + String parent = "parent-995424086"; + client.listResourceValueConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSourcesTest() throws Exception { + Source responsesElement = Source.newBuilder().build(); + ListSourcesResponse expectedResponse = + ListSourcesResponse.newBuilder() + .setNextPageToken("") + .addAllSources(Arrays.asList(responsesElement)) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + FolderName parent = FolderName.of("[FOLDER]"); + + ListSourcesPagedResponse pagedListResponse = client.listSources(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSourcesList().get(0), resources.get(0)); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSourcesRequest actualRequest = ((ListSourcesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSourcesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + FolderName parent = FolderName.of("[FOLDER]"); + client.listSources(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSourcesTest2() throws Exception { + Source responsesElement = Source.newBuilder().build(); + ListSourcesResponse expectedResponse = + ListSourcesResponse.newBuilder() + .setNextPageToken("") + .addAllSources(Arrays.asList(responsesElement)) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + + ListSourcesPagedResponse pagedListResponse = client.listSources(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSourcesList().get(0), resources.get(0)); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSourcesRequest actualRequest = ((ListSourcesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSourcesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + client.listSources(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSourcesTest3() throws Exception { + Source responsesElement = Source.newBuilder().build(); + ListSourcesResponse expectedResponse = + ListSourcesResponse.newBuilder() + .setNextPageToken("") + .addAllSources(Arrays.asList(responsesElement)) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + + ListSourcesPagedResponse pagedListResponse = client.listSources(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSourcesList().get(0), resources.get(0)); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSourcesRequest actualRequest = ((ListSourcesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSourcesExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + client.listSources(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSourcesTest4() throws Exception { + Source responsesElement = Source.newBuilder().build(); + ListSourcesResponse expectedResponse = + ListSourcesResponse.newBuilder() + .setNextPageToken("") + .addAllSources(Arrays.asList(responsesElement)) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListSourcesPagedResponse pagedListResponse = client.listSources(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSourcesList().get(0), resources.get(0)); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSourcesRequest actualRequest = ((ListSourcesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSourcesExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + String parent = "parent-995424086"; + client.listSources(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listValuedResourcesTest() throws Exception { + ValuedResource responsesElement = ValuedResource.newBuilder().build(); + ListValuedResourcesResponse expectedResponse = + ListValuedResourcesResponse.newBuilder() + .setNextPageToken("") + .addAllValuedResources(Arrays.asList(responsesElement)) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + SimulationName parent = SimulationName.of("[ORGANIZATION]", "[SIMULATION]"); + + ListValuedResourcesPagedResponse pagedListResponse = client.listValuedResources(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getValuedResourcesList().get(0), resources.get(0)); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListValuedResourcesRequest actualRequest = ((ListValuedResourcesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listValuedResourcesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + SimulationName parent = SimulationName.of("[ORGANIZATION]", "[SIMULATION]"); + client.listValuedResources(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listValuedResourcesTest2() throws Exception { + ValuedResource responsesElement = ValuedResource.newBuilder().build(); + ListValuedResourcesResponse expectedResponse = + ListValuedResourcesResponse.newBuilder() + .setNextPageToken("") + .addAllValuedResources(Arrays.asList(responsesElement)) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListValuedResourcesPagedResponse pagedListResponse = client.listValuedResources(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getValuedResourcesList().get(0), resources.get(0)); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListValuedResourcesRequest actualRequest = ((ListValuedResourcesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listValuedResourcesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + String parent = "parent-995424086"; + client.listValuedResources(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setFindingStateTest() throws Exception { + Finding expectedResponse = + Finding.newBuilder() + .setName( + FindingName.ofOrganizationSourceFindingName( + "[ORGANIZATION]", "[SOURCE]", "[FINDING]") + .toString()) + .setCanonicalName("canonicalName2122381727") + .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()) + .setIndicator(Indicator.newBuilder().build()) + .setVulnerability(Vulnerability.newBuilder().build()) + .setMuteUpdateTime(Timestamp.newBuilder().build()) + .putAllExternalSystems(new HashMap()) + .setMitreAttack(MitreAttack.newBuilder().build()) + .setAccess(Access.newBuilder().build()) + .addAllConnections(new ArrayList()) + .setMuteInitiator("muteInitiator1395645462") + .addAllProcesses(new ArrayList()) + .putAllContacts(new HashMap()) + .addAllCompliances(new ArrayList()) + .setParentDisplayName("parentDisplayName-1523759261") + .setDescription("description-1724546052") + .setExfiltration(Exfiltration.newBuilder().build()) + .addAllIamBindings(new ArrayList()) + .setNextSteps("nextSteps1206138868") + .setModuleName("moduleName-870351081") + .addAllContainers(new ArrayList()) + .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) + .setAttackExposure(AttackExposure.newBuilder().build()) + .addAllFiles(new ArrayList()) + .setCloudDlpInspection(CloudDlpInspection.newBuilder().build()) + .setCloudDlpDataProfile(CloudDlpDataProfile.newBuilder().build()) + .setKernelRootkit(KernelRootkit.newBuilder().build()) + .addAllOrgPolicies(new ArrayList()) + .setApplication(Application.newBuilder().build()) + .setBackupDisasterRecovery(BackupDisasterRecovery.newBuilder().build()) + .setSecurityPosture(SecurityPosture.newBuilder().build()) + .addAllLogEntries(new ArrayList()) + .addAllLoadBalancers(new ArrayList()) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + FindingName name = + FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]", "[SOURCE]", "[FINDING]"); + Finding.State state = Finding.State.forNumber(0); + + Finding actualResponse = client.setFindingState(name, state); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetFindingStateRequest actualRequest = ((SetFindingStateRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(state, actualRequest.getState()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setFindingStateExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + FindingName name = + FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]", "[SOURCE]", "[FINDING]"); + Finding.State state = Finding.State.forNumber(0); + client.setFindingState(name, state); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setFindingStateTest2() throws Exception { + Finding expectedResponse = + Finding.newBuilder() + .setName( + FindingName.ofOrganizationSourceFindingName( + "[ORGANIZATION]", "[SOURCE]", "[FINDING]") + .toString()) + .setCanonicalName("canonicalName2122381727") + .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()) + .setIndicator(Indicator.newBuilder().build()) + .setVulnerability(Vulnerability.newBuilder().build()) + .setMuteUpdateTime(Timestamp.newBuilder().build()) + .putAllExternalSystems(new HashMap()) + .setMitreAttack(MitreAttack.newBuilder().build()) + .setAccess(Access.newBuilder().build()) + .addAllConnections(new ArrayList()) + .setMuteInitiator("muteInitiator1395645462") + .addAllProcesses(new ArrayList()) + .putAllContacts(new HashMap()) + .addAllCompliances(new ArrayList()) + .setParentDisplayName("parentDisplayName-1523759261") + .setDescription("description-1724546052") + .setExfiltration(Exfiltration.newBuilder().build()) + .addAllIamBindings(new ArrayList()) + .setNextSteps("nextSteps1206138868") + .setModuleName("moduleName-870351081") + .addAllContainers(new ArrayList()) + .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) + .setAttackExposure(AttackExposure.newBuilder().build()) + .addAllFiles(new ArrayList()) + .setCloudDlpInspection(CloudDlpInspection.newBuilder().build()) + .setCloudDlpDataProfile(CloudDlpDataProfile.newBuilder().build()) + .setKernelRootkit(KernelRootkit.newBuilder().build()) + .addAllOrgPolicies(new ArrayList()) + .setApplication(Application.newBuilder().build()) + .setBackupDisasterRecovery(BackupDisasterRecovery.newBuilder().build()) + .setSecurityPosture(SecurityPosture.newBuilder().build()) + .addAllLogEntries(new ArrayList()) + .addAllLoadBalancers(new ArrayList()) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + String name = "name3373707"; + Finding.State state = Finding.State.forNumber(0); + + Finding actualResponse = client.setFindingState(name, state); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetFindingStateRequest actualRequest = ((SetFindingStateRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(state, actualRequest.getState()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setFindingStateExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + String name = "name3373707"; + Finding.State state = Finding.State.forNumber(0); + client.setFindingState(name, state); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); + Policy policy = Policy.newBuilder().build(); + + Policy actualResponse = client.setIamPolicy(resource, policy); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(resource.toString(), actualRequest.getResource()); + Assert.assertEquals(policy, actualRequest.getPolicy()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); + Policy policy = Policy.newBuilder().build(); + client.setIamPolicy(resource, policy); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest2() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + String resource = "resource-341064690"; + Policy policy = Policy.newBuilder().build(); + + Policy actualResponse = client.setIamPolicy(resource, policy); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(resource, actualRequest.getResource()); + Assert.assertEquals(policy, actualRequest.getPolicy()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setIamPolicyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + String resource = "resource-341064690"; + Policy policy = Policy.newBuilder().build(); + client.setIamPolicy(resource, policy); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setMuteTest() throws Exception { + Finding expectedResponse = + Finding.newBuilder() + .setName( + FindingName.ofOrganizationSourceFindingName( + "[ORGANIZATION]", "[SOURCE]", "[FINDING]") + .toString()) + .setCanonicalName("canonicalName2122381727") + .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()) + .setIndicator(Indicator.newBuilder().build()) + .setVulnerability(Vulnerability.newBuilder().build()) + .setMuteUpdateTime(Timestamp.newBuilder().build()) + .putAllExternalSystems(new HashMap()) + .setMitreAttack(MitreAttack.newBuilder().build()) + .setAccess(Access.newBuilder().build()) + .addAllConnections(new ArrayList()) + .setMuteInitiator("muteInitiator1395645462") + .addAllProcesses(new ArrayList()) + .putAllContacts(new HashMap()) + .addAllCompliances(new ArrayList()) + .setParentDisplayName("parentDisplayName-1523759261") + .setDescription("description-1724546052") + .setExfiltration(Exfiltration.newBuilder().build()) + .addAllIamBindings(new ArrayList()) + .setNextSteps("nextSteps1206138868") + .setModuleName("moduleName-870351081") + .addAllContainers(new ArrayList()) + .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) + .setAttackExposure(AttackExposure.newBuilder().build()) + .addAllFiles(new ArrayList()) + .setCloudDlpInspection(CloudDlpInspection.newBuilder().build()) + .setCloudDlpDataProfile(CloudDlpDataProfile.newBuilder().build()) + .setKernelRootkit(KernelRootkit.newBuilder().build()) + .addAllOrgPolicies(new ArrayList()) + .setApplication(Application.newBuilder().build()) + .setBackupDisasterRecovery(BackupDisasterRecovery.newBuilder().build()) + .setSecurityPosture(SecurityPosture.newBuilder().build()) + .addAllLogEntries(new ArrayList()) + .addAllLoadBalancers(new ArrayList()) + .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()) + .setCanonicalName("canonicalName2122381727") + .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()) + .setIndicator(Indicator.newBuilder().build()) + .setVulnerability(Vulnerability.newBuilder().build()) + .setMuteUpdateTime(Timestamp.newBuilder().build()) + .putAllExternalSystems(new HashMap()) + .setMitreAttack(MitreAttack.newBuilder().build()) + .setAccess(Access.newBuilder().build()) + .addAllConnections(new ArrayList()) + .setMuteInitiator("muteInitiator1395645462") + .addAllProcesses(new ArrayList()) + .putAllContacts(new HashMap()) + .addAllCompliances(new ArrayList()) + .setParentDisplayName("parentDisplayName-1523759261") + .setDescription("description-1724546052") + .setExfiltration(Exfiltration.newBuilder().build()) + .addAllIamBindings(new ArrayList()) + .setNextSteps("nextSteps1206138868") + .setModuleName("moduleName-870351081") + .addAllContainers(new ArrayList()) + .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) + .setAttackExposure(AttackExposure.newBuilder().build()) + .addAllFiles(new ArrayList()) + .setCloudDlpInspection(CloudDlpInspection.newBuilder().build()) + .setCloudDlpDataProfile(CloudDlpDataProfile.newBuilder().build()) + .setKernelRootkit(KernelRootkit.newBuilder().build()) + .addAllOrgPolicies(new ArrayList()) + .setApplication(Application.newBuilder().build()) + .setBackupDisasterRecovery(BackupDisasterRecovery.newBuilder().build()) + .setSecurityPosture(SecurityPosture.newBuilder().build()) + .addAllLogEntries(new ArrayList()) + .addAllLoadBalancers(new ArrayList()) + .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 testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockSecurityCenter.addResponse(expectedResponse); + + ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); + List permissions = new ArrayList<>(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(resource, permissions); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); + + Assert.assertEquals(resource.toString(), actualRequest.getResource()); + Assert.assertEquals(permissions, actualRequest.getPermissionsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); + List permissions = new ArrayList<>(); + client.testIamPermissions(resource, permissions); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest2() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockSecurityCenter.addResponse(expectedResponse); + + String resource = "resource-341064690"; + List permissions = new ArrayList<>(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(resource, permissions); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); + + Assert.assertEquals(resource, actualRequest.getResource()); + Assert.assertEquals(permissions, actualRequest.getPermissionsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void testIamPermissionsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + String resource = "resource-341064690"; + List permissions = new ArrayList<>(); + client.testIamPermissions(resource, permissions); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateBigQueryExportTest() throws Exception { + BigQueryExport expectedResponse = + BigQueryExport.newBuilder() + .setName( + BigQueryExportName.ofOrganizationLocationExportName( + "[ORGANIZATION]", "[LOCATION]", "[EXPORT]") + .toString()) + .setDescription("description-1724546052") + .setFilter("filter-1274492040") + .setDataset("dataset1443214456") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMostRecentEditor("mostRecentEditor-833861941") + .setPrincipal("principal-1812041682") + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + BigQueryExport actualResponse = client.updateBigQueryExport(bigQueryExport, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateBigQueryExportRequest actualRequest = + ((UpdateBigQueryExportRequest) actualRequests.get(0)); + + Assert.assertEquals(bigQueryExport, actualRequest.getBigQueryExport()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateBigQueryExportExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateBigQueryExport(bigQueryExport, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected 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()) + .setCaseUri("caseUri554877980") + .setCasePriority("casePriority1589324020") + .setCaseSla(Timestamp.newBuilder().build()) + .setCaseCreateTime(Timestamp.newBuilder().build()) + .setCaseCloseTime(Timestamp.newBuilder().build()) + .setTicketInfo(ExternalSystem.TicketInfo.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 = + Finding.newBuilder() + .setName( + FindingName.ofOrganizationSourceFindingName( + "[ORGANIZATION]", "[SOURCE]", "[FINDING]") + .toString()) + .setCanonicalName("canonicalName2122381727") + .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()) + .setIndicator(Indicator.newBuilder().build()) + .setVulnerability(Vulnerability.newBuilder().build()) + .setMuteUpdateTime(Timestamp.newBuilder().build()) + .putAllExternalSystems(new HashMap()) + .setMitreAttack(MitreAttack.newBuilder().build()) + .setAccess(Access.newBuilder().build()) + .addAllConnections(new ArrayList()) + .setMuteInitiator("muteInitiator1395645462") + .addAllProcesses(new ArrayList()) + .putAllContacts(new HashMap()) + .addAllCompliances(new ArrayList()) + .setParentDisplayName("parentDisplayName-1523759261") + .setDescription("description-1724546052") + .setExfiltration(Exfiltration.newBuilder().build()) + .addAllIamBindings(new ArrayList()) + .setNextSteps("nextSteps1206138868") + .setModuleName("moduleName-870351081") + .addAllContainers(new ArrayList()) + .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) + .setAttackExposure(AttackExposure.newBuilder().build()) + .addAllFiles(new ArrayList()) + .setCloudDlpInspection(CloudDlpInspection.newBuilder().build()) + .setCloudDlpDataProfile(CloudDlpDataProfile.newBuilder().build()) + .setKernelRootkit(KernelRootkit.newBuilder().build()) + .addAllOrgPolicies(new ArrayList()) + .setApplication(Application.newBuilder().build()) + .setBackupDisasterRecovery(BackupDisasterRecovery.newBuilder().build()) + .setSecurityPosture(SecurityPosture.newBuilder().build()) + .addAllLogEntries(new ArrayList()) + .addAllLoadBalancers(new ArrayList()) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + Finding finding = Finding.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Finding actualResponse = client.updateFinding(finding, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateFindingRequest actualRequest = ((UpdateFindingRequest) actualRequests.get(0)); + + Assert.assertEquals(finding, actualRequest.getFinding()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateFindingExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + Finding finding = Finding.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateFinding(finding, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateMuteConfigTest() throws Exception { + MuteConfig expectedResponse = + MuteConfig.newBuilder() + .setName( + MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") + .toString()) + .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 = + NotificationConfig.newBuilder() + .setName( + NotificationConfigName.ofOrganizationLocationNotificationConfigName( + "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION_CONFIG]") + .toString()) + .setDescription("description-1724546052") + .setPubsubTopic("pubsubTopic255880396") + .setServiceAccount("serviceAccount1079137720") + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + NotificationConfig actualResponse = + client.updateNotificationConfig(notificationConfig, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateNotificationConfigRequest actualRequest = + ((UpdateNotificationConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(notificationConfig, actualRequest.getNotificationConfig()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateNotificationConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateNotificationConfig(notificationConfig, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateResourceValueConfigTest() throws Exception { + ResourceValueConfig expectedResponse = + ResourceValueConfig.newBuilder() + .setName( + ResourceValueConfigName.of("[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]").toString()) + .setResourceValue(ResourceValue.forNumber(0)) + .addAllTagValues(new ArrayList()) + .setResourceType("resourceType-384364440") + .setScope("scope109264468") + .putAllResourceLabelsSelector(new HashMap()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSensitiveDataProtectionMapping( + ResourceValueConfig.SensitiveDataProtectionMapping.newBuilder().build()) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + ResourceValueConfig resourceValueConfig = ResourceValueConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + ResourceValueConfig actualResponse = + client.updateResourceValueConfig(resourceValueConfig, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateResourceValueConfigRequest actualRequest = + ((UpdateResourceValueConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(resourceValueConfig, actualRequest.getResourceValueConfig()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateResourceValueConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + ResourceValueConfig resourceValueConfig = ResourceValueConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateResourceValueConfig(resourceValueConfig, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateSecurityMarksTest() throws Exception { + SecurityMarks expectedResponse = + SecurityMarks.newBuilder() + .setName("name3373707") + .putAllMarks(new HashMap()) + .setCanonicalName("canonicalName2122381727") + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + SecurityMarks securityMarks = SecurityMarks.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + SecurityMarks actualResponse = client.updateSecurityMarks(securityMarks, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateSecurityMarksRequest actualRequest = ((UpdateSecurityMarksRequest) actualRequests.get(0)); + + Assert.assertEquals(securityMarks, actualRequest.getSecurityMarks()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateSecurityMarksExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + SecurityMarks securityMarks = SecurityMarks.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateSecurityMarks(securityMarks, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateSourceTest() throws Exception { + Source expectedResponse = + Source.newBuilder() + .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCanonicalName("canonicalName2122381727") + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + Source source = Source.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Source actualResponse = client.updateSource(source, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateSourceRequest actualRequest = ((UpdateSourceRequest) actualRequests.get(0)); + + Assert.assertEquals(source, actualRequest.getSource()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateSourceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + Source source = Source.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateSource(source, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-securitycenter/grpc-google-cloud-securitycenter-v2/pom.xml b/java-securitycenter/grpc-google-cloud-securitycenter-v2/pom.xml new file mode 100644 index 000000000000..54ad79b009e6 --- /dev/null +++ b/java-securitycenter/grpc-google-cloud-securitycenter-v2/pom.xml @@ -0,0 +1,45 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-securitycenter-v2 + 2.45.0-SNAPSHOT + grpc-google-cloud-securitycenter-v2 + GRPC library for google-cloud-securitycenter + + com.google.cloud + google-cloud-securitycenter-parent + 2.45.0-SNAPSHOT + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-cloud-securitycenter-v2 + + + com.google.guava + guava + + + \ No newline at end of file diff --git a/java-securitycenter/grpc-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/SecurityCenterGrpc.java b/java-securitycenter/grpc-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/SecurityCenterGrpc.java new file mode 100644 index 000000000000..fb646b99459a --- /dev/null +++ b/java-securitycenter/grpc-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/SecurityCenterGrpc.java @@ -0,0 +1,5242 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.securitycenter.v2; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *

+ * V2 APIs for Security Center service.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/securitycenter/v2/securitycenter_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class SecurityCenterGrpc { + + private SecurityCenterGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.securitycenter.v2.SecurityCenter"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest, + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse> + getBatchCreateResourceValueConfigsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchCreateResourceValueConfigs", + requestType = com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest.class, + responseType = + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest, + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse> + getBatchCreateResourceValueConfigsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest, + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse> + getBatchCreateResourceValueConfigsMethod; + if ((getBatchCreateResourceValueConfigsMethod = + SecurityCenterGrpc.getBatchCreateResourceValueConfigsMethod) + == null) { + synchronized (SecurityCenterGrpc.class) { + if ((getBatchCreateResourceValueConfigsMethod = + SecurityCenterGrpc.getBatchCreateResourceValueConfigsMethod) + == null) { + SecurityCenterGrpc.getBatchCreateResourceValueConfigsMethod = + getBatchCreateResourceValueConfigsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "BatchCreateResourceValueConfigs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2 + .BatchCreateResourceValueConfigsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2 + .BatchCreateResourceValueConfigsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier( + "BatchCreateResourceValueConfigs")) + .build(); + } + } + } + return getBatchCreateResourceValueConfigsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.BulkMuteFindingsRequest, + com.google.longrunning.Operation> + getBulkMuteFindingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BulkMuteFindings", + requestType = com.google.cloud.securitycenter.v2.BulkMuteFindingsRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.BulkMuteFindingsRequest, + com.google.longrunning.Operation> + getBulkMuteFindingsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.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.v2.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.v2.CreateBigQueryExportRequest, + com.google.cloud.securitycenter.v2.BigQueryExport> + getCreateBigQueryExportMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateBigQueryExport", + requestType = com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest.class, + responseType = com.google.cloud.securitycenter.v2.BigQueryExport.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest, + com.google.cloud.securitycenter.v2.BigQueryExport> + getCreateBigQueryExportMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest, + com.google.cloud.securitycenter.v2.BigQueryExport> + getCreateBigQueryExportMethod; + if ((getCreateBigQueryExportMethod = SecurityCenterGrpc.getCreateBigQueryExportMethod) + == null) { + synchronized (SecurityCenterGrpc.class) { + if ((getCreateBigQueryExportMethod = SecurityCenterGrpc.getCreateBigQueryExportMethod) + == null) { + SecurityCenterGrpc.getCreateBigQueryExportMethod = + getCreateBigQueryExportMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateBigQueryExport")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.BigQueryExport + .getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier("CreateBigQueryExport")) + .build(); + } + } + } + return getCreateBigQueryExportMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.CreateFindingRequest, + com.google.cloud.securitycenter.v2.Finding> + getCreateFindingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateFinding", + requestType = com.google.cloud.securitycenter.v2.CreateFindingRequest.class, + responseType = com.google.cloud.securitycenter.v2.Finding.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.CreateFindingRequest, + com.google.cloud.securitycenter.v2.Finding> + getCreateFindingMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.CreateFindingRequest, + com.google.cloud.securitycenter.v2.Finding> + getCreateFindingMethod; + if ((getCreateFindingMethod = SecurityCenterGrpc.getCreateFindingMethod) == null) { + synchronized (SecurityCenterGrpc.class) { + if ((getCreateFindingMethod = SecurityCenterGrpc.getCreateFindingMethod) == null) { + SecurityCenterGrpc.getCreateFindingMethod = + getCreateFindingMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateFinding")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.CreateFindingRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.Finding.getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier("CreateFinding")) + .build(); + } + } + } + return getCreateFindingMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.CreateMuteConfigRequest, + com.google.cloud.securitycenter.v2.MuteConfig> + getCreateMuteConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateMuteConfig", + requestType = com.google.cloud.securitycenter.v2.CreateMuteConfigRequest.class, + responseType = com.google.cloud.securitycenter.v2.MuteConfig.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.CreateMuteConfigRequest, + com.google.cloud.securitycenter.v2.MuteConfig> + getCreateMuteConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.CreateMuteConfigRequest, + com.google.cloud.securitycenter.v2.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.v2.CreateMuteConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.MuteConfig.getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier("CreateMuteConfig")) + .build(); + } + } + } + return getCreateMuteConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest, + com.google.cloud.securitycenter.v2.NotificationConfig> + getCreateNotificationConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateNotificationConfig", + requestType = com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest.class, + responseType = com.google.cloud.securitycenter.v2.NotificationConfig.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest, + com.google.cloud.securitycenter.v2.NotificationConfig> + getCreateNotificationConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest, + com.google.cloud.securitycenter.v2.NotificationConfig> + getCreateNotificationConfigMethod; + if ((getCreateNotificationConfigMethod = SecurityCenterGrpc.getCreateNotificationConfigMethod) + == null) { + synchronized (SecurityCenterGrpc.class) { + if ((getCreateNotificationConfigMethod = + SecurityCenterGrpc.getCreateNotificationConfigMethod) + == null) { + SecurityCenterGrpc.getCreateNotificationConfigMethod = + getCreateNotificationConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateNotificationConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.NotificationConfig + .getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier("CreateNotificationConfig")) + .build(); + } + } + } + return getCreateNotificationConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.CreateSourceRequest, + com.google.cloud.securitycenter.v2.Source> + getCreateSourceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateSource", + requestType = com.google.cloud.securitycenter.v2.CreateSourceRequest.class, + responseType = com.google.cloud.securitycenter.v2.Source.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.CreateSourceRequest, + com.google.cloud.securitycenter.v2.Source> + getCreateSourceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.CreateSourceRequest, + com.google.cloud.securitycenter.v2.Source> + getCreateSourceMethod; + if ((getCreateSourceMethod = SecurityCenterGrpc.getCreateSourceMethod) == null) { + synchronized (SecurityCenterGrpc.class) { + if ((getCreateSourceMethod = SecurityCenterGrpc.getCreateSourceMethod) == null) { + SecurityCenterGrpc.getCreateSourceMethod = + getCreateSourceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateSource")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.CreateSourceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.Source.getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier("CreateSource")) + .build(); + } + } + } + return getCreateSourceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest, com.google.protobuf.Empty> + getDeleteBigQueryExportMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteBigQueryExport", + requestType = com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest, com.google.protobuf.Empty> + getDeleteBigQueryExportMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest, + com.google.protobuf.Empty> + getDeleteBigQueryExportMethod; + if ((getDeleteBigQueryExportMethod = SecurityCenterGrpc.getDeleteBigQueryExportMethod) + == null) { + synchronized (SecurityCenterGrpc.class) { + if ((getDeleteBigQueryExportMethod = SecurityCenterGrpc.getDeleteBigQueryExportMethod) + == null) { + SecurityCenterGrpc.getDeleteBigQueryExportMethod = + getDeleteBigQueryExportMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteBigQueryExport")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier("DeleteBigQueryExport")) + .build(); + } + } + } + return getDeleteBigQueryExportMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.DeleteMuteConfigRequest, com.google.protobuf.Empty> + getDeleteMuteConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteMuteConfig", + requestType = com.google.cloud.securitycenter.v2.DeleteMuteConfigRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.DeleteMuteConfigRequest, com.google.protobuf.Empty> + getDeleteMuteConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.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.v2.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.v2.DeleteNotificationConfigRequest, + com.google.protobuf.Empty> + getDeleteNotificationConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteNotificationConfig", + requestType = com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest, + com.google.protobuf.Empty> + getDeleteNotificationConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest, + com.google.protobuf.Empty> + getDeleteNotificationConfigMethod; + if ((getDeleteNotificationConfigMethod = SecurityCenterGrpc.getDeleteNotificationConfigMethod) + == null) { + synchronized (SecurityCenterGrpc.class) { + if ((getDeleteNotificationConfigMethod = + SecurityCenterGrpc.getDeleteNotificationConfigMethod) + == null) { + SecurityCenterGrpc.getDeleteNotificationConfigMethod = + getDeleteNotificationConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteNotificationConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier("DeleteNotificationConfig")) + .build(); + } + } + } + return getDeleteNotificationConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest, + com.google.protobuf.Empty> + getDeleteResourceValueConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteResourceValueConfig", + requestType = com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest, + com.google.protobuf.Empty> + getDeleteResourceValueConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest, + com.google.protobuf.Empty> + getDeleteResourceValueConfigMethod; + if ((getDeleteResourceValueConfigMethod = SecurityCenterGrpc.getDeleteResourceValueConfigMethod) + == null) { + synchronized (SecurityCenterGrpc.class) { + if ((getDeleteResourceValueConfigMethod = + SecurityCenterGrpc.getDeleteResourceValueConfigMethod) + == null) { + SecurityCenterGrpc.getDeleteResourceValueConfigMethod = + getDeleteResourceValueConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteResourceValueConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier("DeleteResourceValueConfig")) + .build(); + } + } + } + return getDeleteResourceValueConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.GetBigQueryExportRequest, + com.google.cloud.securitycenter.v2.BigQueryExport> + getGetBigQueryExportMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetBigQueryExport", + requestType = com.google.cloud.securitycenter.v2.GetBigQueryExportRequest.class, + responseType = com.google.cloud.securitycenter.v2.BigQueryExport.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.GetBigQueryExportRequest, + com.google.cloud.securitycenter.v2.BigQueryExport> + getGetBigQueryExportMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.GetBigQueryExportRequest, + com.google.cloud.securitycenter.v2.BigQueryExport> + getGetBigQueryExportMethod; + if ((getGetBigQueryExportMethod = SecurityCenterGrpc.getGetBigQueryExportMethod) == null) { + synchronized (SecurityCenterGrpc.class) { + if ((getGetBigQueryExportMethod = SecurityCenterGrpc.getGetBigQueryExportMethod) == null) { + SecurityCenterGrpc.getGetBigQueryExportMethod = + getGetBigQueryExportMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBigQueryExport")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.GetBigQueryExportRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.BigQueryExport + .getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier("GetBigQueryExport")) + .build(); + } + } + } + return getGetBigQueryExportMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.GetSimulationRequest, + com.google.cloud.securitycenter.v2.Simulation> + getGetSimulationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetSimulation", + requestType = com.google.cloud.securitycenter.v2.GetSimulationRequest.class, + responseType = com.google.cloud.securitycenter.v2.Simulation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.GetSimulationRequest, + com.google.cloud.securitycenter.v2.Simulation> + getGetSimulationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.GetSimulationRequest, + com.google.cloud.securitycenter.v2.Simulation> + getGetSimulationMethod; + if ((getGetSimulationMethod = SecurityCenterGrpc.getGetSimulationMethod) == null) { + synchronized (SecurityCenterGrpc.class) { + if ((getGetSimulationMethod = SecurityCenterGrpc.getGetSimulationMethod) == null) { + SecurityCenterGrpc.getGetSimulationMethod = + getGetSimulationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSimulation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.GetSimulationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.Simulation.getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier("GetSimulation")) + .build(); + } + } + } + return getGetSimulationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.GetValuedResourceRequest, + com.google.cloud.securitycenter.v2.ValuedResource> + getGetValuedResourceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetValuedResource", + requestType = com.google.cloud.securitycenter.v2.GetValuedResourceRequest.class, + responseType = com.google.cloud.securitycenter.v2.ValuedResource.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.GetValuedResourceRequest, + com.google.cloud.securitycenter.v2.ValuedResource> + getGetValuedResourceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.GetValuedResourceRequest, + com.google.cloud.securitycenter.v2.ValuedResource> + getGetValuedResourceMethod; + if ((getGetValuedResourceMethod = SecurityCenterGrpc.getGetValuedResourceMethod) == null) { + synchronized (SecurityCenterGrpc.class) { + if ((getGetValuedResourceMethod = SecurityCenterGrpc.getGetValuedResourceMethod) == null) { + SecurityCenterGrpc.getGetValuedResourceMethod = + getGetValuedResourceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetValuedResource")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.GetValuedResourceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.ValuedResource + .getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier("GetValuedResource")) + .build(); + } + } + } + return getGetValuedResourceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v1.GetIamPolicyRequest, com.google.iam.v1.Policy> + getGetIamPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetIamPolicy", + requestType = com.google.iam.v1.GetIamPolicyRequest.class, + responseType = com.google.iam.v1.Policy.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v1.GetIamPolicyRequest, com.google.iam.v1.Policy> + getGetIamPolicyMethod() { + io.grpc.MethodDescriptor + getGetIamPolicyMethod; + if ((getGetIamPolicyMethod = SecurityCenterGrpc.getGetIamPolicyMethod) == null) { + synchronized (SecurityCenterGrpc.class) { + if ((getGetIamPolicyMethod = SecurityCenterGrpc.getGetIamPolicyMethod) == null) { + SecurityCenterGrpc.getGetIamPolicyMethod = + getGetIamPolicyMethod = + io.grpc.MethodDescriptor + .newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetIamPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.Policy.getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier("GetIamPolicy")) + .build(); + } + } + } + return getGetIamPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.GetMuteConfigRequest, + com.google.cloud.securitycenter.v2.MuteConfig> + getGetMuteConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetMuteConfig", + requestType = com.google.cloud.securitycenter.v2.GetMuteConfigRequest.class, + responseType = com.google.cloud.securitycenter.v2.MuteConfig.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.GetMuteConfigRequest, + com.google.cloud.securitycenter.v2.MuteConfig> + getGetMuteConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.GetMuteConfigRequest, + com.google.cloud.securitycenter.v2.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.v2.GetMuteConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.MuteConfig.getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier("GetMuteConfig")) + .build(); + } + } + } + return getGetMuteConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.GetNotificationConfigRequest, + com.google.cloud.securitycenter.v2.NotificationConfig> + getGetNotificationConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetNotificationConfig", + requestType = com.google.cloud.securitycenter.v2.GetNotificationConfigRequest.class, + responseType = com.google.cloud.securitycenter.v2.NotificationConfig.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.GetNotificationConfigRequest, + com.google.cloud.securitycenter.v2.NotificationConfig> + getGetNotificationConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.GetNotificationConfigRequest, + com.google.cloud.securitycenter.v2.NotificationConfig> + getGetNotificationConfigMethod; + if ((getGetNotificationConfigMethod = SecurityCenterGrpc.getGetNotificationConfigMethod) + == null) { + synchronized (SecurityCenterGrpc.class) { + if ((getGetNotificationConfigMethod = SecurityCenterGrpc.getGetNotificationConfigMethod) + == null) { + SecurityCenterGrpc.getGetNotificationConfigMethod = + getGetNotificationConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetNotificationConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.GetNotificationConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.NotificationConfig + .getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier("GetNotificationConfig")) + .build(); + } + } + } + return getGetNotificationConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest, + com.google.cloud.securitycenter.v2.ResourceValueConfig> + getGetResourceValueConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetResourceValueConfig", + requestType = com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest.class, + responseType = com.google.cloud.securitycenter.v2.ResourceValueConfig.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest, + com.google.cloud.securitycenter.v2.ResourceValueConfig> + getGetResourceValueConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest, + com.google.cloud.securitycenter.v2.ResourceValueConfig> + getGetResourceValueConfigMethod; + if ((getGetResourceValueConfigMethod = SecurityCenterGrpc.getGetResourceValueConfigMethod) + == null) { + synchronized (SecurityCenterGrpc.class) { + if ((getGetResourceValueConfigMethod = SecurityCenterGrpc.getGetResourceValueConfigMethod) + == null) { + SecurityCenterGrpc.getGetResourceValueConfigMethod = + getGetResourceValueConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetResourceValueConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.ResourceValueConfig + .getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier("GetResourceValueConfig")) + .build(); + } + } + } + return getGetResourceValueConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.GetSourceRequest, + com.google.cloud.securitycenter.v2.Source> + getGetSourceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetSource", + requestType = com.google.cloud.securitycenter.v2.GetSourceRequest.class, + responseType = com.google.cloud.securitycenter.v2.Source.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.GetSourceRequest, + com.google.cloud.securitycenter.v2.Source> + getGetSourceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.GetSourceRequest, + com.google.cloud.securitycenter.v2.Source> + getGetSourceMethod; + if ((getGetSourceMethod = SecurityCenterGrpc.getGetSourceMethod) == null) { + synchronized (SecurityCenterGrpc.class) { + if ((getGetSourceMethod = SecurityCenterGrpc.getGetSourceMethod) == null) { + SecurityCenterGrpc.getGetSourceMethod = + getGetSourceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSource")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.GetSourceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.Source.getDefaultInstance())) + .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("GetSource")) + .build(); + } + } + } + return getGetSourceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.GroupFindingsRequest, + com.google.cloud.securitycenter.v2.GroupFindingsResponse> + getGroupFindingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GroupFindings", + requestType = com.google.cloud.securitycenter.v2.GroupFindingsRequest.class, + responseType = com.google.cloud.securitycenter.v2.GroupFindingsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.GroupFindingsRequest, + com.google.cloud.securitycenter.v2.GroupFindingsResponse> + getGroupFindingsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.GroupFindingsRequest, + com.google.cloud.securitycenter.v2.GroupFindingsResponse> + getGroupFindingsMethod; + if ((getGroupFindingsMethod = SecurityCenterGrpc.getGroupFindingsMethod) == null) { + synchronized (SecurityCenterGrpc.class) { + if ((getGroupFindingsMethod = SecurityCenterGrpc.getGroupFindingsMethod) == null) { + SecurityCenterGrpc.getGroupFindingsMethod = + getGroupFindingsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GroupFindings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.GroupFindingsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.GroupFindingsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier("GroupFindings")) + .build(); + } + } + } + return getGroupFindingsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.ListAttackPathsRequest, + com.google.cloud.securitycenter.v2.ListAttackPathsResponse> + getListAttackPathsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAttackPaths", + requestType = com.google.cloud.securitycenter.v2.ListAttackPathsRequest.class, + responseType = com.google.cloud.securitycenter.v2.ListAttackPathsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.ListAttackPathsRequest, + com.google.cloud.securitycenter.v2.ListAttackPathsResponse> + getListAttackPathsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.ListAttackPathsRequest, + com.google.cloud.securitycenter.v2.ListAttackPathsResponse> + getListAttackPathsMethod; + if ((getListAttackPathsMethod = SecurityCenterGrpc.getListAttackPathsMethod) == null) { + synchronized (SecurityCenterGrpc.class) { + if ((getListAttackPathsMethod = SecurityCenterGrpc.getListAttackPathsMethod) == null) { + SecurityCenterGrpc.getListAttackPathsMethod = + getListAttackPathsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListAttackPaths")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.ListAttackPathsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.ListAttackPathsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier("ListAttackPaths")) + .build(); + } + } + } + return getListAttackPathsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.ListBigQueryExportsRequest, + com.google.cloud.securitycenter.v2.ListBigQueryExportsResponse> + getListBigQueryExportsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListBigQueryExports", + requestType = com.google.cloud.securitycenter.v2.ListBigQueryExportsRequest.class, + responseType = com.google.cloud.securitycenter.v2.ListBigQueryExportsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.ListBigQueryExportsRequest, + com.google.cloud.securitycenter.v2.ListBigQueryExportsResponse> + getListBigQueryExportsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.ListBigQueryExportsRequest, + com.google.cloud.securitycenter.v2.ListBigQueryExportsResponse> + getListBigQueryExportsMethod; + if ((getListBigQueryExportsMethod = SecurityCenterGrpc.getListBigQueryExportsMethod) == null) { + synchronized (SecurityCenterGrpc.class) { + if ((getListBigQueryExportsMethod = SecurityCenterGrpc.getListBigQueryExportsMethod) + == null) { + SecurityCenterGrpc.getListBigQueryExportsMethod = + getListBigQueryExportsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListBigQueryExports")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.ListBigQueryExportsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.ListBigQueryExportsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier("ListBigQueryExports")) + .build(); + } + } + } + return getListBigQueryExportsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.ListFindingsRequest, + com.google.cloud.securitycenter.v2.ListFindingsResponse> + getListFindingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListFindings", + requestType = com.google.cloud.securitycenter.v2.ListFindingsRequest.class, + responseType = com.google.cloud.securitycenter.v2.ListFindingsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.ListFindingsRequest, + com.google.cloud.securitycenter.v2.ListFindingsResponse> + getListFindingsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.ListFindingsRequest, + com.google.cloud.securitycenter.v2.ListFindingsResponse> + getListFindingsMethod; + if ((getListFindingsMethod = SecurityCenterGrpc.getListFindingsMethod) == null) { + synchronized (SecurityCenterGrpc.class) { + if ((getListFindingsMethod = SecurityCenterGrpc.getListFindingsMethod) == null) { + SecurityCenterGrpc.getListFindingsMethod = + getListFindingsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListFindings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.ListFindingsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.ListFindingsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier("ListFindings")) + .build(); + } + } + } + return getListFindingsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.ListMuteConfigsRequest, + com.google.cloud.securitycenter.v2.ListMuteConfigsResponse> + getListMuteConfigsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListMuteConfigs", + requestType = com.google.cloud.securitycenter.v2.ListMuteConfigsRequest.class, + responseType = com.google.cloud.securitycenter.v2.ListMuteConfigsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.ListMuteConfigsRequest, + com.google.cloud.securitycenter.v2.ListMuteConfigsResponse> + getListMuteConfigsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.ListMuteConfigsRequest, + com.google.cloud.securitycenter.v2.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.v2.ListMuteConfigsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.ListMuteConfigsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier("ListMuteConfigs")) + .build(); + } + } + } + return getListMuteConfigsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.ListNotificationConfigsRequest, + com.google.cloud.securitycenter.v2.ListNotificationConfigsResponse> + getListNotificationConfigsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListNotificationConfigs", + requestType = com.google.cloud.securitycenter.v2.ListNotificationConfigsRequest.class, + responseType = com.google.cloud.securitycenter.v2.ListNotificationConfigsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.ListNotificationConfigsRequest, + com.google.cloud.securitycenter.v2.ListNotificationConfigsResponse> + getListNotificationConfigsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.ListNotificationConfigsRequest, + com.google.cloud.securitycenter.v2.ListNotificationConfigsResponse> + getListNotificationConfigsMethod; + if ((getListNotificationConfigsMethod = SecurityCenterGrpc.getListNotificationConfigsMethod) + == null) { + synchronized (SecurityCenterGrpc.class) { + if ((getListNotificationConfigsMethod = SecurityCenterGrpc.getListNotificationConfigsMethod) + == null) { + SecurityCenterGrpc.getListNotificationConfigsMethod = + getListNotificationConfigsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListNotificationConfigs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.ListNotificationConfigsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.ListNotificationConfigsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier("ListNotificationConfigs")) + .build(); + } + } + } + return getListNotificationConfigsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.ListResourceValueConfigsRequest, + com.google.cloud.securitycenter.v2.ListResourceValueConfigsResponse> + getListResourceValueConfigsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListResourceValueConfigs", + requestType = com.google.cloud.securitycenter.v2.ListResourceValueConfigsRequest.class, + responseType = com.google.cloud.securitycenter.v2.ListResourceValueConfigsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.ListResourceValueConfigsRequest, + com.google.cloud.securitycenter.v2.ListResourceValueConfigsResponse> + getListResourceValueConfigsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.ListResourceValueConfigsRequest, + com.google.cloud.securitycenter.v2.ListResourceValueConfigsResponse> + getListResourceValueConfigsMethod; + if ((getListResourceValueConfigsMethod = SecurityCenterGrpc.getListResourceValueConfigsMethod) + == null) { + synchronized (SecurityCenterGrpc.class) { + if ((getListResourceValueConfigsMethod = + SecurityCenterGrpc.getListResourceValueConfigsMethod) + == null) { + SecurityCenterGrpc.getListResourceValueConfigsMethod = + getListResourceValueConfigsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListResourceValueConfigs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.ListResourceValueConfigsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.ListResourceValueConfigsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier("ListResourceValueConfigs")) + .build(); + } + } + } + return getListResourceValueConfigsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.ListSourcesRequest, + com.google.cloud.securitycenter.v2.ListSourcesResponse> + getListSourcesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListSources", + requestType = com.google.cloud.securitycenter.v2.ListSourcesRequest.class, + responseType = com.google.cloud.securitycenter.v2.ListSourcesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.ListSourcesRequest, + com.google.cloud.securitycenter.v2.ListSourcesResponse> + getListSourcesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.ListSourcesRequest, + com.google.cloud.securitycenter.v2.ListSourcesResponse> + getListSourcesMethod; + if ((getListSourcesMethod = SecurityCenterGrpc.getListSourcesMethod) == null) { + synchronized (SecurityCenterGrpc.class) { + if ((getListSourcesMethod = SecurityCenterGrpc.getListSourcesMethod) == null) { + SecurityCenterGrpc.getListSourcesMethod = + getListSourcesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSources")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.ListSourcesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.ListSourcesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier("ListSources")) + .build(); + } + } + } + return getListSourcesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.ListValuedResourcesRequest, + com.google.cloud.securitycenter.v2.ListValuedResourcesResponse> + getListValuedResourcesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListValuedResources", + requestType = com.google.cloud.securitycenter.v2.ListValuedResourcesRequest.class, + responseType = com.google.cloud.securitycenter.v2.ListValuedResourcesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.ListValuedResourcesRequest, + com.google.cloud.securitycenter.v2.ListValuedResourcesResponse> + getListValuedResourcesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.ListValuedResourcesRequest, + com.google.cloud.securitycenter.v2.ListValuedResourcesResponse> + getListValuedResourcesMethod; + if ((getListValuedResourcesMethod = SecurityCenterGrpc.getListValuedResourcesMethod) == null) { + synchronized (SecurityCenterGrpc.class) { + if ((getListValuedResourcesMethod = SecurityCenterGrpc.getListValuedResourcesMethod) + == null) { + SecurityCenterGrpc.getListValuedResourcesMethod = + getListValuedResourcesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListValuedResources")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.ListValuedResourcesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.ListValuedResourcesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier("ListValuedResources")) + .build(); + } + } + } + return getListValuedResourcesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.SetFindingStateRequest, + com.google.cloud.securitycenter.v2.Finding> + getSetFindingStateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SetFindingState", + requestType = com.google.cloud.securitycenter.v2.SetFindingStateRequest.class, + responseType = com.google.cloud.securitycenter.v2.Finding.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.SetFindingStateRequest, + com.google.cloud.securitycenter.v2.Finding> + getSetFindingStateMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.SetFindingStateRequest, + com.google.cloud.securitycenter.v2.Finding> + getSetFindingStateMethod; + if ((getSetFindingStateMethod = SecurityCenterGrpc.getSetFindingStateMethod) == null) { + synchronized (SecurityCenterGrpc.class) { + if ((getSetFindingStateMethod = SecurityCenterGrpc.getSetFindingStateMethod) == null) { + SecurityCenterGrpc.getSetFindingStateMethod = + getSetFindingStateMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetFindingState")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.SetFindingStateRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.Finding.getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier("SetFindingState")) + .build(); + } + } + } + return getSetFindingStateMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v1.SetIamPolicyRequest, com.google.iam.v1.Policy> + getSetIamPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SetIamPolicy", + requestType = com.google.iam.v1.SetIamPolicyRequest.class, + responseType = com.google.iam.v1.Policy.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v1.SetIamPolicyRequest, com.google.iam.v1.Policy> + getSetIamPolicyMethod() { + io.grpc.MethodDescriptor + getSetIamPolicyMethod; + if ((getSetIamPolicyMethod = SecurityCenterGrpc.getSetIamPolicyMethod) == null) { + synchronized (SecurityCenterGrpc.class) { + if ((getSetIamPolicyMethod = SecurityCenterGrpc.getSetIamPolicyMethod) == null) { + SecurityCenterGrpc.getSetIamPolicyMethod = + getSetIamPolicyMethod = + io.grpc.MethodDescriptor + .newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetIamPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.Policy.getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier("SetIamPolicy")) + .build(); + } + } + } + return getSetIamPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.SetMuteRequest, + com.google.cloud.securitycenter.v2.Finding> + getSetMuteMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SetMute", + requestType = com.google.cloud.securitycenter.v2.SetMuteRequest.class, + responseType = com.google.cloud.securitycenter.v2.Finding.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.SetMuteRequest, + com.google.cloud.securitycenter.v2.Finding> + getSetMuteMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.SetMuteRequest, + com.google.cloud.securitycenter.v2.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.v2.SetMuteRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.Finding.getDefaultInstance())) + .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("SetMute")) + .build(); + } + } + } + return getSetMuteMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v1.TestIamPermissionsRequest, com.google.iam.v1.TestIamPermissionsResponse> + getTestIamPermissionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "TestIamPermissions", + requestType = com.google.iam.v1.TestIamPermissionsRequest.class, + responseType = com.google.iam.v1.TestIamPermissionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v1.TestIamPermissionsRequest, com.google.iam.v1.TestIamPermissionsResponse> + getTestIamPermissionsMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v1.TestIamPermissionsRequest, + com.google.iam.v1.TestIamPermissionsResponse> + getTestIamPermissionsMethod; + if ((getTestIamPermissionsMethod = SecurityCenterGrpc.getTestIamPermissionsMethod) == null) { + synchronized (SecurityCenterGrpc.class) { + if ((getTestIamPermissionsMethod = SecurityCenterGrpc.getTestIamPermissionsMethod) + == null) { + SecurityCenterGrpc.getTestIamPermissionsMethod = + getTestIamPermissionsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "TestIamPermissions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.TestIamPermissionsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier("TestIamPermissions")) + .build(); + } + } + } + return getTestIamPermissionsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.UpdateBigQueryExportRequest, + com.google.cloud.securitycenter.v2.BigQueryExport> + getUpdateBigQueryExportMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateBigQueryExport", + requestType = com.google.cloud.securitycenter.v2.UpdateBigQueryExportRequest.class, + responseType = com.google.cloud.securitycenter.v2.BigQueryExport.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.UpdateBigQueryExportRequest, + com.google.cloud.securitycenter.v2.BigQueryExport> + getUpdateBigQueryExportMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.UpdateBigQueryExportRequest, + com.google.cloud.securitycenter.v2.BigQueryExport> + getUpdateBigQueryExportMethod; + if ((getUpdateBigQueryExportMethod = SecurityCenterGrpc.getUpdateBigQueryExportMethod) + == null) { + synchronized (SecurityCenterGrpc.class) { + if ((getUpdateBigQueryExportMethod = SecurityCenterGrpc.getUpdateBigQueryExportMethod) + == null) { + SecurityCenterGrpc.getUpdateBigQueryExportMethod = + getUpdateBigQueryExportMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateBigQueryExport")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.UpdateBigQueryExportRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.BigQueryExport + .getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier("UpdateBigQueryExport")) + .build(); + } + } + } + return getUpdateBigQueryExportMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.UpdateExternalSystemRequest, + com.google.cloud.securitycenter.v2.ExternalSystem> + getUpdateExternalSystemMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateExternalSystem", + requestType = com.google.cloud.securitycenter.v2.UpdateExternalSystemRequest.class, + responseType = com.google.cloud.securitycenter.v2.ExternalSystem.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.UpdateExternalSystemRequest, + com.google.cloud.securitycenter.v2.ExternalSystem> + getUpdateExternalSystemMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.UpdateExternalSystemRequest, + com.google.cloud.securitycenter.v2.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.v2.UpdateExternalSystemRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.ExternalSystem + .getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier("UpdateExternalSystem")) + .build(); + } + } + } + return getUpdateExternalSystemMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.UpdateFindingRequest, + com.google.cloud.securitycenter.v2.Finding> + getUpdateFindingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateFinding", + requestType = com.google.cloud.securitycenter.v2.UpdateFindingRequest.class, + responseType = com.google.cloud.securitycenter.v2.Finding.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.UpdateFindingRequest, + com.google.cloud.securitycenter.v2.Finding> + getUpdateFindingMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.UpdateFindingRequest, + com.google.cloud.securitycenter.v2.Finding> + getUpdateFindingMethod; + if ((getUpdateFindingMethod = SecurityCenterGrpc.getUpdateFindingMethod) == null) { + synchronized (SecurityCenterGrpc.class) { + if ((getUpdateFindingMethod = SecurityCenterGrpc.getUpdateFindingMethod) == null) { + SecurityCenterGrpc.getUpdateFindingMethod = + getUpdateFindingMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateFinding")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.UpdateFindingRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.Finding.getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier("UpdateFinding")) + .build(); + } + } + } + return getUpdateFindingMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.UpdateMuteConfigRequest, + com.google.cloud.securitycenter.v2.MuteConfig> + getUpdateMuteConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateMuteConfig", + requestType = com.google.cloud.securitycenter.v2.UpdateMuteConfigRequest.class, + responseType = com.google.cloud.securitycenter.v2.MuteConfig.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.UpdateMuteConfigRequest, + com.google.cloud.securitycenter.v2.MuteConfig> + getUpdateMuteConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.UpdateMuteConfigRequest, + com.google.cloud.securitycenter.v2.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.v2.UpdateMuteConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.MuteConfig.getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier("UpdateMuteConfig")) + .build(); + } + } + } + return getUpdateMuteConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.UpdateNotificationConfigRequest, + com.google.cloud.securitycenter.v2.NotificationConfig> + getUpdateNotificationConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateNotificationConfig", + requestType = com.google.cloud.securitycenter.v2.UpdateNotificationConfigRequest.class, + responseType = com.google.cloud.securitycenter.v2.NotificationConfig.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.UpdateNotificationConfigRequest, + com.google.cloud.securitycenter.v2.NotificationConfig> + getUpdateNotificationConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.UpdateNotificationConfigRequest, + com.google.cloud.securitycenter.v2.NotificationConfig> + getUpdateNotificationConfigMethod; + if ((getUpdateNotificationConfigMethod = SecurityCenterGrpc.getUpdateNotificationConfigMethod) + == null) { + synchronized (SecurityCenterGrpc.class) { + if ((getUpdateNotificationConfigMethod = + SecurityCenterGrpc.getUpdateNotificationConfigMethod) + == null) { + SecurityCenterGrpc.getUpdateNotificationConfigMethod = + getUpdateNotificationConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateNotificationConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.UpdateNotificationConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.NotificationConfig + .getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier("UpdateNotificationConfig")) + .build(); + } + } + } + return getUpdateNotificationConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.UpdateResourceValueConfigRequest, + com.google.cloud.securitycenter.v2.ResourceValueConfig> + getUpdateResourceValueConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateResourceValueConfig", + requestType = com.google.cloud.securitycenter.v2.UpdateResourceValueConfigRequest.class, + responseType = com.google.cloud.securitycenter.v2.ResourceValueConfig.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.UpdateResourceValueConfigRequest, + com.google.cloud.securitycenter.v2.ResourceValueConfig> + getUpdateResourceValueConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.UpdateResourceValueConfigRequest, + com.google.cloud.securitycenter.v2.ResourceValueConfig> + getUpdateResourceValueConfigMethod; + if ((getUpdateResourceValueConfigMethod = SecurityCenterGrpc.getUpdateResourceValueConfigMethod) + == null) { + synchronized (SecurityCenterGrpc.class) { + if ((getUpdateResourceValueConfigMethod = + SecurityCenterGrpc.getUpdateResourceValueConfigMethod) + == null) { + SecurityCenterGrpc.getUpdateResourceValueConfigMethod = + getUpdateResourceValueConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateResourceValueConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.UpdateResourceValueConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.ResourceValueConfig + .getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier("UpdateResourceValueConfig")) + .build(); + } + } + } + return getUpdateResourceValueConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.UpdateSecurityMarksRequest, + com.google.cloud.securitycenter.v2.SecurityMarks> + getUpdateSecurityMarksMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateSecurityMarks", + requestType = com.google.cloud.securitycenter.v2.UpdateSecurityMarksRequest.class, + responseType = com.google.cloud.securitycenter.v2.SecurityMarks.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.UpdateSecurityMarksRequest, + com.google.cloud.securitycenter.v2.SecurityMarks> + getUpdateSecurityMarksMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.UpdateSecurityMarksRequest, + com.google.cloud.securitycenter.v2.SecurityMarks> + getUpdateSecurityMarksMethod; + if ((getUpdateSecurityMarksMethod = SecurityCenterGrpc.getUpdateSecurityMarksMethod) == null) { + synchronized (SecurityCenterGrpc.class) { + if ((getUpdateSecurityMarksMethod = SecurityCenterGrpc.getUpdateSecurityMarksMethod) + == null) { + SecurityCenterGrpc.getUpdateSecurityMarksMethod = + getUpdateSecurityMarksMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateSecurityMarks")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.UpdateSecurityMarksRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.SecurityMarks + .getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier("UpdateSecurityMarks")) + .build(); + } + } + } + return getUpdateSecurityMarksMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.UpdateSourceRequest, + com.google.cloud.securitycenter.v2.Source> + getUpdateSourceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateSource", + requestType = com.google.cloud.securitycenter.v2.UpdateSourceRequest.class, + responseType = com.google.cloud.securitycenter.v2.Source.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.UpdateSourceRequest, + com.google.cloud.securitycenter.v2.Source> + getUpdateSourceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v2.UpdateSourceRequest, + com.google.cloud.securitycenter.v2.Source> + getUpdateSourceMethod; + if ((getUpdateSourceMethod = SecurityCenterGrpc.getUpdateSourceMethod) == null) { + synchronized (SecurityCenterGrpc.class) { + if ((getUpdateSourceMethod = SecurityCenterGrpc.getUpdateSourceMethod) == null) { + SecurityCenterGrpc.getUpdateSourceMethod = + getUpdateSourceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateSource")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.UpdateSourceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v2.Source.getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier("UpdateSource")) + .build(); + } + } + } + return getUpdateSourceMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static SecurityCenterStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SecurityCenterStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SecurityCenterStub(channel, callOptions); + } + }; + return SecurityCenterStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static SecurityCenterBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SecurityCenterBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SecurityCenterBlockingStub(channel, callOptions); + } + }; + return SecurityCenterBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static SecurityCenterFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SecurityCenterFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SecurityCenterFutureStub(channel, callOptions); + } + }; + return SecurityCenterFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * V2 APIs for Security Center service.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Creates a ResourceValueConfig for an organization. Maps user's tags to
+     * difference resource values for use by the attack path simulation.
+     * 
+ */ + default void batchCreateResourceValueConfigs( + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getBatchCreateResourceValueConfigsMethod(), responseObserver); + } + + /** + * + * + *
+     * Kicks off an LRO to bulk mute findings for a parent based on a filter. If
+     * no location is specified, findings are muted in global. The parent
+     * can be either an organization, folder, or project. The findings matched by
+     * the filter will be muted after the LRO is done.
+     * 
+ */ + default void bulkMuteFindings( + com.google.cloud.securitycenter.v2.BulkMuteFindingsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getBulkMuteFindingsMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a BigQuery export.
+     * 
+ */ + default void createBigQueryExport( + com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateBigQueryExportMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a finding in a location. The corresponding source must exist for
+     * finding creation to succeed.
+     * 
+ */ + default void createFinding( + com.google.cloud.securitycenter.v2.CreateFindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateFindingMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a mute config.
+     * 
+ */ + default void createMuteConfig( + com.google.cloud.securitycenter.v2.CreateMuteConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateMuteConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a notification config.
+     * 
+ */ + default void createNotificationConfig( + com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateNotificationConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a source.
+     * 
+ */ + default void createSource( + com.google.cloud.securitycenter.v2.CreateSourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateSourceMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes an existing BigQuery export.
+     * 
+ */ + default void deleteBigQueryExport( + com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteBigQueryExportMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes an existing mute config. If no location is specified, default is
+     * global.
+     * 
+ */ + default void deleteMuteConfig( + com.google.cloud.securitycenter.v2.DeleteMuteConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteMuteConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a notification config.
+     * 
+ */ + default void deleteNotificationConfig( + com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteNotificationConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a ResourceValueConfig.
+     * 
+ */ + default void deleteResourceValueConfig( + com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteResourceValueConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a BigQuery export.
+     * 
+ */ + default void getBigQueryExport( + com.google.cloud.securitycenter.v2.GetBigQueryExportRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetBigQueryExportMethod(), responseObserver); + } + + /** + * + * + *
+     * Get the simulation by name or the latest simulation for the given
+     * organization.
+     * 
+ */ + default void getSimulation( + com.google.cloud.securitycenter.v2.GetSimulationRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetSimulationMethod(), responseObserver); + } + + /** + * + * + *
+     * Get the valued resource by name
+     * 
+ */ + default void getValuedResource( + com.google.cloud.securitycenter.v2.GetValuedResourceRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetValuedResourceMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the access control policy on the specified Source.
+     * 
+ */ + default void getIamPolicy( + com.google.iam.v1.GetIamPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetIamPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a mute config. If no location is specified, default is
+     * global.
+     * 
+ */ + default void getMuteConfig( + com.google.cloud.securitycenter.v2.GetMuteConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetMuteConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a notification config.
+     * 
+ */ + default void getNotificationConfig( + com.google.cloud.securitycenter.v2.GetNotificationConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetNotificationConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a ResourceValueConfig.
+     * 
+ */ + default void getResourceValueConfig( + com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetResourceValueConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a source.
+     * 
+ */ + default void getSource( + com.google.cloud.securitycenter.v2.GetSourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSourceMethod(), responseObserver); + } + + /** + * + * + *
+     * Filters an organization or source's findings and groups them by their
+     * specified properties in a location. If no location is specified, findings
+     * are assumed to be in global
+     * To group across all sources provide a `-` as the source id.
+     * The following list shows some examples:
+     * + `/v2/organizations/{organization_id}/sources/-/findings`
+     * +
+     * `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings`
+     * + `/v2/folders/{folder_id}/sources/-/findings`
+     * + `/v2/folders/{folder_id}/sources/-/locations/{location_id}/findings`
+     * + `/v2/projects/{project_id}/sources/-/findings`
+     * + `/v2/projects/{project_id}/sources/-/locations/{location_id}/findings`
+     * 
+ */ + default void groupFindings( + com.google.cloud.securitycenter.v2.GroupFindingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGroupFindingsMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists the attack paths for a set of simulation results or valued resources
+     * and filter.
+     * 
+ */ + default void listAttackPaths( + com.google.cloud.securitycenter.v2.ListAttackPathsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListAttackPathsMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists BigQuery exports. Note that when requesting BigQuery exports at a
+     * given level all exports under that level are also returned e.g. if
+     * requesting BigQuery exports under a folder, then all BigQuery exports
+     * immediately under the folder plus the ones created under the projects
+     * within the folder are returned.
+     * 
+ */ + default void listBigQueryExports( + com.google.cloud.securitycenter.v2.ListBigQueryExportsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListBigQueryExportsMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists an organization or source's findings.
+     * To list across all sources for a given location provide a `-` as the source
+     * id. If no location is specified, finding are assumed to be in global.
+     * The following list shows some examples:
+     * + `/v2/organizations/{organization_id}/sources/-/findings`
+     * +
+     * `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings`
+     * 
+ */ + default void listFindings( + com.google.cloud.securitycenter.v2.ListFindingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListFindingsMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists mute configs. If no location is specified, default is
+     * global.
+     * 
+ */ + default void listMuteConfigs( + com.google.cloud.securitycenter.v2.ListMuteConfigsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListMuteConfigsMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists notification configs.
+     * 
+ */ + default void listNotificationConfigs( + com.google.cloud.securitycenter.v2.ListNotificationConfigsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.securitycenter.v2.ListNotificationConfigsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListNotificationConfigsMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists all ResourceValueConfigs.
+     * 
+ */ + default void listResourceValueConfigs( + com.google.cloud.securitycenter.v2.ListResourceValueConfigsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.securitycenter.v2.ListResourceValueConfigsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListResourceValueConfigsMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists all sources belonging to an organization.
+     * 
+ */ + default void listSources( + com.google.cloud.securitycenter.v2.ListSourcesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListSourcesMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists the valued resources for a set of simulation results and filter.
+     * 
+ */ + default void listValuedResources( + com.google.cloud.securitycenter.v2.ListValuedResourcesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListValuedResourcesMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the state of a finding. If no location is specified, finding is
+     * assumed to be in global
+     * 
+ */ + default void setFindingState( + com.google.cloud.securitycenter.v2.SetFindingStateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSetFindingStateMethod(), responseObserver); + } + + /** + * + * + *
+     * Sets the access control policy on the specified Source.
+     * 
+ */ + default void setIamPolicy( + com.google.iam.v1.SetIamPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSetIamPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the mute state of a finding. If no location is specified, finding
+     * is assumed to be in global
+     * 
+ */ + default void setMute( + com.google.cloud.securitycenter.v2.SetMuteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetMuteMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns the permissions that a caller has on the specified source.
+     * 
+ */ + default void testIamPermissions( + com.google.iam.v1.TestIamPermissionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getTestIamPermissionsMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a BigQuery export.
+     * 
+ */ + default void updateBigQueryExport( + com.google.cloud.securitycenter.v2.UpdateBigQueryExportRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateBigQueryExportMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates external system. This is for a given finding. If no location is
+     * specified, finding is assumed to be in global
+     * 
+ */ + default void updateExternalSystem( + com.google.cloud.securitycenter.v2.UpdateExternalSystemRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateExternalSystemMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates or updates a finding. If no location is specified, finding is
+     * assumed to be in global. The corresponding source must exist for a finding
+     * creation to succeed.
+     * 
+ */ + default void updateFinding( + com.google.cloud.securitycenter.v2.UpdateFindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateFindingMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a mute config. If no location is specified, default is
+     * global.
+     * 
+ */ + default void updateMuteConfig( + com.google.cloud.securitycenter.v2.UpdateMuteConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateMuteConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a notification config. The following update
+     * fields are allowed: description, pubsub_topic, streaming_config.filter
+     * 
+ */ + default void updateNotificationConfig( + com.google.cloud.securitycenter.v2.UpdateNotificationConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateNotificationConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates an existing ResourceValueConfigs with new rules.
+     * 
+ */ + default void updateResourceValueConfig( + com.google.cloud.securitycenter.v2.UpdateResourceValueConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateResourceValueConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates security marks. For Finding Security marks, if no location is
+     * specified, finding is assumed to be in global. Assets Security Marks can
+     * only be accessed through global endpoint.
+     * 
+ */ + default void updateSecurityMarks( + com.google.cloud.securitycenter.v2.UpdateSecurityMarksRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateSecurityMarksMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a source.
+     * 
+ */ + default void updateSource( + com.google.cloud.securitycenter.v2.UpdateSourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateSourceMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service SecurityCenter. + * + *
+   * V2 APIs for Security Center service.
+   * 
+ */ + public abstract static class SecurityCenterImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return SecurityCenterGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service SecurityCenter. + * + *
+   * V2 APIs for Security Center service.
+   * 
+ */ + public static final class SecurityCenterStub + extends io.grpc.stub.AbstractAsyncStub { + private SecurityCenterStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SecurityCenterStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SecurityCenterStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a ResourceValueConfig for an organization. Maps user's tags to
+     * difference resource values for use by the attack path simulation.
+     * 
+ */ + public void batchCreateResourceValueConfigs( + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBatchCreateResourceValueConfigsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Kicks off an LRO to bulk mute findings for a parent based on a filter. If
+     * no location is specified, findings are muted in global. 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.v2.BulkMuteFindingsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBulkMuteFindingsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a BigQuery export.
+     * 
+ */ + public void createBigQueryExport( + com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateBigQueryExportMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a finding in a location. The corresponding source must exist for
+     * finding creation to succeed.
+     * 
+ */ + public void createFinding( + com.google.cloud.securitycenter.v2.CreateFindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateFindingMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a mute config.
+     * 
+ */ + public void createMuteConfig( + com.google.cloud.securitycenter.v2.CreateMuteConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateMuteConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a notification config.
+     * 
+ */ + public void createNotificationConfig( + com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateNotificationConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a source.
+     * 
+ */ + public void createSource( + com.google.cloud.securitycenter.v2.CreateSourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateSourceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes an existing BigQuery export.
+     * 
+ */ + public void deleteBigQueryExport( + com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteBigQueryExportMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes an existing mute config. If no location is specified, default is
+     * global.
+     * 
+ */ + public void deleteMuteConfig( + com.google.cloud.securitycenter.v2.DeleteMuteConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteMuteConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a notification config.
+     * 
+ */ + public void deleteNotificationConfig( + com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteNotificationConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a ResourceValueConfig.
+     * 
+ */ + public void deleteResourceValueConfig( + com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteResourceValueConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a BigQuery export.
+     * 
+ */ + public void getBigQueryExport( + com.google.cloud.securitycenter.v2.GetBigQueryExportRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetBigQueryExportMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Get the simulation by name or the latest simulation for the given
+     * organization.
+     * 
+ */ + public void getSimulation( + com.google.cloud.securitycenter.v2.GetSimulationRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetSimulationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Get the valued resource by name
+     * 
+ */ + public void getValuedResource( + com.google.cloud.securitycenter.v2.GetValuedResourceRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetValuedResourceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the access control policy on the specified Source.
+     * 
+ */ + public void getIamPolicy( + com.google.iam.v1.GetIamPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a mute config. If no location is specified, default is
+     * global.
+     * 
+ */ + public void getMuteConfig( + com.google.cloud.securitycenter.v2.GetMuteConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetMuteConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a notification config.
+     * 
+ */ + public void getNotificationConfig( + com.google.cloud.securitycenter.v2.GetNotificationConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetNotificationConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a ResourceValueConfig.
+     * 
+ */ + public void getResourceValueConfig( + com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetResourceValueConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a source.
+     * 
+ */ + public void getSource( + com.google.cloud.securitycenter.v2.GetSourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetSourceMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Filters an organization or source's findings and groups them by their
+     * specified properties in a location. If no location is specified, findings
+     * are assumed to be in global
+     * To group across all sources provide a `-` as the source id.
+     * The following list shows some examples:
+     * + `/v2/organizations/{organization_id}/sources/-/findings`
+     * +
+     * `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings`
+     * + `/v2/folders/{folder_id}/sources/-/findings`
+     * + `/v2/folders/{folder_id}/sources/-/locations/{location_id}/findings`
+     * + `/v2/projects/{project_id}/sources/-/findings`
+     * + `/v2/projects/{project_id}/sources/-/locations/{location_id}/findings`
+     * 
+ */ + public void groupFindings( + com.google.cloud.securitycenter.v2.GroupFindingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGroupFindingsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists the attack paths for a set of simulation results or valued resources
+     * and filter.
+     * 
+ */ + public void listAttackPaths( + com.google.cloud.securitycenter.v2.ListAttackPathsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAttackPathsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists BigQuery exports. Note that when requesting BigQuery exports at a
+     * given level all exports under that level are also returned e.g. if
+     * requesting BigQuery exports under a folder, then all BigQuery exports
+     * immediately under the folder plus the ones created under the projects
+     * within the folder are returned.
+     * 
+ */ + public void listBigQueryExports( + com.google.cloud.securitycenter.v2.ListBigQueryExportsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListBigQueryExportsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists an organization or source's findings.
+     * To list across all sources for a given location provide a `-` as the source
+     * id. If no location is specified, finding are assumed to be in global.
+     * The following list shows some examples:
+     * + `/v2/organizations/{organization_id}/sources/-/findings`
+     * +
+     * `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings`
+     * 
+ */ + public void listFindings( + com.google.cloud.securitycenter.v2.ListFindingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListFindingsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists mute configs. If no location is specified, default is
+     * global.
+     * 
+ */ + public void listMuteConfigs( + com.google.cloud.securitycenter.v2.ListMuteConfigsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListMuteConfigsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists notification configs.
+     * 
+ */ + public void listNotificationConfigs( + com.google.cloud.securitycenter.v2.ListNotificationConfigsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.securitycenter.v2.ListNotificationConfigsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListNotificationConfigsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists all ResourceValueConfigs.
+     * 
+ */ + public void listResourceValueConfigs( + com.google.cloud.securitycenter.v2.ListResourceValueConfigsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.securitycenter.v2.ListResourceValueConfigsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListResourceValueConfigsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists all sources belonging to an organization.
+     * 
+ */ + public void listSources( + com.google.cloud.securitycenter.v2.ListSourcesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListSourcesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists the valued resources for a set of simulation results and filter.
+     * 
+ */ + public void listValuedResources( + com.google.cloud.securitycenter.v2.ListValuedResourcesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListValuedResourcesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the state of a finding. If no location is specified, finding is
+     * assumed to be in global
+     * 
+ */ + public void setFindingState( + com.google.cloud.securitycenter.v2.SetFindingStateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSetFindingStateMethod(), getCallOptions()), + request, + 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.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSetIamPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the mute state of a finding. If no location is specified, finding
+     * is assumed to be in global
+     * 
+ */ + public void setMute( + com.google.cloud.securitycenter.v2.SetMuteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSetMuteMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Returns the permissions that a caller has on the specified source.
+     * 
+ */ + public void testIamPermissions( + com.google.iam.v1.TestIamPermissionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a BigQuery export.
+     * 
+ */ + public void updateBigQueryExport( + com.google.cloud.securitycenter.v2.UpdateBigQueryExportRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateBigQueryExportMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates external system. This is for a given finding. If no location is
+     * specified, finding is assumed to be in global
+     * 
+ */ + public void updateExternalSystem( + com.google.cloud.securitycenter.v2.UpdateExternalSystemRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateExternalSystemMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates or updates a finding. If no location is specified, finding is
+     * assumed to be in global. The corresponding source must exist for a finding
+     * creation to succeed.
+     * 
+ */ + public void updateFinding( + com.google.cloud.securitycenter.v2.UpdateFindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateFindingMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a mute config. If no location is specified, default is
+     * global.
+     * 
+ */ + public void updateMuteConfig( + com.google.cloud.securitycenter.v2.UpdateMuteConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateMuteConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a notification config. The following update
+     * fields are allowed: description, pubsub_topic, streaming_config.filter
+     * 
+ */ + public void updateNotificationConfig( + com.google.cloud.securitycenter.v2.UpdateNotificationConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateNotificationConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates an existing ResourceValueConfigs with new rules.
+     * 
+ */ + public void updateResourceValueConfig( + com.google.cloud.securitycenter.v2.UpdateResourceValueConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateResourceValueConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates security marks. For Finding Security marks, if no location is
+     * specified, finding is assumed to be in global. Assets Security Marks can
+     * only be accessed through global endpoint.
+     * 
+ */ + public void updateSecurityMarks( + com.google.cloud.securitycenter.v2.UpdateSecurityMarksRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateSecurityMarksMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a source.
+     * 
+ */ + public void updateSource( + com.google.cloud.securitycenter.v2.UpdateSourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateSourceMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service SecurityCenter. + * + *
+   * V2 APIs for Security Center service.
+   * 
+ */ + public static final class SecurityCenterBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private SecurityCenterBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SecurityCenterBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SecurityCenterBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a ResourceValueConfig for an organization. Maps user's tags to
+     * difference resource values for use by the attack path simulation.
+     * 
+ */ + public com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse + batchCreateResourceValueConfigs( + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBatchCreateResourceValueConfigsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Kicks off an LRO to bulk mute findings for a parent based on a filter. If
+     * no location is specified, findings are muted in global. 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.v2.BulkMuteFindingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBulkMuteFindingsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a BigQuery export.
+     * 
+ */ + public com.google.cloud.securitycenter.v2.BigQueryExport createBigQueryExport( + com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateBigQueryExportMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a finding in a location. The corresponding source must exist for
+     * finding creation to succeed.
+     * 
+ */ + public com.google.cloud.securitycenter.v2.Finding createFinding( + com.google.cloud.securitycenter.v2.CreateFindingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateFindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a mute config.
+     * 
+ */ + public com.google.cloud.securitycenter.v2.MuteConfig createMuteConfig( + com.google.cloud.securitycenter.v2.CreateMuteConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateMuteConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a notification config.
+     * 
+ */ + public com.google.cloud.securitycenter.v2.NotificationConfig createNotificationConfig( + com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateNotificationConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a source.
+     * 
+ */ + public com.google.cloud.securitycenter.v2.Source createSource( + com.google.cloud.securitycenter.v2.CreateSourceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateSourceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes an existing BigQuery export.
+     * 
+ */ + public com.google.protobuf.Empty deleteBigQueryExport( + com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteBigQueryExportMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes an existing mute config. If no location is specified, default is
+     * global.
+     * 
+ */ + public com.google.protobuf.Empty deleteMuteConfig( + com.google.cloud.securitycenter.v2.DeleteMuteConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteMuteConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a notification config.
+     * 
+ */ + public com.google.protobuf.Empty deleteNotificationConfig( + com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteNotificationConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a ResourceValueConfig.
+     * 
+ */ + public com.google.protobuf.Empty deleteResourceValueConfig( + com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteResourceValueConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a BigQuery export.
+     * 
+ */ + public com.google.cloud.securitycenter.v2.BigQueryExport getBigQueryExport( + com.google.cloud.securitycenter.v2.GetBigQueryExportRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetBigQueryExportMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get the simulation by name or the latest simulation for the given
+     * organization.
+     * 
+ */ + public com.google.cloud.securitycenter.v2.Simulation getSimulation( + com.google.cloud.securitycenter.v2.GetSimulationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetSimulationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get the valued resource by name
+     * 
+ */ + public com.google.cloud.securitycenter.v2.ValuedResource getValuedResource( + com.google.cloud.securitycenter.v2.GetValuedResourceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetValuedResourceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the access control policy on the specified Source.
+     * 
+ */ + public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetIamPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a mute config. If no location is specified, default is
+     * global.
+     * 
+ */ + public com.google.cloud.securitycenter.v2.MuteConfig getMuteConfig( + com.google.cloud.securitycenter.v2.GetMuteConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetMuteConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a notification config.
+     * 
+ */ + public com.google.cloud.securitycenter.v2.NotificationConfig getNotificationConfig( + com.google.cloud.securitycenter.v2.GetNotificationConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetNotificationConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a ResourceValueConfig.
+     * 
+ */ + public com.google.cloud.securitycenter.v2.ResourceValueConfig getResourceValueConfig( + com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetResourceValueConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a source.
+     * 
+ */ + public com.google.cloud.securitycenter.v2.Source getSource( + com.google.cloud.securitycenter.v2.GetSourceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetSourceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Filters an organization or source's findings and groups them by their
+     * specified properties in a location. If no location is specified, findings
+     * are assumed to be in global
+     * To group across all sources provide a `-` as the source id.
+     * The following list shows some examples:
+     * + `/v2/organizations/{organization_id}/sources/-/findings`
+     * +
+     * `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings`
+     * + `/v2/folders/{folder_id}/sources/-/findings`
+     * + `/v2/folders/{folder_id}/sources/-/locations/{location_id}/findings`
+     * + `/v2/projects/{project_id}/sources/-/findings`
+     * + `/v2/projects/{project_id}/sources/-/locations/{location_id}/findings`
+     * 
+ */ + public com.google.cloud.securitycenter.v2.GroupFindingsResponse groupFindings( + com.google.cloud.securitycenter.v2.GroupFindingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGroupFindingsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists the attack paths for a set of simulation results or valued resources
+     * and filter.
+     * 
+ */ + public com.google.cloud.securitycenter.v2.ListAttackPathsResponse listAttackPaths( + com.google.cloud.securitycenter.v2.ListAttackPathsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAttackPathsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists BigQuery exports. Note that when requesting BigQuery exports at a
+     * given level all exports under that level are also returned e.g. if
+     * requesting BigQuery exports under a folder, then all BigQuery exports
+     * immediately under the folder plus the ones created under the projects
+     * within the folder are returned.
+     * 
+ */ + public com.google.cloud.securitycenter.v2.ListBigQueryExportsResponse listBigQueryExports( + com.google.cloud.securitycenter.v2.ListBigQueryExportsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListBigQueryExportsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists an organization or source's findings.
+     * To list across all sources for a given location provide a `-` as the source
+     * id. If no location is specified, finding are assumed to be in global.
+     * The following list shows some examples:
+     * + `/v2/organizations/{organization_id}/sources/-/findings`
+     * +
+     * `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings`
+     * 
+ */ + public com.google.cloud.securitycenter.v2.ListFindingsResponse listFindings( + com.google.cloud.securitycenter.v2.ListFindingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListFindingsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists mute configs. If no location is specified, default is
+     * global.
+     * 
+ */ + public com.google.cloud.securitycenter.v2.ListMuteConfigsResponse listMuteConfigs( + com.google.cloud.securitycenter.v2.ListMuteConfigsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListMuteConfigsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists notification configs.
+     * 
+ */ + public com.google.cloud.securitycenter.v2.ListNotificationConfigsResponse + listNotificationConfigs( + com.google.cloud.securitycenter.v2.ListNotificationConfigsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListNotificationConfigsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists all ResourceValueConfigs.
+     * 
+ */ + public com.google.cloud.securitycenter.v2.ListResourceValueConfigsResponse + listResourceValueConfigs( + com.google.cloud.securitycenter.v2.ListResourceValueConfigsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListResourceValueConfigsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists all sources belonging to an organization.
+     * 
+ */ + public com.google.cloud.securitycenter.v2.ListSourcesResponse listSources( + com.google.cloud.securitycenter.v2.ListSourcesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListSourcesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists the valued resources for a set of simulation results and filter.
+     * 
+ */ + public com.google.cloud.securitycenter.v2.ListValuedResourcesResponse listValuedResources( + com.google.cloud.securitycenter.v2.ListValuedResourcesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListValuedResourcesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the state of a finding. If no location is specified, finding is
+     * assumed to be in global
+     * 
+ */ + public com.google.cloud.securitycenter.v2.Finding setFindingState( + com.google.cloud.securitycenter.v2.SetFindingStateRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSetFindingStateMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Sets the access control policy on the specified Source.
+     * 
+ */ + public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSetIamPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the mute state of a finding. If no location is specified, finding
+     * is assumed to be in global
+     * 
+ */ + public com.google.cloud.securitycenter.v2.Finding setMute( + com.google.cloud.securitycenter.v2.SetMuteRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSetMuteMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns the permissions that a caller has on the specified source.
+     * 
+ */ + public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions( + com.google.iam.v1.TestIamPermissionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getTestIamPermissionsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a BigQuery export.
+     * 
+ */ + public com.google.cloud.securitycenter.v2.BigQueryExport updateBigQueryExport( + com.google.cloud.securitycenter.v2.UpdateBigQueryExportRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateBigQueryExportMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates external system. This is for a given finding. If no location is
+     * specified, finding is assumed to be in global
+     * 
+ */ + public com.google.cloud.securitycenter.v2.ExternalSystem updateExternalSystem( + com.google.cloud.securitycenter.v2.UpdateExternalSystemRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateExternalSystemMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates or updates a finding. If no location is specified, finding is
+     * assumed to be in global. The corresponding source must exist for a finding
+     * creation to succeed.
+     * 
+ */ + public com.google.cloud.securitycenter.v2.Finding updateFinding( + com.google.cloud.securitycenter.v2.UpdateFindingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateFindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a mute config. If no location is specified, default is
+     * global.
+     * 
+ */ + public com.google.cloud.securitycenter.v2.MuteConfig updateMuteConfig( + com.google.cloud.securitycenter.v2.UpdateMuteConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateMuteConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a notification config. The following update
+     * fields are allowed: description, pubsub_topic, streaming_config.filter
+     * 
+ */ + public com.google.cloud.securitycenter.v2.NotificationConfig updateNotificationConfig( + com.google.cloud.securitycenter.v2.UpdateNotificationConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateNotificationConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates an existing ResourceValueConfigs with new rules.
+     * 
+ */ + public com.google.cloud.securitycenter.v2.ResourceValueConfig updateResourceValueConfig( + com.google.cloud.securitycenter.v2.UpdateResourceValueConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateResourceValueConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates security marks. For Finding Security marks, if no location is
+     * specified, finding is assumed to be in global. Assets Security Marks can
+     * only be accessed through global endpoint.
+     * 
+ */ + public com.google.cloud.securitycenter.v2.SecurityMarks updateSecurityMarks( + com.google.cloud.securitycenter.v2.UpdateSecurityMarksRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateSecurityMarksMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a source.
+     * 
+ */ + public com.google.cloud.securitycenter.v2.Source updateSource( + com.google.cloud.securitycenter.v2.UpdateSourceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateSourceMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service SecurityCenter. + * + *
+   * V2 APIs for Security Center service.
+   * 
+ */ + public static final class SecurityCenterFutureStub + extends io.grpc.stub.AbstractFutureStub { + private SecurityCenterFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SecurityCenterFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SecurityCenterFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a ResourceValueConfig for an organization. Maps user's tags to
+     * difference resource values for use by the attack path simulation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse> + batchCreateResourceValueConfigs( + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBatchCreateResourceValueConfigsMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Kicks off an LRO to bulk mute findings for a parent based on a filter. If
+     * no location is specified, findings are muted in global. 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.v2.BulkMuteFindingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBulkMuteFindingsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a BigQuery export.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v2.BigQueryExport> + createBigQueryExport( + com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateBigQueryExportMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a finding in a location. The corresponding source must exist for
+     * finding creation to succeed.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v2.Finding> + createFinding(com.google.cloud.securitycenter.v2.CreateFindingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateFindingMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a mute config.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v2.MuteConfig> + createMuteConfig(com.google.cloud.securitycenter.v2.CreateMuteConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateMuteConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a notification config.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v2.NotificationConfig> + createNotificationConfig( + com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateNotificationConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a source.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v2.Source> + createSource(com.google.cloud.securitycenter.v2.CreateSourceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateSourceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes an existing BigQuery export.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteBigQueryExport( + com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteBigQueryExportMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes an existing mute config. If no location is specified, default is
+     * global.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteMuteConfig(com.google.cloud.securitycenter.v2.DeleteMuteConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteMuteConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a notification config.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteNotificationConfig( + com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteNotificationConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a ResourceValueConfig.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteResourceValueConfig( + com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteResourceValueConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a BigQuery export.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v2.BigQueryExport> + getBigQueryExport(com.google.cloud.securitycenter.v2.GetBigQueryExportRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetBigQueryExportMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Get the simulation by name or the latest simulation for the given
+     * organization.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v2.Simulation> + getSimulation(com.google.cloud.securitycenter.v2.GetSimulationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetSimulationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Get the valued resource by name
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v2.ValuedResource> + getValuedResource(com.google.cloud.securitycenter.v2.GetValuedResourceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetValuedResourceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the access control policy on the specified Source.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a mute config. If no location is specified, default is
+     * global.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v2.MuteConfig> + getMuteConfig(com.google.cloud.securitycenter.v2.GetMuteConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetMuteConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a notification config.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v2.NotificationConfig> + getNotificationConfig( + com.google.cloud.securitycenter.v2.GetNotificationConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetNotificationConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a ResourceValueConfig.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v2.ResourceValueConfig> + getResourceValueConfig( + com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetResourceValueConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a source.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v2.Source> + getSource(com.google.cloud.securitycenter.v2.GetSourceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetSourceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Filters an organization or source's findings and groups them by their
+     * specified properties in a location. If no location is specified, findings
+     * are assumed to be in global
+     * To group across all sources provide a `-` as the source id.
+     * The following list shows some examples:
+     * + `/v2/organizations/{organization_id}/sources/-/findings`
+     * +
+     * `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings`
+     * + `/v2/folders/{folder_id}/sources/-/findings`
+     * + `/v2/folders/{folder_id}/sources/-/locations/{location_id}/findings`
+     * + `/v2/projects/{project_id}/sources/-/findings`
+     * + `/v2/projects/{project_id}/sources/-/locations/{location_id}/findings`
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v2.GroupFindingsResponse> + groupFindings(com.google.cloud.securitycenter.v2.GroupFindingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGroupFindingsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists the attack paths for a set of simulation results or valued resources
+     * and filter.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v2.ListAttackPathsResponse> + listAttackPaths(com.google.cloud.securitycenter.v2.ListAttackPathsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAttackPathsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists BigQuery exports. Note that when requesting BigQuery exports at a
+     * given level all exports under that level are also returned e.g. if
+     * requesting BigQuery exports under a folder, then all BigQuery exports
+     * immediately under the folder plus the ones created under the projects
+     * within the folder are returned.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v2.ListBigQueryExportsResponse> + listBigQueryExports(com.google.cloud.securitycenter.v2.ListBigQueryExportsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListBigQueryExportsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists an organization or source's findings.
+     * To list across all sources for a given location provide a `-` as the source
+     * id. If no location is specified, finding are assumed to be in global.
+     * The following list shows some examples:
+     * + `/v2/organizations/{organization_id}/sources/-/findings`
+     * +
+     * `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings`
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v2.ListFindingsResponse> + listFindings(com.google.cloud.securitycenter.v2.ListFindingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListFindingsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists mute configs. If no location is specified, default is
+     * global.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v2.ListMuteConfigsResponse> + listMuteConfigs(com.google.cloud.securitycenter.v2.ListMuteConfigsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListMuteConfigsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists notification configs.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v2.ListNotificationConfigsResponse> + listNotificationConfigs( + com.google.cloud.securitycenter.v2.ListNotificationConfigsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListNotificationConfigsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists all ResourceValueConfigs.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v2.ListResourceValueConfigsResponse> + listResourceValueConfigs( + com.google.cloud.securitycenter.v2.ListResourceValueConfigsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListResourceValueConfigsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists all sources belonging to an organization.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v2.ListSourcesResponse> + listSources(com.google.cloud.securitycenter.v2.ListSourcesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListSourcesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists the valued resources for a set of simulation results and filter.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v2.ListValuedResourcesResponse> + listValuedResources(com.google.cloud.securitycenter.v2.ListValuedResourcesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListValuedResourcesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the state of a finding. If no location is specified, finding is
+     * assumed to be in global
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v2.Finding> + setFindingState(com.google.cloud.securitycenter.v2.SetFindingStateRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSetFindingStateMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Sets the access control policy on the specified Source.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSetIamPolicyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the mute state of a finding. If no location is specified, finding
+     * is assumed to be in global
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v2.Finding> + setMute(com.google.cloud.securitycenter.v2.SetMuteRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSetMuteMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns the permissions that a caller has on the specified source.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.iam.v1.TestIamPermissionsResponse> + testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a BigQuery export.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v2.BigQueryExport> + updateBigQueryExport( + com.google.cloud.securitycenter.v2.UpdateBigQueryExportRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateBigQueryExportMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates external system. This is for a given finding. If no location is
+     * specified, finding is assumed to be in global
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v2.ExternalSystem> + updateExternalSystem( + com.google.cloud.securitycenter.v2.UpdateExternalSystemRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateExternalSystemMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates or updates a finding. If no location is specified, finding is
+     * assumed to be in global. The corresponding source must exist for a finding
+     * creation to succeed.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v2.Finding> + updateFinding(com.google.cloud.securitycenter.v2.UpdateFindingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateFindingMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a mute config. If no location is specified, default is
+     * global.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v2.MuteConfig> + updateMuteConfig(com.google.cloud.securitycenter.v2.UpdateMuteConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateMuteConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a notification config. The following update
+     * fields are allowed: description, pubsub_topic, streaming_config.filter
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v2.NotificationConfig> + updateNotificationConfig( + com.google.cloud.securitycenter.v2.UpdateNotificationConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateNotificationConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates an existing ResourceValueConfigs with new rules.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v2.ResourceValueConfig> + updateResourceValueConfig( + com.google.cloud.securitycenter.v2.UpdateResourceValueConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateResourceValueConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates security marks. For Finding Security marks, if no location is
+     * specified, finding is assumed to be in global. Assets Security Marks can
+     * only be accessed through global endpoint.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v2.SecurityMarks> + updateSecurityMarks(com.google.cloud.securitycenter.v2.UpdateSecurityMarksRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateSecurityMarksMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a source.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v2.Source> + updateSource(com.google.cloud.securitycenter.v2.UpdateSourceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateSourceMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_BATCH_CREATE_RESOURCE_VALUE_CONFIGS = 0; + private static final int METHODID_BULK_MUTE_FINDINGS = 1; + private static final int METHODID_CREATE_BIG_QUERY_EXPORT = 2; + private static final int METHODID_CREATE_FINDING = 3; + private static final int METHODID_CREATE_MUTE_CONFIG = 4; + private static final int METHODID_CREATE_NOTIFICATION_CONFIG = 5; + private static final int METHODID_CREATE_SOURCE = 6; + private static final int METHODID_DELETE_BIG_QUERY_EXPORT = 7; + private static final int METHODID_DELETE_MUTE_CONFIG = 8; + private static final int METHODID_DELETE_NOTIFICATION_CONFIG = 9; + private static final int METHODID_DELETE_RESOURCE_VALUE_CONFIG = 10; + private static final int METHODID_GET_BIG_QUERY_EXPORT = 11; + private static final int METHODID_GET_SIMULATION = 12; + private static final int METHODID_GET_VALUED_RESOURCE = 13; + private static final int METHODID_GET_IAM_POLICY = 14; + private static final int METHODID_GET_MUTE_CONFIG = 15; + private static final int METHODID_GET_NOTIFICATION_CONFIG = 16; + private static final int METHODID_GET_RESOURCE_VALUE_CONFIG = 17; + private static final int METHODID_GET_SOURCE = 18; + private static final int METHODID_GROUP_FINDINGS = 19; + private static final int METHODID_LIST_ATTACK_PATHS = 20; + private static final int METHODID_LIST_BIG_QUERY_EXPORTS = 21; + private static final int METHODID_LIST_FINDINGS = 22; + private static final int METHODID_LIST_MUTE_CONFIGS = 23; + private static final int METHODID_LIST_NOTIFICATION_CONFIGS = 24; + private static final int METHODID_LIST_RESOURCE_VALUE_CONFIGS = 25; + private static final int METHODID_LIST_SOURCES = 26; + private static final int METHODID_LIST_VALUED_RESOURCES = 27; + private static final int METHODID_SET_FINDING_STATE = 28; + private static final int METHODID_SET_IAM_POLICY = 29; + private static final int METHODID_SET_MUTE = 30; + private static final int METHODID_TEST_IAM_PERMISSIONS = 31; + private static final int METHODID_UPDATE_BIG_QUERY_EXPORT = 32; + private static final int METHODID_UPDATE_EXTERNAL_SYSTEM = 33; + private static final int METHODID_UPDATE_FINDING = 34; + private static final int METHODID_UPDATE_MUTE_CONFIG = 35; + private static final int METHODID_UPDATE_NOTIFICATION_CONFIG = 36; + private static final int METHODID_UPDATE_RESOURCE_VALUE_CONFIG = 37; + private static final int METHODID_UPDATE_SECURITY_MARKS = 38; + private static final int METHODID_UPDATE_SOURCE = 39; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_BATCH_CREATE_RESOURCE_VALUE_CONFIGS: + serviceImpl.batchCreateResourceValueConfigs( + (com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse>) + responseObserver); + break; + case METHODID_BULK_MUTE_FINDINGS: + serviceImpl.bulkMuteFindings( + (com.google.cloud.securitycenter.v2.BulkMuteFindingsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_BIG_QUERY_EXPORT: + serviceImpl.createBigQueryExport( + (com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_FINDING: + serviceImpl.createFinding( + (com.google.cloud.securitycenter.v2.CreateFindingRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_MUTE_CONFIG: + serviceImpl.createMuteConfig( + (com.google.cloud.securitycenter.v2.CreateMuteConfigRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_NOTIFICATION_CONFIG: + serviceImpl.createNotificationConfig( + (com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_SOURCE: + serviceImpl.createSource( + (com.google.cloud.securitycenter.v2.CreateSourceRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_BIG_QUERY_EXPORT: + serviceImpl.deleteBigQueryExport( + (com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_MUTE_CONFIG: + serviceImpl.deleteMuteConfig( + (com.google.cloud.securitycenter.v2.DeleteMuteConfigRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_NOTIFICATION_CONFIG: + serviceImpl.deleteNotificationConfig( + (com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_RESOURCE_VALUE_CONFIG: + serviceImpl.deleteResourceValueConfig( + (com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_BIG_QUERY_EXPORT: + serviceImpl.getBigQueryExport( + (com.google.cloud.securitycenter.v2.GetBigQueryExportRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_SIMULATION: + serviceImpl.getSimulation( + (com.google.cloud.securitycenter.v2.GetSimulationRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_VALUED_RESOURCE: + serviceImpl.getValuedResource( + (com.google.cloud.securitycenter.v2.GetValuedResourceRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_IAM_POLICY: + serviceImpl.getIamPolicy( + (com.google.iam.v1.GetIamPolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_MUTE_CONFIG: + serviceImpl.getMuteConfig( + (com.google.cloud.securitycenter.v2.GetMuteConfigRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_NOTIFICATION_CONFIG: + serviceImpl.getNotificationConfig( + (com.google.cloud.securitycenter.v2.GetNotificationConfigRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_RESOURCE_VALUE_CONFIG: + serviceImpl.getResourceValueConfig( + (com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_SOURCE: + serviceImpl.getSource( + (com.google.cloud.securitycenter.v2.GetSourceRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GROUP_FINDINGS: + serviceImpl.groupFindings( + (com.google.cloud.securitycenter.v2.GroupFindingsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.securitycenter.v2.GroupFindingsResponse>) + responseObserver); + break; + case METHODID_LIST_ATTACK_PATHS: + serviceImpl.listAttackPaths( + (com.google.cloud.securitycenter.v2.ListAttackPathsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.securitycenter.v2.ListAttackPathsResponse>) + responseObserver); + break; + case METHODID_LIST_BIG_QUERY_EXPORTS: + serviceImpl.listBigQueryExports( + (com.google.cloud.securitycenter.v2.ListBigQueryExportsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.securitycenter.v2.ListBigQueryExportsResponse>) + responseObserver); + break; + case METHODID_LIST_FINDINGS: + serviceImpl.listFindings( + (com.google.cloud.securitycenter.v2.ListFindingsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_MUTE_CONFIGS: + serviceImpl.listMuteConfigs( + (com.google.cloud.securitycenter.v2.ListMuteConfigsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.securitycenter.v2.ListMuteConfigsResponse>) + responseObserver); + break; + case METHODID_LIST_NOTIFICATION_CONFIGS: + serviceImpl.listNotificationConfigs( + (com.google.cloud.securitycenter.v2.ListNotificationConfigsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.securitycenter.v2.ListNotificationConfigsResponse>) + responseObserver); + break; + case METHODID_LIST_RESOURCE_VALUE_CONFIGS: + serviceImpl.listResourceValueConfigs( + (com.google.cloud.securitycenter.v2.ListResourceValueConfigsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.securitycenter.v2.ListResourceValueConfigsResponse>) + responseObserver); + break; + case METHODID_LIST_SOURCES: + serviceImpl.listSources( + (com.google.cloud.securitycenter.v2.ListSourcesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_VALUED_RESOURCES: + serviceImpl.listValuedResources( + (com.google.cloud.securitycenter.v2.ListValuedResourcesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.securitycenter.v2.ListValuedResourcesResponse>) + responseObserver); + break; + case METHODID_SET_FINDING_STATE: + serviceImpl.setFindingState( + (com.google.cloud.securitycenter.v2.SetFindingStateRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_SET_IAM_POLICY: + serviceImpl.setIamPolicy( + (com.google.iam.v1.SetIamPolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SET_MUTE: + serviceImpl.setMute( + (com.google.cloud.securitycenter.v2.SetMuteRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_TEST_IAM_PERMISSIONS: + serviceImpl.testIamPermissions( + (com.google.iam.v1.TestIamPermissionsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_BIG_QUERY_EXPORT: + serviceImpl.updateBigQueryExport( + (com.google.cloud.securitycenter.v2.UpdateBigQueryExportRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_EXTERNAL_SYSTEM: + serviceImpl.updateExternalSystem( + (com.google.cloud.securitycenter.v2.UpdateExternalSystemRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_FINDING: + serviceImpl.updateFinding( + (com.google.cloud.securitycenter.v2.UpdateFindingRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_MUTE_CONFIG: + serviceImpl.updateMuteConfig( + (com.google.cloud.securitycenter.v2.UpdateMuteConfigRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_NOTIFICATION_CONFIG: + serviceImpl.updateNotificationConfig( + (com.google.cloud.securitycenter.v2.UpdateNotificationConfigRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_RESOURCE_VALUE_CONFIG: + serviceImpl.updateResourceValueConfig( + (com.google.cloud.securitycenter.v2.UpdateResourceValueConfigRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_SECURITY_MARKS: + serviceImpl.updateSecurityMarks( + (com.google.cloud.securitycenter.v2.UpdateSecurityMarksRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_SOURCE: + serviceImpl.updateSource( + (com.google.cloud.securitycenter.v2.UpdateSourceRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getBatchCreateResourceValueConfigsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest, + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse>( + service, METHODID_BATCH_CREATE_RESOURCE_VALUE_CONFIGS))) + .addMethod( + getBulkMuteFindingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.BulkMuteFindingsRequest, + com.google.longrunning.Operation>(service, METHODID_BULK_MUTE_FINDINGS))) + .addMethod( + getCreateBigQueryExportMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest, + com.google.cloud.securitycenter.v2.BigQueryExport>( + service, METHODID_CREATE_BIG_QUERY_EXPORT))) + .addMethod( + getCreateFindingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.CreateFindingRequest, + com.google.cloud.securitycenter.v2.Finding>(service, METHODID_CREATE_FINDING))) + .addMethod( + getCreateMuteConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.CreateMuteConfigRequest, + com.google.cloud.securitycenter.v2.MuteConfig>( + service, METHODID_CREATE_MUTE_CONFIG))) + .addMethod( + getCreateNotificationConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest, + com.google.cloud.securitycenter.v2.NotificationConfig>( + service, METHODID_CREATE_NOTIFICATION_CONFIG))) + .addMethod( + getCreateSourceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.CreateSourceRequest, + com.google.cloud.securitycenter.v2.Source>(service, METHODID_CREATE_SOURCE))) + .addMethod( + getDeleteBigQueryExportMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest, + com.google.protobuf.Empty>(service, METHODID_DELETE_BIG_QUERY_EXPORT))) + .addMethod( + getDeleteMuteConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.DeleteMuteConfigRequest, + com.google.protobuf.Empty>(service, METHODID_DELETE_MUTE_CONFIG))) + .addMethod( + getDeleteNotificationConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest, + com.google.protobuf.Empty>(service, METHODID_DELETE_NOTIFICATION_CONFIG))) + .addMethod( + getDeleteResourceValueConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest, + com.google.protobuf.Empty>(service, METHODID_DELETE_RESOURCE_VALUE_CONFIG))) + .addMethod( + getGetBigQueryExportMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.GetBigQueryExportRequest, + com.google.cloud.securitycenter.v2.BigQueryExport>( + service, METHODID_GET_BIG_QUERY_EXPORT))) + .addMethod( + getGetSimulationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.GetSimulationRequest, + com.google.cloud.securitycenter.v2.Simulation>( + service, METHODID_GET_SIMULATION))) + .addMethod( + getGetValuedResourceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.GetValuedResourceRequest, + com.google.cloud.securitycenter.v2.ValuedResource>( + service, METHODID_GET_VALUED_RESOURCE))) + .addMethod( + getGetIamPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers( + service, METHODID_GET_IAM_POLICY))) + .addMethod( + getGetMuteConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.GetMuteConfigRequest, + com.google.cloud.securitycenter.v2.MuteConfig>( + service, METHODID_GET_MUTE_CONFIG))) + .addMethod( + getGetNotificationConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.GetNotificationConfigRequest, + com.google.cloud.securitycenter.v2.NotificationConfig>( + service, METHODID_GET_NOTIFICATION_CONFIG))) + .addMethod( + getGetResourceValueConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest, + com.google.cloud.securitycenter.v2.ResourceValueConfig>( + service, METHODID_GET_RESOURCE_VALUE_CONFIG))) + .addMethod( + getGetSourceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.GetSourceRequest, + com.google.cloud.securitycenter.v2.Source>(service, METHODID_GET_SOURCE))) + .addMethod( + getGroupFindingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.GroupFindingsRequest, + com.google.cloud.securitycenter.v2.GroupFindingsResponse>( + service, METHODID_GROUP_FINDINGS))) + .addMethod( + getListAttackPathsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.ListAttackPathsRequest, + com.google.cloud.securitycenter.v2.ListAttackPathsResponse>( + service, METHODID_LIST_ATTACK_PATHS))) + .addMethod( + getListBigQueryExportsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.ListBigQueryExportsRequest, + com.google.cloud.securitycenter.v2.ListBigQueryExportsResponse>( + service, METHODID_LIST_BIG_QUERY_EXPORTS))) + .addMethod( + getListFindingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.ListFindingsRequest, + com.google.cloud.securitycenter.v2.ListFindingsResponse>( + service, METHODID_LIST_FINDINGS))) + .addMethod( + getListMuteConfigsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.ListMuteConfigsRequest, + com.google.cloud.securitycenter.v2.ListMuteConfigsResponse>( + service, METHODID_LIST_MUTE_CONFIGS))) + .addMethod( + getListNotificationConfigsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.ListNotificationConfigsRequest, + com.google.cloud.securitycenter.v2.ListNotificationConfigsResponse>( + service, METHODID_LIST_NOTIFICATION_CONFIGS))) + .addMethod( + getListResourceValueConfigsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.ListResourceValueConfigsRequest, + com.google.cloud.securitycenter.v2.ListResourceValueConfigsResponse>( + service, METHODID_LIST_RESOURCE_VALUE_CONFIGS))) + .addMethod( + getListSourcesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.ListSourcesRequest, + com.google.cloud.securitycenter.v2.ListSourcesResponse>( + service, METHODID_LIST_SOURCES))) + .addMethod( + getListValuedResourcesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.ListValuedResourcesRequest, + com.google.cloud.securitycenter.v2.ListValuedResourcesResponse>( + service, METHODID_LIST_VALUED_RESOURCES))) + .addMethod( + getSetFindingStateMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.SetFindingStateRequest, + com.google.cloud.securitycenter.v2.Finding>( + service, METHODID_SET_FINDING_STATE))) + .addMethod( + getSetIamPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers( + service, METHODID_SET_IAM_POLICY))) + .addMethod( + getSetMuteMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.SetMuteRequest, + com.google.cloud.securitycenter.v2.Finding>(service, METHODID_SET_MUTE))) + .addMethod( + getTestIamPermissionsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v1.TestIamPermissionsRequest, + com.google.iam.v1.TestIamPermissionsResponse>( + service, METHODID_TEST_IAM_PERMISSIONS))) + .addMethod( + getUpdateBigQueryExportMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.UpdateBigQueryExportRequest, + com.google.cloud.securitycenter.v2.BigQueryExport>( + service, METHODID_UPDATE_BIG_QUERY_EXPORT))) + .addMethod( + getUpdateExternalSystemMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.UpdateExternalSystemRequest, + com.google.cloud.securitycenter.v2.ExternalSystem>( + service, METHODID_UPDATE_EXTERNAL_SYSTEM))) + .addMethod( + getUpdateFindingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.UpdateFindingRequest, + com.google.cloud.securitycenter.v2.Finding>(service, METHODID_UPDATE_FINDING))) + .addMethod( + getUpdateMuteConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.UpdateMuteConfigRequest, + com.google.cloud.securitycenter.v2.MuteConfig>( + service, METHODID_UPDATE_MUTE_CONFIG))) + .addMethod( + getUpdateNotificationConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.UpdateNotificationConfigRequest, + com.google.cloud.securitycenter.v2.NotificationConfig>( + service, METHODID_UPDATE_NOTIFICATION_CONFIG))) + .addMethod( + getUpdateResourceValueConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.UpdateResourceValueConfigRequest, + com.google.cloud.securitycenter.v2.ResourceValueConfig>( + service, METHODID_UPDATE_RESOURCE_VALUE_CONFIG))) + .addMethod( + getUpdateSecurityMarksMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.UpdateSecurityMarksRequest, + com.google.cloud.securitycenter.v2.SecurityMarks>( + service, METHODID_UPDATE_SECURITY_MARKS))) + .addMethod( + getUpdateSourceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v2.UpdateSourceRequest, + com.google.cloud.securitycenter.v2.Source>(service, METHODID_UPDATE_SOURCE))) + .build(); + } + + private abstract static class SecurityCenterBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + SecurityCenterBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("SecurityCenter"); + } + } + + private static final class SecurityCenterFileDescriptorSupplier + extends SecurityCenterBaseDescriptorSupplier { + SecurityCenterFileDescriptorSupplier() {} + } + + private static final class SecurityCenterMethodDescriptorSupplier + extends SecurityCenterBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + SecurityCenterMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (SecurityCenterGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new SecurityCenterFileDescriptorSupplier()) + .addMethod(getBatchCreateResourceValueConfigsMethod()) + .addMethod(getBulkMuteFindingsMethod()) + .addMethod(getCreateBigQueryExportMethod()) + .addMethod(getCreateFindingMethod()) + .addMethod(getCreateMuteConfigMethod()) + .addMethod(getCreateNotificationConfigMethod()) + .addMethod(getCreateSourceMethod()) + .addMethod(getDeleteBigQueryExportMethod()) + .addMethod(getDeleteMuteConfigMethod()) + .addMethod(getDeleteNotificationConfigMethod()) + .addMethod(getDeleteResourceValueConfigMethod()) + .addMethod(getGetBigQueryExportMethod()) + .addMethod(getGetSimulationMethod()) + .addMethod(getGetValuedResourceMethod()) + .addMethod(getGetIamPolicyMethod()) + .addMethod(getGetMuteConfigMethod()) + .addMethod(getGetNotificationConfigMethod()) + .addMethod(getGetResourceValueConfigMethod()) + .addMethod(getGetSourceMethod()) + .addMethod(getGroupFindingsMethod()) + .addMethod(getListAttackPathsMethod()) + .addMethod(getListBigQueryExportsMethod()) + .addMethod(getListFindingsMethod()) + .addMethod(getListMuteConfigsMethod()) + .addMethod(getListNotificationConfigsMethod()) + .addMethod(getListResourceValueConfigsMethod()) + .addMethod(getListSourcesMethod()) + .addMethod(getListValuedResourcesMethod()) + .addMethod(getSetFindingStateMethod()) + .addMethod(getSetIamPolicyMethod()) + .addMethod(getSetMuteMethod()) + .addMethod(getTestIamPermissionsMethod()) + .addMethod(getUpdateBigQueryExportMethod()) + .addMethod(getUpdateExternalSystemMethod()) + .addMethod(getUpdateFindingMethod()) + .addMethod(getUpdateMuteConfigMethod()) + .addMethod(getUpdateNotificationConfigMethod()) + .addMethod(getUpdateResourceValueConfigMethod()) + .addMethod(getUpdateSecurityMarksMethod()) + .addMethod(getUpdateSourceMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-securitycenter/pom.xml b/java-securitycenter/pom.xml index ffb1689b8140..87e887e54f9a 100644 --- a/java-securitycenter/pom.xml +++ b/java-securitycenter/pom.xml @@ -31,6 +31,16 @@ proto-google-cloud-securitycenter-v1 2.45.0-SNAPSHOT
+ + com.google.api.grpc + proto-google-cloud-securitycenter-v2 + 2.45.0-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-securitycenter-v2 + 2.45.0-SNAPSHOT + com.google.api.grpc proto-google-cloud-securitycenter-v1beta1 @@ -69,9 +79,11 @@ grpc-google-cloud-securitycenter-v1 grpc-google-cloud-securitycenter-v1beta1 grpc-google-cloud-securitycenter-v1p1beta1 + grpc-google-cloud-securitycenter-v2 proto-google-cloud-securitycenter-v1 proto-google-cloud-securitycenter-v1beta1 proto-google-cloud-securitycenter-v1p1beta1 + proto-google-cloud-securitycenter-v2 google-cloud-securitycenter-bom diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AssetName.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AssetName.java index 5ab958e10fb4..6232f60fe005 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AssetName.java +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AssetName.java @@ -16,7 +16,6 @@ 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; @@ -97,17 +96,14 @@ 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 newOrganizationAssetBuilder() { return new Builder(); } - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static FolderAssetBuilder newFolderAssetBuilder() { return new FolderAssetBuilder(); } - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static ProjectAssetBuilder newProjectAssetBuilder() { return new ProjectAssetBuilder(); } @@ -120,17 +116,14 @@ public static AssetName of(String organization, String asset) { return newBuilder().setOrganization(organization).setAsset(asset).build(); } - @BetaApi("The static create methods are not stable yet and may be changed in the future.") public static AssetName ofOrganizationAssetName(String organization, String asset) { return newBuilder().setOrganization(organization).setAsset(asset).build(); } - @BetaApi("The static create methods are not stable yet and may be changed in the future.") public static AssetName ofFolderAssetName(String folder, String asset) { return newFolderAssetBuilder().setFolder(folder).setAsset(asset).build(); } - @BetaApi("The static create methods are not stable yet and may be changed in the future.") public static AssetName ofProjectAssetName(String project, String asset) { return newProjectAssetBuilder().setProject(project).setAsset(asset).build(); } @@ -139,17 +132,14 @@ public static String format(String organization, String asset) { return newBuilder().setOrganization(organization).setAsset(asset).build().toString(); } - @BetaApi("The static format methods are not stable yet and may be changed in the future.") public static String formatOrganizationAssetName(String organization, String asset) { return newBuilder().setOrganization(organization).setAsset(asset).build().toString(); } - @BetaApi("The static format methods are not stable yet and may be changed in the future.") public static String formatFolderAssetName(String folder, String asset) { return newFolderAssetBuilder().setFolder(folder).setAsset(asset).build().toString(); } - @BetaApi("The static format methods are not stable yet and may be changed in the future.") public static String formatProjectAssetName(String project, String asset) { return newProjectAssetBuilder().setProject(project).setAsset(asset).build().toString(); } @@ -301,7 +291,6 @@ public AssetName build() { } /** Builder for folders/{folder}/assets/{asset}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static class FolderAssetBuilder { private String folder; private String asset; @@ -332,7 +321,6 @@ public AssetName build() { } /** Builder for projects/{project}/assets/{asset}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static class ProjectAssetBuilder { private String project; private String asset; diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BigQueryExportName.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BigQueryExportName.java index 0d4fcc572df1..a6e594a5aca1 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BigQueryExportName.java +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BigQueryExportName.java @@ -16,7 +16,6 @@ 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; @@ -98,17 +97,14 @@ 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 newOrganizationExportBuilder() { return new Builder(); } - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static FolderExportBuilder newFolderExportBuilder() { return new FolderExportBuilder(); } - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static ProjectExportBuilder newProjectExportBuilder() { return new ProjectExportBuilder(); } @@ -121,17 +117,14 @@ public static BigQueryExportName of(String organization, String export) { return newBuilder().setOrganization(organization).setExport(export).build(); } - @BetaApi("The static create methods are not stable yet and may be changed in the future.") public static BigQueryExportName ofOrganizationExportName(String organization, String export) { return newBuilder().setOrganization(organization).setExport(export).build(); } - @BetaApi("The static create methods are not stable yet and may be changed in the future.") public static BigQueryExportName ofFolderExportName(String folder, String export) { return newFolderExportBuilder().setFolder(folder).setExport(export).build(); } - @BetaApi("The static create methods are not stable yet and may be changed in the future.") public static BigQueryExportName ofProjectExportName(String project, String export) { return newProjectExportBuilder().setProject(project).setExport(export).build(); } @@ -140,17 +133,14 @@ public static String format(String organization, String export) { return newBuilder().setOrganization(organization).setExport(export).build().toString(); } - @BetaApi("The static format methods are not stable yet and may be changed in the future.") public static String formatOrganizationExportName(String organization, String export) { return newBuilder().setOrganization(organization).setExport(export).build().toString(); } - @BetaApi("The static format methods are not stable yet and may be changed in the future.") public static String formatFolderExportName(String folder, String export) { return newFolderExportBuilder().setFolder(folder).setExport(export).build().toString(); } - @BetaApi("The static format methods are not stable yet and may be changed in the future.") public static String formatProjectExportName(String project, String export) { return newProjectExportBuilder().setProject(project).setExport(export).build().toString(); } @@ -302,7 +292,6 @@ public BigQueryExportName build() { } /** Builder for folders/{folder}/bigQueryExports/{export}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static class FolderExportBuilder { private String folder; private String export; @@ -333,7 +322,6 @@ public BigQueryExportName build() { } /** Builder for projects/{project}/bigQueryExports/{export}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static class ProjectExportBuilder { private String project; private String export; diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/EffectiveSecurityHealthAnalyticsCustomModuleName.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/EffectiveSecurityHealthAnalyticsCustomModuleName.java index c32d511664f7..b45048c60cd2 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/EffectiveSecurityHealthAnalyticsCustomModuleName.java +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/EffectiveSecurityHealthAnalyticsCustomModuleName.java @@ -16,7 +16,6 @@ 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; @@ -102,17 +101,14 @@ 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 newOrganizationEffectiveCustomModuleBuilder() { return new Builder(); } - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static FolderEffectiveCustomModuleBuilder newFolderEffectiveCustomModuleBuilder() { return new FolderEffectiveCustomModuleBuilder(); } - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static ProjectEffectiveCustomModuleBuilder newProjectEffectiveCustomModuleBuilder() { return new ProjectEffectiveCustomModuleBuilder(); } @@ -129,7 +125,6 @@ public static EffectiveSecurityHealthAnalyticsCustomModuleName of( .build(); } - @BetaApi("The static create methods are not stable yet and may be changed in the future.") public static EffectiveSecurityHealthAnalyticsCustomModuleName ofOrganizationEffectiveCustomModuleName(String organization, String effectiveCustomModule) { return newBuilder() @@ -138,7 +133,6 @@ public static EffectiveSecurityHealthAnalyticsCustomModuleName of( .build(); } - @BetaApi("The static create methods are not stable yet and may be changed in the future.") public static EffectiveSecurityHealthAnalyticsCustomModuleName ofFolderEffectiveCustomModuleName( String folder, String effectiveCustomModule) { return newFolderEffectiveCustomModuleBuilder() @@ -147,7 +141,6 @@ public static EffectiveSecurityHealthAnalyticsCustomModuleName ofFolderEffective .build(); } - @BetaApi("The static create methods are not stable yet and may be changed in the future.") public static EffectiveSecurityHealthAnalyticsCustomModuleName ofProjectEffectiveCustomModuleName( String project, String effectiveCustomModule) { return newProjectEffectiveCustomModuleBuilder() @@ -164,7 +157,6 @@ public static String format(String organization, String effectiveCustomModule) { .toString(); } - @BetaApi("The static format methods are not stable yet and may be changed in the future.") public static String formatOrganizationEffectiveCustomModuleName( String organization, String effectiveCustomModule) { return newBuilder() @@ -174,7 +166,6 @@ public static String formatOrganizationEffectiveCustomModuleName( .toString(); } - @BetaApi("The static format methods are not stable yet and may be changed in the future.") public static String formatFolderEffectiveCustomModuleName( String folder, String effectiveCustomModule) { return newFolderEffectiveCustomModuleBuilder() @@ -184,7 +175,6 @@ public static String formatFolderEffectiveCustomModuleName( .toString(); } - @BetaApi("The static format methods are not stable yet and may be changed in the future.") public static String formatProjectEffectiveCustomModuleName( String project, String effectiveCustomModule) { return newProjectEffectiveCustomModuleBuilder() @@ -360,7 +350,6 @@ public EffectiveSecurityHealthAnalyticsCustomModuleName build() { * Builder for * folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{effective_custom_module}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static class FolderEffectiveCustomModuleBuilder { private String folder; private String effectiveCustomModule; @@ -395,7 +384,6 @@ public EffectiveSecurityHealthAnalyticsCustomModuleName build() { * Builder for * projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{effective_custom_module}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static class ProjectEffectiveCustomModuleBuilder { private String project; private String effectiveCustomModule; diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingName.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingName.java index 9a4e8b30a1d9..c2957629c8f7 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingName.java +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingName.java @@ -16,7 +16,6 @@ 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; @@ -108,17 +107,14 @@ 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 newOrganizationSourceFindingBuilder() { return new Builder(); } - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static FolderSourceFindingBuilder newFolderSourceFindingBuilder() { return new FolderSourceFindingBuilder(); } - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static ProjectSourceFindingBuilder newProjectSourceFindingBuilder() { return new ProjectSourceFindingBuilder(); } @@ -131,13 +127,11 @@ public static FindingName of(String organization, String source, String finding) return newBuilder().setOrganization(organization).setSource(source).setFinding(finding).build(); } - @BetaApi("The static create methods are not stable yet and may be changed in the future.") public static FindingName ofOrganizationSourceFindingName( String organization, String source, String finding) { return newBuilder().setOrganization(organization).setSource(source).setFinding(finding).build(); } - @BetaApi("The static create methods are not stable yet and may be changed in the future.") public static FindingName ofFolderSourceFindingName( String folder, String source, String finding) { return newFolderSourceFindingBuilder() @@ -147,7 +141,6 @@ public static FindingName ofFolderSourceFindingName( .build(); } - @BetaApi("The static create methods are not stable yet and may be changed in the future.") public static FindingName ofProjectSourceFindingName( String project, String source, String finding) { return newProjectSourceFindingBuilder() @@ -166,7 +159,6 @@ public static String format(String organization, String source, String finding) .toString(); } - @BetaApi("The static format methods are not stable yet and may be changed in the future.") public static String formatOrganizationSourceFindingName( String organization, String source, String finding) { return newBuilder() @@ -177,7 +169,6 @@ public static String formatOrganizationSourceFindingName( .toString(); } - @BetaApi("The static format methods are not stable yet and may be changed in the future.") public static String formatFolderSourceFindingName(String folder, String source, String finding) { return newFolderSourceFindingBuilder() .setFolder(folder) @@ -187,7 +178,6 @@ public static String formatFolderSourceFindingName(String folder, String source, .toString(); } - @BetaApi("The static format methods are not stable yet and may be changed in the future.") public static String formatProjectSourceFindingName( String project, String source, String finding) { return newProjectSourceFindingBuilder() @@ -365,7 +355,6 @@ public FindingName build() { } /** Builder for folders/{folder}/sources/{source}/findings/{finding}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static class FolderSourceFindingBuilder { private String folder; private String source; @@ -406,7 +395,6 @@ public FindingName build() { } /** Builder for projects/{project}/sources/{source}/findings/{finding}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static class ProjectSourceFindingBuilder { private String project; private String source; diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/MuteConfigName.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/MuteConfigName.java index 50d558f3b993..2977660fe71d 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/MuteConfigName.java +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/MuteConfigName.java @@ -16,7 +16,6 @@ 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; @@ -98,17 +97,14 @@ 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(); } @@ -121,18 +117,15 @@ 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(); } @@ -141,12 +134,10 @@ 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) @@ -155,7 +146,6 @@ public static String formatFolderMuteConfigName(String folder, String muteConfig .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) @@ -312,7 +302,6 @@ public MuteConfigName build() { } /** 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; @@ -343,7 +332,6 @@ public MuteConfigName build() { } /** 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; diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/NotificationConfigName.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/NotificationConfigName.java index 59b3d3938332..55581ea87d63 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/NotificationConfigName.java +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/NotificationConfigName.java @@ -16,7 +16,6 @@ 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; @@ -100,17 +99,14 @@ 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 newOrganizationNotificationConfigBuilder() { return new Builder(); } - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static FolderNotificationConfigBuilder newFolderNotificationConfigBuilder() { return new FolderNotificationConfigBuilder(); } - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static ProjectNotificationConfigBuilder newProjectNotificationConfigBuilder() { return new ProjectNotificationConfigBuilder(); } @@ -126,7 +122,6 @@ public static NotificationConfigName of(String organization, String notification .build(); } - @BetaApi("The static create methods are not stable yet and may be changed in the future.") public static NotificationConfigName ofOrganizationNotificationConfigName( String organization, String notificationConfig) { return newBuilder() @@ -135,7 +130,6 @@ public static NotificationConfigName ofOrganizationNotificationConfigName( .build(); } - @BetaApi("The static create methods are not stable yet and may be changed in the future.") public static NotificationConfigName ofFolderNotificationConfigName( String folder, String notificationConfig) { return newFolderNotificationConfigBuilder() @@ -144,7 +138,6 @@ public static NotificationConfigName ofFolderNotificationConfigName( .build(); } - @BetaApi("The static create methods are not stable yet and may be changed in the future.") public static NotificationConfigName ofProjectNotificationConfigName( String project, String notificationConfig) { return newProjectNotificationConfigBuilder() @@ -161,7 +154,6 @@ public static String format(String organization, String notificationConfig) { .toString(); } - @BetaApi("The static format methods are not stable yet and may be changed in the future.") public static String formatOrganizationNotificationConfigName( String organization, String notificationConfig) { return newBuilder() @@ -171,7 +163,6 @@ public static String formatOrganizationNotificationConfigName( .toString(); } - @BetaApi("The static format methods are not stable yet and may be changed in the future.") public static String formatFolderNotificationConfigName( String folder, String notificationConfig) { return newFolderNotificationConfigBuilder() @@ -181,7 +172,6 @@ public static String formatFolderNotificationConfigName( .toString(); } - @BetaApi("The static format methods are not stable yet and may be changed in the future.") public static String formatProjectNotificationConfigName( String project, String notificationConfig) { return newProjectNotificationConfigBuilder() @@ -342,7 +332,6 @@ public NotificationConfigName build() { } /** Builder for folders/{folder}/notificationConfigs/{notification_config}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static class FolderNotificationConfigBuilder { private String folder; private String notificationConfig; @@ -373,7 +362,6 @@ public NotificationConfigName build() { } /** Builder for projects/{project}/notificationConfigs/{notification_config}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static class ProjectNotificationConfigBuilder { private String project; private String notificationConfig; diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecurityHealthAnalyticsCustomModuleName.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecurityHealthAnalyticsCustomModuleName.java index 8e45bd4b46b0..b17ba52c9923 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecurityHealthAnalyticsCustomModuleName.java +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecurityHealthAnalyticsCustomModuleName.java @@ -16,7 +16,6 @@ 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; @@ -100,17 +99,14 @@ 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 newOrganizationCustomModuleBuilder() { return new Builder(); } - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static FolderCustomModuleBuilder newFolderCustomModuleBuilder() { return new FolderCustomModuleBuilder(); } - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static ProjectCustomModuleBuilder newProjectCustomModuleBuilder() { return new ProjectCustomModuleBuilder(); } @@ -124,19 +120,16 @@ public static SecurityHealthAnalyticsCustomModuleName of( return newBuilder().setOrganization(organization).setCustomModule(customModule).build(); } - @BetaApi("The static create methods are not stable yet and may be changed in the future.") public static SecurityHealthAnalyticsCustomModuleName ofOrganizationCustomModuleName( String organization, String customModule) { return newBuilder().setOrganization(organization).setCustomModule(customModule).build(); } - @BetaApi("The static create methods are not stable yet and may be changed in the future.") public static SecurityHealthAnalyticsCustomModuleName ofFolderCustomModuleName( String folder, String customModule) { return newFolderCustomModuleBuilder().setFolder(folder).setCustomModule(customModule).build(); } - @BetaApi("The static create methods are not stable yet and may be changed in the future.") public static SecurityHealthAnalyticsCustomModuleName ofProjectCustomModuleName( String project, String customModule) { return newProjectCustomModuleBuilder() @@ -153,7 +146,6 @@ public static String format(String organization, String customModule) { .toString(); } - @BetaApi("The static format methods are not stable yet and may be changed in the future.") public static String formatOrganizationCustomModuleName( String organization, String customModule) { return newBuilder() @@ -163,7 +155,6 @@ public static String formatOrganizationCustomModuleName( .toString(); } - @BetaApi("The static format methods are not stable yet and may be changed in the future.") public static String formatFolderCustomModuleName(String folder, String customModule) { return newFolderCustomModuleBuilder() .setFolder(folder) @@ -172,7 +163,6 @@ public static String formatFolderCustomModuleName(String folder, String customMo .toString(); } - @BetaApi("The static format methods are not stable yet and may be changed in the future.") public static String formatProjectCustomModuleName(String project, String customModule) { return newProjectCustomModuleBuilder() .setProject(project) @@ -336,7 +326,6 @@ public SecurityHealthAnalyticsCustomModuleName build() { } /** Builder for folders/{folder}/securityHealthAnalyticsSettings/customModules/{custom_module}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static class FolderCustomModuleBuilder { private String folder; private String customModule; @@ -369,7 +358,6 @@ public SecurityHealthAnalyticsCustomModuleName build() { /** * Builder for projects/{project}/securityHealthAnalyticsSettings/customModules/{custom_module}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static class ProjectCustomModuleBuilder { private String project; private String customModule; diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecurityHealthAnalyticsSettingsName.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecurityHealthAnalyticsSettingsName.java index c4c1b76e4b8b..2e7d08a10514 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecurityHealthAnalyticsSettingsName.java +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecurityHealthAnalyticsSettingsName.java @@ -16,7 +16,6 @@ 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; @@ -89,17 +88,14 @@ 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 newOrganizationBuilder() { return new Builder(); } - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static FolderBuilder newFolderBuilder() { return new FolderBuilder(); } - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static ProjectBuilder newProjectBuilder() { return new ProjectBuilder(); } @@ -112,17 +108,14 @@ public static SecurityHealthAnalyticsSettingsName of(String organization) { return newBuilder().setOrganization(organization).build(); } - @BetaApi("The static create methods are not stable yet and may be changed in the future.") public static SecurityHealthAnalyticsSettingsName ofOrganizationName(String organization) { return newBuilder().setOrganization(organization).build(); } - @BetaApi("The static create methods are not stable yet and may be changed in the future.") public static SecurityHealthAnalyticsSettingsName ofFolderName(String folder) { return newFolderBuilder().setFolder(folder).build(); } - @BetaApi("The static create methods are not stable yet and may be changed in the future.") public static SecurityHealthAnalyticsSettingsName ofProjectName(String project) { return newProjectBuilder().setProject(project).build(); } @@ -131,17 +124,14 @@ public static String format(String organization) { return newBuilder().setOrganization(organization).build().toString(); } - @BetaApi("The static format methods are not stable yet and may be changed in the future.") public static String formatOrganizationName(String organization) { return newBuilder().setOrganization(organization).build().toString(); } - @BetaApi("The static format methods are not stable yet and may be changed in the future.") public static String formatFolderName(String folder) { return newFolderBuilder().setFolder(folder).build().toString(); } - @BetaApi("The static format methods are not stable yet and may be changed in the future.") public static String formatProjectName(String project) { return newProjectBuilder().setProject(project).build().toString(); } @@ -277,7 +267,6 @@ public SecurityHealthAnalyticsSettingsName build() { } /** Builder for folders/{folder}/securityHealthAnalyticsSettings. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static class FolderBuilder { private String folder; @@ -298,7 +287,6 @@ public SecurityHealthAnalyticsSettingsName build() { } /** Builder for projects/{project}/securityHealthAnalyticsSettings. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static class ProjectBuilder { private String project; diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SourceName.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SourceName.java index 2928fb8c26ac..d6776a981479 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SourceName.java +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SourceName.java @@ -16,7 +16,6 @@ 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; @@ -97,17 +96,14 @@ 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 newOrganizationSourceBuilder() { return new Builder(); } - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static FolderSourceBuilder newFolderSourceBuilder() { return new FolderSourceBuilder(); } - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static ProjectSourceBuilder newProjectSourceBuilder() { return new ProjectSourceBuilder(); } @@ -120,17 +116,14 @@ public static SourceName of(String organization, String source) { return newBuilder().setOrganization(organization).setSource(source).build(); } - @BetaApi("The static create methods are not stable yet and may be changed in the future.") public static SourceName ofOrganizationSourceName(String organization, String source) { return newBuilder().setOrganization(organization).setSource(source).build(); } - @BetaApi("The static create methods are not stable yet and may be changed in the future.") public static SourceName ofFolderSourceName(String folder, String source) { return newFolderSourceBuilder().setFolder(folder).setSource(source).build(); } - @BetaApi("The static create methods are not stable yet and may be changed in the future.") public static SourceName ofProjectSourceName(String project, String source) { return newProjectSourceBuilder().setProject(project).setSource(source).build(); } @@ -139,17 +132,14 @@ public static String format(String organization, String source) { return newBuilder().setOrganization(organization).setSource(source).build().toString(); } - @BetaApi("The static format methods are not stable yet and may be changed in the future.") public static String formatOrganizationSourceName(String organization, String source) { return newBuilder().setOrganization(organization).setSource(source).build().toString(); } - @BetaApi("The static format methods are not stable yet and may be changed in the future.") public static String formatFolderSourceName(String folder, String source) { return newFolderSourceBuilder().setFolder(folder).setSource(source).build().toString(); } - @BetaApi("The static format methods are not stable yet and may be changed in the future.") public static String formatProjectSourceName(String project, String source) { return newProjectSourceBuilder().setProject(project).setSource(source).build().toString(); } @@ -301,7 +291,6 @@ public SourceName build() { } /** Builder for folders/{folder}/sources/{source}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static class FolderSourceBuilder { private String folder; private String source; @@ -332,7 +321,6 @@ public SourceName build() { } /** Builder for projects/{project}/sources/{source}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static class ProjectSourceBuilder { private String project; private String source; diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1p1beta1/src/main/java/com/google/cloud/securitycenter/v1p1beta1/AssetName.java b/java-securitycenter/proto-google-cloud-securitycenter-v1p1beta1/src/main/java/com/google/cloud/securitycenter/v1p1beta1/AssetName.java index 862eb299a6b2..1669088f59b1 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v1p1beta1/src/main/java/com/google/cloud/securitycenter/v1p1beta1/AssetName.java +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1p1beta1/src/main/java/com/google/cloud/securitycenter/v1p1beta1/AssetName.java @@ -16,7 +16,6 @@ package com.google.cloud.securitycenter.v1p1beta1; -import com.google.api.core.BetaApi; import com.google.api.pathtemplate.PathTemplate; import com.google.api.pathtemplate.ValidationException; import com.google.api.resourcenames.ResourceName; @@ -97,17 +96,14 @@ 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 newOrganizationAssetBuilder() { return new Builder(); } - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static FolderAssetBuilder newFolderAssetBuilder() { return new FolderAssetBuilder(); } - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static ProjectAssetBuilder newProjectAssetBuilder() { return new ProjectAssetBuilder(); } @@ -120,17 +116,14 @@ public static AssetName of(String organization, String asset) { return newBuilder().setOrganization(organization).setAsset(asset).build(); } - @BetaApi("The static create methods are not stable yet and may be changed in the future.") public static AssetName ofOrganizationAssetName(String organization, String asset) { return newBuilder().setOrganization(organization).setAsset(asset).build(); } - @BetaApi("The static create methods are not stable yet and may be changed in the future.") public static AssetName ofFolderAssetName(String folder, String asset) { return newFolderAssetBuilder().setFolder(folder).setAsset(asset).build(); } - @BetaApi("The static create methods are not stable yet and may be changed in the future.") public static AssetName ofProjectAssetName(String project, String asset) { return newProjectAssetBuilder().setProject(project).setAsset(asset).build(); } @@ -139,17 +132,14 @@ public static String format(String organization, String asset) { return newBuilder().setOrganization(organization).setAsset(asset).build().toString(); } - @BetaApi("The static format methods are not stable yet and may be changed in the future.") public static String formatOrganizationAssetName(String organization, String asset) { return newBuilder().setOrganization(organization).setAsset(asset).build().toString(); } - @BetaApi("The static format methods are not stable yet and may be changed in the future.") public static String formatFolderAssetName(String folder, String asset) { return newFolderAssetBuilder().setFolder(folder).setAsset(asset).build().toString(); } - @BetaApi("The static format methods are not stable yet and may be changed in the future.") public static String formatProjectAssetName(String project, String asset) { return newProjectAssetBuilder().setProject(project).setAsset(asset).build().toString(); } @@ -301,7 +291,6 @@ public AssetName build() { } /** Builder for folders/{folder}/assets/{asset}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static class FolderAssetBuilder { private String folder; private String asset; @@ -332,7 +321,6 @@ public AssetName build() { } /** Builder for projects/{project}/assets/{asset}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static class ProjectAssetBuilder { private String project; private String asset; diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1p1beta1/src/main/java/com/google/cloud/securitycenter/v1p1beta1/FindingName.java b/java-securitycenter/proto-google-cloud-securitycenter-v1p1beta1/src/main/java/com/google/cloud/securitycenter/v1p1beta1/FindingName.java index e6ff9fa2ecfd..1599f4fbf87e 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v1p1beta1/src/main/java/com/google/cloud/securitycenter/v1p1beta1/FindingName.java +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1p1beta1/src/main/java/com/google/cloud/securitycenter/v1p1beta1/FindingName.java @@ -16,7 +16,6 @@ package com.google.cloud.securitycenter.v1p1beta1; -import com.google.api.core.BetaApi; import com.google.api.pathtemplate.PathTemplate; import com.google.api.pathtemplate.ValidationException; import com.google.api.resourcenames.ResourceName; @@ -108,17 +107,14 @@ 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 newOrganizationSourceFindingBuilder() { return new Builder(); } - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static FolderSourceFindingBuilder newFolderSourceFindingBuilder() { return new FolderSourceFindingBuilder(); } - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static ProjectSourceFindingBuilder newProjectSourceFindingBuilder() { return new ProjectSourceFindingBuilder(); } @@ -131,13 +127,11 @@ public static FindingName of(String organization, String source, String finding) return newBuilder().setOrganization(organization).setSource(source).setFinding(finding).build(); } - @BetaApi("The static create methods are not stable yet and may be changed in the future.") public static FindingName ofOrganizationSourceFindingName( String organization, String source, String finding) { return newBuilder().setOrganization(organization).setSource(source).setFinding(finding).build(); } - @BetaApi("The static create methods are not stable yet and may be changed in the future.") public static FindingName ofFolderSourceFindingName( String folder, String source, String finding) { return newFolderSourceFindingBuilder() @@ -147,7 +141,6 @@ public static FindingName ofFolderSourceFindingName( .build(); } - @BetaApi("The static create methods are not stable yet and may be changed in the future.") public static FindingName ofProjectSourceFindingName( String project, String source, String finding) { return newProjectSourceFindingBuilder() @@ -166,7 +159,6 @@ public static String format(String organization, String source, String finding) .toString(); } - @BetaApi("The static format methods are not stable yet and may be changed in the future.") public static String formatOrganizationSourceFindingName( String organization, String source, String finding) { return newBuilder() @@ -177,7 +169,6 @@ public static String formatOrganizationSourceFindingName( .toString(); } - @BetaApi("The static format methods are not stable yet and may be changed in the future.") public static String formatFolderSourceFindingName(String folder, String source, String finding) { return newFolderSourceFindingBuilder() .setFolder(folder) @@ -187,7 +178,6 @@ public static String formatFolderSourceFindingName(String folder, String source, .toString(); } - @BetaApi("The static format methods are not stable yet and may be changed in the future.") public static String formatProjectSourceFindingName( String project, String source, String finding) { return newProjectSourceFindingBuilder() @@ -365,7 +355,6 @@ public FindingName build() { } /** Builder for folders/{folder}/sources/{source}/findings/{finding}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static class FolderSourceFindingBuilder { private String folder; private String source; @@ -406,7 +395,6 @@ public FindingName build() { } /** Builder for projects/{project}/sources/{source}/findings/{finding}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static class ProjectSourceFindingBuilder { private String project; private String source; diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1p1beta1/src/main/java/com/google/cloud/securitycenter/v1p1beta1/SourceName.java b/java-securitycenter/proto-google-cloud-securitycenter-v1p1beta1/src/main/java/com/google/cloud/securitycenter/v1p1beta1/SourceName.java index 0a442490e077..9af60987fad6 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v1p1beta1/src/main/java/com/google/cloud/securitycenter/v1p1beta1/SourceName.java +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1p1beta1/src/main/java/com/google/cloud/securitycenter/v1p1beta1/SourceName.java @@ -16,7 +16,6 @@ package com.google.cloud.securitycenter.v1p1beta1; -import com.google.api.core.BetaApi; import com.google.api.pathtemplate.PathTemplate; import com.google.api.pathtemplate.ValidationException; import com.google.api.resourcenames.ResourceName; @@ -97,17 +96,14 @@ 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 newOrganizationSourceBuilder() { return new Builder(); } - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static FolderSourceBuilder newFolderSourceBuilder() { return new FolderSourceBuilder(); } - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static ProjectSourceBuilder newProjectSourceBuilder() { return new ProjectSourceBuilder(); } @@ -120,17 +116,14 @@ public static SourceName of(String organization, String source) { return newBuilder().setOrganization(organization).setSource(source).build(); } - @BetaApi("The static create methods are not stable yet and may be changed in the future.") public static SourceName ofOrganizationSourceName(String organization, String source) { return newBuilder().setOrganization(organization).setSource(source).build(); } - @BetaApi("The static create methods are not stable yet and may be changed in the future.") public static SourceName ofFolderSourceName(String folder, String source) { return newFolderSourceBuilder().setFolder(folder).setSource(source).build(); } - @BetaApi("The static create methods are not stable yet and may be changed in the future.") public static SourceName ofProjectSourceName(String project, String source) { return newProjectSourceBuilder().setProject(project).setSource(source).build(); } @@ -139,17 +132,14 @@ public static String format(String organization, String source) { return newBuilder().setOrganization(organization).setSource(source).build().toString(); } - @BetaApi("The static format methods are not stable yet and may be changed in the future.") public static String formatOrganizationSourceName(String organization, String source) { return newBuilder().setOrganization(organization).setSource(source).build().toString(); } - @BetaApi("The static format methods are not stable yet and may be changed in the future.") public static String formatFolderSourceName(String folder, String source) { return newFolderSourceBuilder().setFolder(folder).setSource(source).build().toString(); } - @BetaApi("The static format methods are not stable yet and may be changed in the future.") public static String formatProjectSourceName(String project, String source) { return newProjectSourceBuilder().setProject(project).setSource(source).build().toString(); } @@ -301,7 +291,6 @@ public SourceName build() { } /** Builder for folders/{folder}/sources/{source}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static class FolderSourceBuilder { private String folder; private String source; @@ -332,7 +321,6 @@ public SourceName build() { } /** Builder for projects/{project}/sources/{source}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static class ProjectSourceBuilder { private String project; private String source; diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/clirr-ignored-differences.xml b/java-securitycenter/proto-google-cloud-securitycenter-v2/clirr-ignored-differences.xml new file mode 100644 index 000000000000..093b309c0f66 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/clirr-ignored-differences.xml @@ -0,0 +1,19 @@ + + + + + 7012 + com/google/cloud/securitycenter/v2/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/securitycenter/v2/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/securitycenter/v2/*OrBuilder + boolean has*(*) + + diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/pom.xml b/java-securitycenter/proto-google-cloud-securitycenter-v2/pom.xml new file mode 100644 index 000000000000..b1717c49f30e --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/pom.xml @@ -0,0 +1,37 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-securitycenter-v2 + 2.45.0-SNAPSHOT + proto-google-cloud-securitycenter-v2 + Proto library for google-cloud-securitycenter + + com.google.cloud + google-cloud-securitycenter-parent + 2.45.0-SNAPSHOT + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api + api-common + + + com.google.guava + guava + + + diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Access.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Access.java new file mode 100644 index 000000000000..e937eb4b135c --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Access.java @@ -0,0 +1,3213 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/access.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Represents an access event.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Access} + */ +public final class Access extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.Access) + AccessOrBuilder { + private static final long serialVersionUID = 0L; + // Use Access.newBuilder() to construct. + private Access(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Access() { + principalEmail_ = ""; + callerIp_ = ""; + userAgentFamily_ = ""; + userAgent_ = ""; + serviceName_ = ""; + methodName_ = ""; + principalSubject_ = ""; + serviceAccountKeyName_ = ""; + serviceAccountDelegationInfo_ = java.util.Collections.emptyList(); + userName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Access(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.AccessProto + .internal_static_google_cloud_securitycenter_v2_Access_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.AccessProto + .internal_static_google_cloud_securitycenter_v2_Access_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Access.class, + com.google.cloud.securitycenter.v2.Access.Builder.class); + } + + private int bitField0_; + public static final int PRINCIPAL_EMAIL_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object principalEmail_ = ""; + /** + * + * + *
+   * Associated email, such as "foo@google.com".
+   *
+   * The email address of the authenticated user or a service account acting on
+   * behalf of a third party principal making the request. For third party
+   * identity callers, the `principal_subject` field is populated instead of
+   * this field. For privacy reasons, the principal email address is sometimes
+   * redacted. For more information, see [Caller identities in audit
+   * logs](https://cloud.google.com/logging/docs/audit#user-id).
+   * 
+ * + * string principal_email = 1; + * + * @return The principalEmail. + */ + @java.lang.Override + public java.lang.String getPrincipalEmail() { + java.lang.Object ref = principalEmail_; + 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(); + principalEmail_ = s; + return s; + } + } + /** + * + * + *
+   * Associated email, such as "foo@google.com".
+   *
+   * The email address of the authenticated user or a service account acting on
+   * behalf of a third party principal making the request. For third party
+   * identity callers, the `principal_subject` field is populated instead of
+   * this field. For privacy reasons, the principal email address is sometimes
+   * redacted. For more information, see [Caller identities in audit
+   * logs](https://cloud.google.com/logging/docs/audit#user-id).
+   * 
+ * + * string principal_email = 1; + * + * @return The bytes for principalEmail. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPrincipalEmailBytes() { + java.lang.Object ref = principalEmail_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + principalEmail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CALLER_IP_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object callerIp_ = ""; + /** + * + * + *
+   * Caller's IP address, such as "1.1.1.1".
+   * 
+ * + * string caller_ip = 2; + * + * @return The callerIp. + */ + @java.lang.Override + public java.lang.String getCallerIp() { + java.lang.Object ref = callerIp_; + 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(); + callerIp_ = s; + return s; + } + } + /** + * + * + *
+   * Caller's IP address, such as "1.1.1.1".
+   * 
+ * + * string caller_ip = 2; + * + * @return The bytes for callerIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCallerIpBytes() { + java.lang.Object ref = callerIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + callerIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CALLER_IP_GEO_FIELD_NUMBER = 3; + private com.google.cloud.securitycenter.v2.Geolocation callerIpGeo_; + /** + * + * + *
+   * The caller IP's geolocation, which identifies where the call came from.
+   * 
+ * + * .google.cloud.securitycenter.v2.Geolocation caller_ip_geo = 3; + * + * @return Whether the callerIpGeo field is set. + */ + @java.lang.Override + public boolean hasCallerIpGeo() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The caller IP's geolocation, which identifies where the call came from.
+   * 
+ * + * .google.cloud.securitycenter.v2.Geolocation caller_ip_geo = 3; + * + * @return The callerIpGeo. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Geolocation getCallerIpGeo() { + return callerIpGeo_ == null + ? com.google.cloud.securitycenter.v2.Geolocation.getDefaultInstance() + : callerIpGeo_; + } + /** + * + * + *
+   * The caller IP's geolocation, which identifies where the call came from.
+   * 
+ * + * .google.cloud.securitycenter.v2.Geolocation caller_ip_geo = 3; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.GeolocationOrBuilder getCallerIpGeoOrBuilder() { + return callerIpGeo_ == null + ? com.google.cloud.securitycenter.v2.Geolocation.getDefaultInstance() + : callerIpGeo_; + } + + public static final int USER_AGENT_FAMILY_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object userAgentFamily_ = ""; + /** + * + * + *
+   * Type of user agent associated with the finding. For example, an operating
+   * system shell or an embedded or standalone application.
+   * 
+ * + * string user_agent_family = 4; + * + * @return The userAgentFamily. + */ + @java.lang.Override + public java.lang.String getUserAgentFamily() { + java.lang.Object ref = userAgentFamily_; + 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(); + userAgentFamily_ = s; + return s; + } + } + /** + * + * + *
+   * Type of user agent associated with the finding. For example, an operating
+   * system shell or an embedded or standalone application.
+   * 
+ * + * string user_agent_family = 4; + * + * @return The bytes for userAgentFamily. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserAgentFamilyBytes() { + java.lang.Object ref = userAgentFamily_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userAgentFamily_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_AGENT_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object userAgent_ = ""; + /** + * + * + *
+   * The caller's user agent string associated with the finding.
+   * 
+ * + * string user_agent = 5; + * + * @return The userAgent. + */ + @java.lang.Override + public java.lang.String getUserAgent() { + java.lang.Object ref = userAgent_; + 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(); + userAgent_ = s; + return s; + } + } + /** + * + * + *
+   * The caller's user agent string associated with the finding.
+   * 
+ * + * string user_agent = 5; + * + * @return The bytes for userAgent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserAgentBytes() { + java.lang.Object ref = userAgent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userAgent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_NAME_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object serviceName_ = ""; + /** + * + * + *
+   * This is the API service that the service account made a call to, e.g.
+   * "iam.googleapis.com"
+   * 
+ * + * string service_name = 6; + * + * @return The serviceName. + */ + @java.lang.Override + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + 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(); + serviceName_ = s; + return s; + } + } + /** + * + * + *
+   * This is the API service that the service account made a call to, e.g.
+   * "iam.googleapis.com"
+   * 
+ * + * string service_name = 6; + * + * @return The bytes for serviceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METHOD_NAME_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object methodName_ = ""; + /** + * + * + *
+   * The method that the service account called, e.g. "SetIamPolicy".
+   * 
+ * + * string method_name = 7; + * + * @return The methodName. + */ + @java.lang.Override + public java.lang.String getMethodName() { + java.lang.Object ref = methodName_; + 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(); + methodName_ = s; + return s; + } + } + /** + * + * + *
+   * The method that the service account called, e.g. "SetIamPolicy".
+   * 
+ * + * string method_name = 7; + * + * @return The bytes for methodName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMethodNameBytes() { + java.lang.Object ref = methodName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + methodName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRINCIPAL_SUBJECT_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object principalSubject_ = ""; + /** + * + * + *
+   * A string that represents the principal_subject that is associated with the
+   * identity. Unlike `principal_email`, `principal_subject` supports principals
+   * that aren't associated with email addresses, such as third party
+   * principals. For most identities, the format is
+   * `principal://iam.googleapis.com/{identity pool name}/subject/{subject}`.
+   * Some GKE identities, such as GKE_WORKLOAD, FREEFORM, and GKE_HUB_WORKLOAD,
+   * still use the legacy format `serviceAccount:{identity pool
+   * name}[{subject}]`.
+   * 
+ * + * string principal_subject = 8; + * + * @return The principalSubject. + */ + @java.lang.Override + public java.lang.String getPrincipalSubject() { + java.lang.Object ref = principalSubject_; + 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(); + principalSubject_ = s; + return s; + } + } + /** + * + * + *
+   * A string that represents the principal_subject that is associated with the
+   * identity. Unlike `principal_email`, `principal_subject` supports principals
+   * that aren't associated with email addresses, such as third party
+   * principals. For most identities, the format is
+   * `principal://iam.googleapis.com/{identity pool name}/subject/{subject}`.
+   * Some GKE identities, such as GKE_WORKLOAD, FREEFORM, and GKE_HUB_WORKLOAD,
+   * still use the legacy format `serviceAccount:{identity pool
+   * name}[{subject}]`.
+   * 
+ * + * string principal_subject = 8; + * + * @return The bytes for principalSubject. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPrincipalSubjectBytes() { + java.lang.Object ref = principalSubject_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + principalSubject_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_ACCOUNT_KEY_NAME_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private volatile java.lang.Object serviceAccountKeyName_ = ""; + /** + * + * + *
+   * The name of the service account key that was used to create or exchange
+   * credentials when authenticating the service account that made the request.
+   * This is a scheme-less URI full resource name. For example:
+   *
+   * "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}".
+   * 
+ * + * string service_account_key_name = 9; + * + * @return The serviceAccountKeyName. + */ + @java.lang.Override + public java.lang.String getServiceAccountKeyName() { + java.lang.Object ref = serviceAccountKeyName_; + 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(); + serviceAccountKeyName_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the service account key that was used to create or exchange
+   * credentials when authenticating the service account that made the request.
+   * This is a scheme-less URI full resource name. For example:
+   *
+   * "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}".
+   * 
+ * + * string service_account_key_name = 9; + * + * @return The bytes for serviceAccountKeyName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceAccountKeyNameBytes() { + java.lang.Object ref = serviceAccountKeyName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccountKeyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_ACCOUNT_DELEGATION_INFO_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private java.util.List + serviceAccountDelegationInfo_; + /** + * + * + *
+   * The identity delegation history of an authenticated service account that
+   * made the request. The `serviceAccountDelegationInfo[]` object contains
+   * information about the real authorities that try to access Google Cloud
+   * resources by delegating on a service account. When multiple authorities are
+   * present, they are guaranteed to be sorted based on the original ordering of
+   * the identity delegation events.
+   * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ServiceAccountDelegationInfo service_account_delegation_info = 10; + * + */ + @java.lang.Override + public java.util.List + getServiceAccountDelegationInfoList() { + return serviceAccountDelegationInfo_; + } + /** + * + * + *
+   * The identity delegation history of an authenticated service account that
+   * made the request. The `serviceAccountDelegationInfo[]` object contains
+   * information about the real authorities that try to access Google Cloud
+   * resources by delegating on a service account. When multiple authorities are
+   * present, they are guaranteed to be sorted based on the original ordering of
+   * the identity delegation events.
+   * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ServiceAccountDelegationInfo service_account_delegation_info = 10; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.securitycenter.v2.ServiceAccountDelegationInfoOrBuilder> + getServiceAccountDelegationInfoOrBuilderList() { + return serviceAccountDelegationInfo_; + } + /** + * + * + *
+   * The identity delegation history of an authenticated service account that
+   * made the request. The `serviceAccountDelegationInfo[]` object contains
+   * information about the real authorities that try to access Google Cloud
+   * resources by delegating on a service account. When multiple authorities are
+   * present, they are guaranteed to be sorted based on the original ordering of
+   * the identity delegation events.
+   * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ServiceAccountDelegationInfo service_account_delegation_info = 10; + * + */ + @java.lang.Override + public int getServiceAccountDelegationInfoCount() { + return serviceAccountDelegationInfo_.size(); + } + /** + * + * + *
+   * The identity delegation history of an authenticated service account that
+   * made the request. The `serviceAccountDelegationInfo[]` object contains
+   * information about the real authorities that try to access Google Cloud
+   * resources by delegating on a service account. When multiple authorities are
+   * present, they are guaranteed to be sorted based on the original ordering of
+   * the identity delegation events.
+   * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ServiceAccountDelegationInfo service_account_delegation_info = 10; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.ServiceAccountDelegationInfo + getServiceAccountDelegationInfo(int index) { + return serviceAccountDelegationInfo_.get(index); + } + /** + * + * + *
+   * The identity delegation history of an authenticated service account that
+   * made the request. The `serviceAccountDelegationInfo[]` object contains
+   * information about the real authorities that try to access Google Cloud
+   * resources by delegating on a service account. When multiple authorities are
+   * present, they are guaranteed to be sorted based on the original ordering of
+   * the identity delegation events.
+   * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ServiceAccountDelegationInfo service_account_delegation_info = 10; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.ServiceAccountDelegationInfoOrBuilder + getServiceAccountDelegationInfoOrBuilder(int index) { + return serviceAccountDelegationInfo_.get(index); + } + + public static final int USER_NAME_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private volatile java.lang.Object userName_ = ""; + /** + * + * + *
+   * A string that represents a username. The username provided depends on the
+   * type of the finding and is likely not an IAM principal. For example, this
+   * can be a system username if the finding is related to a virtual machine, or
+   * it can be an application login username.
+   * 
+ * + * string user_name = 11; + * + * @return The userName. + */ + @java.lang.Override + public java.lang.String getUserName() { + java.lang.Object ref = userName_; + 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(); + userName_ = s; + return s; + } + } + /** + * + * + *
+   * A string that represents a username. The username provided depends on the
+   * type of the finding and is likely not an IAM principal. For example, this
+   * can be a system username if the finding is related to a virtual machine, or
+   * it can be an application login username.
+   * 
+ * + * string user_name = 11; + * + * @return The bytes for userName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserNameBytes() { + java.lang.Object ref = userName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userName_ = 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(principalEmail_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, principalEmail_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(callerIp_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, callerIp_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getCallerIpGeo()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userAgentFamily_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, userAgentFamily_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userAgent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, userAgent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, serviceName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(methodName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, methodName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principalSubject_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, principalSubject_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountKeyName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, serviceAccountKeyName_); + } + for (int i = 0; i < serviceAccountDelegationInfo_.size(); i++) { + output.writeMessage(10, serviceAccountDelegationInfo_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, userName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principalEmail_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, principalEmail_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(callerIp_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, callerIp_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCallerIpGeo()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userAgentFamily_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, userAgentFamily_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userAgent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, userAgent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, serviceName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(methodName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, methodName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principalSubject_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, principalSubject_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountKeyName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, serviceAccountKeyName_); + } + for (int i = 0; i < serviceAccountDelegationInfo_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, serviceAccountDelegationInfo_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, userName_); + } + size += getUnknownFields().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.v2.Access)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.Access other = + (com.google.cloud.securitycenter.v2.Access) obj; + + if (!getPrincipalEmail().equals(other.getPrincipalEmail())) return false; + if (!getCallerIp().equals(other.getCallerIp())) return false; + if (hasCallerIpGeo() != other.hasCallerIpGeo()) return false; + if (hasCallerIpGeo()) { + if (!getCallerIpGeo().equals(other.getCallerIpGeo())) return false; + } + if (!getUserAgentFamily().equals(other.getUserAgentFamily())) return false; + if (!getUserAgent().equals(other.getUserAgent())) return false; + if (!getServiceName().equals(other.getServiceName())) return false; + if (!getMethodName().equals(other.getMethodName())) return false; + if (!getPrincipalSubject().equals(other.getPrincipalSubject())) return false; + if (!getServiceAccountKeyName().equals(other.getServiceAccountKeyName())) return false; + if (!getServiceAccountDelegationInfoList().equals(other.getServiceAccountDelegationInfoList())) + return false; + if (!getUserName().equals(other.getUserName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + PRINCIPAL_EMAIL_FIELD_NUMBER; + hash = (53 * hash) + getPrincipalEmail().hashCode(); + hash = (37 * hash) + CALLER_IP_FIELD_NUMBER; + hash = (53 * hash) + getCallerIp().hashCode(); + if (hasCallerIpGeo()) { + hash = (37 * hash) + CALLER_IP_GEO_FIELD_NUMBER; + hash = (53 * hash) + getCallerIpGeo().hashCode(); + } + hash = (37 * hash) + USER_AGENT_FAMILY_FIELD_NUMBER; + hash = (53 * hash) + getUserAgentFamily().hashCode(); + hash = (37 * hash) + USER_AGENT_FIELD_NUMBER; + hash = (53 * hash) + getUserAgent().hashCode(); + hash = (37 * hash) + SERVICE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getServiceName().hashCode(); + hash = (37 * hash) + METHOD_NAME_FIELD_NUMBER; + hash = (53 * hash) + getMethodName().hashCode(); + hash = (37 * hash) + PRINCIPAL_SUBJECT_FIELD_NUMBER; + hash = (53 * hash) + getPrincipalSubject().hashCode(); + hash = (37 * hash) + SERVICE_ACCOUNT_KEY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccountKeyName().hashCode(); + if (getServiceAccountDelegationInfoCount() > 0) { + hash = (37 * hash) + SERVICE_ACCOUNT_DELEGATION_INFO_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccountDelegationInfoList().hashCode(); + } + hash = (37 * hash) + USER_NAME_FIELD_NUMBER; + hash = (53 * hash) + getUserName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.Access parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Access 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.v2.Access parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Access 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.v2.Access parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Access parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.Access parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Access 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.v2.Access parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Access 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.v2.Access parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Access 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.v2.Access 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; + } + /** + * + * + *
+   * Represents an access event.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Access} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.Access) + com.google.cloud.securitycenter.v2.AccessOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.AccessProto + .internal_static_google_cloud_securitycenter_v2_Access_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.AccessProto + .internal_static_google_cloud_securitycenter_v2_Access_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Access.class, + com.google.cloud.securitycenter.v2.Access.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.Access.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCallerIpGeoFieldBuilder(); + getServiceAccountDelegationInfoFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + principalEmail_ = ""; + callerIp_ = ""; + callerIpGeo_ = null; + if (callerIpGeoBuilder_ != null) { + callerIpGeoBuilder_.dispose(); + callerIpGeoBuilder_ = null; + } + userAgentFamily_ = ""; + userAgent_ = ""; + serviceName_ = ""; + methodName_ = ""; + principalSubject_ = ""; + serviceAccountKeyName_ = ""; + if (serviceAccountDelegationInfoBuilder_ == null) { + serviceAccountDelegationInfo_ = java.util.Collections.emptyList(); + } else { + serviceAccountDelegationInfo_ = null; + serviceAccountDelegationInfoBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000200); + userName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.AccessProto + .internal_static_google_cloud_securitycenter_v2_Access_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Access getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.Access.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Access build() { + com.google.cloud.securitycenter.v2.Access result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Access buildPartial() { + com.google.cloud.securitycenter.v2.Access result = + new com.google.cloud.securitycenter.v2.Access(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.securitycenter.v2.Access result) { + if (serviceAccountDelegationInfoBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0)) { + serviceAccountDelegationInfo_ = + java.util.Collections.unmodifiableList(serviceAccountDelegationInfo_); + bitField0_ = (bitField0_ & ~0x00000200); + } + result.serviceAccountDelegationInfo_ = serviceAccountDelegationInfo_; + } else { + result.serviceAccountDelegationInfo_ = serviceAccountDelegationInfoBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.Access result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.principalEmail_ = principalEmail_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.callerIp_ = callerIp_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.callerIpGeo_ = + callerIpGeoBuilder_ == null ? callerIpGeo_ : callerIpGeoBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.userAgentFamily_ = userAgentFamily_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.userAgent_ = userAgent_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.serviceName_ = serviceName_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.methodName_ = methodName_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.principalSubject_ = principalSubject_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.serviceAccountKeyName_ = serviceAccountKeyName_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.userName_ = userName_; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v2.Access) { + return mergeFrom((com.google.cloud.securitycenter.v2.Access) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.Access other) { + if (other == com.google.cloud.securitycenter.v2.Access.getDefaultInstance()) return this; + if (!other.getPrincipalEmail().isEmpty()) { + principalEmail_ = other.principalEmail_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getCallerIp().isEmpty()) { + callerIp_ = other.callerIp_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasCallerIpGeo()) { + mergeCallerIpGeo(other.getCallerIpGeo()); + } + if (!other.getUserAgentFamily().isEmpty()) { + userAgentFamily_ = other.userAgentFamily_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getUserAgent().isEmpty()) { + userAgent_ = other.userAgent_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getServiceName().isEmpty()) { + serviceName_ = other.serviceName_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getMethodName().isEmpty()) { + methodName_ = other.methodName_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (!other.getPrincipalSubject().isEmpty()) { + principalSubject_ = other.principalSubject_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.getServiceAccountKeyName().isEmpty()) { + serviceAccountKeyName_ = other.serviceAccountKeyName_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (serviceAccountDelegationInfoBuilder_ == null) { + if (!other.serviceAccountDelegationInfo_.isEmpty()) { + if (serviceAccountDelegationInfo_.isEmpty()) { + serviceAccountDelegationInfo_ = other.serviceAccountDelegationInfo_; + bitField0_ = (bitField0_ & ~0x00000200); + } else { + ensureServiceAccountDelegationInfoIsMutable(); + serviceAccountDelegationInfo_.addAll(other.serviceAccountDelegationInfo_); + } + onChanged(); + } + } else { + if (!other.serviceAccountDelegationInfo_.isEmpty()) { + if (serviceAccountDelegationInfoBuilder_.isEmpty()) { + serviceAccountDelegationInfoBuilder_.dispose(); + serviceAccountDelegationInfoBuilder_ = null; + serviceAccountDelegationInfo_ = other.serviceAccountDelegationInfo_; + bitField0_ = (bitField0_ & ~0x00000200); + serviceAccountDelegationInfoBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getServiceAccountDelegationInfoFieldBuilder() + : null; + } else { + serviceAccountDelegationInfoBuilder_.addAllMessages( + other.serviceAccountDelegationInfo_); + } + } + } + if (!other.getUserName().isEmpty()) { + userName_ = other.userName_; + bitField0_ |= 0x00000400; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + principalEmail_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + callerIp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getCallerIpGeoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + userAgentFamily_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + userAgent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + serviceName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + methodName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + principalSubject_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + serviceAccountKeyName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: + { + com.google.cloud.securitycenter.v2.ServiceAccountDelegationInfo m = + input.readMessage( + com.google.cloud.securitycenter.v2.ServiceAccountDelegationInfo.parser(), + extensionRegistry); + if (serviceAccountDelegationInfoBuilder_ == null) { + ensureServiceAccountDelegationInfoIsMutable(); + serviceAccountDelegationInfo_.add(m); + } else { + serviceAccountDelegationInfoBuilder_.addMessage(m); + } + break; + } // case 82 + case 90: + { + userName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 90 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object principalEmail_ = ""; + /** + * + * + *
+     * Associated email, such as "foo@google.com".
+     *
+     * The email address of the authenticated user or a service account acting on
+     * behalf of a third party principal making the request. For third party
+     * identity callers, the `principal_subject` field is populated instead of
+     * this field. For privacy reasons, the principal email address is sometimes
+     * redacted. For more information, see [Caller identities in audit
+     * logs](https://cloud.google.com/logging/docs/audit#user-id).
+     * 
+ * + * string principal_email = 1; + * + * @return The principalEmail. + */ + public java.lang.String getPrincipalEmail() { + java.lang.Object ref = principalEmail_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + principalEmail_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Associated email, such as "foo@google.com".
+     *
+     * The email address of the authenticated user or a service account acting on
+     * behalf of a third party principal making the request. For third party
+     * identity callers, the `principal_subject` field is populated instead of
+     * this field. For privacy reasons, the principal email address is sometimes
+     * redacted. For more information, see [Caller identities in audit
+     * logs](https://cloud.google.com/logging/docs/audit#user-id).
+     * 
+ * + * string principal_email = 1; + * + * @return The bytes for principalEmail. + */ + public com.google.protobuf.ByteString getPrincipalEmailBytes() { + java.lang.Object ref = principalEmail_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + principalEmail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Associated email, such as "foo@google.com".
+     *
+     * The email address of the authenticated user or a service account acting on
+     * behalf of a third party principal making the request. For third party
+     * identity callers, the `principal_subject` field is populated instead of
+     * this field. For privacy reasons, the principal email address is sometimes
+     * redacted. For more information, see [Caller identities in audit
+     * logs](https://cloud.google.com/logging/docs/audit#user-id).
+     * 
+ * + * string principal_email = 1; + * + * @param value The principalEmail to set. + * @return This builder for chaining. + */ + public Builder setPrincipalEmail(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + principalEmail_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Associated email, such as "foo@google.com".
+     *
+     * The email address of the authenticated user or a service account acting on
+     * behalf of a third party principal making the request. For third party
+     * identity callers, the `principal_subject` field is populated instead of
+     * this field. For privacy reasons, the principal email address is sometimes
+     * redacted. For more information, see [Caller identities in audit
+     * logs](https://cloud.google.com/logging/docs/audit#user-id).
+     * 
+ * + * string principal_email = 1; + * + * @return This builder for chaining. + */ + public Builder clearPrincipalEmail() { + principalEmail_ = getDefaultInstance().getPrincipalEmail(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Associated email, such as "foo@google.com".
+     *
+     * The email address of the authenticated user or a service account acting on
+     * behalf of a third party principal making the request. For third party
+     * identity callers, the `principal_subject` field is populated instead of
+     * this field. For privacy reasons, the principal email address is sometimes
+     * redacted. For more information, see [Caller identities in audit
+     * logs](https://cloud.google.com/logging/docs/audit#user-id).
+     * 
+ * + * string principal_email = 1; + * + * @param value The bytes for principalEmail to set. + * @return This builder for chaining. + */ + public Builder setPrincipalEmailBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + principalEmail_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object callerIp_ = ""; + /** + * + * + *
+     * Caller's IP address, such as "1.1.1.1".
+     * 
+ * + * string caller_ip = 2; + * + * @return The callerIp. + */ + public java.lang.String getCallerIp() { + java.lang.Object ref = callerIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + callerIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Caller's IP address, such as "1.1.1.1".
+     * 
+ * + * string caller_ip = 2; + * + * @return The bytes for callerIp. + */ + public com.google.protobuf.ByteString getCallerIpBytes() { + java.lang.Object ref = callerIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + callerIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Caller's IP address, such as "1.1.1.1".
+     * 
+ * + * string caller_ip = 2; + * + * @param value The callerIp to set. + * @return This builder for chaining. + */ + public Builder setCallerIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + callerIp_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Caller's IP address, such as "1.1.1.1".
+     * 
+ * + * string caller_ip = 2; + * + * @return This builder for chaining. + */ + public Builder clearCallerIp() { + callerIp_ = getDefaultInstance().getCallerIp(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Caller's IP address, such as "1.1.1.1".
+     * 
+ * + * string caller_ip = 2; + * + * @param value The bytes for callerIp to set. + * @return This builder for chaining. + */ + public Builder setCallerIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + callerIp_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.securitycenter.v2.Geolocation callerIpGeo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Geolocation, + com.google.cloud.securitycenter.v2.Geolocation.Builder, + com.google.cloud.securitycenter.v2.GeolocationOrBuilder> + callerIpGeoBuilder_; + /** + * + * + *
+     * The caller IP's geolocation, which identifies where the call came from.
+     * 
+ * + * .google.cloud.securitycenter.v2.Geolocation caller_ip_geo = 3; + * + * @return Whether the callerIpGeo field is set. + */ + public boolean hasCallerIpGeo() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * The caller IP's geolocation, which identifies where the call came from.
+     * 
+ * + * .google.cloud.securitycenter.v2.Geolocation caller_ip_geo = 3; + * + * @return The callerIpGeo. + */ + public com.google.cloud.securitycenter.v2.Geolocation getCallerIpGeo() { + if (callerIpGeoBuilder_ == null) { + return callerIpGeo_ == null + ? com.google.cloud.securitycenter.v2.Geolocation.getDefaultInstance() + : callerIpGeo_; + } else { + return callerIpGeoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The caller IP's geolocation, which identifies where the call came from.
+     * 
+ * + * .google.cloud.securitycenter.v2.Geolocation caller_ip_geo = 3; + */ + public Builder setCallerIpGeo(com.google.cloud.securitycenter.v2.Geolocation value) { + if (callerIpGeoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + callerIpGeo_ = value; + } else { + callerIpGeoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The caller IP's geolocation, which identifies where the call came from.
+     * 
+ * + * .google.cloud.securitycenter.v2.Geolocation caller_ip_geo = 3; + */ + public Builder setCallerIpGeo( + com.google.cloud.securitycenter.v2.Geolocation.Builder builderForValue) { + if (callerIpGeoBuilder_ == null) { + callerIpGeo_ = builderForValue.build(); + } else { + callerIpGeoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The caller IP's geolocation, which identifies where the call came from.
+     * 
+ * + * .google.cloud.securitycenter.v2.Geolocation caller_ip_geo = 3; + */ + public Builder mergeCallerIpGeo(com.google.cloud.securitycenter.v2.Geolocation value) { + if (callerIpGeoBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && callerIpGeo_ != null + && callerIpGeo_ + != com.google.cloud.securitycenter.v2.Geolocation.getDefaultInstance()) { + getCallerIpGeoBuilder().mergeFrom(value); + } else { + callerIpGeo_ = value; + } + } else { + callerIpGeoBuilder_.mergeFrom(value); + } + if (callerIpGeo_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The caller IP's geolocation, which identifies where the call came from.
+     * 
+ * + * .google.cloud.securitycenter.v2.Geolocation caller_ip_geo = 3; + */ + public Builder clearCallerIpGeo() { + bitField0_ = (bitField0_ & ~0x00000004); + callerIpGeo_ = null; + if (callerIpGeoBuilder_ != null) { + callerIpGeoBuilder_.dispose(); + callerIpGeoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The caller IP's geolocation, which identifies where the call came from.
+     * 
+ * + * .google.cloud.securitycenter.v2.Geolocation caller_ip_geo = 3; + */ + public com.google.cloud.securitycenter.v2.Geolocation.Builder getCallerIpGeoBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCallerIpGeoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The caller IP's geolocation, which identifies where the call came from.
+     * 
+ * + * .google.cloud.securitycenter.v2.Geolocation caller_ip_geo = 3; + */ + public com.google.cloud.securitycenter.v2.GeolocationOrBuilder getCallerIpGeoOrBuilder() { + if (callerIpGeoBuilder_ != null) { + return callerIpGeoBuilder_.getMessageOrBuilder(); + } else { + return callerIpGeo_ == null + ? com.google.cloud.securitycenter.v2.Geolocation.getDefaultInstance() + : callerIpGeo_; + } + } + /** + * + * + *
+     * The caller IP's geolocation, which identifies where the call came from.
+     * 
+ * + * .google.cloud.securitycenter.v2.Geolocation caller_ip_geo = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Geolocation, + com.google.cloud.securitycenter.v2.Geolocation.Builder, + com.google.cloud.securitycenter.v2.GeolocationOrBuilder> + getCallerIpGeoFieldBuilder() { + if (callerIpGeoBuilder_ == null) { + callerIpGeoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Geolocation, + com.google.cloud.securitycenter.v2.Geolocation.Builder, + com.google.cloud.securitycenter.v2.GeolocationOrBuilder>( + getCallerIpGeo(), getParentForChildren(), isClean()); + callerIpGeo_ = null; + } + return callerIpGeoBuilder_; + } + + private java.lang.Object userAgentFamily_ = ""; + /** + * + * + *
+     * Type of user agent associated with the finding. For example, an operating
+     * system shell or an embedded or standalone application.
+     * 
+ * + * string user_agent_family = 4; + * + * @return The userAgentFamily. + */ + public java.lang.String getUserAgentFamily() { + java.lang.Object ref = userAgentFamily_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userAgentFamily_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Type of user agent associated with the finding. For example, an operating
+     * system shell or an embedded or standalone application.
+     * 
+ * + * string user_agent_family = 4; + * + * @return The bytes for userAgentFamily. + */ + public com.google.protobuf.ByteString getUserAgentFamilyBytes() { + java.lang.Object ref = userAgentFamily_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userAgentFamily_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Type of user agent associated with the finding. For example, an operating
+     * system shell or an embedded or standalone application.
+     * 
+ * + * string user_agent_family = 4; + * + * @param value The userAgentFamily to set. + * @return This builder for chaining. + */ + public Builder setUserAgentFamily(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + userAgentFamily_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Type of user agent associated with the finding. For example, an operating
+     * system shell or an embedded or standalone application.
+     * 
+ * + * string user_agent_family = 4; + * + * @return This builder for chaining. + */ + public Builder clearUserAgentFamily() { + userAgentFamily_ = getDefaultInstance().getUserAgentFamily(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Type of user agent associated with the finding. For example, an operating
+     * system shell or an embedded or standalone application.
+     * 
+ * + * string user_agent_family = 4; + * + * @param value The bytes for userAgentFamily to set. + * @return This builder for chaining. + */ + public Builder setUserAgentFamilyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + userAgentFamily_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object userAgent_ = ""; + /** + * + * + *
+     * The caller's user agent string associated with the finding.
+     * 
+ * + * string user_agent = 5; + * + * @return The userAgent. + */ + public java.lang.String getUserAgent() { + java.lang.Object ref = userAgent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userAgent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The caller's user agent string associated with the finding.
+     * 
+ * + * string user_agent = 5; + * + * @return The bytes for userAgent. + */ + public com.google.protobuf.ByteString getUserAgentBytes() { + java.lang.Object ref = userAgent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userAgent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The caller's user agent string associated with the finding.
+     * 
+ * + * string user_agent = 5; + * + * @param value The userAgent to set. + * @return This builder for chaining. + */ + public Builder setUserAgent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + userAgent_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The caller's user agent string associated with the finding.
+     * 
+ * + * string user_agent = 5; + * + * @return This builder for chaining. + */ + public Builder clearUserAgent() { + userAgent_ = getDefaultInstance().getUserAgent(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * The caller's user agent string associated with the finding.
+     * 
+ * + * string user_agent = 5; + * + * @param value The bytes for userAgent to set. + * @return This builder for chaining. + */ + public Builder setUserAgentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + userAgent_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object serviceName_ = ""; + /** + * + * + *
+     * This is the API service that the service account made a call to, e.g.
+     * "iam.googleapis.com"
+     * 
+ * + * string service_name = 6; + * + * @return The serviceName. + */ + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * This is the API service that the service account made a call to, e.g.
+     * "iam.googleapis.com"
+     * 
+ * + * string service_name = 6; + * + * @return The bytes for serviceName. + */ + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * This is the API service that the service account made a call to, e.g.
+     * "iam.googleapis.com"
+     * 
+ * + * string service_name = 6; + * + * @param value The serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serviceName_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * This is the API service that the service account made a call to, e.g.
+     * "iam.googleapis.com"
+     * 
+ * + * string service_name = 6; + * + * @return This builder for chaining. + */ + public Builder clearServiceName() { + serviceName_ = getDefaultInstance().getServiceName(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * This is the API service that the service account made a call to, e.g.
+     * "iam.googleapis.com"
+     * 
+ * + * string service_name = 6; + * + * @param value The bytes for serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serviceName_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object methodName_ = ""; + /** + * + * + *
+     * The method that the service account called, e.g. "SetIamPolicy".
+     * 
+ * + * string method_name = 7; + * + * @return The methodName. + */ + public java.lang.String getMethodName() { + java.lang.Object ref = methodName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + methodName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The method that the service account called, e.g. "SetIamPolicy".
+     * 
+ * + * string method_name = 7; + * + * @return The bytes for methodName. + */ + public com.google.protobuf.ByteString getMethodNameBytes() { + java.lang.Object ref = methodName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + methodName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The method that the service account called, e.g. "SetIamPolicy".
+     * 
+ * + * string method_name = 7; + * + * @param value The methodName to set. + * @return This builder for chaining. + */ + public Builder setMethodName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + methodName_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * The method that the service account called, e.g. "SetIamPolicy".
+     * 
+ * + * string method_name = 7; + * + * @return This builder for chaining. + */ + public Builder clearMethodName() { + methodName_ = getDefaultInstance().getMethodName(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * The method that the service account called, e.g. "SetIamPolicy".
+     * 
+ * + * string method_name = 7; + * + * @param value The bytes for methodName to set. + * @return This builder for chaining. + */ + public Builder setMethodNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + methodName_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private java.lang.Object principalSubject_ = ""; + /** + * + * + *
+     * A string that represents the principal_subject that is associated with the
+     * identity. Unlike `principal_email`, `principal_subject` supports principals
+     * that aren't associated with email addresses, such as third party
+     * principals. For most identities, the format is
+     * `principal://iam.googleapis.com/{identity pool name}/subject/{subject}`.
+     * Some GKE identities, such as GKE_WORKLOAD, FREEFORM, and GKE_HUB_WORKLOAD,
+     * still use the legacy format `serviceAccount:{identity pool
+     * name}[{subject}]`.
+     * 
+ * + * string principal_subject = 8; + * + * @return The principalSubject. + */ + public java.lang.String getPrincipalSubject() { + java.lang.Object ref = principalSubject_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + principalSubject_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A string that represents the principal_subject that is associated with the
+     * identity. Unlike `principal_email`, `principal_subject` supports principals
+     * that aren't associated with email addresses, such as third party
+     * principals. For most identities, the format is
+     * `principal://iam.googleapis.com/{identity pool name}/subject/{subject}`.
+     * Some GKE identities, such as GKE_WORKLOAD, FREEFORM, and GKE_HUB_WORKLOAD,
+     * still use the legacy format `serviceAccount:{identity pool
+     * name}[{subject}]`.
+     * 
+ * + * string principal_subject = 8; + * + * @return The bytes for principalSubject. + */ + public com.google.protobuf.ByteString getPrincipalSubjectBytes() { + java.lang.Object ref = principalSubject_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + principalSubject_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A string that represents the principal_subject that is associated with the
+     * identity. Unlike `principal_email`, `principal_subject` supports principals
+     * that aren't associated with email addresses, such as third party
+     * principals. For most identities, the format is
+     * `principal://iam.googleapis.com/{identity pool name}/subject/{subject}`.
+     * Some GKE identities, such as GKE_WORKLOAD, FREEFORM, and GKE_HUB_WORKLOAD,
+     * still use the legacy format `serviceAccount:{identity pool
+     * name}[{subject}]`.
+     * 
+ * + * string principal_subject = 8; + * + * @param value The principalSubject to set. + * @return This builder for chaining. + */ + public Builder setPrincipalSubject(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + principalSubject_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * A string that represents the principal_subject that is associated with the
+     * identity. Unlike `principal_email`, `principal_subject` supports principals
+     * that aren't associated with email addresses, such as third party
+     * principals. For most identities, the format is
+     * `principal://iam.googleapis.com/{identity pool name}/subject/{subject}`.
+     * Some GKE identities, such as GKE_WORKLOAD, FREEFORM, and GKE_HUB_WORKLOAD,
+     * still use the legacy format `serviceAccount:{identity pool
+     * name}[{subject}]`.
+     * 
+ * + * string principal_subject = 8; + * + * @return This builder for chaining. + */ + public Builder clearPrincipalSubject() { + principalSubject_ = getDefaultInstance().getPrincipalSubject(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * A string that represents the principal_subject that is associated with the
+     * identity. Unlike `principal_email`, `principal_subject` supports principals
+     * that aren't associated with email addresses, such as third party
+     * principals. For most identities, the format is
+     * `principal://iam.googleapis.com/{identity pool name}/subject/{subject}`.
+     * Some GKE identities, such as GKE_WORKLOAD, FREEFORM, and GKE_HUB_WORKLOAD,
+     * still use the legacy format `serviceAccount:{identity pool
+     * name}[{subject}]`.
+     * 
+ * + * string principal_subject = 8; + * + * @param value The bytes for principalSubject to set. + * @return This builder for chaining. + */ + public Builder setPrincipalSubjectBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + principalSubject_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object serviceAccountKeyName_ = ""; + /** + * + * + *
+     * The name of the service account key that was used to create or exchange
+     * credentials when authenticating the service account that made the request.
+     * This is a scheme-less URI full resource name. For example:
+     *
+     * "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}".
+     * 
+ * + * string service_account_key_name = 9; + * + * @return The serviceAccountKeyName. + */ + public java.lang.String getServiceAccountKeyName() { + java.lang.Object ref = serviceAccountKeyName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccountKeyName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the service account key that was used to create or exchange
+     * credentials when authenticating the service account that made the request.
+     * This is a scheme-less URI full resource name. For example:
+     *
+     * "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}".
+     * 
+ * + * string service_account_key_name = 9; + * + * @return The bytes for serviceAccountKeyName. + */ + public com.google.protobuf.ByteString getServiceAccountKeyNameBytes() { + java.lang.Object ref = serviceAccountKeyName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccountKeyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the service account key that was used to create or exchange
+     * credentials when authenticating the service account that made the request.
+     * This is a scheme-less URI full resource name. For example:
+     *
+     * "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}".
+     * 
+ * + * string service_account_key_name = 9; + * + * @param value The serviceAccountKeyName to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountKeyName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serviceAccountKeyName_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the service account key that was used to create or exchange
+     * credentials when authenticating the service account that made the request.
+     * This is a scheme-less URI full resource name. For example:
+     *
+     * "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}".
+     * 
+ * + * string service_account_key_name = 9; + * + * @return This builder for chaining. + */ + public Builder clearServiceAccountKeyName() { + serviceAccountKeyName_ = getDefaultInstance().getServiceAccountKeyName(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the service account key that was used to create or exchange
+     * credentials when authenticating the service account that made the request.
+     * This is a scheme-less URI full resource name. For example:
+     *
+     * "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}".
+     * 
+ * + * string service_account_key_name = 9; + * + * @param value The bytes for serviceAccountKeyName to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountKeyNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serviceAccountKeyName_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private java.util.List + serviceAccountDelegationInfo_ = java.util.Collections.emptyList(); + + private void ensureServiceAccountDelegationInfoIsMutable() { + if (!((bitField0_ & 0x00000200) != 0)) { + serviceAccountDelegationInfo_ = + new java.util.ArrayList< + com.google.cloud.securitycenter.v2.ServiceAccountDelegationInfo>( + serviceAccountDelegationInfo_); + bitField0_ |= 0x00000200; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.ServiceAccountDelegationInfo, + com.google.cloud.securitycenter.v2.ServiceAccountDelegationInfo.Builder, + com.google.cloud.securitycenter.v2.ServiceAccountDelegationInfoOrBuilder> + serviceAccountDelegationInfoBuilder_; + + /** + * + * + *
+     * The identity delegation history of an authenticated service account that
+     * made the request. The `serviceAccountDelegationInfo[]` object contains
+     * information about the real authorities that try to access Google Cloud
+     * resources by delegating on a service account. When multiple authorities are
+     * present, they are guaranteed to be sorted based on the original ordering of
+     * the identity delegation events.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ServiceAccountDelegationInfo service_account_delegation_info = 10; + * + */ + public java.util.List + getServiceAccountDelegationInfoList() { + if (serviceAccountDelegationInfoBuilder_ == null) { + return java.util.Collections.unmodifiableList(serviceAccountDelegationInfo_); + } else { + return serviceAccountDelegationInfoBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The identity delegation history of an authenticated service account that
+     * made the request. The `serviceAccountDelegationInfo[]` object contains
+     * information about the real authorities that try to access Google Cloud
+     * resources by delegating on a service account. When multiple authorities are
+     * present, they are guaranteed to be sorted based on the original ordering of
+     * the identity delegation events.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ServiceAccountDelegationInfo service_account_delegation_info = 10; + * + */ + public int getServiceAccountDelegationInfoCount() { + if (serviceAccountDelegationInfoBuilder_ == null) { + return serviceAccountDelegationInfo_.size(); + } else { + return serviceAccountDelegationInfoBuilder_.getCount(); + } + } + /** + * + * + *
+     * The identity delegation history of an authenticated service account that
+     * made the request. The `serviceAccountDelegationInfo[]` object contains
+     * information about the real authorities that try to access Google Cloud
+     * resources by delegating on a service account. When multiple authorities are
+     * present, they are guaranteed to be sorted based on the original ordering of
+     * the identity delegation events.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ServiceAccountDelegationInfo service_account_delegation_info = 10; + * + */ + public com.google.cloud.securitycenter.v2.ServiceAccountDelegationInfo + getServiceAccountDelegationInfo(int index) { + if (serviceAccountDelegationInfoBuilder_ == null) { + return serviceAccountDelegationInfo_.get(index); + } else { + return serviceAccountDelegationInfoBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The identity delegation history of an authenticated service account that
+     * made the request. The `serviceAccountDelegationInfo[]` object contains
+     * information about the real authorities that try to access Google Cloud
+     * resources by delegating on a service account. When multiple authorities are
+     * present, they are guaranteed to be sorted based on the original ordering of
+     * the identity delegation events.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ServiceAccountDelegationInfo service_account_delegation_info = 10; + * + */ + public Builder setServiceAccountDelegationInfo( + int index, com.google.cloud.securitycenter.v2.ServiceAccountDelegationInfo value) { + if (serviceAccountDelegationInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceAccountDelegationInfoIsMutable(); + serviceAccountDelegationInfo_.set(index, value); + onChanged(); + } else { + serviceAccountDelegationInfoBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The identity delegation history of an authenticated service account that
+     * made the request. The `serviceAccountDelegationInfo[]` object contains
+     * information about the real authorities that try to access Google Cloud
+     * resources by delegating on a service account. When multiple authorities are
+     * present, they are guaranteed to be sorted based on the original ordering of
+     * the identity delegation events.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ServiceAccountDelegationInfo service_account_delegation_info = 10; + * + */ + public Builder setServiceAccountDelegationInfo( + int index, + com.google.cloud.securitycenter.v2.ServiceAccountDelegationInfo.Builder builderForValue) { + if (serviceAccountDelegationInfoBuilder_ == null) { + ensureServiceAccountDelegationInfoIsMutable(); + serviceAccountDelegationInfo_.set(index, builderForValue.build()); + onChanged(); + } else { + serviceAccountDelegationInfoBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The identity delegation history of an authenticated service account that
+     * made the request. The `serviceAccountDelegationInfo[]` object contains
+     * information about the real authorities that try to access Google Cloud
+     * resources by delegating on a service account. When multiple authorities are
+     * present, they are guaranteed to be sorted based on the original ordering of
+     * the identity delegation events.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ServiceAccountDelegationInfo service_account_delegation_info = 10; + * + */ + public Builder addServiceAccountDelegationInfo( + com.google.cloud.securitycenter.v2.ServiceAccountDelegationInfo value) { + if (serviceAccountDelegationInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceAccountDelegationInfoIsMutable(); + serviceAccountDelegationInfo_.add(value); + onChanged(); + } else { + serviceAccountDelegationInfoBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The identity delegation history of an authenticated service account that
+     * made the request. The `serviceAccountDelegationInfo[]` object contains
+     * information about the real authorities that try to access Google Cloud
+     * resources by delegating on a service account. When multiple authorities are
+     * present, they are guaranteed to be sorted based on the original ordering of
+     * the identity delegation events.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ServiceAccountDelegationInfo service_account_delegation_info = 10; + * + */ + public Builder addServiceAccountDelegationInfo( + int index, com.google.cloud.securitycenter.v2.ServiceAccountDelegationInfo value) { + if (serviceAccountDelegationInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceAccountDelegationInfoIsMutable(); + serviceAccountDelegationInfo_.add(index, value); + onChanged(); + } else { + serviceAccountDelegationInfoBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The identity delegation history of an authenticated service account that
+     * made the request. The `serviceAccountDelegationInfo[]` object contains
+     * information about the real authorities that try to access Google Cloud
+     * resources by delegating on a service account. When multiple authorities are
+     * present, they are guaranteed to be sorted based on the original ordering of
+     * the identity delegation events.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ServiceAccountDelegationInfo service_account_delegation_info = 10; + * + */ + public Builder addServiceAccountDelegationInfo( + com.google.cloud.securitycenter.v2.ServiceAccountDelegationInfo.Builder builderForValue) { + if (serviceAccountDelegationInfoBuilder_ == null) { + ensureServiceAccountDelegationInfoIsMutable(); + serviceAccountDelegationInfo_.add(builderForValue.build()); + onChanged(); + } else { + serviceAccountDelegationInfoBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The identity delegation history of an authenticated service account that
+     * made the request. The `serviceAccountDelegationInfo[]` object contains
+     * information about the real authorities that try to access Google Cloud
+     * resources by delegating on a service account. When multiple authorities are
+     * present, they are guaranteed to be sorted based on the original ordering of
+     * the identity delegation events.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ServiceAccountDelegationInfo service_account_delegation_info = 10; + * + */ + public Builder addServiceAccountDelegationInfo( + int index, + com.google.cloud.securitycenter.v2.ServiceAccountDelegationInfo.Builder builderForValue) { + if (serviceAccountDelegationInfoBuilder_ == null) { + ensureServiceAccountDelegationInfoIsMutable(); + serviceAccountDelegationInfo_.add(index, builderForValue.build()); + onChanged(); + } else { + serviceAccountDelegationInfoBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The identity delegation history of an authenticated service account that
+     * made the request. The `serviceAccountDelegationInfo[]` object contains
+     * information about the real authorities that try to access Google Cloud
+     * resources by delegating on a service account. When multiple authorities are
+     * present, they are guaranteed to be sorted based on the original ordering of
+     * the identity delegation events.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ServiceAccountDelegationInfo service_account_delegation_info = 10; + * + */ + public Builder addAllServiceAccountDelegationInfo( + java.lang.Iterable< + ? extends com.google.cloud.securitycenter.v2.ServiceAccountDelegationInfo> + values) { + if (serviceAccountDelegationInfoBuilder_ == null) { + ensureServiceAccountDelegationInfoIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, serviceAccountDelegationInfo_); + onChanged(); + } else { + serviceAccountDelegationInfoBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The identity delegation history of an authenticated service account that
+     * made the request. The `serviceAccountDelegationInfo[]` object contains
+     * information about the real authorities that try to access Google Cloud
+     * resources by delegating on a service account. When multiple authorities are
+     * present, they are guaranteed to be sorted based on the original ordering of
+     * the identity delegation events.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ServiceAccountDelegationInfo service_account_delegation_info = 10; + * + */ + public Builder clearServiceAccountDelegationInfo() { + if (serviceAccountDelegationInfoBuilder_ == null) { + serviceAccountDelegationInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + } else { + serviceAccountDelegationInfoBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The identity delegation history of an authenticated service account that
+     * made the request. The `serviceAccountDelegationInfo[]` object contains
+     * information about the real authorities that try to access Google Cloud
+     * resources by delegating on a service account. When multiple authorities are
+     * present, they are guaranteed to be sorted based on the original ordering of
+     * the identity delegation events.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ServiceAccountDelegationInfo service_account_delegation_info = 10; + * + */ + public Builder removeServiceAccountDelegationInfo(int index) { + if (serviceAccountDelegationInfoBuilder_ == null) { + ensureServiceAccountDelegationInfoIsMutable(); + serviceAccountDelegationInfo_.remove(index); + onChanged(); + } else { + serviceAccountDelegationInfoBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The identity delegation history of an authenticated service account that
+     * made the request. The `serviceAccountDelegationInfo[]` object contains
+     * information about the real authorities that try to access Google Cloud
+     * resources by delegating on a service account. When multiple authorities are
+     * present, they are guaranteed to be sorted based on the original ordering of
+     * the identity delegation events.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ServiceAccountDelegationInfo service_account_delegation_info = 10; + * + */ + public com.google.cloud.securitycenter.v2.ServiceAccountDelegationInfo.Builder + getServiceAccountDelegationInfoBuilder(int index) { + return getServiceAccountDelegationInfoFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The identity delegation history of an authenticated service account that
+     * made the request. The `serviceAccountDelegationInfo[]` object contains
+     * information about the real authorities that try to access Google Cloud
+     * resources by delegating on a service account. When multiple authorities are
+     * present, they are guaranteed to be sorted based on the original ordering of
+     * the identity delegation events.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ServiceAccountDelegationInfo service_account_delegation_info = 10; + * + */ + public com.google.cloud.securitycenter.v2.ServiceAccountDelegationInfoOrBuilder + getServiceAccountDelegationInfoOrBuilder(int index) { + if (serviceAccountDelegationInfoBuilder_ == null) { + return serviceAccountDelegationInfo_.get(index); + } else { + return serviceAccountDelegationInfoBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The identity delegation history of an authenticated service account that
+     * made the request. The `serviceAccountDelegationInfo[]` object contains
+     * information about the real authorities that try to access Google Cloud
+     * resources by delegating on a service account. When multiple authorities are
+     * present, they are guaranteed to be sorted based on the original ordering of
+     * the identity delegation events.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ServiceAccountDelegationInfo service_account_delegation_info = 10; + * + */ + public java.util.List< + ? extends com.google.cloud.securitycenter.v2.ServiceAccountDelegationInfoOrBuilder> + getServiceAccountDelegationInfoOrBuilderList() { + if (serviceAccountDelegationInfoBuilder_ != null) { + return serviceAccountDelegationInfoBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(serviceAccountDelegationInfo_); + } + } + /** + * + * + *
+     * The identity delegation history of an authenticated service account that
+     * made the request. The `serviceAccountDelegationInfo[]` object contains
+     * information about the real authorities that try to access Google Cloud
+     * resources by delegating on a service account. When multiple authorities are
+     * present, they are guaranteed to be sorted based on the original ordering of
+     * the identity delegation events.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ServiceAccountDelegationInfo service_account_delegation_info = 10; + * + */ + public com.google.cloud.securitycenter.v2.ServiceAccountDelegationInfo.Builder + addServiceAccountDelegationInfoBuilder() { + return getServiceAccountDelegationInfoFieldBuilder() + .addBuilder( + com.google.cloud.securitycenter.v2.ServiceAccountDelegationInfo.getDefaultInstance()); + } + /** + * + * + *
+     * The identity delegation history of an authenticated service account that
+     * made the request. The `serviceAccountDelegationInfo[]` object contains
+     * information about the real authorities that try to access Google Cloud
+     * resources by delegating on a service account. When multiple authorities are
+     * present, they are guaranteed to be sorted based on the original ordering of
+     * the identity delegation events.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ServiceAccountDelegationInfo service_account_delegation_info = 10; + * + */ + public com.google.cloud.securitycenter.v2.ServiceAccountDelegationInfo.Builder + addServiceAccountDelegationInfoBuilder(int index) { + return getServiceAccountDelegationInfoFieldBuilder() + .addBuilder( + index, + com.google.cloud.securitycenter.v2.ServiceAccountDelegationInfo.getDefaultInstance()); + } + /** + * + * + *
+     * The identity delegation history of an authenticated service account that
+     * made the request. The `serviceAccountDelegationInfo[]` object contains
+     * information about the real authorities that try to access Google Cloud
+     * resources by delegating on a service account. When multiple authorities are
+     * present, they are guaranteed to be sorted based on the original ordering of
+     * the identity delegation events.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ServiceAccountDelegationInfo service_account_delegation_info = 10; + * + */ + public java.util.List + getServiceAccountDelegationInfoBuilderList() { + return getServiceAccountDelegationInfoFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.ServiceAccountDelegationInfo, + com.google.cloud.securitycenter.v2.ServiceAccountDelegationInfo.Builder, + com.google.cloud.securitycenter.v2.ServiceAccountDelegationInfoOrBuilder> + getServiceAccountDelegationInfoFieldBuilder() { + if (serviceAccountDelegationInfoBuilder_ == null) { + serviceAccountDelegationInfoBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.ServiceAccountDelegationInfo, + com.google.cloud.securitycenter.v2.ServiceAccountDelegationInfo.Builder, + com.google.cloud.securitycenter.v2.ServiceAccountDelegationInfoOrBuilder>( + serviceAccountDelegationInfo_, + ((bitField0_ & 0x00000200) != 0), + getParentForChildren(), + isClean()); + serviceAccountDelegationInfo_ = null; + } + return serviceAccountDelegationInfoBuilder_; + } + + private java.lang.Object userName_ = ""; + /** + * + * + *
+     * A string that represents a username. The username provided depends on the
+     * type of the finding and is likely not an IAM principal. For example, this
+     * can be a system username if the finding is related to a virtual machine, or
+     * it can be an application login username.
+     * 
+ * + * string user_name = 11; + * + * @return The userName. + */ + public java.lang.String getUserName() { + java.lang.Object ref = userName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A string that represents a username. The username provided depends on the
+     * type of the finding and is likely not an IAM principal. For example, this
+     * can be a system username if the finding is related to a virtual machine, or
+     * it can be an application login username.
+     * 
+ * + * string user_name = 11; + * + * @return The bytes for userName. + */ + public com.google.protobuf.ByteString getUserNameBytes() { + java.lang.Object ref = userName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A string that represents a username. The username provided depends on the
+     * type of the finding and is likely not an IAM principal. For example, this
+     * can be a system username if the finding is related to a virtual machine, or
+     * it can be an application login username.
+     * 
+ * + * string user_name = 11; + * + * @param value The userName to set. + * @return This builder for chaining. + */ + public Builder setUserName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + userName_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * A string that represents a username. The username provided depends on the
+     * type of the finding and is likely not an IAM principal. For example, this
+     * can be a system username if the finding is related to a virtual machine, or
+     * it can be an application login username.
+     * 
+ * + * string user_name = 11; + * + * @return This builder for chaining. + */ + public Builder clearUserName() { + userName_ = getDefaultInstance().getUserName(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + * + * + *
+     * A string that represents a username. The username provided depends on the
+     * type of the finding and is likely not an IAM principal. For example, this
+     * can be a system username if the finding is related to a virtual machine, or
+     * it can be an application login username.
+     * 
+ * + * string user_name = 11; + * + * @param value The bytes for userName to set. + * @return This builder for chaining. + */ + public Builder setUserNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + userName_ = value; + bitField0_ |= 0x00000400; + 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.v2.Access) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.Access) + private static final com.google.cloud.securitycenter.v2.Access DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.Access(); + } + + public static com.google.cloud.securitycenter.v2.Access getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Access parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.Access getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/AccessOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/AccessOrBuilder.java new file mode 100644 index 000000000000..eb2aed510dac --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/AccessOrBuilder.java @@ -0,0 +1,422 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/access.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface AccessOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.Access) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Associated email, such as "foo@google.com".
+   *
+   * The email address of the authenticated user or a service account acting on
+   * behalf of a third party principal making the request. For third party
+   * identity callers, the `principal_subject` field is populated instead of
+   * this field. For privacy reasons, the principal email address is sometimes
+   * redacted. For more information, see [Caller identities in audit
+   * logs](https://cloud.google.com/logging/docs/audit#user-id).
+   * 
+ * + * string principal_email = 1; + * + * @return The principalEmail. + */ + java.lang.String getPrincipalEmail(); + /** + * + * + *
+   * Associated email, such as "foo@google.com".
+   *
+   * The email address of the authenticated user or a service account acting on
+   * behalf of a third party principal making the request. For third party
+   * identity callers, the `principal_subject` field is populated instead of
+   * this field. For privacy reasons, the principal email address is sometimes
+   * redacted. For more information, see [Caller identities in audit
+   * logs](https://cloud.google.com/logging/docs/audit#user-id).
+   * 
+ * + * string principal_email = 1; + * + * @return The bytes for principalEmail. + */ + com.google.protobuf.ByteString getPrincipalEmailBytes(); + + /** + * + * + *
+   * Caller's IP address, such as "1.1.1.1".
+   * 
+ * + * string caller_ip = 2; + * + * @return The callerIp. + */ + java.lang.String getCallerIp(); + /** + * + * + *
+   * Caller's IP address, such as "1.1.1.1".
+   * 
+ * + * string caller_ip = 2; + * + * @return The bytes for callerIp. + */ + com.google.protobuf.ByteString getCallerIpBytes(); + + /** + * + * + *
+   * The caller IP's geolocation, which identifies where the call came from.
+   * 
+ * + * .google.cloud.securitycenter.v2.Geolocation caller_ip_geo = 3; + * + * @return Whether the callerIpGeo field is set. + */ + boolean hasCallerIpGeo(); + /** + * + * + *
+   * The caller IP's geolocation, which identifies where the call came from.
+   * 
+ * + * .google.cloud.securitycenter.v2.Geolocation caller_ip_geo = 3; + * + * @return The callerIpGeo. + */ + com.google.cloud.securitycenter.v2.Geolocation getCallerIpGeo(); + /** + * + * + *
+   * The caller IP's geolocation, which identifies where the call came from.
+   * 
+ * + * .google.cloud.securitycenter.v2.Geolocation caller_ip_geo = 3; + */ + com.google.cloud.securitycenter.v2.GeolocationOrBuilder getCallerIpGeoOrBuilder(); + + /** + * + * + *
+   * Type of user agent associated with the finding. For example, an operating
+   * system shell or an embedded or standalone application.
+   * 
+ * + * string user_agent_family = 4; + * + * @return The userAgentFamily. + */ + java.lang.String getUserAgentFamily(); + /** + * + * + *
+   * Type of user agent associated with the finding. For example, an operating
+   * system shell or an embedded or standalone application.
+   * 
+ * + * string user_agent_family = 4; + * + * @return The bytes for userAgentFamily. + */ + com.google.protobuf.ByteString getUserAgentFamilyBytes(); + + /** + * + * + *
+   * The caller's user agent string associated with the finding.
+   * 
+ * + * string user_agent = 5; + * + * @return The userAgent. + */ + java.lang.String getUserAgent(); + /** + * + * + *
+   * The caller's user agent string associated with the finding.
+   * 
+ * + * string user_agent = 5; + * + * @return The bytes for userAgent. + */ + com.google.protobuf.ByteString getUserAgentBytes(); + + /** + * + * + *
+   * This is the API service that the service account made a call to, e.g.
+   * "iam.googleapis.com"
+   * 
+ * + * string service_name = 6; + * + * @return The serviceName. + */ + java.lang.String getServiceName(); + /** + * + * + *
+   * This is the API service that the service account made a call to, e.g.
+   * "iam.googleapis.com"
+   * 
+ * + * string service_name = 6; + * + * @return The bytes for serviceName. + */ + com.google.protobuf.ByteString getServiceNameBytes(); + + /** + * + * + *
+   * The method that the service account called, e.g. "SetIamPolicy".
+   * 
+ * + * string method_name = 7; + * + * @return The methodName. + */ + java.lang.String getMethodName(); + /** + * + * + *
+   * The method that the service account called, e.g. "SetIamPolicy".
+   * 
+ * + * string method_name = 7; + * + * @return The bytes for methodName. + */ + com.google.protobuf.ByteString getMethodNameBytes(); + + /** + * + * + *
+   * A string that represents the principal_subject that is associated with the
+   * identity. Unlike `principal_email`, `principal_subject` supports principals
+   * that aren't associated with email addresses, such as third party
+   * principals. For most identities, the format is
+   * `principal://iam.googleapis.com/{identity pool name}/subject/{subject}`.
+   * Some GKE identities, such as GKE_WORKLOAD, FREEFORM, and GKE_HUB_WORKLOAD,
+   * still use the legacy format `serviceAccount:{identity pool
+   * name}[{subject}]`.
+   * 
+ * + * string principal_subject = 8; + * + * @return The principalSubject. + */ + java.lang.String getPrincipalSubject(); + /** + * + * + *
+   * A string that represents the principal_subject that is associated with the
+   * identity. Unlike `principal_email`, `principal_subject` supports principals
+   * that aren't associated with email addresses, such as third party
+   * principals. For most identities, the format is
+   * `principal://iam.googleapis.com/{identity pool name}/subject/{subject}`.
+   * Some GKE identities, such as GKE_WORKLOAD, FREEFORM, and GKE_HUB_WORKLOAD,
+   * still use the legacy format `serviceAccount:{identity pool
+   * name}[{subject}]`.
+   * 
+ * + * string principal_subject = 8; + * + * @return The bytes for principalSubject. + */ + com.google.protobuf.ByteString getPrincipalSubjectBytes(); + + /** + * + * + *
+   * The name of the service account key that was used to create or exchange
+   * credentials when authenticating the service account that made the request.
+   * This is a scheme-less URI full resource name. For example:
+   *
+   * "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}".
+   * 
+ * + * string service_account_key_name = 9; + * + * @return The serviceAccountKeyName. + */ + java.lang.String getServiceAccountKeyName(); + /** + * + * + *
+   * The name of the service account key that was used to create or exchange
+   * credentials when authenticating the service account that made the request.
+   * This is a scheme-less URI full resource name. For example:
+   *
+   * "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}".
+   * 
+ * + * string service_account_key_name = 9; + * + * @return The bytes for serviceAccountKeyName. + */ + com.google.protobuf.ByteString getServiceAccountKeyNameBytes(); + + /** + * + * + *
+   * The identity delegation history of an authenticated service account that
+   * made the request. The `serviceAccountDelegationInfo[]` object contains
+   * information about the real authorities that try to access Google Cloud
+   * resources by delegating on a service account. When multiple authorities are
+   * present, they are guaranteed to be sorted based on the original ordering of
+   * the identity delegation events.
+   * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ServiceAccountDelegationInfo service_account_delegation_info = 10; + * + */ + java.util.List + getServiceAccountDelegationInfoList(); + /** + * + * + *
+   * The identity delegation history of an authenticated service account that
+   * made the request. The `serviceAccountDelegationInfo[]` object contains
+   * information about the real authorities that try to access Google Cloud
+   * resources by delegating on a service account. When multiple authorities are
+   * present, they are guaranteed to be sorted based on the original ordering of
+   * the identity delegation events.
+   * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ServiceAccountDelegationInfo service_account_delegation_info = 10; + * + */ + com.google.cloud.securitycenter.v2.ServiceAccountDelegationInfo getServiceAccountDelegationInfo( + int index); + /** + * + * + *
+   * The identity delegation history of an authenticated service account that
+   * made the request. The `serviceAccountDelegationInfo[]` object contains
+   * information about the real authorities that try to access Google Cloud
+   * resources by delegating on a service account. When multiple authorities are
+   * present, they are guaranteed to be sorted based on the original ordering of
+   * the identity delegation events.
+   * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ServiceAccountDelegationInfo service_account_delegation_info = 10; + * + */ + int getServiceAccountDelegationInfoCount(); + /** + * + * + *
+   * The identity delegation history of an authenticated service account that
+   * made the request. The `serviceAccountDelegationInfo[]` object contains
+   * information about the real authorities that try to access Google Cloud
+   * resources by delegating on a service account. When multiple authorities are
+   * present, they are guaranteed to be sorted based on the original ordering of
+   * the identity delegation events.
+   * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ServiceAccountDelegationInfo service_account_delegation_info = 10; + * + */ + java.util.List + getServiceAccountDelegationInfoOrBuilderList(); + /** + * + * + *
+   * The identity delegation history of an authenticated service account that
+   * made the request. The `serviceAccountDelegationInfo[]` object contains
+   * information about the real authorities that try to access Google Cloud
+   * resources by delegating on a service account. When multiple authorities are
+   * present, they are guaranteed to be sorted based on the original ordering of
+   * the identity delegation events.
+   * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ServiceAccountDelegationInfo service_account_delegation_info = 10; + * + */ + com.google.cloud.securitycenter.v2.ServiceAccountDelegationInfoOrBuilder + getServiceAccountDelegationInfoOrBuilder(int index); + + /** + * + * + *
+   * A string that represents a username. The username provided depends on the
+   * type of the finding and is likely not an IAM principal. For example, this
+   * can be a system username if the finding is related to a virtual machine, or
+   * it can be an application login username.
+   * 
+ * + * string user_name = 11; + * + * @return The userName. + */ + java.lang.String getUserName(); + /** + * + * + *
+   * A string that represents a username. The username provided depends on the
+   * type of the finding and is likely not an IAM principal. For example, this
+   * can be a system username if the finding is related to a virtual machine, or
+   * it can be an application login username.
+   * 
+ * + * string user_name = 11; + * + * @return The bytes for userName. + */ + com.google.protobuf.ByteString getUserNameBytes(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/AccessProto.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/AccessProto.java new file mode 100644 index 000000000000..b1f6bf70cd8a --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/AccessProto.java @@ -0,0 +1,114 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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/v2/access.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public final class AccessProto { + private AccessProto() {} + + 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_v2_Access_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_Access_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v2_ServiceAccountDelegationInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_ServiceAccountDelegationInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v2_Geolocation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_Geolocation_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n+google/cloud/securitycenter/v2/access." + + "proto\022\036google.cloud.securitycenter.v2\"\211\003" + + "\n\006Access\022\027\n\017principal_email\030\001 \001(\t\022\021\n\tcal" + + "ler_ip\030\002 \001(\t\022B\n\rcaller_ip_geo\030\003 \001(\0132+.go" + + "ogle.cloud.securitycenter.v2.Geolocation" + + "\022\031\n\021user_agent_family\030\004 \001(\t\022\022\n\nuser_agen" + + "t\030\005 \001(\t\022\024\n\014service_name\030\006 \001(\t\022\023\n\013method_" + + "name\030\007 \001(\t\022\031\n\021principal_subject\030\010 \001(\t\022 \n" + + "\030service_account_key_name\030\t \001(\t\022e\n\037servi" + + "ce_account_delegation_info\030\n \003(\0132<.googl" + + "e.cloud.securitycenter.v2.ServiceAccount" + + "DelegationInfo\022\021\n\tuser_name\030\013 \001(\t\"R\n\034Ser" + + "viceAccountDelegationInfo\022\027\n\017principal_e" + + "mail\030\001 \001(\t\022\031\n\021principal_subject\030\002 \001(\t\"\"\n" + + "\013Geolocation\022\023\n\013region_code\030\001 \001(\tB\345\001\n\"co" + + "m.google.cloud.securitycenter.v2B\013Access" + + "ProtoP\001ZJcloud.google.com/go/securitycen" + + "ter/apiv2/securitycenterpb;securitycente" + + "rpb\252\002\036Google.Cloud.SecurityCenter.V2\312\002\036G" + + "oogle\\Cloud\\SecurityCenter\\V2\352\002!Google::" + + "Cloud::SecurityCenter::V2b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_cloud_securitycenter_v2_Access_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_securitycenter_v2_Access_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_Access_descriptor, + new java.lang.String[] { + "PrincipalEmail", + "CallerIp", + "CallerIpGeo", + "UserAgentFamily", + "UserAgent", + "ServiceName", + "MethodName", + "PrincipalSubject", + "ServiceAccountKeyName", + "ServiceAccountDelegationInfo", + "UserName", + }); + internal_static_google_cloud_securitycenter_v2_ServiceAccountDelegationInfo_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_securitycenter_v2_ServiceAccountDelegationInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_ServiceAccountDelegationInfo_descriptor, + new java.lang.String[] { + "PrincipalEmail", "PrincipalSubject", + }); + internal_static_google_cloud_securitycenter_v2_Geolocation_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_securitycenter_v2_Geolocation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_Geolocation_descriptor, + new java.lang.String[] { + "RegionCode", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Application.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Application.java new file mode 100644 index 000000000000..e0a2eaa497c8 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Application.java @@ -0,0 +1,820 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/application.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Represents an application associated with a finding.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Application} + */ +public final class Application extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.Application) + ApplicationOrBuilder { + private static final long serialVersionUID = 0L; + // Use Application.newBuilder() to construct. + private Application(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Application() { + baseUri_ = ""; + fullUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Application(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.ApplicationProto + .internal_static_google_cloud_securitycenter_v2_Application_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.ApplicationProto + .internal_static_google_cloud_securitycenter_v2_Application_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Application.class, + com.google.cloud.securitycenter.v2.Application.Builder.class); + } + + public static final int BASE_URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object baseUri_ = ""; + /** + * + * + *
+   * The base URI that identifies the network location of the application in
+   * which the vulnerability was detected. For example, `http://example.com`.
+   * 
+ * + * string base_uri = 1; + * + * @return The baseUri. + */ + @java.lang.Override + public java.lang.String getBaseUri() { + java.lang.Object ref = baseUri_; + 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(); + baseUri_ = s; + return s; + } + } + /** + * + * + *
+   * The base URI that identifies the network location of the application in
+   * which the vulnerability was detected. For example, `http://example.com`.
+   * 
+ * + * string base_uri = 1; + * + * @return The bytes for baseUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBaseUriBytes() { + java.lang.Object ref = baseUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + baseUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FULL_URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object fullUri_ = ""; + /** + * + * + *
+   * The full URI with payload that could be used to reproduce the
+   * vulnerability. For example, `http://example.com?p=aMmYgI6H`.
+   * 
+ * + * string full_uri = 2; + * + * @return The fullUri. + */ + @java.lang.Override + public java.lang.String getFullUri() { + java.lang.Object ref = fullUri_; + 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(); + fullUri_ = s; + return s; + } + } + /** + * + * + *
+   * The full URI with payload that could be used to reproduce the
+   * vulnerability. For example, `http://example.com?p=aMmYgI6H`.
+   * 
+ * + * string full_uri = 2; + * + * @return The bytes for fullUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFullUriBytes() { + java.lang.Object ref = fullUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fullUri_ = 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(baseUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, baseUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fullUri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(baseUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, baseUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, fullUri_); + } + size += getUnknownFields().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.v2.Application)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.Application other = + (com.google.cloud.securitycenter.v2.Application) obj; + + if (!getBaseUri().equals(other.getBaseUri())) return false; + if (!getFullUri().equals(other.getFullUri())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + BASE_URI_FIELD_NUMBER; + hash = (53 * hash) + getBaseUri().hashCode(); + hash = (37 * hash) + FULL_URI_FIELD_NUMBER; + hash = (53 * hash) + getFullUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.Application parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Application 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.v2.Application parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Application 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.v2.Application parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Application parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.Application parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Application 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.v2.Application parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Application 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.v2.Application parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Application 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.v2.Application 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; + } + /** + * + * + *
+   * Represents an application associated with a finding.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Application} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.Application) + com.google.cloud.securitycenter.v2.ApplicationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.ApplicationProto + .internal_static_google_cloud_securitycenter_v2_Application_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.ApplicationProto + .internal_static_google_cloud_securitycenter_v2_Application_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Application.class, + com.google.cloud.securitycenter.v2.Application.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.Application.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + baseUri_ = ""; + fullUri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.ApplicationProto + .internal_static_google_cloud_securitycenter_v2_Application_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Application getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.Application.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Application build() { + com.google.cloud.securitycenter.v2.Application result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Application buildPartial() { + com.google.cloud.securitycenter.v2.Application result = + new com.google.cloud.securitycenter.v2.Application(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.Application result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.baseUri_ = baseUri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.fullUri_ = fullUri_; + } + } + + @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.v2.Application) { + return mergeFrom((com.google.cloud.securitycenter.v2.Application) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.Application other) { + if (other == com.google.cloud.securitycenter.v2.Application.getDefaultInstance()) return this; + if (!other.getBaseUri().isEmpty()) { + baseUri_ = other.baseUri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFullUri().isEmpty()) { + fullUri_ = other.fullUri_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + baseUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + fullUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object baseUri_ = ""; + /** + * + * + *
+     * The base URI that identifies the network location of the application in
+     * which the vulnerability was detected. For example, `http://example.com`.
+     * 
+ * + * string base_uri = 1; + * + * @return The baseUri. + */ + public java.lang.String getBaseUri() { + java.lang.Object ref = baseUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + baseUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The base URI that identifies the network location of the application in
+     * which the vulnerability was detected. For example, `http://example.com`.
+     * 
+ * + * string base_uri = 1; + * + * @return The bytes for baseUri. + */ + public com.google.protobuf.ByteString getBaseUriBytes() { + java.lang.Object ref = baseUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + baseUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The base URI that identifies the network location of the application in
+     * which the vulnerability was detected. For example, `http://example.com`.
+     * 
+ * + * string base_uri = 1; + * + * @param value The baseUri to set. + * @return This builder for chaining. + */ + public Builder setBaseUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + baseUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The base URI that identifies the network location of the application in
+     * which the vulnerability was detected. For example, `http://example.com`.
+     * 
+ * + * string base_uri = 1; + * + * @return This builder for chaining. + */ + public Builder clearBaseUri() { + baseUri_ = getDefaultInstance().getBaseUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The base URI that identifies the network location of the application in
+     * which the vulnerability was detected. For example, `http://example.com`.
+     * 
+ * + * string base_uri = 1; + * + * @param value The bytes for baseUri to set. + * @return This builder for chaining. + */ + public Builder setBaseUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + baseUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object fullUri_ = ""; + /** + * + * + *
+     * The full URI with payload that could be used to reproduce the
+     * vulnerability. For example, `http://example.com?p=aMmYgI6H`.
+     * 
+ * + * string full_uri = 2; + * + * @return The fullUri. + */ + public java.lang.String getFullUri() { + java.lang.Object ref = fullUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fullUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The full URI with payload that could be used to reproduce the
+     * vulnerability. For example, `http://example.com?p=aMmYgI6H`.
+     * 
+ * + * string full_uri = 2; + * + * @return The bytes for fullUri. + */ + public com.google.protobuf.ByteString getFullUriBytes() { + java.lang.Object ref = fullUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fullUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The full URI with payload that could be used to reproduce the
+     * vulnerability. For example, `http://example.com?p=aMmYgI6H`.
+     * 
+ * + * string full_uri = 2; + * + * @param value The fullUri to set. + * @return This builder for chaining. + */ + public Builder setFullUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + fullUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The full URI with payload that could be used to reproduce the
+     * vulnerability. For example, `http://example.com?p=aMmYgI6H`.
+     * 
+ * + * string full_uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearFullUri() { + fullUri_ = getDefaultInstance().getFullUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The full URI with payload that could be used to reproduce the
+     * vulnerability. For example, `http://example.com?p=aMmYgI6H`.
+     * 
+ * + * string full_uri = 2; + * + * @param value The bytes for fullUri to set. + * @return This builder for chaining. + */ + public Builder setFullUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + fullUri_ = value; + bitField0_ |= 0x00000002; + 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.v2.Application) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.Application) + private static final com.google.cloud.securitycenter.v2.Application DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.Application(); + } + + public static com.google.cloud.securitycenter.v2.Application getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Application parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.Application getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ApplicationOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ApplicationOrBuilder.java new file mode 100644 index 000000000000..ddf7f3da0499 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ApplicationOrBuilder.java @@ -0,0 +1,80 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/application.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface ApplicationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.Application) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The base URI that identifies the network location of the application in
+   * which the vulnerability was detected. For example, `http://example.com`.
+   * 
+ * + * string base_uri = 1; + * + * @return The baseUri. + */ + java.lang.String getBaseUri(); + /** + * + * + *
+   * The base URI that identifies the network location of the application in
+   * which the vulnerability was detected. For example, `http://example.com`.
+   * 
+ * + * string base_uri = 1; + * + * @return The bytes for baseUri. + */ + com.google.protobuf.ByteString getBaseUriBytes(); + + /** + * + * + *
+   * The full URI with payload that could be used to reproduce the
+   * vulnerability. For example, `http://example.com?p=aMmYgI6H`.
+   * 
+ * + * string full_uri = 2; + * + * @return The fullUri. + */ + java.lang.String getFullUri(); + /** + * + * + *
+   * The full URI with payload that could be used to reproduce the
+   * vulnerability. For example, `http://example.com?p=aMmYgI6H`.
+   * 
+ * + * string full_uri = 2; + * + * @return The bytes for fullUri. + */ + com.google.protobuf.ByteString getFullUriBytes(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ApplicationProto.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ApplicationProto.java new file mode 100644 index 000000000000..c41d67c29938 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ApplicationProto.java @@ -0,0 +1,69 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/application.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public final class ApplicationProto { + private ApplicationProto() {} + + 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_v2_Application_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_Application_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/v2/applica" + + "tion.proto\022\036google.cloud.securitycenter." + + "v2\"1\n\013Application\022\020\n\010base_uri\030\001 \001(\t\022\020\n\010f" + + "ull_uri\030\002 \001(\tB\352\001\n\"com.google.cloud.secur" + + "itycenter.v2B\020ApplicationProtoP\001ZJcloud." + + "google.com/go/securitycenter/apiv2/secur" + + "itycenterpb;securitycenterpb\252\002\036Google.Cl" + + "oud.SecurityCenter.V2\312\002\036Google\\Cloud\\Sec" + + "urityCenter\\V2\352\002!Google::Cloud::Security" + + "Center::V2b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_cloud_securitycenter_v2_Application_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_securitycenter_v2_Application_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_Application_descriptor, + new java.lang.String[] { + "BaseUri", "FullUri", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/AttackExposure.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/AttackExposure.java new file mode 100644 index 000000000000..f1155d49e9d2 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/AttackExposure.java @@ -0,0 +1,1660 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/attack_exposure.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * An attack exposure contains the results of an attack path simulation run.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.AttackExposure} + */ +public final class AttackExposure extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.AttackExposure) + AttackExposureOrBuilder { + private static final long serialVersionUID = 0L; + // Use AttackExposure.newBuilder() to construct. + private AttackExposure(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AttackExposure() { + attackExposureResult_ = ""; + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AttackExposure(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.AttackExposureProto + .internal_static_google_cloud_securitycenter_v2_AttackExposure_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.AttackExposureProto + .internal_static_google_cloud_securitycenter_v2_AttackExposure_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.AttackExposure.class, + com.google.cloud.securitycenter.v2.AttackExposure.Builder.class); + } + + /** + * + * + *
+   * This enum defines the various states an AttackExposure can be in.
+   * 
+ * + * Protobuf enum {@code google.cloud.securitycenter.v2.AttackExposure.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The state is not specified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The attack exposure has been calculated.
+     * 
+ * + * CALCULATED = 1; + */ + CALCULATED(1), + /** + * + * + *
+     * The attack exposure has not been calculated.
+     * 
+ * + * NOT_CALCULATED = 2; + */ + NOT_CALCULATED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The state is not specified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The attack exposure has been calculated.
+     * 
+ * + * CALCULATED = 1; + */ + public static final int CALCULATED_VALUE = 1; + /** + * + * + *
+     * The attack exposure has not been calculated.
+     * 
+ * + * NOT_CALCULATED = 2; + */ + public static final int NOT_CALCULATED_VALUE = 2; + + 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 State 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 State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return CALCULATED; + case 2: + return NOT_CALCULATED; + 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 State findValueByNumber(int number) { + return State.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.v2.AttackExposure.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final State[] VALUES = values(); + + public static State 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 State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v2.AttackExposure.State) + } + + private int bitField0_; + public static final int SCORE_FIELD_NUMBER = 1; + private double score_ = 0D; + /** + * + * + *
+   * A number between 0 (inclusive) and infinity that represents how important
+   * this finding is to remediate. The higher the score, the more important it
+   * is to remediate.
+   * 
+ * + * double score = 1; + * + * @return The score. + */ + @java.lang.Override + public double getScore() { + return score_; + } + + public static final int LATEST_CALCULATION_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp latestCalculationTime_; + /** + * + * + *
+   * The most recent time the attack exposure was updated on this finding.
+   * 
+ * + * .google.protobuf.Timestamp latest_calculation_time = 2; + * + * @return Whether the latestCalculationTime field is set. + */ + @java.lang.Override + public boolean hasLatestCalculationTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The most recent time the attack exposure was updated on this finding.
+   * 
+ * + * .google.protobuf.Timestamp latest_calculation_time = 2; + * + * @return The latestCalculationTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getLatestCalculationTime() { + return latestCalculationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : latestCalculationTime_; + } + /** + * + * + *
+   * The most recent time the attack exposure was updated on this finding.
+   * 
+ * + * .google.protobuf.Timestamp latest_calculation_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getLatestCalculationTimeOrBuilder() { + return latestCalculationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : latestCalculationTime_; + } + + public static final int ATTACK_EXPOSURE_RESULT_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object attackExposureResult_ = ""; + /** + * + * + *
+   * The resource name of the attack path simulation result that contains the
+   * details regarding this attack exposure score.
+   * Example: organizations/123/simulations/456/attackExposureResults/789
+   * 
+ * + * string attack_exposure_result = 3; + * + * @return The attackExposureResult. + */ + @java.lang.Override + public java.lang.String getAttackExposureResult() { + java.lang.Object ref = attackExposureResult_; + 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(); + attackExposureResult_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name of the attack path simulation result that contains the
+   * details regarding this attack exposure score.
+   * Example: organizations/123/simulations/456/attackExposureResults/789
+   * 
+ * + * string attack_exposure_result = 3; + * + * @return The bytes for attackExposureResult. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAttackExposureResultBytes() { + java.lang.Object ref = attackExposureResult_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + attackExposureResult_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 4; + private int state_ = 0; + /** + * + * + *
+   * Output only. What state this AttackExposure is in. This captures whether or
+   * not an attack exposure has been calculated or not.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.AttackExposure.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. What state this AttackExposure is in. This captures whether or
+   * not an attack exposure has been calculated or not.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.AttackExposure.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.AttackExposure.State getState() { + com.google.cloud.securitycenter.v2.AttackExposure.State result = + com.google.cloud.securitycenter.v2.AttackExposure.State.forNumber(state_); + return result == null + ? com.google.cloud.securitycenter.v2.AttackExposure.State.UNRECOGNIZED + : result; + } + + public static final int EXPOSED_HIGH_VALUE_RESOURCES_COUNT_FIELD_NUMBER = 5; + private int exposedHighValueResourcesCount_ = 0; + /** + * + * + *
+   * The number of high value resources that are exposed as a result of this
+   * finding.
+   * 
+ * + * int32 exposed_high_value_resources_count = 5; + * + * @return The exposedHighValueResourcesCount. + */ + @java.lang.Override + public int getExposedHighValueResourcesCount() { + return exposedHighValueResourcesCount_; + } + + public static final int EXPOSED_MEDIUM_VALUE_RESOURCES_COUNT_FIELD_NUMBER = 6; + private int exposedMediumValueResourcesCount_ = 0; + /** + * + * + *
+   * The number of medium value resources that are exposed as a result of this
+   * finding.
+   * 
+ * + * int32 exposed_medium_value_resources_count = 6; + * + * @return The exposedMediumValueResourcesCount. + */ + @java.lang.Override + public int getExposedMediumValueResourcesCount() { + return exposedMediumValueResourcesCount_; + } + + public static final int EXPOSED_LOW_VALUE_RESOURCES_COUNT_FIELD_NUMBER = 7; + private int exposedLowValueResourcesCount_ = 0; + /** + * + * + *
+   * The number of high value resources that are exposed as a result of this
+   * finding.
+   * 
+ * + * int32 exposed_low_value_resources_count = 7; + * + * @return The exposedLowValueResourcesCount. + */ + @java.lang.Override + public int getExposedLowValueResourcesCount() { + return exposedLowValueResourcesCount_; + } + + 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 (java.lang.Double.doubleToRawLongBits(score_) != 0) { + output.writeDouble(1, score_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getLatestCalculationTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attackExposureResult_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, attackExposureResult_); + } + if (state_ + != com.google.cloud.securitycenter.v2.AttackExposure.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, state_); + } + if (exposedHighValueResourcesCount_ != 0) { + output.writeInt32(5, exposedHighValueResourcesCount_); + } + if (exposedMediumValueResourcesCount_ != 0) { + output.writeInt32(6, exposedMediumValueResourcesCount_); + } + if (exposedLowValueResourcesCount_ != 0) { + output.writeInt32(7, exposedLowValueResourcesCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Double.doubleToRawLongBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, score_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getLatestCalculationTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attackExposureResult_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, attackExposureResult_); + } + if (state_ + != com.google.cloud.securitycenter.v2.AttackExposure.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); + } + if (exposedHighValueResourcesCount_ != 0) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size( + 5, exposedHighValueResourcesCount_); + } + if (exposedMediumValueResourcesCount_ != 0) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size( + 6, exposedMediumValueResourcesCount_); + } + if (exposedLowValueResourcesCount_ != 0) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size(7, exposedLowValueResourcesCount_); + } + size += getUnknownFields().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.v2.AttackExposure)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.AttackExposure other = + (com.google.cloud.securitycenter.v2.AttackExposure) obj; + + if (java.lang.Double.doubleToLongBits(getScore()) + != java.lang.Double.doubleToLongBits(other.getScore())) return false; + if (hasLatestCalculationTime() != other.hasLatestCalculationTime()) return false; + if (hasLatestCalculationTime()) { + if (!getLatestCalculationTime().equals(other.getLatestCalculationTime())) return false; + } + if (!getAttackExposureResult().equals(other.getAttackExposureResult())) return false; + if (state_ != other.state_) return false; + if (getExposedHighValueResourcesCount() != other.getExposedHighValueResourcesCount()) + return false; + if (getExposedMediumValueResourcesCount() != other.getExposedMediumValueResourcesCount()) + return false; + if (getExposedLowValueResourcesCount() != other.getExposedLowValueResourcesCount()) + return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + SCORE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getScore())); + if (hasLatestCalculationTime()) { + hash = (37 * hash) + LATEST_CALCULATION_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLatestCalculationTime().hashCode(); + } + hash = (37 * hash) + ATTACK_EXPOSURE_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getAttackExposureResult().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + EXPOSED_HIGH_VALUE_RESOURCES_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getExposedHighValueResourcesCount(); + hash = (37 * hash) + EXPOSED_MEDIUM_VALUE_RESOURCES_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getExposedMediumValueResourcesCount(); + hash = (37 * hash) + EXPOSED_LOW_VALUE_RESOURCES_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getExposedLowValueResourcesCount(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.AttackExposure parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.AttackExposure 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.v2.AttackExposure parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.AttackExposure 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.v2.AttackExposure parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.AttackExposure parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.AttackExposure parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.AttackExposure 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.v2.AttackExposure parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.AttackExposure 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.v2.AttackExposure parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.AttackExposure 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.v2.AttackExposure 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; + } + /** + * + * + *
+   * An attack exposure contains the results of an attack path simulation run.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.AttackExposure} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.AttackExposure) + com.google.cloud.securitycenter.v2.AttackExposureOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.AttackExposureProto + .internal_static_google_cloud_securitycenter_v2_AttackExposure_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.AttackExposureProto + .internal_static_google_cloud_securitycenter_v2_AttackExposure_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.AttackExposure.class, + com.google.cloud.securitycenter.v2.AttackExposure.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.AttackExposure.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getLatestCalculationTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + score_ = 0D; + latestCalculationTime_ = null; + if (latestCalculationTimeBuilder_ != null) { + latestCalculationTimeBuilder_.dispose(); + latestCalculationTimeBuilder_ = null; + } + attackExposureResult_ = ""; + state_ = 0; + exposedHighValueResourcesCount_ = 0; + exposedMediumValueResourcesCount_ = 0; + exposedLowValueResourcesCount_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.AttackExposureProto + .internal_static_google_cloud_securitycenter_v2_AttackExposure_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.AttackExposure getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.AttackExposure.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.AttackExposure build() { + com.google.cloud.securitycenter.v2.AttackExposure result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.AttackExposure buildPartial() { + com.google.cloud.securitycenter.v2.AttackExposure result = + new com.google.cloud.securitycenter.v2.AttackExposure(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.AttackExposure result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.score_ = score_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.latestCalculationTime_ = + latestCalculationTimeBuilder_ == null + ? latestCalculationTime_ + : latestCalculationTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.attackExposureResult_ = attackExposureResult_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.exposedHighValueResourcesCount_ = exposedHighValueResourcesCount_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.exposedMediumValueResourcesCount_ = exposedMediumValueResourcesCount_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.exposedLowValueResourcesCount_ = exposedLowValueResourcesCount_; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v2.AttackExposure) { + return mergeFrom((com.google.cloud.securitycenter.v2.AttackExposure) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.AttackExposure other) { + if (other == com.google.cloud.securitycenter.v2.AttackExposure.getDefaultInstance()) + return this; + if (other.getScore() != 0D) { + setScore(other.getScore()); + } + if (other.hasLatestCalculationTime()) { + mergeLatestCalculationTime(other.getLatestCalculationTime()); + } + if (!other.getAttackExposureResult().isEmpty()) { + attackExposureResult_ = other.attackExposureResult_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.getExposedHighValueResourcesCount() != 0) { + setExposedHighValueResourcesCount(other.getExposedHighValueResourcesCount()); + } + if (other.getExposedMediumValueResourcesCount() != 0) { + setExposedMediumValueResourcesCount(other.getExposedMediumValueResourcesCount()); + } + if (other.getExposedLowValueResourcesCount() != 0) { + setExposedLowValueResourcesCount(other.getExposedLowValueResourcesCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: + { + score_ = input.readDouble(); + bitField0_ |= 0x00000001; + break; + } // case 9 + case 18: + { + input.readMessage( + getLatestCalculationTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + attackExposureResult_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + exposedHighValueResourcesCount_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: + { + exposedMediumValueResourcesCount_ = input.readInt32(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: + { + exposedLowValueResourcesCount_ = input.readInt32(); + bitField0_ |= 0x00000040; + break; + } // case 56 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private double score_; + /** + * + * + *
+     * A number between 0 (inclusive) and infinity that represents how important
+     * this finding is to remediate. The higher the score, the more important it
+     * is to remediate.
+     * 
+ * + * double score = 1; + * + * @return The score. + */ + @java.lang.Override + public double getScore() { + return score_; + } + /** + * + * + *
+     * A number between 0 (inclusive) and infinity that represents how important
+     * this finding is to remediate. The higher the score, the more important it
+     * is to remediate.
+     * 
+ * + * double score = 1; + * + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(double value) { + + score_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * A number between 0 (inclusive) and infinity that represents how important
+     * this finding is to remediate. The higher the score, the more important it
+     * is to remediate.
+     * 
+ * + * double score = 1; + * + * @return This builder for chaining. + */ + public Builder clearScore() { + bitField0_ = (bitField0_ & ~0x00000001); + score_ = 0D; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp latestCalculationTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + latestCalculationTimeBuilder_; + /** + * + * + *
+     * The most recent time the attack exposure was updated on this finding.
+     * 
+ * + * .google.protobuf.Timestamp latest_calculation_time = 2; + * + * @return Whether the latestCalculationTime field is set. + */ + public boolean hasLatestCalculationTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The most recent time the attack exposure was updated on this finding.
+     * 
+ * + * .google.protobuf.Timestamp latest_calculation_time = 2; + * + * @return The latestCalculationTime. + */ + public com.google.protobuf.Timestamp getLatestCalculationTime() { + if (latestCalculationTimeBuilder_ == null) { + return latestCalculationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : latestCalculationTime_; + } else { + return latestCalculationTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The most recent time the attack exposure was updated on this finding.
+     * 
+ * + * .google.protobuf.Timestamp latest_calculation_time = 2; + */ + public Builder setLatestCalculationTime(com.google.protobuf.Timestamp value) { + if (latestCalculationTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + latestCalculationTime_ = value; + } else { + latestCalculationTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The most recent time the attack exposure was updated on this finding.
+     * 
+ * + * .google.protobuf.Timestamp latest_calculation_time = 2; + */ + public Builder setLatestCalculationTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (latestCalculationTimeBuilder_ == null) { + latestCalculationTime_ = builderForValue.build(); + } else { + latestCalculationTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The most recent time the attack exposure was updated on this finding.
+     * 
+ * + * .google.protobuf.Timestamp latest_calculation_time = 2; + */ + public Builder mergeLatestCalculationTime(com.google.protobuf.Timestamp value) { + if (latestCalculationTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && latestCalculationTime_ != null + && latestCalculationTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getLatestCalculationTimeBuilder().mergeFrom(value); + } else { + latestCalculationTime_ = value; + } + } else { + latestCalculationTimeBuilder_.mergeFrom(value); + } + if (latestCalculationTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The most recent time the attack exposure was updated on this finding.
+     * 
+ * + * .google.protobuf.Timestamp latest_calculation_time = 2; + */ + public Builder clearLatestCalculationTime() { + bitField0_ = (bitField0_ & ~0x00000002); + latestCalculationTime_ = null; + if (latestCalculationTimeBuilder_ != null) { + latestCalculationTimeBuilder_.dispose(); + latestCalculationTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The most recent time the attack exposure was updated on this finding.
+     * 
+ * + * .google.protobuf.Timestamp latest_calculation_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getLatestCalculationTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getLatestCalculationTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The most recent time the attack exposure was updated on this finding.
+     * 
+ * + * .google.protobuf.Timestamp latest_calculation_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getLatestCalculationTimeOrBuilder() { + if (latestCalculationTimeBuilder_ != null) { + return latestCalculationTimeBuilder_.getMessageOrBuilder(); + } else { + return latestCalculationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : latestCalculationTime_; + } + } + /** + * + * + *
+     * The most recent time the attack exposure was updated on this finding.
+     * 
+ * + * .google.protobuf.Timestamp latest_calculation_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getLatestCalculationTimeFieldBuilder() { + if (latestCalculationTimeBuilder_ == null) { + latestCalculationTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getLatestCalculationTime(), getParentForChildren(), isClean()); + latestCalculationTime_ = null; + } + return latestCalculationTimeBuilder_; + } + + private java.lang.Object attackExposureResult_ = ""; + /** + * + * + *
+     * The resource name of the attack path simulation result that contains the
+     * details regarding this attack exposure score.
+     * Example: organizations/123/simulations/456/attackExposureResults/789
+     * 
+ * + * string attack_exposure_result = 3; + * + * @return The attackExposureResult. + */ + public java.lang.String getAttackExposureResult() { + java.lang.Object ref = attackExposureResult_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attackExposureResult_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name of the attack path simulation result that contains the
+     * details regarding this attack exposure score.
+     * Example: organizations/123/simulations/456/attackExposureResults/789
+     * 
+ * + * string attack_exposure_result = 3; + * + * @return The bytes for attackExposureResult. + */ + public com.google.protobuf.ByteString getAttackExposureResultBytes() { + java.lang.Object ref = attackExposureResult_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + attackExposureResult_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name of the attack path simulation result that contains the
+     * details regarding this attack exposure score.
+     * Example: organizations/123/simulations/456/attackExposureResults/789
+     * 
+ * + * string attack_exposure_result = 3; + * + * @param value The attackExposureResult to set. + * @return This builder for chaining. + */ + public Builder setAttackExposureResult(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + attackExposureResult_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the attack path simulation result that contains the
+     * details regarding this attack exposure score.
+     * Example: organizations/123/simulations/456/attackExposureResults/789
+     * 
+ * + * string attack_exposure_result = 3; + * + * @return This builder for chaining. + */ + public Builder clearAttackExposureResult() { + attackExposureResult_ = getDefaultInstance().getAttackExposureResult(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the attack path simulation result that contains the
+     * details regarding this attack exposure score.
+     * Example: organizations/123/simulations/456/attackExposureResults/789
+     * 
+ * + * string attack_exposure_result = 3; + * + * @param value The bytes for attackExposureResult to set. + * @return This builder for chaining. + */ + public Builder setAttackExposureResultBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + attackExposureResult_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. What state this AttackExposure is in. This captures whether or
+     * not an attack exposure has been calculated or not.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.AttackExposure.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. What state this AttackExposure is in. This captures whether or
+     * not an attack exposure has been calculated or not.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.AttackExposure.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. What state this AttackExposure is in. This captures whether or
+     * not an attack exposure has been calculated or not.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.AttackExposure.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.AttackExposure.State getState() { + com.google.cloud.securitycenter.v2.AttackExposure.State result = + com.google.cloud.securitycenter.v2.AttackExposure.State.forNumber(state_); + return result == null + ? com.google.cloud.securitycenter.v2.AttackExposure.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. What state this AttackExposure is in. This captures whether or
+     * not an attack exposure has been calculated or not.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.AttackExposure.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.securitycenter.v2.AttackExposure.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. What state this AttackExposure is in. This captures whether or
+     * not an attack exposure has been calculated or not.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.AttackExposure.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000008); + state_ = 0; + onChanged(); + return this; + } + + private int exposedHighValueResourcesCount_; + /** + * + * + *
+     * The number of high value resources that are exposed as a result of this
+     * finding.
+     * 
+ * + * int32 exposed_high_value_resources_count = 5; + * + * @return The exposedHighValueResourcesCount. + */ + @java.lang.Override + public int getExposedHighValueResourcesCount() { + return exposedHighValueResourcesCount_; + } + /** + * + * + *
+     * The number of high value resources that are exposed as a result of this
+     * finding.
+     * 
+ * + * int32 exposed_high_value_resources_count = 5; + * + * @param value The exposedHighValueResourcesCount to set. + * @return This builder for chaining. + */ + public Builder setExposedHighValueResourcesCount(int value) { + + exposedHighValueResourcesCount_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The number of high value resources that are exposed as a result of this
+     * finding.
+     * 
+ * + * int32 exposed_high_value_resources_count = 5; + * + * @return This builder for chaining. + */ + public Builder clearExposedHighValueResourcesCount() { + bitField0_ = (bitField0_ & ~0x00000010); + exposedHighValueResourcesCount_ = 0; + onChanged(); + return this; + } + + private int exposedMediumValueResourcesCount_; + /** + * + * + *
+     * The number of medium value resources that are exposed as a result of this
+     * finding.
+     * 
+ * + * int32 exposed_medium_value_resources_count = 6; + * + * @return The exposedMediumValueResourcesCount. + */ + @java.lang.Override + public int getExposedMediumValueResourcesCount() { + return exposedMediumValueResourcesCount_; + } + /** + * + * + *
+     * The number of medium value resources that are exposed as a result of this
+     * finding.
+     * 
+ * + * int32 exposed_medium_value_resources_count = 6; + * + * @param value The exposedMediumValueResourcesCount to set. + * @return This builder for chaining. + */ + public Builder setExposedMediumValueResourcesCount(int value) { + + exposedMediumValueResourcesCount_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The number of medium value resources that are exposed as a result of this
+     * finding.
+     * 
+ * + * int32 exposed_medium_value_resources_count = 6; + * + * @return This builder for chaining. + */ + public Builder clearExposedMediumValueResourcesCount() { + bitField0_ = (bitField0_ & ~0x00000020); + exposedMediumValueResourcesCount_ = 0; + onChanged(); + return this; + } + + private int exposedLowValueResourcesCount_; + /** + * + * + *
+     * The number of high value resources that are exposed as a result of this
+     * finding.
+     * 
+ * + * int32 exposed_low_value_resources_count = 7; + * + * @return The exposedLowValueResourcesCount. + */ + @java.lang.Override + public int getExposedLowValueResourcesCount() { + return exposedLowValueResourcesCount_; + } + /** + * + * + *
+     * The number of high value resources that are exposed as a result of this
+     * finding.
+     * 
+ * + * int32 exposed_low_value_resources_count = 7; + * + * @param value The exposedLowValueResourcesCount to set. + * @return This builder for chaining. + */ + public Builder setExposedLowValueResourcesCount(int value) { + + exposedLowValueResourcesCount_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * The number of high value resources that are exposed as a result of this
+     * finding.
+     * 
+ * + * int32 exposed_low_value_resources_count = 7; + * + * @return This builder for chaining. + */ + public Builder clearExposedLowValueResourcesCount() { + bitField0_ = (bitField0_ & ~0x00000040); + exposedLowValueResourcesCount_ = 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.v2.AttackExposure) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.AttackExposure) + private static final com.google.cloud.securitycenter.v2.AttackExposure DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.AttackExposure(); + } + + public static com.google.cloud.securitycenter.v2.AttackExposure getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AttackExposure parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.AttackExposure getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/AttackExposureOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/AttackExposureOrBuilder.java new file mode 100644 index 000000000000..c5c069a7516c --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/AttackExposureOrBuilder.java @@ -0,0 +1,178 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/attack_exposure.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface AttackExposureOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.AttackExposure) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A number between 0 (inclusive) and infinity that represents how important
+   * this finding is to remediate. The higher the score, the more important it
+   * is to remediate.
+   * 
+ * + * double score = 1; + * + * @return The score. + */ + double getScore(); + + /** + * + * + *
+   * The most recent time the attack exposure was updated on this finding.
+   * 
+ * + * .google.protobuf.Timestamp latest_calculation_time = 2; + * + * @return Whether the latestCalculationTime field is set. + */ + boolean hasLatestCalculationTime(); + /** + * + * + *
+   * The most recent time the attack exposure was updated on this finding.
+   * 
+ * + * .google.protobuf.Timestamp latest_calculation_time = 2; + * + * @return The latestCalculationTime. + */ + com.google.protobuf.Timestamp getLatestCalculationTime(); + /** + * + * + *
+   * The most recent time the attack exposure was updated on this finding.
+   * 
+ * + * .google.protobuf.Timestamp latest_calculation_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getLatestCalculationTimeOrBuilder(); + + /** + * + * + *
+   * The resource name of the attack path simulation result that contains the
+   * details regarding this attack exposure score.
+   * Example: organizations/123/simulations/456/attackExposureResults/789
+   * 
+ * + * string attack_exposure_result = 3; + * + * @return The attackExposureResult. + */ + java.lang.String getAttackExposureResult(); + /** + * + * + *
+   * The resource name of the attack path simulation result that contains the
+   * details regarding this attack exposure score.
+   * Example: organizations/123/simulations/456/attackExposureResults/789
+   * 
+ * + * string attack_exposure_result = 3; + * + * @return The bytes for attackExposureResult. + */ + com.google.protobuf.ByteString getAttackExposureResultBytes(); + + /** + * + * + *
+   * Output only. What state this AttackExposure is in. This captures whether or
+   * not an attack exposure has been calculated or not.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.AttackExposure.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. What state this AttackExposure is in. This captures whether or
+   * not an attack exposure has been calculated or not.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.AttackExposure.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.securitycenter.v2.AttackExposure.State getState(); + + /** + * + * + *
+   * The number of high value resources that are exposed as a result of this
+   * finding.
+   * 
+ * + * int32 exposed_high_value_resources_count = 5; + * + * @return The exposedHighValueResourcesCount. + */ + int getExposedHighValueResourcesCount(); + + /** + * + * + *
+   * The number of medium value resources that are exposed as a result of this
+   * finding.
+   * 
+ * + * int32 exposed_medium_value_resources_count = 6; + * + * @return The exposedMediumValueResourcesCount. + */ + int getExposedMediumValueResourcesCount(); + + /** + * + * + *
+   * The number of high value resources that are exposed as a result of this
+   * finding.
+   * 
+ * + * int32 exposed_low_value_resources_count = 7; + * + * @return The exposedLowValueResourcesCount. + */ + int getExposedLowValueResourcesCount(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/AttackExposureProto.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/AttackExposureProto.java new file mode 100644 index 000000000000..02329f8da2e5 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/AttackExposureProto.java @@ -0,0 +1,97 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/attack_exposure.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public final class AttackExposureProto { + private AttackExposureProto() {} + + 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_v2_AttackExposure_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_AttackExposure_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/v2/attack_" + + "exposure.proto\022\036google.cloud.securitycen" + + "ter.v2\032\037google/api/field_behavior.proto\032" + + "\037google/protobuf/timestamp.proto\"\217\003\n\016Att" + + "ackExposure\022\r\n\005score\030\001 \001(\001\022;\n\027latest_cal" + + "culation_time\030\002 \001(\0132\032.google.protobuf.Ti" + + "mestamp\022\036\n\026attack_exposure_result\030\003 \001(\t\022" + + "H\n\005state\030\004 \001(\01624.google.cloud.securityce" + + "nter.v2.AttackExposure.StateB\003\340A\003\022*\n\"exp" + + "osed_high_value_resources_count\030\005 \001(\005\022,\n" + + "$exposed_medium_value_resources_count\030\006 " + + "\001(\005\022)\n!exposed_low_value_resources_count" + + "\030\007 \001(\005\"B\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\016" + + "\n\nCALCULATED\020\001\022\022\n\016NOT_CALCULATED\020\002B\355\001\n\"c" + + "om.google.cloud.securitycenter.v2B\023Attac" + + "kExposureProtoP\001ZJcloud.google.com/go/se" + + "curitycenter/apiv2/securitycenterpb;secu" + + "ritycenterpb\252\002\036Google.Cloud.SecurityCent" + + "er.V2\312\002\036Google\\Cloud\\SecurityCenter\\V2\352\002" + + "!Google::Cloud::SecurityCenter::V2b\006prot" + + "o3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_securitycenter_v2_AttackExposure_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_securitycenter_v2_AttackExposure_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_AttackExposure_descriptor, + new java.lang.String[] { + "Score", + "LatestCalculationTime", + "AttackExposureResult", + "State", + "ExposedHighValueResourcesCount", + "ExposedMediumValueResourcesCount", + "ExposedLowValueResourcesCount", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/AttackPath.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/AttackPath.java new file mode 100644 index 000000000000..8446d3c55a0a --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/AttackPath.java @@ -0,0 +1,8167 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/attack_path.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * A path that an attacker could take to reach an exposed resource.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.AttackPath} + */ +public final class AttackPath extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.AttackPath) + AttackPathOrBuilder { + private static final long serialVersionUID = 0L; + // Use AttackPath.newBuilder() to construct. + private AttackPath(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AttackPath() { + name_ = ""; + pathNodes_ = java.util.Collections.emptyList(); + edges_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AttackPath(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.AttackPathProto + .internal_static_google_cloud_securitycenter_v2_AttackPath_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.AttackPathProto + .internal_static_google_cloud_securitycenter_v2_AttackPath_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.AttackPath.class, + com.google.cloud.securitycenter.v2.AttackPath.Builder.class); + } + + public interface AttackPathNodeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.AttackPath.AttackPathNode) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The name of the resource at this point in the attack path.
+     * The format of the name follows the Cloud Asset Inventory [resource
+     * name
+     * format]("https://cloud.google.com/asset-inventory/docs/resource-name-format")
+     * 
+ * + * string resource = 1; + * + * @return The resource. + */ + java.lang.String getResource(); + /** + * + * + *
+     * The name of the resource at this point in the attack path.
+     * The format of the name follows the Cloud Asset Inventory [resource
+     * name
+     * format]("https://cloud.google.com/asset-inventory/docs/resource-name-format")
+     * 
+ * + * string resource = 1; + * + * @return The bytes for resource. + */ + com.google.protobuf.ByteString getResourceBytes(); + + /** + * + * + *
+     * The [supported resource
+     * type](https://cloud.google.com/asset-inventory/docs/supported-asset-types")
+     * 
+ * + * string resource_type = 2; + * + * @return The resourceType. + */ + java.lang.String getResourceType(); + /** + * + * + *
+     * The [supported resource
+     * type](https://cloud.google.com/asset-inventory/docs/supported-asset-types")
+     * 
+ * + * string resource_type = 2; + * + * @return The bytes for resourceType. + */ + com.google.protobuf.ByteString getResourceTypeBytes(); + + /** + * + * + *
+     * Human-readable name of this resource.
+     * 
+ * + * string display_name = 3; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+     * Human-readable name of this resource.
+     * 
+ * + * string display_name = 3; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+     * The findings associated with this node in the attack path.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding associated_findings = 4; + * + */ + java.util.List< + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding> + getAssociatedFindingsList(); + /** + * + * + *
+     * The findings associated with this node in the attack path.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding associated_findings = 4; + * + */ + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding + getAssociatedFindings(int index); + /** + * + * + *
+     * The findings associated with this node in the attack path.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding associated_findings = 4; + * + */ + int getAssociatedFindingsCount(); + /** + * + * + *
+     * The findings associated with this node in the attack path.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding associated_findings = 4; + * + */ + java.util.List< + ? extends + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFindingOrBuilder> + getAssociatedFindingsOrBuilderList(); + /** + * + * + *
+     * The findings associated with this node in the attack path.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding associated_findings = 4; + * + */ + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFindingOrBuilder + getAssociatedFindingsOrBuilder(int index); + + /** + * + * + *
+     * Unique id of the attack path node.
+     * 
+ * + * string uuid = 5; + * + * @return The uuid. + */ + java.lang.String getUuid(); + /** + * + * + *
+     * Unique id of the attack path node.
+     * 
+ * + * string uuid = 5; + * + * @return The bytes for uuid. + */ + com.google.protobuf.ByteString getUuidBytes(); + + /** + * + * + *
+     * A list of attack step nodes that exist in this attack path node.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode attack_steps = 6; + * + */ + java.util.List + getAttackStepsList(); + /** + * + * + *
+     * A list of attack step nodes that exist in this attack path node.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode attack_steps = 6; + * + */ + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode getAttackSteps( + int index); + /** + * + * + *
+     * A list of attack step nodes that exist in this attack path node.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode attack_steps = 6; + * + */ + int getAttackStepsCount(); + /** + * + * + *
+     * A list of attack step nodes that exist in this attack path node.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode attack_steps = 6; + * + */ + java.util.List< + ? extends + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .AttackStepNodeOrBuilder> + getAttackStepsOrBuilderList(); + /** + * + * + *
+     * A list of attack step nodes that exist in this attack path node.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode attack_steps = 6; + * + */ + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNodeOrBuilder + getAttackStepsOrBuilder(int index); + } + /** + * + * + *
+   * Represents one point that an attacker passes through in this attack path.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.AttackPath.AttackPathNode} + */ + public static final class AttackPathNode extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.AttackPath.AttackPathNode) + AttackPathNodeOrBuilder { + private static final long serialVersionUID = 0L; + // Use AttackPathNode.newBuilder() to construct. + private AttackPathNode(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AttackPathNode() { + resource_ = ""; + resourceType_ = ""; + displayName_ = ""; + associatedFindings_ = java.util.Collections.emptyList(); + uuid_ = ""; + attackSteps_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AttackPathNode(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.AttackPathProto + .internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.AttackPathProto + .internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.class, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.Builder.class); + } + + /** + * + * + *
+     * The type of the incoming attack step node.
+     * 
+ * + * Protobuf enum {@code google.cloud.securitycenter.v2.AttackPath.AttackPathNode.NodeType} + */ + public enum NodeType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Type not specified
+       * 
+ * + * NODE_TYPE_UNSPECIFIED = 0; + */ + NODE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+       * Incoming edge joined with AND
+       * 
+ * + * NODE_TYPE_AND = 1; + */ + NODE_TYPE_AND(1), + /** + * + * + *
+       * Incoming edge joined with OR
+       * 
+ * + * NODE_TYPE_OR = 2; + */ + NODE_TYPE_OR(2), + /** + * + * + *
+       * Incoming edge is defense
+       * 
+ * + * NODE_TYPE_DEFENSE = 3; + */ + NODE_TYPE_DEFENSE(3), + /** + * + * + *
+       * Incoming edge is attacker
+       * 
+ * + * NODE_TYPE_ATTACKER = 4; + */ + NODE_TYPE_ATTACKER(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Type not specified
+       * 
+ * + * NODE_TYPE_UNSPECIFIED = 0; + */ + public static final int NODE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Incoming edge joined with AND
+       * 
+ * + * NODE_TYPE_AND = 1; + */ + public static final int NODE_TYPE_AND_VALUE = 1; + /** + * + * + *
+       * Incoming edge joined with OR
+       * 
+ * + * NODE_TYPE_OR = 2; + */ + public static final int NODE_TYPE_OR_VALUE = 2; + /** + * + * + *
+       * Incoming edge is defense
+       * 
+ * + * NODE_TYPE_DEFENSE = 3; + */ + public static final int NODE_TYPE_DEFENSE_VALUE = 3; + /** + * + * + *
+       * Incoming edge is attacker
+       * 
+ * + * NODE_TYPE_ATTACKER = 4; + */ + public static final int NODE_TYPE_ATTACKER_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 NodeType 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 NodeType forNumber(int value) { + switch (value) { + case 0: + return NODE_TYPE_UNSPECIFIED; + case 1: + return NODE_TYPE_AND; + case 2: + return NODE_TYPE_OR; + case 3: + return NODE_TYPE_DEFENSE; + case 4: + return NODE_TYPE_ATTACKER; + 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 NodeType findValueByNumber(int number) { + return NodeType.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.v2.AttackPath.AttackPathNode.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final NodeType[] VALUES = values(); + + public static NodeType 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 NodeType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v2.AttackPath.AttackPathNode.NodeType) + } + + public interface PathNodeAssociatedFindingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Canonical name of the associated findings. Example:
+       * organizations/123/sources/456/findings/789
+       * 
+ * + * string canonical_finding = 1; + * + * @return The canonicalFinding. + */ + java.lang.String getCanonicalFinding(); + /** + * + * + *
+       * Canonical name of the associated findings. Example:
+       * organizations/123/sources/456/findings/789
+       * 
+ * + * string canonical_finding = 1; + * + * @return The bytes for canonicalFinding. + */ + com.google.protobuf.ByteString getCanonicalFindingBytes(); + + /** + * + * + *
+       * The additional taxonomy group within findings from a given source.
+       * 
+ * + * string finding_category = 2; + * + * @return The findingCategory. + */ + java.lang.String getFindingCategory(); + /** + * + * + *
+       * The additional taxonomy group within findings from a given source.
+       * 
+ * + * string finding_category = 2; + * + * @return The bytes for findingCategory. + */ + com.google.protobuf.ByteString getFindingCategoryBytes(); + + /** + * + * + *
+       * Full resource name of the finding.
+       * 
+ * + * string name = 3; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+       * Full resource name of the finding.
+       * 
+ * + * string name = 3; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + } + /** + * + * + *
+     * A finding that is associated with this node in the attack path.
+     * 
+ * + * Protobuf type {@code + * google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding} + */ + public static final class PathNodeAssociatedFinding + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding) + PathNodeAssociatedFindingOrBuilder { + private static final long serialVersionUID = 0L; + // Use PathNodeAssociatedFinding.newBuilder() to construct. + private PathNodeAssociatedFinding(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PathNodeAssociatedFinding() { + canonicalFinding_ = ""; + findingCategory_ = ""; + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PathNodeAssociatedFinding(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.AttackPathProto + .internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_PathNodeAssociatedFinding_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.AttackPathProto + .internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_PathNodeAssociatedFinding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding.class, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding.Builder.class); + } + + public static final int CANONICAL_FINDING_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object canonicalFinding_ = ""; + /** + * + * + *
+       * Canonical name of the associated findings. Example:
+       * organizations/123/sources/456/findings/789
+       * 
+ * + * string canonical_finding = 1; + * + * @return The canonicalFinding. + */ + @java.lang.Override + public java.lang.String getCanonicalFinding() { + java.lang.Object ref = canonicalFinding_; + 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(); + canonicalFinding_ = s; + return s; + } + } + /** + * + * + *
+       * Canonical name of the associated findings. Example:
+       * organizations/123/sources/456/findings/789
+       * 
+ * + * string canonical_finding = 1; + * + * @return The bytes for canonicalFinding. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCanonicalFindingBytes() { + java.lang.Object ref = canonicalFinding_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + canonicalFinding_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FINDING_CATEGORY_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object findingCategory_ = ""; + /** + * + * + *
+       * The additional taxonomy group within findings from a given source.
+       * 
+ * + * string finding_category = 2; + * + * @return The findingCategory. + */ + @java.lang.Override + public java.lang.String getFindingCategory() { + java.lang.Object ref = findingCategory_; + 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(); + findingCategory_ = s; + return s; + } + } + /** + * + * + *
+       * The additional taxonomy group within findings from a given source.
+       * 
+ * + * string finding_category = 2; + * + * @return The bytes for findingCategory. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFindingCategoryBytes() { + java.lang.Object ref = findingCategory_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + findingCategory_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+       * Full resource name of the finding.
+       * 
+ * + * string name = 3; + * + * @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; + } + } + /** + * + * + *
+       * Full resource name of the finding.
+       * 
+ * + * string name = 3; + * + * @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(canonicalFinding_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, canonicalFinding_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(findingCategory_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, findingCategory_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(canonicalFinding_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, canonicalFinding_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(findingCategory_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, findingCategory_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); + } + size += getUnknownFields().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.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding + other = + (com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding) + obj; + + if (!getCanonicalFinding().equals(other.getCanonicalFinding())) return false; + if (!getFindingCategory().equals(other.getFindingCategory())) return false; + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + CANONICAL_FINDING_FIELD_NUMBER; + hash = (53 * hash) + getCanonicalFinding().hashCode(); + hash = (37 * hash) + FINDING_CATEGORY_FIELD_NUMBER; + hash = (53 * hash) + getFindingCategory().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding + 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.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding + 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.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding + 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.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding + 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.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding + 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.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding + 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 finding that is associated with this node in the attack path.
+       * 
+ * + * Protobuf type {@code + * google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding) + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFindingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.AttackPathProto + .internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_PathNodeAssociatedFinding_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.AttackPathProto + .internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_PathNodeAssociatedFinding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding.class, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding.Builder.class); + } + + // Construct using + // com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + canonicalFinding_ = ""; + findingCategory_ = ""; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.AttackPathProto + .internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_PathNodeAssociatedFinding_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding + getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding + build() { + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding + buildPartial() { + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding + result = + new com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.canonicalFinding_ = canonicalFinding_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.findingCategory_ = findingCategory_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.name_ = name_; + } + } + + @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.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding) { + return mergeFrom( + (com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding + other) { + if (other + == com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding.getDefaultInstance()) return this; + if (!other.getCanonicalFinding().isEmpty()) { + canonicalFinding_ = other.canonicalFinding_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFindingCategory().isEmpty()) { + findingCategory_ = other.findingCategory_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + canonicalFinding_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + findingCategory_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object canonicalFinding_ = ""; + /** + * + * + *
+         * Canonical name of the associated findings. Example:
+         * organizations/123/sources/456/findings/789
+         * 
+ * + * string canonical_finding = 1; + * + * @return The canonicalFinding. + */ + public java.lang.String getCanonicalFinding() { + java.lang.Object ref = canonicalFinding_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + canonicalFinding_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Canonical name of the associated findings. Example:
+         * organizations/123/sources/456/findings/789
+         * 
+ * + * string canonical_finding = 1; + * + * @return The bytes for canonicalFinding. + */ + public com.google.protobuf.ByteString getCanonicalFindingBytes() { + java.lang.Object ref = canonicalFinding_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + canonicalFinding_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Canonical name of the associated findings. Example:
+         * organizations/123/sources/456/findings/789
+         * 
+ * + * string canonical_finding = 1; + * + * @param value The canonicalFinding to set. + * @return This builder for chaining. + */ + public Builder setCanonicalFinding(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + canonicalFinding_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Canonical name of the associated findings. Example:
+         * organizations/123/sources/456/findings/789
+         * 
+ * + * string canonical_finding = 1; + * + * @return This builder for chaining. + */ + public Builder clearCanonicalFinding() { + canonicalFinding_ = getDefaultInstance().getCanonicalFinding(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * Canonical name of the associated findings. Example:
+         * organizations/123/sources/456/findings/789
+         * 
+ * + * string canonical_finding = 1; + * + * @param value The bytes for canonicalFinding to set. + * @return This builder for chaining. + */ + public Builder setCanonicalFindingBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + canonicalFinding_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object findingCategory_ = ""; + /** + * + * + *
+         * The additional taxonomy group within findings from a given source.
+         * 
+ * + * string finding_category = 2; + * + * @return The findingCategory. + */ + public java.lang.String getFindingCategory() { + java.lang.Object ref = findingCategory_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + findingCategory_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The additional taxonomy group within findings from a given source.
+         * 
+ * + * string finding_category = 2; + * + * @return The bytes for findingCategory. + */ + public com.google.protobuf.ByteString getFindingCategoryBytes() { + java.lang.Object ref = findingCategory_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + findingCategory_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The additional taxonomy group within findings from a given source.
+         * 
+ * + * string finding_category = 2; + * + * @param value The findingCategory to set. + * @return This builder for chaining. + */ + public Builder setFindingCategory(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + findingCategory_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * The additional taxonomy group within findings from a given source.
+         * 
+ * + * string finding_category = 2; + * + * @return This builder for chaining. + */ + public Builder clearFindingCategory() { + findingCategory_ = getDefaultInstance().getFindingCategory(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+         * The additional taxonomy group within findings from a given source.
+         * 
+ * + * string finding_category = 2; + * + * @param value The bytes for findingCategory to set. + * @return This builder for chaining. + */ + public Builder setFindingCategoryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + findingCategory_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+         * Full resource name of the finding.
+         * 
+ * + * string name = 3; + * + * @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; + } + } + /** + * + * + *
+         * Full resource name of the finding.
+         * 
+ * + * string name = 3; + * + * @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; + } + } + /** + * + * + *
+         * Full resource name of the finding.
+         * 
+ * + * string name = 3; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * Full resource name of the finding.
+         * 
+ * + * string name = 3; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+         * Full resource name of the finding.
+         * 
+ * + * string name = 3; + * + * @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; + bitField0_ |= 0x00000004; + 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.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding) + private static final com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding(); + } + + public static com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PathNodeAssociatedFinding parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AttackStepNodeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Unique ID for one Node
+       * 
+ * + * string uuid = 1; + * + * @return The uuid. + */ + java.lang.String getUuid(); + /** + * + * + *
+       * Unique ID for one Node
+       * 
+ * + * string uuid = 1; + * + * @return The bytes for uuid. + */ + com.google.protobuf.ByteString getUuidBytes(); + + /** + * + * + *
+       * Attack step type. Can be either AND, OR or DEFENSE
+       * 
+ * + * .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.NodeType type = 2; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+       * Attack step type. Can be either AND, OR or DEFENSE
+       * 
+ * + * .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.NodeType type = 2; + * + * @return The type. + */ + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.NodeType getType(); + + /** + * + * + *
+       * User friendly name of the attack step
+       * 
+ * + * string display_name = 3; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+       * User friendly name of the attack step
+       * 
+ * + * string display_name = 3; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+       * Attack step labels for metadata
+       * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + /** + * + * + *
+       * Attack step labels for metadata
+       * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+       * Attack step labels for metadata
+       * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+       * Attack step labels for metadata
+       * 
+ * + * map<string, string> labels = 4; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+       * Attack step labels for metadata
+       * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+       * Attack step description
+       * 
+ * + * string description = 5; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+       * Attack step description
+       * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + } + /** + * + * + *
+     * Detailed steps the attack can take between path nodes.
+     * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode} + */ + public static final class AttackStepNode extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode) + AttackStepNodeOrBuilder { + private static final long serialVersionUID = 0L; + // Use AttackStepNode.newBuilder() to construct. + private AttackStepNode(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AttackStepNode() { + uuid_ = ""; + type_ = 0; + displayName_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AttackStepNode(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.AttackPathProto + .internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_AttackStepNode_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.AttackPathProto + .internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_AttackStepNode_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode.class, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode.Builder + .class); + } + + public static final int UUID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object uuid_ = ""; + /** + * + * + *
+       * Unique ID for one Node
+       * 
+ * + * string uuid = 1; + * + * @return The uuid. + */ + @java.lang.Override + public java.lang.String getUuid() { + java.lang.Object ref = uuid_; + 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(); + uuid_ = s; + return s; + } + } + /** + * + * + *
+       * Unique ID for one Node
+       * 
+ * + * string uuid = 1; + * + * @return The bytes for uuid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUuidBytes() { + java.lang.Object ref = uuid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 2; + private int type_ = 0; + /** + * + * + *
+       * Attack step type. Can be either AND, OR or DEFENSE
+       * 
+ * + * .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.NodeType type = 2; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+       * Attack step type. Can be either AND, OR or DEFENSE
+       * 
+ * + * .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.NodeType type = 2; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.NodeType getType() { + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.NodeType result = + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.NodeType.forNumber(type_); + return result == null + ? com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.NodeType.UNRECOGNIZED + : result; + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+       * User friendly name of the attack step
+       * 
+ * + * string display_name = 3; + * + * @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; + } + } + /** + * + * + *
+       * User friendly name of the attack step
+       * 
+ * + * string display_name = 3; + * + * @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; + } + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.securitycenter.v2.AttackPathProto + .internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_AttackStepNode_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+       * Attack step labels for metadata
+       * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+       * Attack step labels for metadata
+       * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+       * Attack step labels for metadata
+       * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+       * Attack step labels for metadata
+       * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int DESCRIPTION_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+       * Attack step description
+       * 
+ * + * string description = 5; + * + * @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; + } + } + /** + * + * + *
+       * Attack step description
+       * 
+ * + * string description = 5; + * + * @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; + } + } + + 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(uuid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uuid_); + } + if (type_ + != com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.NodeType + .NODE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uuid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uuid_); + } + if (type_ + != com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.NodeType + .NODE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayName_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, description_); + } + size += getUnknownFields().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.v2.AttackPath.AttackPathNode.AttackStepNode)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode other = + (com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode) obj; + + if (!getUuid().equals(other.getUuid())) return false; + if (type_ != other.type_) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + UUID_FIELD_NUMBER; + hash = (53 * hash) + getUuid().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode + 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.v2.AttackPath.AttackPathNode.AttackStepNode + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode + 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.v2.AttackPath.AttackPathNode.AttackStepNode + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode + 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.v2.AttackPath.AttackPathNode.AttackStepNode + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode + 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.v2.AttackPath.AttackPathNode.AttackStepNode + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode + 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.v2.AttackPath.AttackPathNode.AttackStepNode 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; + } + /** + * + * + *
+       * Detailed steps the attack can take between path nodes.
+       * 
+ * + * Protobuf type {@code + * google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode) + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNodeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.AttackPathProto + .internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_AttackStepNode_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor + internalGetMutableMapFieldReflection(int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.AttackPathProto + .internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_AttackStepNode_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode.class, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode + .Builder.class); + } + + // Construct using + // com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uuid_ = ""; + type_ = 0; + displayName_ = ""; + internalGetMutableLabels().clear(); + description_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.AttackPathProto + .internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_AttackStepNode_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode + getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode build() { + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode + buildPartial() { + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode result = + new com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uuid_ = uuid_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.description_ = description_; + } + } + + @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.v2.AttackPath.AttackPathNode.AttackStepNode) { + return mergeFrom( + (com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode other) { + if (other + == com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode + .getDefaultInstance()) return this; + if (!other.getUuid().isEmpty()) { + uuid_ = other.uuid_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000004; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000008; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + uuid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object uuid_ = ""; + /** + * + * + *
+         * Unique ID for one Node
+         * 
+ * + * string uuid = 1; + * + * @return The uuid. + */ + public java.lang.String getUuid() { + java.lang.Object ref = uuid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uuid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Unique ID for one Node
+         * 
+ * + * string uuid = 1; + * + * @return The bytes for uuid. + */ + public com.google.protobuf.ByteString getUuidBytes() { + java.lang.Object ref = uuid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Unique ID for one Node
+         * 
+ * + * string uuid = 1; + * + * @param value The uuid to set. + * @return This builder for chaining. + */ + public Builder setUuid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uuid_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Unique ID for one Node
+         * 
+ * + * string uuid = 1; + * + * @return This builder for chaining. + */ + public Builder clearUuid() { + uuid_ = getDefaultInstance().getUuid(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * Unique ID for one Node
+         * 
+ * + * string uuid = 1; + * + * @param value The bytes for uuid to set. + * @return This builder for chaining. + */ + public Builder setUuidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uuid_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int type_ = 0; + /** + * + * + *
+         * Attack step type. Can be either AND, OR or DEFENSE
+         * 
+ * + * .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.NodeType type = 2; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+         * Attack step type. Can be either AND, OR or DEFENSE
+         * 
+ * + * .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.NodeType type = 2; + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Attack step type. Can be either AND, OR or DEFENSE
+         * 
+ * + * .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.NodeType type = 2; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.NodeType getType() { + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.NodeType result = + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.NodeType.forNumber( + type_); + return result == null + ? com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.NodeType.UNRECOGNIZED + : result; + } + /** + * + * + *
+         * Attack step type. Can be either AND, OR or DEFENSE
+         * 
+ * + * .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.NodeType type = 2; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.NodeType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+         * Attack step type. Can be either AND, OR or DEFENSE
+         * 
+ * + * .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.NodeType type = 2; + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000002); + type_ = 0; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+         * User friendly name of the attack step
+         * 
+ * + * string display_name = 3; + * + * @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; + } + } + /** + * + * + *
+         * User friendly name of the attack step
+         * 
+ * + * string display_name = 3; + * + * @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; + } + } + /** + * + * + *
+         * User friendly name of the attack step
+         * 
+ * + * string display_name = 3; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * User friendly name of the attack step
+         * 
+ * + * string display_name = 3; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+         * User friendly name of the attack step
+         * 
+ * + * string display_name = 3; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+         * Attack step labels for metadata
+         * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+         * Attack step labels for metadata
+         * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+         * Attack step labels for metadata
+         * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+         * Attack step labels for metadata
+         * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+         * Attack step labels for metadata
+         * 
+ * + * map<string, string> labels = 4; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000008; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+         * Attack step labels for metadata
+         * 
+ * + * map<string, string> labels = 4; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000008; + return this; + } + /** + * + * + *
+         * Attack step labels for metadata
+         * 
+ * + * map<string, string> labels = 4; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+         * Attack step description
+         * 
+ * + * string description = 5; + * + * @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; + } + } + /** + * + * + *
+         * Attack step description
+         * 
+ * + * string description = 5; + * + * @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; + } + } + /** + * + * + *
+         * Attack step description
+         * 
+ * + * string description = 5; + * + * @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; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+         * Attack step description
+         * 
+ * + * string description = 5; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+         * Attack step description
+         * 
+ * + * string description = 5; + * + * @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; + bitField0_ |= 0x00000010; + 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.v2.AttackPath.AttackPathNode.AttackStepNode) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode) + private static final com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .AttackStepNode + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode(); + } + + public static com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AttackStepNode parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.AttackPath.AttackPathNode.AttackStepNode + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int RESOURCE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object resource_ = ""; + /** + * + * + *
+     * The name of the resource at this point in the attack path.
+     * The format of the name follows the Cloud Asset Inventory [resource
+     * name
+     * format]("https://cloud.google.com/asset-inventory/docs/resource-name-format")
+     * 
+ * + * string resource = 1; + * + * @return The resource. + */ + @java.lang.Override + public java.lang.String getResource() { + java.lang.Object ref = resource_; + 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(); + resource_ = s; + return s; + } + } + /** + * + * + *
+     * The name of the resource at this point in the attack path.
+     * The format of the name follows the Cloud Asset Inventory [resource
+     * name
+     * format]("https://cloud.google.com/asset-inventory/docs/resource-name-format")
+     * 
+ * + * string resource = 1; + * + * @return The bytes for resource. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_TYPE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object resourceType_ = ""; + /** + * + * + *
+     * The [supported resource
+     * type](https://cloud.google.com/asset-inventory/docs/supported-asset-types")
+     * 
+ * + * string resource_type = 2; + * + * @return The resourceType. + */ + @java.lang.Override + public java.lang.String getResourceType() { + java.lang.Object ref = resourceType_; + 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(); + resourceType_ = s; + return s; + } + } + /** + * + * + *
+     * The [supported resource
+     * type](https://cloud.google.com/asset-inventory/docs/supported-asset-types")
+     * 
+ * + * string resource_type = 2; + * + * @return The bytes for resourceType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceTypeBytes() { + java.lang.Object ref = resourceType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Human-readable name of this resource.
+     * 
+ * + * string display_name = 3; + * + * @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; + } + } + /** + * + * + *
+     * Human-readable name of this resource.
+     * 
+ * + * string display_name = 3; + * + * @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; + } + } + + public static final int ASSOCIATED_FINDINGS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding> + associatedFindings_; + /** + * + * + *
+     * The findings associated with this node in the attack path.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding associated_findings = 4; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding> + getAssociatedFindingsList() { + return associatedFindings_; + } + /** + * + * + *
+     * The findings associated with this node in the attack path.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding associated_findings = 4; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFindingOrBuilder> + getAssociatedFindingsOrBuilderList() { + return associatedFindings_; + } + /** + * + * + *
+     * The findings associated with this node in the attack path.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding associated_findings = 4; + * + */ + @java.lang.Override + public int getAssociatedFindingsCount() { + return associatedFindings_.size(); + } + /** + * + * + *
+     * The findings associated with this node in the attack path.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding associated_findings = 4; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding + getAssociatedFindings(int index) { + return associatedFindings_.get(index); + } + /** + * + * + *
+     * The findings associated with this node in the attack path.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding associated_findings = 4; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFindingOrBuilder + getAssociatedFindingsOrBuilder(int index) { + return associatedFindings_.get(index); + } + + public static final int UUID_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object uuid_ = ""; + /** + * + * + *
+     * Unique id of the attack path node.
+     * 
+ * + * string uuid = 5; + * + * @return The uuid. + */ + @java.lang.Override + public java.lang.String getUuid() { + java.lang.Object ref = uuid_; + 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(); + uuid_ = s; + return s; + } + } + /** + * + * + *
+     * Unique id of the attack path node.
+     * 
+ * + * string uuid = 5; + * + * @return The bytes for uuid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUuidBytes() { + java.lang.Object ref = uuid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ATTACK_STEPS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode> + attackSteps_; + /** + * + * + *
+     * A list of attack step nodes that exist in this attack path node.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode attack_steps = 6; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode> + getAttackStepsList() { + return attackSteps_; + } + /** + * + * + *
+     * A list of attack step nodes that exist in this attack path node.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode attack_steps = 6; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .AttackStepNodeOrBuilder> + getAttackStepsOrBuilderList() { + return attackSteps_; + } + /** + * + * + *
+     * A list of attack step nodes that exist in this attack path node.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode attack_steps = 6; + * + */ + @java.lang.Override + public int getAttackStepsCount() { + return attackSteps_.size(); + } + /** + * + * + *
+     * A list of attack step nodes that exist in this attack path node.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode attack_steps = 6; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode + getAttackSteps(int index) { + return attackSteps_.get(index); + } + /** + * + * + *
+     * A list of attack step nodes that exist in this attack path node.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode attack_steps = 6; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNodeOrBuilder + getAttackStepsOrBuilder(int index) { + return attackSteps_.get(index); + } + + 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(resource_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resource_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_); + } + for (int i = 0; i < associatedFindings_.size(); i++) { + output.writeMessage(4, associatedFindings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uuid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, uuid_); + } + for (int i = 0; i < attackSteps_.size(); i++) { + output.writeMessage(6, attackSteps_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resource_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayName_); + } + for (int i = 0; i < associatedFindings_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, associatedFindings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uuid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, uuid_); + } + for (int i = 0; i < attackSteps_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, attackSteps_.get(i)); + } + size += getUnknownFields().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.v2.AttackPath.AttackPathNode)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode other = + (com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode) obj; + + if (!getResource().equals(other.getResource())) return false; + if (!getResourceType().equals(other.getResourceType())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getAssociatedFindingsList().equals(other.getAssociatedFindingsList())) return false; + if (!getUuid().equals(other.getUuid())) return false; + if (!getAttackStepsList().equals(other.getAttackStepsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + hash = (37 * hash) + RESOURCE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getResourceType().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (getAssociatedFindingsCount() > 0) { + hash = (37 * hash) + ASSOCIATED_FINDINGS_FIELD_NUMBER; + hash = (53 * hash) + getAssociatedFindingsList().hashCode(); + } + hash = (37 * hash) + UUID_FIELD_NUMBER; + hash = (53 * hash) + getUuid().hashCode(); + if (getAttackStepsCount() > 0) { + hash = (37 * hash) + ATTACK_STEPS_FIELD_NUMBER; + hash = (53 * hash) + getAttackStepsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode 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.v2.AttackPath.AttackPathNode parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode 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.v2.AttackPath.AttackPathNode parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode 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.v2.AttackPath.AttackPathNode parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode 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.v2.AttackPath.AttackPathNode parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode 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.v2.AttackPath.AttackPathNode 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; + } + /** + * + * + *
+     * Represents one point that an attacker passes through in this attack path.
+     * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.AttackPath.AttackPathNode} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.AttackPath.AttackPathNode) + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNodeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.AttackPathProto + .internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.AttackPathProto + .internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.class, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + resource_ = ""; + resourceType_ = ""; + displayName_ = ""; + if (associatedFindingsBuilder_ == null) { + associatedFindings_ = java.util.Collections.emptyList(); + } else { + associatedFindings_ = null; + associatedFindingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + uuid_ = ""; + if (attackStepsBuilder_ == null) { + attackSteps_ = java.util.Collections.emptyList(); + } else { + attackSteps_ = null; + attackStepsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.AttackPathProto + .internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode build() { + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode buildPartial() { + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode result = + new com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode result) { + if (associatedFindingsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + associatedFindings_ = java.util.Collections.unmodifiableList(associatedFindings_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.associatedFindings_ = associatedFindings_; + } else { + result.associatedFindings_ = associatedFindingsBuilder_.build(); + } + if (attackStepsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + attackSteps_ = java.util.Collections.unmodifiableList(attackSteps_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.attackSteps_ = attackSteps_; + } else { + result.attackSteps_ = attackStepsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.resource_ = resource_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.resourceType_ = resourceType_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.uuid_ = uuid_; + } + } + + @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.v2.AttackPath.AttackPathNode) { + return mergeFrom((com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode other) { + if (other + == com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.getDefaultInstance()) + return this; + if (!other.getResource().isEmpty()) { + resource_ = other.resource_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getResourceType().isEmpty()) { + resourceType_ = other.resourceType_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (associatedFindingsBuilder_ == null) { + if (!other.associatedFindings_.isEmpty()) { + if (associatedFindings_.isEmpty()) { + associatedFindings_ = other.associatedFindings_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureAssociatedFindingsIsMutable(); + associatedFindings_.addAll(other.associatedFindings_); + } + onChanged(); + } + } else { + if (!other.associatedFindings_.isEmpty()) { + if (associatedFindingsBuilder_.isEmpty()) { + associatedFindingsBuilder_.dispose(); + associatedFindingsBuilder_ = null; + associatedFindings_ = other.associatedFindings_; + bitField0_ = (bitField0_ & ~0x00000008); + associatedFindingsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAssociatedFindingsFieldBuilder() + : null; + } else { + associatedFindingsBuilder_.addAllMessages(other.associatedFindings_); + } + } + } + if (!other.getUuid().isEmpty()) { + uuid_ = other.uuid_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (attackStepsBuilder_ == null) { + if (!other.attackSteps_.isEmpty()) { + if (attackSteps_.isEmpty()) { + attackSteps_ = other.attackSteps_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureAttackStepsIsMutable(); + attackSteps_.addAll(other.attackSteps_); + } + onChanged(); + } + } else { + if (!other.attackSteps_.isEmpty()) { + if (attackStepsBuilder_.isEmpty()) { + attackStepsBuilder_.dispose(); + attackStepsBuilder_ = null; + attackSteps_ = other.attackSteps_; + bitField0_ = (bitField0_ & ~0x00000020); + attackStepsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAttackStepsFieldBuilder() + : null; + } else { + attackStepsBuilder_.addAllMessages(other.attackSteps_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + resource_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + resourceType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding + m = + input.readMessage( + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding.parser(), + extensionRegistry); + if (associatedFindingsBuilder_ == null) { + ensureAssociatedFindingsIsMutable(); + associatedFindings_.add(m); + } else { + associatedFindingsBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + uuid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode m = + input.readMessage( + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .AttackStepNode.parser(), + extensionRegistry); + if (attackStepsBuilder_ == null) { + ensureAttackStepsIsMutable(); + attackSteps_.add(m); + } else { + attackStepsBuilder_.addMessage(m); + } + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object resource_ = ""; + /** + * + * + *
+       * The name of the resource at this point in the attack path.
+       * The format of the name follows the Cloud Asset Inventory [resource
+       * name
+       * format]("https://cloud.google.com/asset-inventory/docs/resource-name-format")
+       * 
+ * + * string resource = 1; + * + * @return The resource. + */ + public java.lang.String getResource() { + java.lang.Object ref = resource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The name of the resource at this point in the attack path.
+       * The format of the name follows the Cloud Asset Inventory [resource
+       * name
+       * format]("https://cloud.google.com/asset-inventory/docs/resource-name-format")
+       * 
+ * + * string resource = 1; + * + * @return The bytes for resource. + */ + public com.google.protobuf.ByteString getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The name of the resource at this point in the attack path.
+       * The format of the name follows the Cloud Asset Inventory [resource
+       * name
+       * format]("https://cloud.google.com/asset-inventory/docs/resource-name-format")
+       * 
+ * + * string resource = 1; + * + * @param value The resource to set. + * @return This builder for chaining. + */ + public Builder setResource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the resource at this point in the attack path.
+       * The format of the name follows the Cloud Asset Inventory [resource
+       * name
+       * format]("https://cloud.google.com/asset-inventory/docs/resource-name-format")
+       * 
+ * + * string resource = 1; + * + * @return This builder for chaining. + */ + public Builder clearResource() { + resource_ = getDefaultInstance().getResource(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the resource at this point in the attack path.
+       * The format of the name follows the Cloud Asset Inventory [resource
+       * name
+       * format]("https://cloud.google.com/asset-inventory/docs/resource-name-format")
+       * 
+ * + * string resource = 1; + * + * @param value The bytes for resource to set. + * @return This builder for chaining. + */ + public Builder setResourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resource_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object resourceType_ = ""; + /** + * + * + *
+       * The [supported resource
+       * type](https://cloud.google.com/asset-inventory/docs/supported-asset-types")
+       * 
+ * + * string resource_type = 2; + * + * @return The resourceType. + */ + public java.lang.String getResourceType() { + java.lang.Object ref = resourceType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The [supported resource
+       * type](https://cloud.google.com/asset-inventory/docs/supported-asset-types")
+       * 
+ * + * string resource_type = 2; + * + * @return The bytes for resourceType. + */ + public com.google.protobuf.ByteString getResourceTypeBytes() { + java.lang.Object ref = resourceType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The [supported resource
+       * type](https://cloud.google.com/asset-inventory/docs/supported-asset-types")
+       * 
+ * + * string resource_type = 2; + * + * @param value The resourceType to set. + * @return This builder for chaining. + */ + public Builder setResourceType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resourceType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The [supported resource
+       * type](https://cloud.google.com/asset-inventory/docs/supported-asset-types")
+       * 
+ * + * string resource_type = 2; + * + * @return This builder for chaining. + */ + public Builder clearResourceType() { + resourceType_ = getDefaultInstance().getResourceType(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * The [supported resource
+       * type](https://cloud.google.com/asset-inventory/docs/supported-asset-types")
+       * 
+ * + * string resource_type = 2; + * + * @param value The bytes for resourceType to set. + * @return This builder for chaining. + */ + public Builder setResourceTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resourceType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+       * Human-readable name of this resource.
+       * 
+ * + * string display_name = 3; + * + * @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; + } + } + /** + * + * + *
+       * Human-readable name of this resource.
+       * 
+ * + * string display_name = 3; + * + * @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; + } + } + /** + * + * + *
+       * Human-readable name of this resource.
+       * 
+ * + * string display_name = 3; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Human-readable name of this resource.
+       * 
+ * + * string display_name = 3; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * Human-readable name of this resource.
+       * 
+ * + * string display_name = 3; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding> + associatedFindings_ = java.util.Collections.emptyList(); + + private void ensureAssociatedFindingsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + associatedFindings_ = + new java.util.ArrayList< + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding>(associatedFindings_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding + .Builder, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFindingOrBuilder> + associatedFindingsBuilder_; + + /** + * + * + *
+       * The findings associated with this node in the attack path.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding associated_findings = 4; + * + */ + public java.util.List< + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding> + getAssociatedFindingsList() { + if (associatedFindingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(associatedFindings_); + } else { + return associatedFindingsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * The findings associated with this node in the attack path.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding associated_findings = 4; + * + */ + public int getAssociatedFindingsCount() { + if (associatedFindingsBuilder_ == null) { + return associatedFindings_.size(); + } else { + return associatedFindingsBuilder_.getCount(); + } + } + /** + * + * + *
+       * The findings associated with this node in the attack path.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding associated_findings = 4; + * + */ + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding + getAssociatedFindings(int index) { + if (associatedFindingsBuilder_ == null) { + return associatedFindings_.get(index); + } else { + return associatedFindingsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * The findings associated with this node in the attack path.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding associated_findings = 4; + * + */ + public Builder setAssociatedFindings( + int index, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding + value) { + if (associatedFindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssociatedFindingsIsMutable(); + associatedFindings_.set(index, value); + onChanged(); + } else { + associatedFindingsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The findings associated with this node in the attack path.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding associated_findings = 4; + * + */ + public Builder setAssociatedFindings( + int index, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding + .Builder + builderForValue) { + if (associatedFindingsBuilder_ == null) { + ensureAssociatedFindingsIsMutable(); + associatedFindings_.set(index, builderForValue.build()); + onChanged(); + } else { + associatedFindingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The findings associated with this node in the attack path.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding associated_findings = 4; + * + */ + public Builder addAssociatedFindings( + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding + value) { + if (associatedFindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssociatedFindingsIsMutable(); + associatedFindings_.add(value); + onChanged(); + } else { + associatedFindingsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * The findings associated with this node in the attack path.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding associated_findings = 4; + * + */ + public Builder addAssociatedFindings( + int index, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding + value) { + if (associatedFindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssociatedFindingsIsMutable(); + associatedFindings_.add(index, value); + onChanged(); + } else { + associatedFindingsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The findings associated with this node in the attack path.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding associated_findings = 4; + * + */ + public Builder addAssociatedFindings( + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding + .Builder + builderForValue) { + if (associatedFindingsBuilder_ == null) { + ensureAssociatedFindingsIsMutable(); + associatedFindings_.add(builderForValue.build()); + onChanged(); + } else { + associatedFindingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The findings associated with this node in the attack path.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding associated_findings = 4; + * + */ + public Builder addAssociatedFindings( + int index, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding + .Builder + builderForValue) { + if (associatedFindingsBuilder_ == null) { + ensureAssociatedFindingsIsMutable(); + associatedFindings_.add(index, builderForValue.build()); + onChanged(); + } else { + associatedFindingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The findings associated with this node in the attack path.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding associated_findings = 4; + * + */ + public Builder addAllAssociatedFindings( + java.lang.Iterable< + ? extends + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding> + values) { + if (associatedFindingsBuilder_ == null) { + ensureAssociatedFindingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, associatedFindings_); + onChanged(); + } else { + associatedFindingsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * The findings associated with this node in the attack path.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding associated_findings = 4; + * + */ + public Builder clearAssociatedFindings() { + if (associatedFindingsBuilder_ == null) { + associatedFindings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + associatedFindingsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The findings associated with this node in the attack path.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding associated_findings = 4; + * + */ + public Builder removeAssociatedFindings(int index) { + if (associatedFindingsBuilder_ == null) { + ensureAssociatedFindingsIsMutable(); + associatedFindings_.remove(index); + onChanged(); + } else { + associatedFindingsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * The findings associated with this node in the attack path.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding associated_findings = 4; + * + */ + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding + .Builder + getAssociatedFindingsBuilder(int index) { + return getAssociatedFindingsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * The findings associated with this node in the attack path.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding associated_findings = 4; + * + */ + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFindingOrBuilder + getAssociatedFindingsOrBuilder(int index) { + if (associatedFindingsBuilder_ == null) { + return associatedFindings_.get(index); + } else { + return associatedFindingsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * The findings associated with this node in the attack path.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding associated_findings = 4; + * + */ + public java.util.List< + ? extends + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFindingOrBuilder> + getAssociatedFindingsOrBuilderList() { + if (associatedFindingsBuilder_ != null) { + return associatedFindingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(associatedFindings_); + } + } + /** + * + * + *
+       * The findings associated with this node in the attack path.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding associated_findings = 4; + * + */ + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding + .Builder + addAssociatedFindingsBuilder() { + return getAssociatedFindingsFieldBuilder() + .addBuilder( + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding.getDefaultInstance()); + } + /** + * + * + *
+       * The findings associated with this node in the attack path.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding associated_findings = 4; + * + */ + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding + .Builder + addAssociatedFindingsBuilder(int index) { + return getAssociatedFindingsFieldBuilder() + .addBuilder( + index, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding.getDefaultInstance()); + } + /** + * + * + *
+       * The findings associated with this node in the attack path.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding associated_findings = 4; + * + */ + public java.util.List< + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding + .Builder> + getAssociatedFindingsBuilderList() { + return getAssociatedFindingsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding + .Builder, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFindingOrBuilder> + getAssociatedFindingsFieldBuilder() { + if (associatedFindingsBuilder_ == null) { + associatedFindingsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFinding.Builder, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .PathNodeAssociatedFindingOrBuilder>( + associatedFindings_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + associatedFindings_ = null; + } + return associatedFindingsBuilder_; + } + + private java.lang.Object uuid_ = ""; + /** + * + * + *
+       * Unique id of the attack path node.
+       * 
+ * + * string uuid = 5; + * + * @return The uuid. + */ + public java.lang.String getUuid() { + java.lang.Object ref = uuid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uuid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Unique id of the attack path node.
+       * 
+ * + * string uuid = 5; + * + * @return The bytes for uuid. + */ + public com.google.protobuf.ByteString getUuidBytes() { + java.lang.Object ref = uuid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Unique id of the attack path node.
+       * 
+ * + * string uuid = 5; + * + * @param value The uuid to set. + * @return This builder for chaining. + */ + public Builder setUuid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uuid_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * Unique id of the attack path node.
+       * 
+ * + * string uuid = 5; + * + * @return This builder for chaining. + */ + public Builder clearUuid() { + uuid_ = getDefaultInstance().getUuid(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+       * Unique id of the attack path node.
+       * 
+ * + * string uuid = 5; + * + * @param value The bytes for uuid to set. + * @return This builder for chaining. + */ + public Builder setUuidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uuid_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode> + attackSteps_ = java.util.Collections.emptyList(); + + private void ensureAttackStepsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + attackSteps_ = + new java.util.ArrayList< + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode>( + attackSteps_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode.Builder, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNodeOrBuilder> + attackStepsBuilder_; + + /** + * + * + *
+       * A list of attack step nodes that exist in this attack path node.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode attack_steps = 6; + * + */ + public java.util.List< + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode> + getAttackStepsList() { + if (attackStepsBuilder_ == null) { + return java.util.Collections.unmodifiableList(attackSteps_); + } else { + return attackStepsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * A list of attack step nodes that exist in this attack path node.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode attack_steps = 6; + * + */ + public int getAttackStepsCount() { + if (attackStepsBuilder_ == null) { + return attackSteps_.size(); + } else { + return attackStepsBuilder_.getCount(); + } + } + /** + * + * + *
+       * A list of attack step nodes that exist in this attack path node.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode attack_steps = 6; + * + */ + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode + getAttackSteps(int index) { + if (attackStepsBuilder_ == null) { + return attackSteps_.get(index); + } else { + return attackStepsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * A list of attack step nodes that exist in this attack path node.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode attack_steps = 6; + * + */ + public Builder setAttackSteps( + int index, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode value) { + if (attackStepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttackStepsIsMutable(); + attackSteps_.set(index, value); + onChanged(); + } else { + attackStepsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of attack step nodes that exist in this attack path node.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode attack_steps = 6; + * + */ + public Builder setAttackSteps( + int index, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode.Builder + builderForValue) { + if (attackStepsBuilder_ == null) { + ensureAttackStepsIsMutable(); + attackSteps_.set(index, builderForValue.build()); + onChanged(); + } else { + attackStepsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of attack step nodes that exist in this attack path node.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode attack_steps = 6; + * + */ + public Builder addAttackSteps( + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode value) { + if (attackStepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttackStepsIsMutable(); + attackSteps_.add(value); + onChanged(); + } else { + attackStepsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * A list of attack step nodes that exist in this attack path node.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode attack_steps = 6; + * + */ + public Builder addAttackSteps( + int index, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode value) { + if (attackStepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttackStepsIsMutable(); + attackSteps_.add(index, value); + onChanged(); + } else { + attackStepsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of attack step nodes that exist in this attack path node.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode attack_steps = 6; + * + */ + public Builder addAttackSteps( + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode.Builder + builderForValue) { + if (attackStepsBuilder_ == null) { + ensureAttackStepsIsMutable(); + attackSteps_.add(builderForValue.build()); + onChanged(); + } else { + attackStepsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of attack step nodes that exist in this attack path node.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode attack_steps = 6; + * + */ + public Builder addAttackSteps( + int index, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode.Builder + builderForValue) { + if (attackStepsBuilder_ == null) { + ensureAttackStepsIsMutable(); + attackSteps_.add(index, builderForValue.build()); + onChanged(); + } else { + attackStepsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of attack step nodes that exist in this attack path node.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode attack_steps = 6; + * + */ + public Builder addAllAttackSteps( + java.lang.Iterable< + ? extends + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode> + values) { + if (attackStepsBuilder_ == null) { + ensureAttackStepsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, attackSteps_); + onChanged(); + } else { + attackStepsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * A list of attack step nodes that exist in this attack path node.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode attack_steps = 6; + * + */ + public Builder clearAttackSteps() { + if (attackStepsBuilder_ == null) { + attackSteps_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + attackStepsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A list of attack step nodes that exist in this attack path node.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode attack_steps = 6; + * + */ + public Builder removeAttackSteps(int index) { + if (attackStepsBuilder_ == null) { + ensureAttackStepsIsMutable(); + attackSteps_.remove(index); + onChanged(); + } else { + attackStepsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * A list of attack step nodes that exist in this attack path node.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode attack_steps = 6; + * + */ + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode.Builder + getAttackStepsBuilder(int index) { + return getAttackStepsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * A list of attack step nodes that exist in this attack path node.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode attack_steps = 6; + * + */ + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNodeOrBuilder + getAttackStepsOrBuilder(int index) { + if (attackStepsBuilder_ == null) { + return attackSteps_.get(index); + } else { + return attackStepsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * A list of attack step nodes that exist in this attack path node.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode attack_steps = 6; + * + */ + public java.util.List< + ? extends + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .AttackStepNodeOrBuilder> + getAttackStepsOrBuilderList() { + if (attackStepsBuilder_ != null) { + return attackStepsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(attackSteps_); + } + } + /** + * + * + *
+       * A list of attack step nodes that exist in this attack path node.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode attack_steps = 6; + * + */ + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode.Builder + addAttackStepsBuilder() { + return getAttackStepsFieldBuilder() + .addBuilder( + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode + .getDefaultInstance()); + } + /** + * + * + *
+       * A list of attack step nodes that exist in this attack path node.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode attack_steps = 6; + * + */ + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode.Builder + addAttackStepsBuilder(int index) { + return getAttackStepsFieldBuilder() + .addBuilder( + index, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode + .getDefaultInstance()); + } + /** + * + * + *
+       * A list of attack step nodes that exist in this attack path node.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode attack_steps = 6; + * + */ + public java.util.List< + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode.Builder> + getAttackStepsBuilderList() { + return getAttackStepsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode.Builder, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNodeOrBuilder> + getAttackStepsFieldBuilder() { + if (attackStepsBuilder_ == null) { + attackStepsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode + .Builder, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + .AttackStepNodeOrBuilder>( + attackSteps_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + attackSteps_ = null; + } + return attackStepsBuilder_; + } + + @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.v2.AttackPath.AttackPathNode) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.AttackPath.AttackPathNode) + private static final com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode(); + } + + public static com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AttackPathNode parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.AttackPath.AttackPathNode + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AttackPathEdgeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.AttackPath.AttackPathEdge) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The attack node uuid of the source node.
+     * 
+ * + * string source = 1; + * + * @return The source. + */ + java.lang.String getSource(); + /** + * + * + *
+     * The attack node uuid of the source node.
+     * 
+ * + * string source = 1; + * + * @return The bytes for source. + */ + com.google.protobuf.ByteString getSourceBytes(); + + /** + * + * + *
+     * The attack node uuid of the destination node.
+     * 
+ * + * string destination = 2; + * + * @return The destination. + */ + java.lang.String getDestination(); + /** + * + * + *
+     * The attack node uuid of the destination node.
+     * 
+ * + * string destination = 2; + * + * @return The bytes for destination. + */ + com.google.protobuf.ByteString getDestinationBytes(); + } + /** + * + * + *
+   * Represents a connection between a source node and a destination node in
+   * this attack path.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.AttackPath.AttackPathEdge} + */ + public static final class AttackPathEdge extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.AttackPath.AttackPathEdge) + AttackPathEdgeOrBuilder { + private static final long serialVersionUID = 0L; + // Use AttackPathEdge.newBuilder() to construct. + private AttackPathEdge(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AttackPathEdge() { + source_ = ""; + destination_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AttackPathEdge(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.AttackPathProto + .internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathEdge_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.AttackPathProto + .internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathEdge_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge.class, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge.Builder.class); + } + + public static final int SOURCE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object source_ = ""; + /** + * + * + *
+     * The attack node uuid of the source node.
+     * 
+ * + * string source = 1; + * + * @return The source. + */ + @java.lang.Override + public java.lang.String getSource() { + java.lang.Object ref = source_; + 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(); + source_ = s; + return s; + } + } + /** + * + * + *
+     * The attack node uuid of the source node.
+     * 
+ * + * string source = 1; + * + * @return The bytes for source. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESTINATION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object destination_ = ""; + /** + * + * + *
+     * The attack node uuid of the destination node.
+     * 
+ * + * string destination = 2; + * + * @return The destination. + */ + @java.lang.Override + public java.lang.String getDestination() { + java.lang.Object ref = destination_; + 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(); + destination_ = s; + return s; + } + } + /** + * + * + *
+     * The attack node uuid of the destination node.
+     * 
+ * + * string destination = 2; + * + * @return The bytes for destination. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDestinationBytes() { + java.lang.Object ref = destination_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destination_ = 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(source_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, source_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destination_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, destination_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(source_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, source_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destination_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, destination_); + } + size += getUnknownFields().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.v2.AttackPath.AttackPathEdge)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge other = + (com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge) obj; + + if (!getSource().equals(other.getSource())) return false; + if (!getDestination().equals(other.getDestination())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + hash = (37 * hash) + DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getDestination().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge 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.v2.AttackPath.AttackPathEdge parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge 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.v2.AttackPath.AttackPathEdge parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge 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.v2.AttackPath.AttackPathEdge parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge 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.v2.AttackPath.AttackPathEdge parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge 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.v2.AttackPath.AttackPathEdge 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; + } + /** + * + * + *
+     * Represents a connection between a source node and a destination node in
+     * this attack path.
+     * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.AttackPath.AttackPathEdge} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.AttackPath.AttackPathEdge) + com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdgeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.AttackPathProto + .internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathEdge_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.AttackPathProto + .internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathEdge_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge.class, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + source_ = ""; + destination_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.AttackPathProto + .internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathEdge_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge + getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge build() { + com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge buildPartial() { + com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge result = + new com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.source_ = source_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.destination_ = destination_; + } + } + + @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.v2.AttackPath.AttackPathEdge) { + return mergeFrom((com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge other) { + if (other + == com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge.getDefaultInstance()) + return this; + if (!other.getSource().isEmpty()) { + source_ = other.source_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDestination().isEmpty()) { + destination_ = other.destination_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + source_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + destination_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object source_ = ""; + /** + * + * + *
+       * The attack node uuid of the source node.
+       * 
+ * + * string source = 1; + * + * @return The source. + */ + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + source_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The attack node uuid of the source node.
+       * 
+ * + * string source = 1; + * + * @return The bytes for source. + */ + public com.google.protobuf.ByteString getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The attack node uuid of the source node.
+       * 
+ * + * string source = 1; + * + * @param value The source to set. + * @return This builder for chaining. + */ + public Builder setSource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The attack node uuid of the source node.
+       * 
+ * + * string source = 1; + * + * @return This builder for chaining. + */ + public Builder clearSource() { + source_ = getDefaultInstance().getSource(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The attack node uuid of the source node.
+       * 
+ * + * string source = 1; + * + * @param value The bytes for source to set. + * @return This builder for chaining. + */ + public Builder setSourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + source_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object destination_ = ""; + /** + * + * + *
+       * The attack node uuid of the destination node.
+       * 
+ * + * string destination = 2; + * + * @return The destination. + */ + public java.lang.String getDestination() { + java.lang.Object ref = destination_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destination_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The attack node uuid of the destination node.
+       * 
+ * + * string destination = 2; + * + * @return The bytes for destination. + */ + public com.google.protobuf.ByteString getDestinationBytes() { + java.lang.Object ref = destination_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destination_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The attack node uuid of the destination node.
+       * 
+ * + * string destination = 2; + * + * @param value The destination to set. + * @return This builder for chaining. + */ + public Builder setDestination(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + destination_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The attack node uuid of the destination node.
+       * 
+ * + * string destination = 2; + * + * @return This builder for chaining. + */ + public Builder clearDestination() { + destination_ = getDefaultInstance().getDestination(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * The attack node uuid of the destination node.
+       * 
+ * + * string destination = 2; + * + * @param value The bytes for destination to set. + * @return This builder for chaining. + */ + public Builder setDestinationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + destination_ = value; + bitField0_ |= 0x00000002; + 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.v2.AttackPath.AttackPathEdge) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.AttackPath.AttackPathEdge) + private static final com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge(); + } + + public static com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AttackPathEdge parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.AttackPath.AttackPathEdge + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * The attack path name, for example,
+   *  `organizations/12/simulations/34/valuedResources/56/attackPaths/78`
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * The attack path name, for example,
+   *  `organizations/12/simulations/34/valuedResources/56/attackPaths/78`
+   * 
+ * + * 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 PATH_NODES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List pathNodes_; + /** + * + * + *
+   * A list of nodes that exist in this attack path.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode path_nodes = 2; + */ + @java.lang.Override + public java.util.List + getPathNodesList() { + return pathNodes_; + } + /** + * + * + *
+   * A list of nodes that exist in this attack path.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode path_nodes = 2; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.securitycenter.v2.AttackPath.AttackPathNodeOrBuilder> + getPathNodesOrBuilderList() { + return pathNodes_; + } + /** + * + * + *
+   * A list of nodes that exist in this attack path.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode path_nodes = 2; + */ + @java.lang.Override + public int getPathNodesCount() { + return pathNodes_.size(); + } + /** + * + * + *
+   * A list of nodes that exist in this attack path.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode path_nodes = 2; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode getPathNodes(int index) { + return pathNodes_.get(index); + } + /** + * + * + *
+   * A list of nodes that exist in this attack path.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode path_nodes = 2; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathNodeOrBuilder + getPathNodesOrBuilder(int index) { + return pathNodes_.get(index); + } + + public static final int EDGES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List edges_; + /** + * + * + *
+   * A list of the edges between nodes in this attack path.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathEdge edges = 3; + */ + @java.lang.Override + public java.util.List + getEdgesList() { + return edges_; + } + /** + * + * + *
+   * A list of the edges between nodes in this attack path.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathEdge edges = 3; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdgeOrBuilder> + getEdgesOrBuilderList() { + return edges_; + } + /** + * + * + *
+   * A list of the edges between nodes in this attack path.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathEdge edges = 3; + */ + @java.lang.Override + public int getEdgesCount() { + return edges_.size(); + } + /** + * + * + *
+   * A list of the edges between nodes in this attack path.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathEdge edges = 3; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge getEdges(int index) { + return edges_.get(index); + } + /** + * + * + *
+   * A list of the edges between nodes in this attack path.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathEdge edges = 3; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdgeOrBuilder getEdgesOrBuilder( + int index) { + return edges_.get(index); + } + + 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 < pathNodes_.size(); i++) { + output.writeMessage(2, pathNodes_.get(i)); + } + for (int i = 0; i < edges_.size(); i++) { + output.writeMessage(3, edges_.get(i)); + } + getUnknownFields().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_); + } + for (int i = 0; i < pathNodes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, pathNodes_.get(i)); + } + for (int i = 0; i < edges_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, edges_.get(i)); + } + size += getUnknownFields().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.v2.AttackPath)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.AttackPath other = + (com.google.cloud.securitycenter.v2.AttackPath) obj; + + if (!getName().equals(other.getName())) return false; + if (!getPathNodesList().equals(other.getPathNodesList())) return false; + if (!getEdgesList().equals(other.getEdgesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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 (getPathNodesCount() > 0) { + hash = (37 * hash) + PATH_NODES_FIELD_NUMBER; + hash = (53 * hash) + getPathNodesList().hashCode(); + } + if (getEdgesCount() > 0) { + hash = (37 * hash) + EDGES_FIELD_NUMBER; + hash = (53 * hash) + getEdgesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.AttackPath parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.AttackPath 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.v2.AttackPath parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.AttackPath 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.v2.AttackPath parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.AttackPath parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.AttackPath parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.AttackPath 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.v2.AttackPath parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.AttackPath 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.v2.AttackPath parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.AttackPath 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.v2.AttackPath 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 path that an attacker could take to reach an exposed resource.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.AttackPath} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.AttackPath) + com.google.cloud.securitycenter.v2.AttackPathOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.AttackPathProto + .internal_static_google_cloud_securitycenter_v2_AttackPath_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.AttackPathProto + .internal_static_google_cloud_securitycenter_v2_AttackPath_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.AttackPath.class, + com.google.cloud.securitycenter.v2.AttackPath.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.AttackPath.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + if (pathNodesBuilder_ == null) { + pathNodes_ = java.util.Collections.emptyList(); + } else { + pathNodes_ = null; + pathNodesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (edgesBuilder_ == null) { + edges_ = java.util.Collections.emptyList(); + } else { + edges_ = null; + edgesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.AttackPathProto + .internal_static_google_cloud_securitycenter_v2_AttackPath_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.AttackPath getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.AttackPath.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.AttackPath build() { + com.google.cloud.securitycenter.v2.AttackPath result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.AttackPath buildPartial() { + com.google.cloud.securitycenter.v2.AttackPath result = + new com.google.cloud.securitycenter.v2.AttackPath(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.securitycenter.v2.AttackPath result) { + if (pathNodesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + pathNodes_ = java.util.Collections.unmodifiableList(pathNodes_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.pathNodes_ = pathNodes_; + } else { + result.pathNodes_ = pathNodesBuilder_.build(); + } + if (edgesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + edges_ = java.util.Collections.unmodifiableList(edges_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.edges_ = edges_; + } else { + result.edges_ = edgesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.AttackPath result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.v2.AttackPath) { + return mergeFrom((com.google.cloud.securitycenter.v2.AttackPath) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.AttackPath other) { + if (other == com.google.cloud.securitycenter.v2.AttackPath.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (pathNodesBuilder_ == null) { + if (!other.pathNodes_.isEmpty()) { + if (pathNodes_.isEmpty()) { + pathNodes_ = other.pathNodes_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePathNodesIsMutable(); + pathNodes_.addAll(other.pathNodes_); + } + onChanged(); + } + } else { + if (!other.pathNodes_.isEmpty()) { + if (pathNodesBuilder_.isEmpty()) { + pathNodesBuilder_.dispose(); + pathNodesBuilder_ = null; + pathNodes_ = other.pathNodes_; + bitField0_ = (bitField0_ & ~0x00000002); + pathNodesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPathNodesFieldBuilder() + : null; + } else { + pathNodesBuilder_.addAllMessages(other.pathNodes_); + } + } + } + if (edgesBuilder_ == null) { + if (!other.edges_.isEmpty()) { + if (edges_.isEmpty()) { + edges_ = other.edges_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureEdgesIsMutable(); + edges_.addAll(other.edges_); + } + onChanged(); + } + } else { + if (!other.edges_.isEmpty()) { + if (edgesBuilder_.isEmpty()) { + edgesBuilder_.dispose(); + edgesBuilder_ = null; + edges_ = other.edges_; + bitField0_ = (bitField0_ & ~0x00000004); + edgesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEdgesFieldBuilder() + : null; + } else { + edgesBuilder_.addAllMessages(other.edges_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode m = + input.readMessage( + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.parser(), + extensionRegistry); + if (pathNodesBuilder_ == null) { + ensurePathNodesIsMutable(); + pathNodes_.add(m); + } else { + pathNodesBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge m = + input.readMessage( + com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge.parser(), + extensionRegistry); + if (edgesBuilder_ == null) { + ensureEdgesIsMutable(); + edges_.add(m); + } else { + edgesBuilder_.addMessage(m); + } + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The attack path name, for example,
+     *  `organizations/12/simulations/34/valuedResources/56/attackPaths/78`
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * The attack path name, for example,
+     *  `organizations/12/simulations/34/valuedResources/56/attackPaths/78`
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * The attack path name, for example,
+     *  `organizations/12/simulations/34/valuedResources/56/attackPaths/78`
+     * 
+ * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The attack path name, for example,
+     *  `organizations/12/simulations/34/valuedResources/56/attackPaths/78`
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The attack path name, for example,
+     *  `organizations/12/simulations/34/valuedResources/56/attackPaths/78`
+     * 
+ * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List + pathNodes_ = java.util.Collections.emptyList(); + + private void ensurePathNodesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + pathNodes_ = + new java.util.ArrayList( + pathNodes_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.Builder, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNodeOrBuilder> + pathNodesBuilder_; + + /** + * + * + *
+     * A list of nodes that exist in this attack path.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode path_nodes = 2; + * + */ + public java.util.List + getPathNodesList() { + if (pathNodesBuilder_ == null) { + return java.util.Collections.unmodifiableList(pathNodes_); + } else { + return pathNodesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of nodes that exist in this attack path.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode path_nodes = 2; + * + */ + public int getPathNodesCount() { + if (pathNodesBuilder_ == null) { + return pathNodes_.size(); + } else { + return pathNodesBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of nodes that exist in this attack path.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode path_nodes = 2; + * + */ + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode getPathNodes(int index) { + if (pathNodesBuilder_ == null) { + return pathNodes_.get(index); + } else { + return pathNodesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of nodes that exist in this attack path.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode path_nodes = 2; + * + */ + public Builder setPathNodes( + int index, com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode value) { + if (pathNodesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePathNodesIsMutable(); + pathNodes_.set(index, value); + onChanged(); + } else { + pathNodesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of nodes that exist in this attack path.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode path_nodes = 2; + * + */ + public Builder setPathNodes( + int index, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.Builder builderForValue) { + if (pathNodesBuilder_ == null) { + ensurePathNodesIsMutable(); + pathNodes_.set(index, builderForValue.build()); + onChanged(); + } else { + pathNodesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of nodes that exist in this attack path.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode path_nodes = 2; + * + */ + public Builder addPathNodes( + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode value) { + if (pathNodesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePathNodesIsMutable(); + pathNodes_.add(value); + onChanged(); + } else { + pathNodesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of nodes that exist in this attack path.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode path_nodes = 2; + * + */ + public Builder addPathNodes( + int index, com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode value) { + if (pathNodesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePathNodesIsMutable(); + pathNodes_.add(index, value); + onChanged(); + } else { + pathNodesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of nodes that exist in this attack path.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode path_nodes = 2; + * + */ + public Builder addPathNodes( + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.Builder builderForValue) { + if (pathNodesBuilder_ == null) { + ensurePathNodesIsMutable(); + pathNodes_.add(builderForValue.build()); + onChanged(); + } else { + pathNodesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of nodes that exist in this attack path.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode path_nodes = 2; + * + */ + public Builder addPathNodes( + int index, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.Builder builderForValue) { + if (pathNodesBuilder_ == null) { + ensurePathNodesIsMutable(); + pathNodes_.add(index, builderForValue.build()); + onChanged(); + } else { + pathNodesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of nodes that exist in this attack path.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode path_nodes = 2; + * + */ + public Builder addAllPathNodes( + java.lang.Iterable + values) { + if (pathNodesBuilder_ == null) { + ensurePathNodesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pathNodes_); + onChanged(); + } else { + pathNodesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of nodes that exist in this attack path.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode path_nodes = 2; + * + */ + public Builder clearPathNodes() { + if (pathNodesBuilder_ == null) { + pathNodes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + pathNodesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of nodes that exist in this attack path.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode path_nodes = 2; + * + */ + public Builder removePathNodes(int index) { + if (pathNodesBuilder_ == null) { + ensurePathNodesIsMutable(); + pathNodes_.remove(index); + onChanged(); + } else { + pathNodesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of nodes that exist in this attack path.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode path_nodes = 2; + * + */ + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.Builder getPathNodesBuilder( + int index) { + return getPathNodesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of nodes that exist in this attack path.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode path_nodes = 2; + * + */ + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathNodeOrBuilder + getPathNodesOrBuilder(int index) { + if (pathNodesBuilder_ == null) { + return pathNodes_.get(index); + } else { + return pathNodesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of nodes that exist in this attack path.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode path_nodes = 2; + * + */ + public java.util.List< + ? extends com.google.cloud.securitycenter.v2.AttackPath.AttackPathNodeOrBuilder> + getPathNodesOrBuilderList() { + if (pathNodesBuilder_ != null) { + return pathNodesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pathNodes_); + } + } + /** + * + * + *
+     * A list of nodes that exist in this attack path.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode path_nodes = 2; + * + */ + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.Builder + addPathNodesBuilder() { + return getPathNodesFieldBuilder() + .addBuilder( + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.getDefaultInstance()); + } + /** + * + * + *
+     * A list of nodes that exist in this attack path.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode path_nodes = 2; + * + */ + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.Builder addPathNodesBuilder( + int index) { + return getPathNodesFieldBuilder() + .addBuilder( + index, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.getDefaultInstance()); + } + /** + * + * + *
+     * A list of nodes that exist in this attack path.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode path_nodes = 2; + * + */ + public java.util.List + getPathNodesBuilderList() { + return getPathNodesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.Builder, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNodeOrBuilder> + getPathNodesFieldBuilder() { + if (pathNodesBuilder_ == null) { + pathNodesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.Builder, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNodeOrBuilder>( + pathNodes_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + pathNodes_ = null; + } + return pathNodesBuilder_; + } + + private java.util.List edges_ = + java.util.Collections.emptyList(); + + private void ensureEdgesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + edges_ = + new java.util.ArrayList( + edges_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge.Builder, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdgeOrBuilder> + edgesBuilder_; + + /** + * + * + *
+     * A list of the edges between nodes in this attack path.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathEdge edges = 3; + */ + public java.util.List + getEdgesList() { + if (edgesBuilder_ == null) { + return java.util.Collections.unmodifiableList(edges_); + } else { + return edgesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of the edges between nodes in this attack path.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathEdge edges = 3; + */ + public int getEdgesCount() { + if (edgesBuilder_ == null) { + return edges_.size(); + } else { + return edgesBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of the edges between nodes in this attack path.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathEdge edges = 3; + */ + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge getEdges(int index) { + if (edgesBuilder_ == null) { + return edges_.get(index); + } else { + return edgesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of the edges between nodes in this attack path.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathEdge edges = 3; + */ + public Builder setEdges( + int index, com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge value) { + if (edgesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEdgesIsMutable(); + edges_.set(index, value); + onChanged(); + } else { + edgesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of the edges between nodes in this attack path.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathEdge edges = 3; + */ + public Builder setEdges( + int index, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge.Builder builderForValue) { + if (edgesBuilder_ == null) { + ensureEdgesIsMutable(); + edges_.set(index, builderForValue.build()); + onChanged(); + } else { + edgesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of the edges between nodes in this attack path.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathEdge edges = 3; + */ + public Builder addEdges(com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge value) { + if (edgesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEdgesIsMutable(); + edges_.add(value); + onChanged(); + } else { + edgesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of the edges between nodes in this attack path.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathEdge edges = 3; + */ + public Builder addEdges( + int index, com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge value) { + if (edgesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEdgesIsMutable(); + edges_.add(index, value); + onChanged(); + } else { + edgesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of the edges between nodes in this attack path.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathEdge edges = 3; + */ + public Builder addEdges( + com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge.Builder builderForValue) { + if (edgesBuilder_ == null) { + ensureEdgesIsMutable(); + edges_.add(builderForValue.build()); + onChanged(); + } else { + edgesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of the edges between nodes in this attack path.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathEdge edges = 3; + */ + public Builder addEdges( + int index, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge.Builder builderForValue) { + if (edgesBuilder_ == null) { + ensureEdgesIsMutable(); + edges_.add(index, builderForValue.build()); + onChanged(); + } else { + edgesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of the edges between nodes in this attack path.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathEdge edges = 3; + */ + public Builder addAllEdges( + java.lang.Iterable + values) { + if (edgesBuilder_ == null) { + ensureEdgesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, edges_); + onChanged(); + } else { + edgesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of the edges between nodes in this attack path.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathEdge edges = 3; + */ + public Builder clearEdges() { + if (edgesBuilder_ == null) { + edges_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + edgesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of the edges between nodes in this attack path.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathEdge edges = 3; + */ + public Builder removeEdges(int index) { + if (edgesBuilder_ == null) { + ensureEdgesIsMutable(); + edges_.remove(index); + onChanged(); + } else { + edgesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of the edges between nodes in this attack path.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathEdge edges = 3; + */ + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge.Builder getEdgesBuilder( + int index) { + return getEdgesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of the edges between nodes in this attack path.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathEdge edges = 3; + */ + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdgeOrBuilder getEdgesOrBuilder( + int index) { + if (edgesBuilder_ == null) { + return edges_.get(index); + } else { + return edgesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of the edges between nodes in this attack path.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathEdge edges = 3; + */ + public java.util.List< + ? extends com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdgeOrBuilder> + getEdgesOrBuilderList() { + if (edgesBuilder_ != null) { + return edgesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(edges_); + } + } + /** + * + * + *
+     * A list of the edges between nodes in this attack path.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathEdge edges = 3; + */ + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge.Builder addEdgesBuilder() { + return getEdgesFieldBuilder() + .addBuilder( + com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge.getDefaultInstance()); + } + /** + * + * + *
+     * A list of the edges between nodes in this attack path.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathEdge edges = 3; + */ + public com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge.Builder addEdgesBuilder( + int index) { + return getEdgesFieldBuilder() + .addBuilder( + index, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge.getDefaultInstance()); + } + /** + * + * + *
+     * A list of the edges between nodes in this attack path.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathEdge edges = 3; + */ + public java.util.List + getEdgesBuilderList() { + return getEdgesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge.Builder, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdgeOrBuilder> + getEdgesFieldBuilder() { + if (edgesBuilder_ == null) { + edgesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge.Builder, + com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdgeOrBuilder>( + edges_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + edges_ = null; + } + return edgesBuilder_; + } + + @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.v2.AttackPath) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.AttackPath) + private static final com.google.cloud.securitycenter.v2.AttackPath DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.AttackPath(); + } + + public static com.google.cloud.securitycenter.v2.AttackPath getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AttackPath parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.AttackPath getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/AttackPathName.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/AttackPathName.java new file mode 100644 index 000000000000..342d1ad5c70f --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/AttackPathName.java @@ -0,0 +1,269 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.securitycenter.v2; + +import com.google.api.pathtemplate.PathTemplate; +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 AttackPathName implements ResourceName { + private static final PathTemplate ORGANIZATION_SIMULATION_VALUED_RESOURCE_ATTACK_PATH = + PathTemplate.createWithoutUrlEncoding( + "organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}/attackPaths/{attack_path}"); + private volatile Map fieldValuesMap; + private final String organization; + private final String simulation; + private final String valuedResource; + private final String attackPath; + + @Deprecated + protected AttackPathName() { + organization = null; + simulation = null; + valuedResource = null; + attackPath = null; + } + + private AttackPathName(Builder builder) { + organization = Preconditions.checkNotNull(builder.getOrganization()); + simulation = Preconditions.checkNotNull(builder.getSimulation()); + valuedResource = Preconditions.checkNotNull(builder.getValuedResource()); + attackPath = Preconditions.checkNotNull(builder.getAttackPath()); + } + + public String getOrganization() { + return organization; + } + + public String getSimulation() { + return simulation; + } + + public String getValuedResource() { + return valuedResource; + } + + public String getAttackPath() { + return attackPath; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static AttackPathName of( + String organization, String simulation, String valuedResource, String attackPath) { + return newBuilder() + .setOrganization(organization) + .setSimulation(simulation) + .setValuedResource(valuedResource) + .setAttackPath(attackPath) + .build(); + } + + public static String format( + String organization, String simulation, String valuedResource, String attackPath) { + return newBuilder() + .setOrganization(organization) + .setSimulation(simulation) + .setValuedResource(valuedResource) + .setAttackPath(attackPath) + .build() + .toString(); + } + + public static AttackPathName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + ORGANIZATION_SIMULATION_VALUED_RESOURCE_ATTACK_PATH.validatedMatch( + formattedString, "AttackPathName.parse: formattedString not in valid format"); + return of( + matchMap.get("organization"), + matchMap.get("simulation"), + matchMap.get("valued_resource"), + matchMap.get("attack_path")); + } + + 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 (AttackPathName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return ORGANIZATION_SIMULATION_VALUED_RESOURCE_ATTACK_PATH.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 (simulation != null) { + fieldMapBuilder.put("simulation", simulation); + } + if (valuedResource != null) { + fieldMapBuilder.put("valued_resource", valuedResource); + } + if (attackPath != null) { + fieldMapBuilder.put("attack_path", attackPath); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return ORGANIZATION_SIMULATION_VALUED_RESOURCE_ATTACK_PATH.instantiate( + "organization", + organization, + "simulation", + simulation, + "valued_resource", + valuedResource, + "attack_path", + attackPath); + } + + @Override + public boolean equals(java.lang.Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + AttackPathName that = ((AttackPathName) o); + return Objects.equals(this.organization, that.organization) + && Objects.equals(this.simulation, that.simulation) + && Objects.equals(this.valuedResource, that.valuedResource) + && Objects.equals(this.attackPath, that.attackPath); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(organization); + h *= 1000003; + h ^= Objects.hashCode(simulation); + h *= 1000003; + h ^= Objects.hashCode(valuedResource); + h *= 1000003; + h ^= Objects.hashCode(attackPath); + return h; + } + + /** + * Builder for + * organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}/attackPaths/{attack_path}. + */ + public static class Builder { + private String organization; + private String simulation; + private String valuedResource; + private String attackPath; + + protected Builder() {} + + public String getOrganization() { + return organization; + } + + public String getSimulation() { + return simulation; + } + + public String getValuedResource() { + return valuedResource; + } + + public String getAttackPath() { + return attackPath; + } + + public Builder setOrganization(String organization) { + this.organization = organization; + return this; + } + + public Builder setSimulation(String simulation) { + this.simulation = simulation; + return this; + } + + public Builder setValuedResource(String valuedResource) { + this.valuedResource = valuedResource; + return this; + } + + public Builder setAttackPath(String attackPath) { + this.attackPath = attackPath; + return this; + } + + private Builder(AttackPathName attackPathName) { + this.organization = attackPathName.organization; + this.simulation = attackPathName.simulation; + this.valuedResource = attackPathName.valuedResource; + this.attackPath = attackPathName.attackPath; + } + + public AttackPathName build() { + return new AttackPathName(this); + } + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/AttackPathOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/AttackPathOrBuilder.java new file mode 100644 index 000000000000..737d86b874e0 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/AttackPathOrBuilder.java @@ -0,0 +1,159 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/attack_path.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface AttackPathOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.AttackPath) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The attack path name, for example,
+   *  `organizations/12/simulations/34/valuedResources/56/attackPaths/78`
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The attack path name, for example,
+   *  `organizations/12/simulations/34/valuedResources/56/attackPaths/78`
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * A list of nodes that exist in this attack path.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode path_nodes = 2; + */ + java.util.List getPathNodesList(); + /** + * + * + *
+   * A list of nodes that exist in this attack path.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode path_nodes = 2; + */ + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNode getPathNodes(int index); + /** + * + * + *
+   * A list of nodes that exist in this attack path.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode path_nodes = 2; + */ + int getPathNodesCount(); + /** + * + * + *
+   * A list of nodes that exist in this attack path.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode path_nodes = 2; + */ + java.util.List + getPathNodesOrBuilderList(); + /** + * + * + *
+   * A list of nodes that exist in this attack path.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathNode path_nodes = 2; + */ + com.google.cloud.securitycenter.v2.AttackPath.AttackPathNodeOrBuilder getPathNodesOrBuilder( + int index); + + /** + * + * + *
+   * A list of the edges between nodes in this attack path.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathEdge edges = 3; + */ + java.util.List getEdgesList(); + /** + * + * + *
+   * A list of the edges between nodes in this attack path.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathEdge edges = 3; + */ + com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge getEdges(int index); + /** + * + * + *
+   * A list of the edges between nodes in this attack path.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathEdge edges = 3; + */ + int getEdgesCount(); + /** + * + * + *
+   * A list of the edges between nodes in this attack path.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathEdge edges = 3; + */ + java.util.List + getEdgesOrBuilderList(); + /** + * + * + *
+   * A list of the edges between nodes in this attack path.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.AttackPath.AttackPathEdge edges = 3; + */ + com.google.cloud.securitycenter.v2.AttackPath.AttackPathEdgeOrBuilder getEdgesOrBuilder( + int index); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/AttackPathProto.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/AttackPathProto.java new file mode 100644 index 000000000000..645eb21e0885 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/AttackPathProto.java @@ -0,0 +1,184 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/attack_path.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public final class AttackPathProto { + private AttackPathProto() {} + + 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_v2_AttackPath_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_AttackPath_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_PathNodeAssociatedFinding_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_PathNodeAssociatedFinding_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_AttackStepNode_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_AttackStepNode_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_AttackStepNode_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_AttackStepNode_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathEdge_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathEdge_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/v2/attack_" + + "path.proto\022\036google.cloud.securitycenter." + + "v2\032\031google/api/resource.proto\"\347\t\n\nAttack" + + "Path\022\014\n\004name\030\001 \001(\t\022M\n\npath_nodes\030\002 \003(\01329" + + ".google.cloud.securitycenter.v2.AttackPa" + + "th.AttackPathNode\022H\n\005edges\030\003 \003(\01329.googl" + + "e.cloud.securitycenter.v2.AttackPath.Att" + + "ackPathEdge\032\275\006\n\016AttackPathNode\022\020\n\010resour" + + "ce\030\001 \001(\t\022\025\n\rresource_type\030\002 \001(\t\022\024\n\014displ" + + "ay_name\030\003 \001(\t\022p\n\023associated_findings\030\004 \003" + + "(\0132S.google.cloud.securitycenter.v2.Atta" + + "ckPath.AttackPathNode.PathNodeAssociated" + + "Finding\022\014\n\004uuid\030\005 \001(\t\022^\n\014attack_steps\030\006 " + + "\003(\0132H.google.cloud.securitycenter.v2.Att" + + "ackPath.AttackPathNode.AttackStepNode\032^\n" + + "\031PathNodeAssociatedFinding\022\031\n\021canonical_" + + "finding\030\001 \001(\t\022\030\n\020finding_category\030\002 \001(\t\022" + + "\014\n\004name\030\003 \001(\t\032\260\002\n\016AttackStepNode\022\014\n\004uuid" + + "\030\001 \001(\t\022P\n\004type\030\002 \001(\0162B.google.cloud.secu" + + "ritycenter.v2.AttackPath.AttackPathNode." + + "NodeType\022\024\n\014display_name\030\003 \001(\t\022d\n\006labels" + + "\030\004 \003(\0132T.google.cloud.securitycenter.v2." + + "AttackPath.AttackPathNode.AttackStepNode" + + ".LabelsEntry\022\023\n\013description\030\005 \001(\t\032-\n\013Lab" + + "elsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001" + + "\"y\n\010NodeType\022\031\n\025NODE_TYPE_UNSPECIFIED\020\000\022" + + "\021\n\rNODE_TYPE_AND\020\001\022\020\n\014NODE_TYPE_OR\020\002\022\025\n\021" + + "NODE_TYPE_DEFENSE\020\003\022\026\n\022NODE_TYPE_ATTACKE" + + "R\020\004\0325\n\016AttackPathEdge\022\016\n\006source\030\001 \001(\t\022\023\n" + + "\013destination\030\002 \001(\t:\272\001\352A\266\001\n(securitycente" + + "r.googleapis.com/AttackPath\022qorganizatio" + + "ns/{organization}/simulations/{simulatio" + + "n}/valuedResources/{valued_resource}/att" + + "ackPaths/{attack_path}*\013attackPaths2\natt" + + "ackPathB\351\001\n\"com.google.cloud.securitycen" + + "ter.v2B\017AttackPathProtoP\001ZJcloud.google." + + "com/go/securitycenter/apiv2/securitycent" + + "erpb;securitycenterpb\252\002\036Google.Cloud.Sec" + + "urityCenter.V2\312\002\036Google\\Cloud\\SecurityCe" + + "nter\\V2\352\002!Google::Cloud::SecurityCenter:" + + ":V2b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.ResourceProto.getDescriptor(), + }); + internal_static_google_cloud_securitycenter_v2_AttackPath_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_securitycenter_v2_AttackPath_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_AttackPath_descriptor, + new java.lang.String[] { + "Name", "PathNodes", "Edges", + }); + internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_descriptor = + internal_static_google_cloud_securitycenter_v2_AttackPath_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_descriptor, + new java.lang.String[] { + "Resource", + "ResourceType", + "DisplayName", + "AssociatedFindings", + "Uuid", + "AttackSteps", + }); + internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_PathNodeAssociatedFinding_descriptor = + internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_PathNodeAssociatedFinding_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_PathNodeAssociatedFinding_descriptor, + new java.lang.String[] { + "CanonicalFinding", "FindingCategory", "Name", + }); + internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_AttackStepNode_descriptor = + internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_AttackStepNode_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_AttackStepNode_descriptor, + new java.lang.String[] { + "Uuid", "Type", "DisplayName", "Labels", "Description", + }); + internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_AttackStepNode_LabelsEntry_descriptor = + internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_AttackStepNode_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_AttackStepNode_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathNode_AttackStepNode_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathEdge_descriptor = + internal_static_google_cloud_securitycenter_v2_AttackPath_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathEdge_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_AttackPath_AttackPathEdge_descriptor, + new java.lang.String[] { + "Source", "Destination", + }); + 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(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BackupDisasterRecovery.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BackupDisasterRecovery.java new file mode 100644 index 000000000000..fc0c1a9ddfd2 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BackupDisasterRecovery.java @@ -0,0 +1,2892 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/backup_disaster_recovery.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Information related to Google Cloud Backup and DR Service findings.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.BackupDisasterRecovery} + */ +public final class BackupDisasterRecovery extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.BackupDisasterRecovery) + BackupDisasterRecoveryOrBuilder { + private static final long serialVersionUID = 0L; + // Use BackupDisasterRecovery.newBuilder() to construct. + private BackupDisasterRecovery(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BackupDisasterRecovery() { + backupTemplate_ = ""; + policies_ = com.google.protobuf.LazyStringArrayList.emptyList(); + host_ = ""; + applications_ = com.google.protobuf.LazyStringArrayList.emptyList(); + storagePool_ = ""; + policyOptions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + profile_ = ""; + appliance_ = ""; + backupType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BackupDisasterRecovery(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.BackupDisasterRecoveryProto + .internal_static_google_cloud_securitycenter_v2_BackupDisasterRecovery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.BackupDisasterRecoveryProto + .internal_static_google_cloud_securitycenter_v2_BackupDisasterRecovery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.BackupDisasterRecovery.class, + com.google.cloud.securitycenter.v2.BackupDisasterRecovery.Builder.class); + } + + private int bitField0_; + public static final int BACKUP_TEMPLATE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupTemplate_ = ""; + /** + * + * + *
+   * The name of a Backup and DR template which comprises one or more backup
+   * policies. See the [Backup and DR
+   * documentation](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#temp)
+   * for more information. For example, `snap-ov`.
+   * 
+ * + * string backup_template = 1; + * + * @return The backupTemplate. + */ + @java.lang.Override + public java.lang.String getBackupTemplate() { + java.lang.Object ref = backupTemplate_; + 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(); + backupTemplate_ = s; + return s; + } + } + /** + * + * + *
+   * The name of a Backup and DR template which comprises one or more backup
+   * policies. See the [Backup and DR
+   * documentation](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#temp)
+   * for more information. For example, `snap-ov`.
+   * 
+ * + * string backup_template = 1; + * + * @return The bytes for backupTemplate. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupTemplateBytes() { + java.lang.Object ref = backupTemplate_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupTemplate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POLICIES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList policies_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * The names of Backup and DR policies that are associated with a template
+   * and that define when to run a backup, how frequently to run a backup, and
+   * how long to retain the backup image. For example, `onvaults`.
+   * 
+ * + * repeated string policies = 2; + * + * @return A list containing the policies. + */ + public com.google.protobuf.ProtocolStringList getPoliciesList() { + return policies_; + } + /** + * + * + *
+   * The names of Backup and DR policies that are associated with a template
+   * and that define when to run a backup, how frequently to run a backup, and
+   * how long to retain the backup image. For example, `onvaults`.
+   * 
+ * + * repeated string policies = 2; + * + * @return The count of policies. + */ + public int getPoliciesCount() { + return policies_.size(); + } + /** + * + * + *
+   * The names of Backup and DR policies that are associated with a template
+   * and that define when to run a backup, how frequently to run a backup, and
+   * how long to retain the backup image. For example, `onvaults`.
+   * 
+ * + * repeated string policies = 2; + * + * @param index The index of the element to return. + * @return The policies at the given index. + */ + public java.lang.String getPolicies(int index) { + return policies_.get(index); + } + /** + * + * + *
+   * The names of Backup and DR policies that are associated with a template
+   * and that define when to run a backup, how frequently to run a backup, and
+   * how long to retain the backup image. For example, `onvaults`.
+   * 
+ * + * repeated string policies = 2; + * + * @param index The index of the value to return. + * @return The bytes of the policies at the given index. + */ + public com.google.protobuf.ByteString getPoliciesBytes(int index) { + return policies_.getByteString(index); + } + + public static final int HOST_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object host_ = ""; + /** + * + * + *
+   * The name of a Backup and DR host, which is managed by the backup and
+   * recovery appliance and known to the management console. The host can be of
+   * type Generic (for example, Compute Engine, SQL Server, Oracle DB, SMB file
+   * system, etc.), vCenter, or an ESX server. See the [Backup and DR
+   * documentation on
+   * hosts](https://cloud.google.com/backup-disaster-recovery/docs/configuration/manage-hosts-and-their-applications)
+   * for more information. For example, `centos7-01`.
+   * 
+ * + * string host = 3; + * + * @return The host. + */ + @java.lang.Override + public java.lang.String getHost() { + java.lang.Object ref = host_; + 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(); + host_ = s; + return s; + } + } + /** + * + * + *
+   * The name of a Backup and DR host, which is managed by the backup and
+   * recovery appliance and known to the management console. The host can be of
+   * type Generic (for example, Compute Engine, SQL Server, Oracle DB, SMB file
+   * system, etc.), vCenter, or an ESX server. See the [Backup and DR
+   * documentation on
+   * hosts](https://cloud.google.com/backup-disaster-recovery/docs/configuration/manage-hosts-and-their-applications)
+   * for more information. For example, `centos7-01`.
+   * 
+ * + * string host = 3; + * + * @return The bytes for host. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHostBytes() { + java.lang.Object ref = host_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + host_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APPLICATIONS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList applications_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * The names of Backup and DR applications. An application is a VM, database,
+   * or file system on a managed host monitored by a backup and recovery
+   * appliance. For example, `centos7-01-vol00`, `centos7-01-vol01`,
+   * `centos7-01-vol02`.
+   * 
+ * + * repeated string applications = 4; + * + * @return A list containing the applications. + */ + public com.google.protobuf.ProtocolStringList getApplicationsList() { + return applications_; + } + /** + * + * + *
+   * The names of Backup and DR applications. An application is a VM, database,
+   * or file system on a managed host monitored by a backup and recovery
+   * appliance. For example, `centos7-01-vol00`, `centos7-01-vol01`,
+   * `centos7-01-vol02`.
+   * 
+ * + * repeated string applications = 4; + * + * @return The count of applications. + */ + public int getApplicationsCount() { + return applications_.size(); + } + /** + * + * + *
+   * The names of Backup and DR applications. An application is a VM, database,
+   * or file system on a managed host monitored by a backup and recovery
+   * appliance. For example, `centos7-01-vol00`, `centos7-01-vol01`,
+   * `centos7-01-vol02`.
+   * 
+ * + * repeated string applications = 4; + * + * @param index The index of the element to return. + * @return The applications at the given index. + */ + public java.lang.String getApplications(int index) { + return applications_.get(index); + } + /** + * + * + *
+   * The names of Backup and DR applications. An application is a VM, database,
+   * or file system on a managed host monitored by a backup and recovery
+   * appliance. For example, `centos7-01-vol00`, `centos7-01-vol01`,
+   * `centos7-01-vol02`.
+   * 
+ * + * repeated string applications = 4; + * + * @param index The index of the value to return. + * @return The bytes of the applications at the given index. + */ + public com.google.protobuf.ByteString getApplicationsBytes(int index) { + return applications_.getByteString(index); + } + + public static final int STORAGE_POOL_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object storagePool_ = ""; + /** + * + * + *
+   * The name of the Backup and DR storage pool that the backup and recovery
+   * appliance is storing data in. The storage pool could be of type Cloud,
+   * Primary, Snapshot, or OnVault. See the [Backup and DR documentation on
+   * storage
+   * pools](https://cloud.google.com/backup-disaster-recovery/docs/concepts/storage-pools).
+   * For example, `DiskPoolOne`.
+   * 
+ * + * string storage_pool = 5; + * + * @return The storagePool. + */ + @java.lang.Override + public java.lang.String getStoragePool() { + java.lang.Object ref = storagePool_; + 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(); + storagePool_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the Backup and DR storage pool that the backup and recovery
+   * appliance is storing data in. The storage pool could be of type Cloud,
+   * Primary, Snapshot, or OnVault. See the [Backup and DR documentation on
+   * storage
+   * pools](https://cloud.google.com/backup-disaster-recovery/docs/concepts/storage-pools).
+   * For example, `DiskPoolOne`.
+   * 
+ * + * string storage_pool = 5; + * + * @return The bytes for storagePool. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStoragePoolBytes() { + java.lang.Object ref = storagePool_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + storagePool_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POLICY_OPTIONS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList policyOptions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * The names of Backup and DR advanced policy options of a policy applying to
+   * an application. See the [Backup and DR documentation on policy
+   * options](https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings).
+   * For example, `skipofflineappsincongrp, nounmap`.
+   * 
+ * + * repeated string policy_options = 6; + * + * @return A list containing the policyOptions. + */ + public com.google.protobuf.ProtocolStringList getPolicyOptionsList() { + return policyOptions_; + } + /** + * + * + *
+   * The names of Backup and DR advanced policy options of a policy applying to
+   * an application. See the [Backup and DR documentation on policy
+   * options](https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings).
+   * For example, `skipofflineappsincongrp, nounmap`.
+   * 
+ * + * repeated string policy_options = 6; + * + * @return The count of policyOptions. + */ + public int getPolicyOptionsCount() { + return policyOptions_.size(); + } + /** + * + * + *
+   * The names of Backup and DR advanced policy options of a policy applying to
+   * an application. See the [Backup and DR documentation on policy
+   * options](https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings).
+   * For example, `skipofflineappsincongrp, nounmap`.
+   * 
+ * + * repeated string policy_options = 6; + * + * @param index The index of the element to return. + * @return The policyOptions at the given index. + */ + public java.lang.String getPolicyOptions(int index) { + return policyOptions_.get(index); + } + /** + * + * + *
+   * The names of Backup and DR advanced policy options of a policy applying to
+   * an application. See the [Backup and DR documentation on policy
+   * options](https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings).
+   * For example, `skipofflineappsincongrp, nounmap`.
+   * 
+ * + * repeated string policy_options = 6; + * + * @param index The index of the value to return. + * @return The bytes of the policyOptions at the given index. + */ + public com.google.protobuf.ByteString getPolicyOptionsBytes(int index) { + return policyOptions_.getByteString(index); + } + + public static final int PROFILE_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object profile_ = ""; + /** + * + * + *
+   * The name of the Backup and DR resource profile that specifies the storage
+   * media for backups of application and VM data. See the [Backup and DR
+   * documentation on
+   * profiles](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#profile).
+   * For example, `GCP`.
+   * 
+ * + * string profile = 7; + * + * @return The profile. + */ + @java.lang.Override + public java.lang.String getProfile() { + java.lang.Object ref = profile_; + 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(); + profile_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the Backup and DR resource profile that specifies the storage
+   * media for backups of application and VM data. See the [Backup and DR
+   * documentation on
+   * profiles](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#profile).
+   * For example, `GCP`.
+   * 
+ * + * string profile = 7; + * + * @return The bytes for profile. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProfileBytes() { + java.lang.Object ref = profile_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + profile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APPLIANCE_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object appliance_ = ""; + /** + * + * + *
+   * The name of the Backup and DR appliance that captures, moves, and manages
+   * the lifecycle of backup data. For example, `backup-server-57137`.
+   * 
+ * + * string appliance = 8; + * + * @return The appliance. + */ + @java.lang.Override + public java.lang.String getAppliance() { + java.lang.Object ref = appliance_; + 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(); + appliance_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the Backup and DR appliance that captures, moves, and manages
+   * the lifecycle of backup data. For example, `backup-server-57137`.
+   * 
+ * + * string appliance = 8; + * + * @return The bytes for appliance. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApplianceBytes() { + java.lang.Object ref = appliance_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + appliance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_TYPE_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupType_ = ""; + /** + * + * + *
+   * The backup type of the Backup and DR image.
+   * For example, `Snapshot`, `Remote Snapshot`, `OnVault`.
+   * 
+ * + * string backup_type = 9; + * + * @return The backupType. + */ + @java.lang.Override + public java.lang.String getBackupType() { + java.lang.Object ref = backupType_; + 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(); + backupType_ = s; + return s; + } + } + /** + * + * + *
+   * The backup type of the Backup and DR image.
+   * For example, `Snapshot`, `Remote Snapshot`, `OnVault`.
+   * 
+ * + * string backup_type = 9; + * + * @return The bytes for backupType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupTypeBytes() { + java.lang.Object ref = backupType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_CREATE_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp backupCreateTime_; + /** + * + * + *
+   * The timestamp at which the Backup and DR backup was created.
+   * 
+ * + * .google.protobuf.Timestamp backup_create_time = 10; + * + * @return Whether the backupCreateTime field is set. + */ + @java.lang.Override + public boolean hasBackupCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The timestamp at which the Backup and DR backup was created.
+   * 
+ * + * .google.protobuf.Timestamp backup_create_time = 10; + * + * @return The backupCreateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getBackupCreateTime() { + return backupCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : backupCreateTime_; + } + /** + * + * + *
+   * The timestamp at which the Backup and DR backup was created.
+   * 
+ * + * .google.protobuf.Timestamp backup_create_time = 10; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getBackupCreateTimeOrBuilder() { + return backupCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : backupCreateTime_; + } + + 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(backupTemplate_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, backupTemplate_); + } + for (int i = 0; i < policies_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, policies_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(host_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, host_); + } + for (int i = 0; i < applications_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, applications_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(storagePool_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, storagePool_); + } + for (int i = 0; i < policyOptions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, policyOptions_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(profile_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, profile_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appliance_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, appliance_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, backupType_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(10, getBackupCreateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupTemplate_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, backupTemplate_); + } + { + int dataSize = 0; + for (int i = 0; i < policies_.size(); i++) { + dataSize += computeStringSizeNoTag(policies_.getRaw(i)); + } + size += dataSize; + size += 1 * getPoliciesList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(host_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, host_); + } + { + int dataSize = 0; + for (int i = 0; i < applications_.size(); i++) { + dataSize += computeStringSizeNoTag(applications_.getRaw(i)); + } + size += dataSize; + size += 1 * getApplicationsList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(storagePool_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, storagePool_); + } + { + int dataSize = 0; + for (int i = 0; i < policyOptions_.size(); i++) { + dataSize += computeStringSizeNoTag(policyOptions_.getRaw(i)); + } + size += dataSize; + size += 1 * getPolicyOptionsList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(profile_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, profile_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appliance_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, appliance_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, backupType_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getBackupCreateTime()); + } + size += getUnknownFields().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.v2.BackupDisasterRecovery)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.BackupDisasterRecovery other = + (com.google.cloud.securitycenter.v2.BackupDisasterRecovery) obj; + + if (!getBackupTemplate().equals(other.getBackupTemplate())) return false; + if (!getPoliciesList().equals(other.getPoliciesList())) return false; + if (!getHost().equals(other.getHost())) return false; + if (!getApplicationsList().equals(other.getApplicationsList())) return false; + if (!getStoragePool().equals(other.getStoragePool())) return false; + if (!getPolicyOptionsList().equals(other.getPolicyOptionsList())) return false; + if (!getProfile().equals(other.getProfile())) return false; + if (!getAppliance().equals(other.getAppliance())) return false; + if (!getBackupType().equals(other.getBackupType())) return false; + if (hasBackupCreateTime() != other.hasBackupCreateTime()) return false; + if (hasBackupCreateTime()) { + if (!getBackupCreateTime().equals(other.getBackupCreateTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + BACKUP_TEMPLATE_FIELD_NUMBER; + hash = (53 * hash) + getBackupTemplate().hashCode(); + if (getPoliciesCount() > 0) { + hash = (37 * hash) + POLICIES_FIELD_NUMBER; + hash = (53 * hash) + getPoliciesList().hashCode(); + } + hash = (37 * hash) + HOST_FIELD_NUMBER; + hash = (53 * hash) + getHost().hashCode(); + if (getApplicationsCount() > 0) { + hash = (37 * hash) + APPLICATIONS_FIELD_NUMBER; + hash = (53 * hash) + getApplicationsList().hashCode(); + } + hash = (37 * hash) + STORAGE_POOL_FIELD_NUMBER; + hash = (53 * hash) + getStoragePool().hashCode(); + if (getPolicyOptionsCount() > 0) { + hash = (37 * hash) + POLICY_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getPolicyOptionsList().hashCode(); + } + hash = (37 * hash) + PROFILE_FIELD_NUMBER; + hash = (53 * hash) + getProfile().hashCode(); + hash = (37 * hash) + APPLIANCE_FIELD_NUMBER; + hash = (53 * hash) + getAppliance().hashCode(); + hash = (37 * hash) + BACKUP_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getBackupType().hashCode(); + if (hasBackupCreateTime()) { + hash = (37 * hash) + BACKUP_CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getBackupCreateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.BackupDisasterRecovery parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.BackupDisasterRecovery 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.v2.BackupDisasterRecovery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.BackupDisasterRecovery 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.v2.BackupDisasterRecovery parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.BackupDisasterRecovery parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.BackupDisasterRecovery parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.BackupDisasterRecovery 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.v2.BackupDisasterRecovery parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.BackupDisasterRecovery 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.v2.BackupDisasterRecovery parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.BackupDisasterRecovery 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.v2.BackupDisasterRecovery 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; + } + /** + * + * + *
+   * Information related to Google Cloud Backup and DR Service findings.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.BackupDisasterRecovery} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.BackupDisasterRecovery) + com.google.cloud.securitycenter.v2.BackupDisasterRecoveryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.BackupDisasterRecoveryProto + .internal_static_google_cloud_securitycenter_v2_BackupDisasterRecovery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.BackupDisasterRecoveryProto + .internal_static_google_cloud_securitycenter_v2_BackupDisasterRecovery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.BackupDisasterRecovery.class, + com.google.cloud.securitycenter.v2.BackupDisasterRecovery.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.BackupDisasterRecovery.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getBackupCreateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + backupTemplate_ = ""; + policies_ = com.google.protobuf.LazyStringArrayList.emptyList(); + host_ = ""; + applications_ = com.google.protobuf.LazyStringArrayList.emptyList(); + storagePool_ = ""; + policyOptions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + profile_ = ""; + appliance_ = ""; + backupType_ = ""; + backupCreateTime_ = null; + if (backupCreateTimeBuilder_ != null) { + backupCreateTimeBuilder_.dispose(); + backupCreateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.BackupDisasterRecoveryProto + .internal_static_google_cloud_securitycenter_v2_BackupDisasterRecovery_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.BackupDisasterRecovery getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.BackupDisasterRecovery.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.BackupDisasterRecovery build() { + com.google.cloud.securitycenter.v2.BackupDisasterRecovery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.BackupDisasterRecovery buildPartial() { + com.google.cloud.securitycenter.v2.BackupDisasterRecovery result = + new com.google.cloud.securitycenter.v2.BackupDisasterRecovery(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.BackupDisasterRecovery result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.backupTemplate_ = backupTemplate_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + policies_.makeImmutable(); + result.policies_ = policies_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.host_ = host_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + applications_.makeImmutable(); + result.applications_ = applications_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.storagePool_ = storagePool_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + policyOptions_.makeImmutable(); + result.policyOptions_ = policyOptions_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.profile_ = profile_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.appliance_ = appliance_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.backupType_ = backupType_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000200) != 0)) { + result.backupCreateTime_ = + backupCreateTimeBuilder_ == null ? backupCreateTime_ : backupCreateTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v2.BackupDisasterRecovery) { + return mergeFrom((com.google.cloud.securitycenter.v2.BackupDisasterRecovery) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.BackupDisasterRecovery other) { + if (other == com.google.cloud.securitycenter.v2.BackupDisasterRecovery.getDefaultInstance()) + return this; + if (!other.getBackupTemplate().isEmpty()) { + backupTemplate_ = other.backupTemplate_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.policies_.isEmpty()) { + if (policies_.isEmpty()) { + policies_ = other.policies_; + bitField0_ |= 0x00000002; + } else { + ensurePoliciesIsMutable(); + policies_.addAll(other.policies_); + } + onChanged(); + } + if (!other.getHost().isEmpty()) { + host_ = other.host_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.applications_.isEmpty()) { + if (applications_.isEmpty()) { + applications_ = other.applications_; + bitField0_ |= 0x00000008; + } else { + ensureApplicationsIsMutable(); + applications_.addAll(other.applications_); + } + onChanged(); + } + if (!other.getStoragePool().isEmpty()) { + storagePool_ = other.storagePool_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.policyOptions_.isEmpty()) { + if (policyOptions_.isEmpty()) { + policyOptions_ = other.policyOptions_; + bitField0_ |= 0x00000020; + } else { + ensurePolicyOptionsIsMutable(); + policyOptions_.addAll(other.policyOptions_); + } + onChanged(); + } + if (!other.getProfile().isEmpty()) { + profile_ = other.profile_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (!other.getAppliance().isEmpty()) { + appliance_ = other.appliance_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.getBackupType().isEmpty()) { + backupType_ = other.backupType_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (other.hasBackupCreateTime()) { + mergeBackupCreateTime(other.getBackupCreateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + backupTemplate_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePoliciesIsMutable(); + policies_.add(s); + break; + } // case 18 + case 26: + { + host_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureApplicationsIsMutable(); + applications_.add(s); + break; + } // case 34 + case 42: + { + storagePool_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePolicyOptionsIsMutable(); + policyOptions_.add(s); + break; + } // case 50 + case 58: + { + profile_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + appliance_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + backupType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: + { + input.readMessage( + getBackupCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 82 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object backupTemplate_ = ""; + /** + * + * + *
+     * The name of a Backup and DR template which comprises one or more backup
+     * policies. See the [Backup and DR
+     * documentation](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#temp)
+     * for more information. For example, `snap-ov`.
+     * 
+ * + * string backup_template = 1; + * + * @return The backupTemplate. + */ + public java.lang.String getBackupTemplate() { + java.lang.Object ref = backupTemplate_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupTemplate_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of a Backup and DR template which comprises one or more backup
+     * policies. See the [Backup and DR
+     * documentation](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#temp)
+     * for more information. For example, `snap-ov`.
+     * 
+ * + * string backup_template = 1; + * + * @return The bytes for backupTemplate. + */ + public com.google.protobuf.ByteString getBackupTemplateBytes() { + java.lang.Object ref = backupTemplate_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupTemplate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of a Backup and DR template which comprises one or more backup
+     * policies. See the [Backup and DR
+     * documentation](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#temp)
+     * for more information. For example, `snap-ov`.
+     * 
+ * + * string backup_template = 1; + * + * @param value The backupTemplate to set. + * @return This builder for chaining. + */ + public Builder setBackupTemplate(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupTemplate_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of a Backup and DR template which comprises one or more backup
+     * policies. See the [Backup and DR
+     * documentation](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#temp)
+     * for more information. For example, `snap-ov`.
+     * 
+ * + * string backup_template = 1; + * + * @return This builder for chaining. + */ + public Builder clearBackupTemplate() { + backupTemplate_ = getDefaultInstance().getBackupTemplate(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of a Backup and DR template which comprises one or more backup
+     * policies. See the [Backup and DR
+     * documentation](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#temp)
+     * for more information. For example, `snap-ov`.
+     * 
+ * + * string backup_template = 1; + * + * @param value The bytes for backupTemplate to set. + * @return This builder for chaining. + */ + public Builder setBackupTemplateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupTemplate_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList policies_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensurePoliciesIsMutable() { + if (!policies_.isModifiable()) { + policies_ = new com.google.protobuf.LazyStringArrayList(policies_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * The names of Backup and DR policies that are associated with a template
+     * and that define when to run a backup, how frequently to run a backup, and
+     * how long to retain the backup image. For example, `onvaults`.
+     * 
+ * + * repeated string policies = 2; + * + * @return A list containing the policies. + */ + public com.google.protobuf.ProtocolStringList getPoliciesList() { + policies_.makeImmutable(); + return policies_; + } + /** + * + * + *
+     * The names of Backup and DR policies that are associated with a template
+     * and that define when to run a backup, how frequently to run a backup, and
+     * how long to retain the backup image. For example, `onvaults`.
+     * 
+ * + * repeated string policies = 2; + * + * @return The count of policies. + */ + public int getPoliciesCount() { + return policies_.size(); + } + /** + * + * + *
+     * The names of Backup and DR policies that are associated with a template
+     * and that define when to run a backup, how frequently to run a backup, and
+     * how long to retain the backup image. For example, `onvaults`.
+     * 
+ * + * repeated string policies = 2; + * + * @param index The index of the element to return. + * @return The policies at the given index. + */ + public java.lang.String getPolicies(int index) { + return policies_.get(index); + } + /** + * + * + *
+     * The names of Backup and DR policies that are associated with a template
+     * and that define when to run a backup, how frequently to run a backup, and
+     * how long to retain the backup image. For example, `onvaults`.
+     * 
+ * + * repeated string policies = 2; + * + * @param index The index of the value to return. + * @return The bytes of the policies at the given index. + */ + public com.google.protobuf.ByteString getPoliciesBytes(int index) { + return policies_.getByteString(index); + } + /** + * + * + *
+     * The names of Backup and DR policies that are associated with a template
+     * and that define when to run a backup, how frequently to run a backup, and
+     * how long to retain the backup image. For example, `onvaults`.
+     * 
+ * + * repeated string policies = 2; + * + * @param index The index to set the value at. + * @param value The policies to set. + * @return This builder for chaining. + */ + public Builder setPolicies(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePoliciesIsMutable(); + policies_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The names of Backup and DR policies that are associated with a template
+     * and that define when to run a backup, how frequently to run a backup, and
+     * how long to retain the backup image. For example, `onvaults`.
+     * 
+ * + * repeated string policies = 2; + * + * @param value The policies to add. + * @return This builder for chaining. + */ + public Builder addPolicies(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePoliciesIsMutable(); + policies_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The names of Backup and DR policies that are associated with a template
+     * and that define when to run a backup, how frequently to run a backup, and
+     * how long to retain the backup image. For example, `onvaults`.
+     * 
+ * + * repeated string policies = 2; + * + * @param values The policies to add. + * @return This builder for chaining. + */ + public Builder addAllPolicies(java.lang.Iterable values) { + ensurePoliciesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, policies_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The names of Backup and DR policies that are associated with a template
+     * and that define when to run a backup, how frequently to run a backup, and
+     * how long to retain the backup image. For example, `onvaults`.
+     * 
+ * + * repeated string policies = 2; + * + * @return This builder for chaining. + */ + public Builder clearPolicies() { + policies_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * The names of Backup and DR policies that are associated with a template
+     * and that define when to run a backup, how frequently to run a backup, and
+     * how long to retain the backup image. For example, `onvaults`.
+     * 
+ * + * repeated string policies = 2; + * + * @param value The bytes of the policies to add. + * @return This builder for chaining. + */ + public Builder addPoliciesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePoliciesIsMutable(); + policies_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object host_ = ""; + /** + * + * + *
+     * The name of a Backup and DR host, which is managed by the backup and
+     * recovery appliance and known to the management console. The host can be of
+     * type Generic (for example, Compute Engine, SQL Server, Oracle DB, SMB file
+     * system, etc.), vCenter, or an ESX server. See the [Backup and DR
+     * documentation on
+     * hosts](https://cloud.google.com/backup-disaster-recovery/docs/configuration/manage-hosts-and-their-applications)
+     * for more information. For example, `centos7-01`.
+     * 
+ * + * string host = 3; + * + * @return The host. + */ + public java.lang.String getHost() { + java.lang.Object ref = host_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + host_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of a Backup and DR host, which is managed by the backup and
+     * recovery appliance and known to the management console. The host can be of
+     * type Generic (for example, Compute Engine, SQL Server, Oracle DB, SMB file
+     * system, etc.), vCenter, or an ESX server. See the [Backup and DR
+     * documentation on
+     * hosts](https://cloud.google.com/backup-disaster-recovery/docs/configuration/manage-hosts-and-their-applications)
+     * for more information. For example, `centos7-01`.
+     * 
+ * + * string host = 3; + * + * @return The bytes for host. + */ + public com.google.protobuf.ByteString getHostBytes() { + java.lang.Object ref = host_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + host_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of a Backup and DR host, which is managed by the backup and
+     * recovery appliance and known to the management console. The host can be of
+     * type Generic (for example, Compute Engine, SQL Server, Oracle DB, SMB file
+     * system, etc.), vCenter, or an ESX server. See the [Backup and DR
+     * documentation on
+     * hosts](https://cloud.google.com/backup-disaster-recovery/docs/configuration/manage-hosts-and-their-applications)
+     * for more information. For example, `centos7-01`.
+     * 
+ * + * string host = 3; + * + * @param value The host to set. + * @return This builder for chaining. + */ + public Builder setHost(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + host_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of a Backup and DR host, which is managed by the backup and
+     * recovery appliance and known to the management console. The host can be of
+     * type Generic (for example, Compute Engine, SQL Server, Oracle DB, SMB file
+     * system, etc.), vCenter, or an ESX server. See the [Backup and DR
+     * documentation on
+     * hosts](https://cloud.google.com/backup-disaster-recovery/docs/configuration/manage-hosts-and-their-applications)
+     * for more information. For example, `centos7-01`.
+     * 
+ * + * string host = 3; + * + * @return This builder for chaining. + */ + public Builder clearHost() { + host_ = getDefaultInstance().getHost(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of a Backup and DR host, which is managed by the backup and
+     * recovery appliance and known to the management console. The host can be of
+     * type Generic (for example, Compute Engine, SQL Server, Oracle DB, SMB file
+     * system, etc.), vCenter, or an ESX server. See the [Backup and DR
+     * documentation on
+     * hosts](https://cloud.google.com/backup-disaster-recovery/docs/configuration/manage-hosts-and-their-applications)
+     * for more information. For example, `centos7-01`.
+     * 
+ * + * string host = 3; + * + * @param value The bytes for host to set. + * @return This builder for chaining. + */ + public Builder setHostBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + host_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList applications_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureApplicationsIsMutable() { + if (!applications_.isModifiable()) { + applications_ = new com.google.protobuf.LazyStringArrayList(applications_); + } + bitField0_ |= 0x00000008; + } + /** + * + * + *
+     * The names of Backup and DR applications. An application is a VM, database,
+     * or file system on a managed host monitored by a backup and recovery
+     * appliance. For example, `centos7-01-vol00`, `centos7-01-vol01`,
+     * `centos7-01-vol02`.
+     * 
+ * + * repeated string applications = 4; + * + * @return A list containing the applications. + */ + public com.google.protobuf.ProtocolStringList getApplicationsList() { + applications_.makeImmutable(); + return applications_; + } + /** + * + * + *
+     * The names of Backup and DR applications. An application is a VM, database,
+     * or file system on a managed host monitored by a backup and recovery
+     * appliance. For example, `centos7-01-vol00`, `centos7-01-vol01`,
+     * `centos7-01-vol02`.
+     * 
+ * + * repeated string applications = 4; + * + * @return The count of applications. + */ + public int getApplicationsCount() { + return applications_.size(); + } + /** + * + * + *
+     * The names of Backup and DR applications. An application is a VM, database,
+     * or file system on a managed host monitored by a backup and recovery
+     * appliance. For example, `centos7-01-vol00`, `centos7-01-vol01`,
+     * `centos7-01-vol02`.
+     * 
+ * + * repeated string applications = 4; + * + * @param index The index of the element to return. + * @return The applications at the given index. + */ + public java.lang.String getApplications(int index) { + return applications_.get(index); + } + /** + * + * + *
+     * The names of Backup and DR applications. An application is a VM, database,
+     * or file system on a managed host monitored by a backup and recovery
+     * appliance. For example, `centos7-01-vol00`, `centos7-01-vol01`,
+     * `centos7-01-vol02`.
+     * 
+ * + * repeated string applications = 4; + * + * @param index The index of the value to return. + * @return The bytes of the applications at the given index. + */ + public com.google.protobuf.ByteString getApplicationsBytes(int index) { + return applications_.getByteString(index); + } + /** + * + * + *
+     * The names of Backup and DR applications. An application is a VM, database,
+     * or file system on a managed host monitored by a backup and recovery
+     * appliance. For example, `centos7-01-vol00`, `centos7-01-vol01`,
+     * `centos7-01-vol02`.
+     * 
+ * + * repeated string applications = 4; + * + * @param index The index to set the value at. + * @param value The applications to set. + * @return This builder for chaining. + */ + public Builder setApplications(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureApplicationsIsMutable(); + applications_.set(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The names of Backup and DR applications. An application is a VM, database,
+     * or file system on a managed host monitored by a backup and recovery
+     * appliance. For example, `centos7-01-vol00`, `centos7-01-vol01`,
+     * `centos7-01-vol02`.
+     * 
+ * + * repeated string applications = 4; + * + * @param value The applications to add. + * @return This builder for chaining. + */ + public Builder addApplications(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureApplicationsIsMutable(); + applications_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The names of Backup and DR applications. An application is a VM, database,
+     * or file system on a managed host monitored by a backup and recovery
+     * appliance. For example, `centos7-01-vol00`, `centos7-01-vol01`,
+     * `centos7-01-vol02`.
+     * 
+ * + * repeated string applications = 4; + * + * @param values The applications to add. + * @return This builder for chaining. + */ + public Builder addAllApplications(java.lang.Iterable values) { + ensureApplicationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, applications_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The names of Backup and DR applications. An application is a VM, database,
+     * or file system on a managed host monitored by a backup and recovery
+     * appliance. For example, `centos7-01-vol00`, `centos7-01-vol01`,
+     * `centos7-01-vol02`.
+     * 
+ * + * repeated string applications = 4; + * + * @return This builder for chaining. + */ + public Builder clearApplications() { + applications_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * The names of Backup and DR applications. An application is a VM, database,
+     * or file system on a managed host monitored by a backup and recovery
+     * appliance. For example, `centos7-01-vol00`, `centos7-01-vol01`,
+     * `centos7-01-vol02`.
+     * 
+ * + * repeated string applications = 4; + * + * @param value The bytes of the applications to add. + * @return This builder for chaining. + */ + public Builder addApplicationsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureApplicationsIsMutable(); + applications_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object storagePool_ = ""; + /** + * + * + *
+     * The name of the Backup and DR storage pool that the backup and recovery
+     * appliance is storing data in. The storage pool could be of type Cloud,
+     * Primary, Snapshot, or OnVault. See the [Backup and DR documentation on
+     * storage
+     * pools](https://cloud.google.com/backup-disaster-recovery/docs/concepts/storage-pools).
+     * For example, `DiskPoolOne`.
+     * 
+ * + * string storage_pool = 5; + * + * @return The storagePool. + */ + public java.lang.String getStoragePool() { + java.lang.Object ref = storagePool_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + storagePool_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the Backup and DR storage pool that the backup and recovery
+     * appliance is storing data in. The storage pool could be of type Cloud,
+     * Primary, Snapshot, or OnVault. See the [Backup and DR documentation on
+     * storage
+     * pools](https://cloud.google.com/backup-disaster-recovery/docs/concepts/storage-pools).
+     * For example, `DiskPoolOne`.
+     * 
+ * + * string storage_pool = 5; + * + * @return The bytes for storagePool. + */ + public com.google.protobuf.ByteString getStoragePoolBytes() { + java.lang.Object ref = storagePool_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + storagePool_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the Backup and DR storage pool that the backup and recovery
+     * appliance is storing data in. The storage pool could be of type Cloud,
+     * Primary, Snapshot, or OnVault. See the [Backup and DR documentation on
+     * storage
+     * pools](https://cloud.google.com/backup-disaster-recovery/docs/concepts/storage-pools).
+     * For example, `DiskPoolOne`.
+     * 
+ * + * string storage_pool = 5; + * + * @param value The storagePool to set. + * @return This builder for chaining. + */ + public Builder setStoragePool(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + storagePool_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the Backup and DR storage pool that the backup and recovery
+     * appliance is storing data in. The storage pool could be of type Cloud,
+     * Primary, Snapshot, or OnVault. See the [Backup and DR documentation on
+     * storage
+     * pools](https://cloud.google.com/backup-disaster-recovery/docs/concepts/storage-pools).
+     * For example, `DiskPoolOne`.
+     * 
+ * + * string storage_pool = 5; + * + * @return This builder for chaining. + */ + public Builder clearStoragePool() { + storagePool_ = getDefaultInstance().getStoragePool(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the Backup and DR storage pool that the backup and recovery
+     * appliance is storing data in. The storage pool could be of type Cloud,
+     * Primary, Snapshot, or OnVault. See the [Backup and DR documentation on
+     * storage
+     * pools](https://cloud.google.com/backup-disaster-recovery/docs/concepts/storage-pools).
+     * For example, `DiskPoolOne`.
+     * 
+ * + * string storage_pool = 5; + * + * @param value The bytes for storagePool to set. + * @return This builder for chaining. + */ + public Builder setStoragePoolBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + storagePool_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList policyOptions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensurePolicyOptionsIsMutable() { + if (!policyOptions_.isModifiable()) { + policyOptions_ = new com.google.protobuf.LazyStringArrayList(policyOptions_); + } + bitField0_ |= 0x00000020; + } + /** + * + * + *
+     * The names of Backup and DR advanced policy options of a policy applying to
+     * an application. See the [Backup and DR documentation on policy
+     * options](https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings).
+     * For example, `skipofflineappsincongrp, nounmap`.
+     * 
+ * + * repeated string policy_options = 6; + * + * @return A list containing the policyOptions. + */ + public com.google.protobuf.ProtocolStringList getPolicyOptionsList() { + policyOptions_.makeImmutable(); + return policyOptions_; + } + /** + * + * + *
+     * The names of Backup and DR advanced policy options of a policy applying to
+     * an application. See the [Backup and DR documentation on policy
+     * options](https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings).
+     * For example, `skipofflineappsincongrp, nounmap`.
+     * 
+ * + * repeated string policy_options = 6; + * + * @return The count of policyOptions. + */ + public int getPolicyOptionsCount() { + return policyOptions_.size(); + } + /** + * + * + *
+     * The names of Backup and DR advanced policy options of a policy applying to
+     * an application. See the [Backup and DR documentation on policy
+     * options](https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings).
+     * For example, `skipofflineappsincongrp, nounmap`.
+     * 
+ * + * repeated string policy_options = 6; + * + * @param index The index of the element to return. + * @return The policyOptions at the given index. + */ + public java.lang.String getPolicyOptions(int index) { + return policyOptions_.get(index); + } + /** + * + * + *
+     * The names of Backup and DR advanced policy options of a policy applying to
+     * an application. See the [Backup and DR documentation on policy
+     * options](https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings).
+     * For example, `skipofflineappsincongrp, nounmap`.
+     * 
+ * + * repeated string policy_options = 6; + * + * @param index The index of the value to return. + * @return The bytes of the policyOptions at the given index. + */ + public com.google.protobuf.ByteString getPolicyOptionsBytes(int index) { + return policyOptions_.getByteString(index); + } + /** + * + * + *
+     * The names of Backup and DR advanced policy options of a policy applying to
+     * an application. See the [Backup and DR documentation on policy
+     * options](https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings).
+     * For example, `skipofflineappsincongrp, nounmap`.
+     * 
+ * + * repeated string policy_options = 6; + * + * @param index The index to set the value at. + * @param value The policyOptions to set. + * @return This builder for chaining. + */ + public Builder setPolicyOptions(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyOptionsIsMutable(); + policyOptions_.set(index, value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The names of Backup and DR advanced policy options of a policy applying to
+     * an application. See the [Backup and DR documentation on policy
+     * options](https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings).
+     * For example, `skipofflineappsincongrp, nounmap`.
+     * 
+ * + * repeated string policy_options = 6; + * + * @param value The policyOptions to add. + * @return This builder for chaining. + */ + public Builder addPolicyOptions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyOptionsIsMutable(); + policyOptions_.add(value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The names of Backup and DR advanced policy options of a policy applying to
+     * an application. See the [Backup and DR documentation on policy
+     * options](https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings).
+     * For example, `skipofflineappsincongrp, nounmap`.
+     * 
+ * + * repeated string policy_options = 6; + * + * @param values The policyOptions to add. + * @return This builder for chaining. + */ + public Builder addAllPolicyOptions(java.lang.Iterable values) { + ensurePolicyOptionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, policyOptions_); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The names of Backup and DR advanced policy options of a policy applying to
+     * an application. See the [Backup and DR documentation on policy
+     * options](https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings).
+     * For example, `skipofflineappsincongrp, nounmap`.
+     * 
+ * + * repeated string policy_options = 6; + * + * @return This builder for chaining. + */ + public Builder clearPolicyOptions() { + policyOptions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * The names of Backup and DR advanced policy options of a policy applying to
+     * an application. See the [Backup and DR documentation on policy
+     * options](https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings).
+     * For example, `skipofflineappsincongrp, nounmap`.
+     * 
+ * + * repeated string policy_options = 6; + * + * @param value The bytes of the policyOptions to add. + * @return This builder for chaining. + */ + public Builder addPolicyOptionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePolicyOptionsIsMutable(); + policyOptions_.add(value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object profile_ = ""; + /** + * + * + *
+     * The name of the Backup and DR resource profile that specifies the storage
+     * media for backups of application and VM data. See the [Backup and DR
+     * documentation on
+     * profiles](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#profile).
+     * For example, `GCP`.
+     * 
+ * + * string profile = 7; + * + * @return The profile. + */ + public java.lang.String getProfile() { + java.lang.Object ref = profile_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + profile_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the Backup and DR resource profile that specifies the storage
+     * media for backups of application and VM data. See the [Backup and DR
+     * documentation on
+     * profiles](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#profile).
+     * For example, `GCP`.
+     * 
+ * + * string profile = 7; + * + * @return The bytes for profile. + */ + public com.google.protobuf.ByteString getProfileBytes() { + java.lang.Object ref = profile_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + profile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the Backup and DR resource profile that specifies the storage
+     * media for backups of application and VM data. See the [Backup and DR
+     * documentation on
+     * profiles](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#profile).
+     * For example, `GCP`.
+     * 
+ * + * string profile = 7; + * + * @param value The profile to set. + * @return This builder for chaining. + */ + public Builder setProfile(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + profile_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the Backup and DR resource profile that specifies the storage
+     * media for backups of application and VM data. See the [Backup and DR
+     * documentation on
+     * profiles](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#profile).
+     * For example, `GCP`.
+     * 
+ * + * string profile = 7; + * + * @return This builder for chaining. + */ + public Builder clearProfile() { + profile_ = getDefaultInstance().getProfile(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the Backup and DR resource profile that specifies the storage
+     * media for backups of application and VM data. See the [Backup and DR
+     * documentation on
+     * profiles](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#profile).
+     * For example, `GCP`.
+     * 
+ * + * string profile = 7; + * + * @param value The bytes for profile to set. + * @return This builder for chaining. + */ + public Builder setProfileBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + profile_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private java.lang.Object appliance_ = ""; + /** + * + * + *
+     * The name of the Backup and DR appliance that captures, moves, and manages
+     * the lifecycle of backup data. For example, `backup-server-57137`.
+     * 
+ * + * string appliance = 8; + * + * @return The appliance. + */ + public java.lang.String getAppliance() { + java.lang.Object ref = appliance_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + appliance_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the Backup and DR appliance that captures, moves, and manages
+     * the lifecycle of backup data. For example, `backup-server-57137`.
+     * 
+ * + * string appliance = 8; + * + * @return The bytes for appliance. + */ + public com.google.protobuf.ByteString getApplianceBytes() { + java.lang.Object ref = appliance_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + appliance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the Backup and DR appliance that captures, moves, and manages
+     * the lifecycle of backup data. For example, `backup-server-57137`.
+     * 
+ * + * string appliance = 8; + * + * @param value The appliance to set. + * @return This builder for chaining. + */ + public Builder setAppliance(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + appliance_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the Backup and DR appliance that captures, moves, and manages
+     * the lifecycle of backup data. For example, `backup-server-57137`.
+     * 
+ * + * string appliance = 8; + * + * @return This builder for chaining. + */ + public Builder clearAppliance() { + appliance_ = getDefaultInstance().getAppliance(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the Backup and DR appliance that captures, moves, and manages
+     * the lifecycle of backup data. For example, `backup-server-57137`.
+     * 
+ * + * string appliance = 8; + * + * @param value The bytes for appliance to set. + * @return This builder for chaining. + */ + public Builder setApplianceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + appliance_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object backupType_ = ""; + /** + * + * + *
+     * The backup type of the Backup and DR image.
+     * For example, `Snapshot`, `Remote Snapshot`, `OnVault`.
+     * 
+ * + * string backup_type = 9; + * + * @return The backupType. + */ + public java.lang.String getBackupType() { + java.lang.Object ref = backupType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The backup type of the Backup and DR image.
+     * For example, `Snapshot`, `Remote Snapshot`, `OnVault`.
+     * 
+ * + * string backup_type = 9; + * + * @return The bytes for backupType. + */ + public com.google.protobuf.ByteString getBackupTypeBytes() { + java.lang.Object ref = backupType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The backup type of the Backup and DR image.
+     * For example, `Snapshot`, `Remote Snapshot`, `OnVault`.
+     * 
+ * + * string backup_type = 9; + * + * @param value The backupType to set. + * @return This builder for chaining. + */ + public Builder setBackupType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupType_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * The backup type of the Backup and DR image.
+     * For example, `Snapshot`, `Remote Snapshot`, `OnVault`.
+     * 
+ * + * string backup_type = 9; + * + * @return This builder for chaining. + */ + public Builder clearBackupType() { + backupType_ = getDefaultInstance().getBackupType(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + * + * + *
+     * The backup type of the Backup and DR image.
+     * For example, `Snapshot`, `Remote Snapshot`, `OnVault`.
+     * 
+ * + * string backup_type = 9; + * + * @param value The bytes for backupType to set. + * @return This builder for chaining. + */ + public Builder setBackupTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupType_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp backupCreateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + backupCreateTimeBuilder_; + /** + * + * + *
+     * The timestamp at which the Backup and DR backup was created.
+     * 
+ * + * .google.protobuf.Timestamp backup_create_time = 10; + * + * @return Whether the backupCreateTime field is set. + */ + public boolean hasBackupCreateTime() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * + * + *
+     * The timestamp at which the Backup and DR backup was created.
+     * 
+ * + * .google.protobuf.Timestamp backup_create_time = 10; + * + * @return The backupCreateTime. + */ + public com.google.protobuf.Timestamp getBackupCreateTime() { + if (backupCreateTimeBuilder_ == null) { + return backupCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : backupCreateTime_; + } else { + return backupCreateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The timestamp at which the Backup and DR backup was created.
+     * 
+ * + * .google.protobuf.Timestamp backup_create_time = 10; + */ + public Builder setBackupCreateTime(com.google.protobuf.Timestamp value) { + if (backupCreateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backupCreateTime_ = value; + } else { + backupCreateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * The timestamp at which the Backup and DR backup was created.
+     * 
+ * + * .google.protobuf.Timestamp backup_create_time = 10; + */ + public Builder setBackupCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (backupCreateTimeBuilder_ == null) { + backupCreateTime_ = builderForValue.build(); + } else { + backupCreateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * The timestamp at which the Backup and DR backup was created.
+     * 
+ * + * .google.protobuf.Timestamp backup_create_time = 10; + */ + public Builder mergeBackupCreateTime(com.google.protobuf.Timestamp value) { + if (backupCreateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && backupCreateTime_ != null + && backupCreateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getBackupCreateTimeBuilder().mergeFrom(value); + } else { + backupCreateTime_ = value; + } + } else { + backupCreateTimeBuilder_.mergeFrom(value); + } + if (backupCreateTime_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The timestamp at which the Backup and DR backup was created.
+     * 
+ * + * .google.protobuf.Timestamp backup_create_time = 10; + */ + public Builder clearBackupCreateTime() { + bitField0_ = (bitField0_ & ~0x00000200); + backupCreateTime_ = null; + if (backupCreateTimeBuilder_ != null) { + backupCreateTimeBuilder_.dispose(); + backupCreateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The timestamp at which the Backup and DR backup was created.
+     * 
+ * + * .google.protobuf.Timestamp backup_create_time = 10; + */ + public com.google.protobuf.Timestamp.Builder getBackupCreateTimeBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getBackupCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The timestamp at which the Backup and DR backup was created.
+     * 
+ * + * .google.protobuf.Timestamp backup_create_time = 10; + */ + public com.google.protobuf.TimestampOrBuilder getBackupCreateTimeOrBuilder() { + if (backupCreateTimeBuilder_ != null) { + return backupCreateTimeBuilder_.getMessageOrBuilder(); + } else { + return backupCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : backupCreateTime_; + } + } + /** + * + * + *
+     * The timestamp at which the Backup and DR backup was created.
+     * 
+ * + * .google.protobuf.Timestamp backup_create_time = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getBackupCreateTimeFieldBuilder() { + if (backupCreateTimeBuilder_ == null) { + backupCreateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getBackupCreateTime(), getParentForChildren(), isClean()); + backupCreateTime_ = null; + } + return backupCreateTimeBuilder_; + } + + @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.v2.BackupDisasterRecovery) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.BackupDisasterRecovery) + private static final com.google.cloud.securitycenter.v2.BackupDisasterRecovery DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.BackupDisasterRecovery(); + } + + public static com.google.cloud.securitycenter.v2.BackupDisasterRecovery getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BackupDisasterRecovery parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.BackupDisasterRecovery getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BackupDisasterRecoveryOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BackupDisasterRecoveryOrBuilder.java new file mode 100644 index 000000000000..d0c1f3d9d089 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BackupDisasterRecoveryOrBuilder.java @@ -0,0 +1,436 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/backup_disaster_recovery.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface BackupDisasterRecoveryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.BackupDisasterRecovery) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of a Backup and DR template which comprises one or more backup
+   * policies. See the [Backup and DR
+   * documentation](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#temp)
+   * for more information. For example, `snap-ov`.
+   * 
+ * + * string backup_template = 1; + * + * @return The backupTemplate. + */ + java.lang.String getBackupTemplate(); + /** + * + * + *
+   * The name of a Backup and DR template which comprises one or more backup
+   * policies. See the [Backup and DR
+   * documentation](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#temp)
+   * for more information. For example, `snap-ov`.
+   * 
+ * + * string backup_template = 1; + * + * @return The bytes for backupTemplate. + */ + com.google.protobuf.ByteString getBackupTemplateBytes(); + + /** + * + * + *
+   * The names of Backup and DR policies that are associated with a template
+   * and that define when to run a backup, how frequently to run a backup, and
+   * how long to retain the backup image. For example, `onvaults`.
+   * 
+ * + * repeated string policies = 2; + * + * @return A list containing the policies. + */ + java.util.List getPoliciesList(); + /** + * + * + *
+   * The names of Backup and DR policies that are associated with a template
+   * and that define when to run a backup, how frequently to run a backup, and
+   * how long to retain the backup image. For example, `onvaults`.
+   * 
+ * + * repeated string policies = 2; + * + * @return The count of policies. + */ + int getPoliciesCount(); + /** + * + * + *
+   * The names of Backup and DR policies that are associated with a template
+   * and that define when to run a backup, how frequently to run a backup, and
+   * how long to retain the backup image. For example, `onvaults`.
+   * 
+ * + * repeated string policies = 2; + * + * @param index The index of the element to return. + * @return The policies at the given index. + */ + java.lang.String getPolicies(int index); + /** + * + * + *
+   * The names of Backup and DR policies that are associated with a template
+   * and that define when to run a backup, how frequently to run a backup, and
+   * how long to retain the backup image. For example, `onvaults`.
+   * 
+ * + * repeated string policies = 2; + * + * @param index The index of the value to return. + * @return The bytes of the policies at the given index. + */ + com.google.protobuf.ByteString getPoliciesBytes(int index); + + /** + * + * + *
+   * The name of a Backup and DR host, which is managed by the backup and
+   * recovery appliance and known to the management console. The host can be of
+   * type Generic (for example, Compute Engine, SQL Server, Oracle DB, SMB file
+   * system, etc.), vCenter, or an ESX server. See the [Backup and DR
+   * documentation on
+   * hosts](https://cloud.google.com/backup-disaster-recovery/docs/configuration/manage-hosts-and-their-applications)
+   * for more information. For example, `centos7-01`.
+   * 
+ * + * string host = 3; + * + * @return The host. + */ + java.lang.String getHost(); + /** + * + * + *
+   * The name of a Backup and DR host, which is managed by the backup and
+   * recovery appliance and known to the management console. The host can be of
+   * type Generic (for example, Compute Engine, SQL Server, Oracle DB, SMB file
+   * system, etc.), vCenter, or an ESX server. See the [Backup and DR
+   * documentation on
+   * hosts](https://cloud.google.com/backup-disaster-recovery/docs/configuration/manage-hosts-and-their-applications)
+   * for more information. For example, `centos7-01`.
+   * 
+ * + * string host = 3; + * + * @return The bytes for host. + */ + com.google.protobuf.ByteString getHostBytes(); + + /** + * + * + *
+   * The names of Backup and DR applications. An application is a VM, database,
+   * or file system on a managed host monitored by a backup and recovery
+   * appliance. For example, `centos7-01-vol00`, `centos7-01-vol01`,
+   * `centos7-01-vol02`.
+   * 
+ * + * repeated string applications = 4; + * + * @return A list containing the applications. + */ + java.util.List getApplicationsList(); + /** + * + * + *
+   * The names of Backup and DR applications. An application is a VM, database,
+   * or file system on a managed host monitored by a backup and recovery
+   * appliance. For example, `centos7-01-vol00`, `centos7-01-vol01`,
+   * `centos7-01-vol02`.
+   * 
+ * + * repeated string applications = 4; + * + * @return The count of applications. + */ + int getApplicationsCount(); + /** + * + * + *
+   * The names of Backup and DR applications. An application is a VM, database,
+   * or file system on a managed host monitored by a backup and recovery
+   * appliance. For example, `centos7-01-vol00`, `centos7-01-vol01`,
+   * `centos7-01-vol02`.
+   * 
+ * + * repeated string applications = 4; + * + * @param index The index of the element to return. + * @return The applications at the given index. + */ + java.lang.String getApplications(int index); + /** + * + * + *
+   * The names of Backup and DR applications. An application is a VM, database,
+   * or file system on a managed host monitored by a backup and recovery
+   * appliance. For example, `centos7-01-vol00`, `centos7-01-vol01`,
+   * `centos7-01-vol02`.
+   * 
+ * + * repeated string applications = 4; + * + * @param index The index of the value to return. + * @return The bytes of the applications at the given index. + */ + com.google.protobuf.ByteString getApplicationsBytes(int index); + + /** + * + * + *
+   * The name of the Backup and DR storage pool that the backup and recovery
+   * appliance is storing data in. The storage pool could be of type Cloud,
+   * Primary, Snapshot, or OnVault. See the [Backup and DR documentation on
+   * storage
+   * pools](https://cloud.google.com/backup-disaster-recovery/docs/concepts/storage-pools).
+   * For example, `DiskPoolOne`.
+   * 
+ * + * string storage_pool = 5; + * + * @return The storagePool. + */ + java.lang.String getStoragePool(); + /** + * + * + *
+   * The name of the Backup and DR storage pool that the backup and recovery
+   * appliance is storing data in. The storage pool could be of type Cloud,
+   * Primary, Snapshot, or OnVault. See the [Backup and DR documentation on
+   * storage
+   * pools](https://cloud.google.com/backup-disaster-recovery/docs/concepts/storage-pools).
+   * For example, `DiskPoolOne`.
+   * 
+ * + * string storage_pool = 5; + * + * @return The bytes for storagePool. + */ + com.google.protobuf.ByteString getStoragePoolBytes(); + + /** + * + * + *
+   * The names of Backup and DR advanced policy options of a policy applying to
+   * an application. See the [Backup and DR documentation on policy
+   * options](https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings).
+   * For example, `skipofflineappsincongrp, nounmap`.
+   * 
+ * + * repeated string policy_options = 6; + * + * @return A list containing the policyOptions. + */ + java.util.List getPolicyOptionsList(); + /** + * + * + *
+   * The names of Backup and DR advanced policy options of a policy applying to
+   * an application. See the [Backup and DR documentation on policy
+   * options](https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings).
+   * For example, `skipofflineappsincongrp, nounmap`.
+   * 
+ * + * repeated string policy_options = 6; + * + * @return The count of policyOptions. + */ + int getPolicyOptionsCount(); + /** + * + * + *
+   * The names of Backup and DR advanced policy options of a policy applying to
+   * an application. See the [Backup and DR documentation on policy
+   * options](https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings).
+   * For example, `skipofflineappsincongrp, nounmap`.
+   * 
+ * + * repeated string policy_options = 6; + * + * @param index The index of the element to return. + * @return The policyOptions at the given index. + */ + java.lang.String getPolicyOptions(int index); + /** + * + * + *
+   * The names of Backup and DR advanced policy options of a policy applying to
+   * an application. See the [Backup and DR documentation on policy
+   * options](https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings).
+   * For example, `skipofflineappsincongrp, nounmap`.
+   * 
+ * + * repeated string policy_options = 6; + * + * @param index The index of the value to return. + * @return The bytes of the policyOptions at the given index. + */ + com.google.protobuf.ByteString getPolicyOptionsBytes(int index); + + /** + * + * + *
+   * The name of the Backup and DR resource profile that specifies the storage
+   * media for backups of application and VM data. See the [Backup and DR
+   * documentation on
+   * profiles](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#profile).
+   * For example, `GCP`.
+   * 
+ * + * string profile = 7; + * + * @return The profile. + */ + java.lang.String getProfile(); + /** + * + * + *
+   * The name of the Backup and DR resource profile that specifies the storage
+   * media for backups of application and VM data. See the [Backup and DR
+   * documentation on
+   * profiles](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#profile).
+   * For example, `GCP`.
+   * 
+ * + * string profile = 7; + * + * @return The bytes for profile. + */ + com.google.protobuf.ByteString getProfileBytes(); + + /** + * + * + *
+   * The name of the Backup and DR appliance that captures, moves, and manages
+   * the lifecycle of backup data. For example, `backup-server-57137`.
+   * 
+ * + * string appliance = 8; + * + * @return The appliance. + */ + java.lang.String getAppliance(); + /** + * + * + *
+   * The name of the Backup and DR appliance that captures, moves, and manages
+   * the lifecycle of backup data. For example, `backup-server-57137`.
+   * 
+ * + * string appliance = 8; + * + * @return The bytes for appliance. + */ + com.google.protobuf.ByteString getApplianceBytes(); + + /** + * + * + *
+   * The backup type of the Backup and DR image.
+   * For example, `Snapshot`, `Remote Snapshot`, `OnVault`.
+   * 
+ * + * string backup_type = 9; + * + * @return The backupType. + */ + java.lang.String getBackupType(); + /** + * + * + *
+   * The backup type of the Backup and DR image.
+   * For example, `Snapshot`, `Remote Snapshot`, `OnVault`.
+   * 
+ * + * string backup_type = 9; + * + * @return The bytes for backupType. + */ + com.google.protobuf.ByteString getBackupTypeBytes(); + + /** + * + * + *
+   * The timestamp at which the Backup and DR backup was created.
+   * 
+ * + * .google.protobuf.Timestamp backup_create_time = 10; + * + * @return Whether the backupCreateTime field is set. + */ + boolean hasBackupCreateTime(); + /** + * + * + *
+   * The timestamp at which the Backup and DR backup was created.
+   * 
+ * + * .google.protobuf.Timestamp backup_create_time = 10; + * + * @return The backupCreateTime. + */ + com.google.protobuf.Timestamp getBackupCreateTime(); + /** + * + * + *
+   * The timestamp at which the Backup and DR backup was created.
+   * 
+ * + * .google.protobuf.Timestamp backup_create_time = 10; + */ + com.google.protobuf.TimestampOrBuilder getBackupCreateTimeOrBuilder(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BackupDisasterRecoveryProto.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BackupDisasterRecoveryProto.java new file mode 100644 index 000000000000..c4304d98ba71 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BackupDisasterRecoveryProto.java @@ -0,0 +1,89 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/backup_disaster_recovery.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public final class BackupDisasterRecoveryProto { + private BackupDisasterRecoveryProto() {} + + 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_v2_BackupDisasterRecovery_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_BackupDisasterRecovery_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n=google/cloud/securitycenter/v2/backup_" + + "disaster_recovery.proto\022\036google.cloud.se" + + "curitycenter.v2\032\037google/protobuf/timesta" + + "mp.proto\"\206\002\n\026BackupDisasterRecovery\022\027\n\017b" + + "ackup_template\030\001 \001(\t\022\020\n\010policies\030\002 \003(\t\022\014" + + "\n\004host\030\003 \001(\t\022\024\n\014applications\030\004 \003(\t\022\024\n\014st" + + "orage_pool\030\005 \001(\t\022\026\n\016policy_options\030\006 \003(\t" + + "\022\017\n\007profile\030\007 \001(\t\022\021\n\tappliance\030\010 \001(\t\022\023\n\013" + + "backup_type\030\t \001(\t\0226\n\022backup_create_time\030" + + "\n \001(\0132\032.google.protobuf.TimestampB\365\001\n\"co" + + "m.google.cloud.securitycenter.v2B\033Backup" + + "DisasterRecoveryProtoP\001ZJcloud.google.co" + + "m/go/securitycenter/apiv2/securitycenter" + + "pb;securitycenterpb\252\002\036Google.Cloud.Secur" + + "ityCenter.V2\312\002\036Google\\Cloud\\SecurityCent" + + "er\\V2\352\002!Google::Cloud::SecurityCenter::V" + + "2b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_securitycenter_v2_BackupDisasterRecovery_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_securitycenter_v2_BackupDisasterRecovery_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_BackupDisasterRecovery_descriptor, + new java.lang.String[] { + "BackupTemplate", + "Policies", + "Host", + "Applications", + "StoragePool", + "PolicyOptions", + "Profile", + "Appliance", + "BackupType", + "BackupCreateTime", + }); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BatchCreateResourceValueConfigsRequest.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BatchCreateResourceValueConfigsRequest.java new file mode 100644 index 000000000000..68af24a974be --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BatchCreateResourceValueConfigsRequest.java @@ -0,0 +1,1246 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Request message to create multiple resource value configs
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest} + */ +public final class BatchCreateResourceValueConfigsRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest) + BatchCreateResourceValueConfigsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchCreateResourceValueConfigsRequest.newBuilder() to construct. + private BatchCreateResourceValueConfigsRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchCreateResourceValueConfigsRequest() { + parent_ = ""; + requests_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchCreateResourceValueConfigsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_BatchCreateResourceValueConfigsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_BatchCreateResourceValueConfigsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest.class, + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest.Builder + .class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Resource name of the new ResourceValueConfig's parent.
+   * The parent field in the CreateResourceValueConfigRequest
+   * messages must either be empty or match this field.
+   * 
+ * + * + * 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 ResourceValueConfig's parent.
+   * The parent field in the CreateResourceValueConfigRequest
+   * messages must either be empty or match this field.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 REQUESTS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List + requests_; + /** + * + * + *
+   * Required. The resource value configs to be created.
+   * 
+ * + * + * repeated .google.cloud.securitycenter.v2.CreateResourceValueConfigRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getRequestsList() { + return requests_; + } + /** + * + * + *
+   * Required. The resource value configs to be created.
+   * 
+ * + * + * repeated .google.cloud.securitycenter.v2.CreateResourceValueConfigRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequestOrBuilder> + getRequestsOrBuilderList() { + return requests_; + } + /** + * + * + *
+   * Required. The resource value configs to be created.
+   * 
+ * + * + * repeated .google.cloud.securitycenter.v2.CreateResourceValueConfigRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getRequestsCount() { + return requests_.size(); + } + /** + * + * + *
+   * Required. The resource value configs to be created.
+   * 
+ * + * + * repeated .google.cloud.securitycenter.v2.CreateResourceValueConfigRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest getRequests( + int index) { + return requests_.get(index); + } + /** + * + * + *
+   * Required. The resource value configs to be created.
+   * 
+ * + * + * repeated .google.cloud.securitycenter.v2.CreateResourceValueConfigRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequestOrBuilder + getRequestsOrBuilder(int index) { + return requests_.get(index); + } + + 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_); + } + for (int i = 0; i < requests_.size(); i++) { + output.writeMessage(2, requests_.get(i)); + } + getUnknownFields().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_); + } + for (int i = 0; i < requests_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, requests_.get(i)); + } + size += getUnknownFields().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.v2.BatchCreateResourceValueConfigsRequest)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest other = + (com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getRequestsList().equals(other.getRequestsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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 (getRequestsCount() > 0) { + hash = (37 * hash) + REQUESTS_FIELD_NUMBER; + hash = (53 * hash) + getRequestsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest 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.v2.BatchCreateResourceValueConfigsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest 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.v2.BatchCreateResourceValueConfigsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest 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.v2.BatchCreateResourceValueConfigsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest + 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.v2.BatchCreateResourceValueConfigsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest 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.v2.BatchCreateResourceValueConfigsRequest 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 to create multiple resource value configs
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest) + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_BatchCreateResourceValueConfigsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_BatchCreateResourceValueConfigsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest.class, + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + } else { + requests_ = null; + requestsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_BatchCreateResourceValueConfigsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest + getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest build() { + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest + buildPartial() { + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest result = + new com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest result) { + if (requestsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + requests_ = java.util.Collections.unmodifiableList(requests_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.requests_ = requests_; + } else { + result.requests_ = requestsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + } + + @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.v2.BatchCreateResourceValueConfigsRequest) { + return mergeFrom( + (com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest other) { + if (other + == com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (requestsBuilder_ == null) { + if (!other.requests_.isEmpty()) { + if (requests_.isEmpty()) { + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRequestsIsMutable(); + requests_.addAll(other.requests_); + } + onChanged(); + } + } else { + if (!other.requests_.isEmpty()) { + if (requestsBuilder_.isEmpty()) { + requestsBuilder_.dispose(); + requestsBuilder_ = null; + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000002); + requestsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRequestsFieldBuilder() + : null; + } else { + requestsBuilder_.addAllMessages(other.requests_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest m = + input.readMessage( + com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest + .parser(), + extensionRegistry); + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(m); + } else { + requestsBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Resource name of the new ResourceValueConfig's parent.
+     * The parent field in the CreateResourceValueConfigRequest
+     * messages must either be empty or match this field.
+     * 
+ * + * + * 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 ResourceValueConfig's parent.
+     * The parent field in the CreateResourceValueConfigRequest
+     * messages must either be empty or match this field.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 ResourceValueConfig's parent.
+     * The parent field in the CreateResourceValueConfigRequest
+     * messages must either be empty or match this field.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the new ResourceValueConfig's parent.
+     * The parent field in the CreateResourceValueConfigRequest
+     * messages must either be empty or match this field.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the new ResourceValueConfig's parent.
+     * The parent field in the CreateResourceValueConfigRequest
+     * messages must either be empty or match this field.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List + requests_ = java.util.Collections.emptyList(); + + private void ensureRequestsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + requests_ = + new java.util.ArrayList< + com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest>(requests_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest, + com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest.Builder, + com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequestOrBuilder> + requestsBuilder_; + + /** + * + * + *
+     * Required. The resource value configs to be created.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.CreateResourceValueConfigRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getRequestsList() { + if (requestsBuilder_ == null) { + return java.util.Collections.unmodifiableList(requests_); + } else { + return requestsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. The resource value configs to be created.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.CreateResourceValueConfigRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getRequestsCount() { + if (requestsBuilder_ == null) { + return requests_.size(); + } else { + return requestsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. The resource value configs to be created.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.CreateResourceValueConfigRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest getRequests( + int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); + } else { + return requestsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. The resource value configs to be created.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.CreateResourceValueConfigRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRequests( + int index, com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.set(index, value); + onChanged(); + } else { + requestsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The resource value configs to be created.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.CreateResourceValueConfigRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRequests( + int index, + com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest.Builder + builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.set(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The resource value configs to be created.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.CreateResourceValueConfigRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRequests( + com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(value); + onChanged(); + } else { + requestsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. The resource value configs to be created.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.CreateResourceValueConfigRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRequests( + int index, com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(index, value); + onChanged(); + } else { + requestsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The resource value configs to be created.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.CreateResourceValueConfigRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRequests( + com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest.Builder + builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The resource value configs to be created.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.CreateResourceValueConfigRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRequests( + int index, + com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest.Builder + builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The resource value configs to be created.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.CreateResourceValueConfigRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllRequests( + java.lang.Iterable< + ? extends com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest> + values) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, requests_); + onChanged(); + } else { + requestsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. The resource value configs to be created.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.CreateResourceValueConfigRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearRequests() { + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + requestsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. The resource value configs to be created.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.CreateResourceValueConfigRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeRequests(int index) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.remove(index); + onChanged(); + } else { + requestsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. The resource value configs to be created.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.CreateResourceValueConfigRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest.Builder + getRequestsBuilder(int index) { + return getRequestsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. The resource value configs to be created.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.CreateResourceValueConfigRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequestOrBuilder + getRequestsOrBuilder(int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); + } else { + return requestsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. The resource value configs to be created.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.CreateResourceValueConfigRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + ? extends com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequestOrBuilder> + getRequestsOrBuilderList() { + if (requestsBuilder_ != null) { + return requestsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(requests_); + } + } + /** + * + * + *
+     * Required. The resource value configs to be created.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.CreateResourceValueConfigRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest.Builder + addRequestsBuilder() { + return getRequestsFieldBuilder() + .addBuilder( + com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest + .getDefaultInstance()); + } + /** + * + * + *
+     * Required. The resource value configs to be created.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.CreateResourceValueConfigRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest.Builder + addRequestsBuilder(int index) { + return getRequestsFieldBuilder() + .addBuilder( + index, + com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest + .getDefaultInstance()); + } + /** + * + * + *
+     * Required. The resource value configs to be created.
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.CreateResourceValueConfigRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest.Builder> + getRequestsBuilderList() { + return getRequestsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest, + com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest.Builder, + com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequestOrBuilder> + getRequestsFieldBuilder() { + if (requestsBuilder_ == null) { + requestsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest, + com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest.Builder, + com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequestOrBuilder>( + requests_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + requests_ = null; + } + return requestsBuilder_; + } + + @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.v2.BatchCreateResourceValueConfigsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest) + private static final com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest(); + } + + public static com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchCreateResourceValueConfigsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.BatchCreateResourceValueConfigsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BatchCreateResourceValueConfigsRequestOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BatchCreateResourceValueConfigsRequestOrBuilder.java new file mode 100644 index 000000000000..fa79447ea452 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BatchCreateResourceValueConfigsRequestOrBuilder.java @@ -0,0 +1,124 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface BatchCreateResourceValueConfigsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Resource name of the new ResourceValueConfig's parent.
+   * The parent field in the CreateResourceValueConfigRequest
+   * messages must either be empty or match this field.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Resource name of the new ResourceValueConfig's parent.
+   * The parent field in the CreateResourceValueConfigRequest
+   * messages must either be empty or match this field.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The resource value configs to be created.
+   * 
+ * + * + * repeated .google.cloud.securitycenter.v2.CreateResourceValueConfigRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getRequestsList(); + /** + * + * + *
+   * Required. The resource value configs to be created.
+   * 
+ * + * + * repeated .google.cloud.securitycenter.v2.CreateResourceValueConfigRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest getRequests(int index); + /** + * + * + *
+   * Required. The resource value configs to be created.
+   * 
+ * + * + * repeated .google.cloud.securitycenter.v2.CreateResourceValueConfigRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getRequestsCount(); + /** + * + * + *
+   * Required. The resource value configs to be created.
+   * 
+ * + * + * repeated .google.cloud.securitycenter.v2.CreateResourceValueConfigRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List< + ? extends com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequestOrBuilder> + getRequestsOrBuilderList(); + /** + * + * + *
+   * Required. The resource value configs to be created.
+   * 
+ * + * + * repeated .google.cloud.securitycenter.v2.CreateResourceValueConfigRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequestOrBuilder getRequestsOrBuilder( + int index); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BatchCreateResourceValueConfigsResponse.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BatchCreateResourceValueConfigsResponse.java new file mode 100644 index 000000000000..4bde5b6371df --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BatchCreateResourceValueConfigsResponse.java @@ -0,0 +1,1025 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Response message for BatchCreateResourceValueConfigs
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse} + */ +public final class BatchCreateResourceValueConfigsResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse) + BatchCreateResourceValueConfigsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchCreateResourceValueConfigsResponse.newBuilder() to construct. + private BatchCreateResourceValueConfigsResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchCreateResourceValueConfigsResponse() { + resourceValueConfigs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchCreateResourceValueConfigsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_BatchCreateResourceValueConfigsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_BatchCreateResourceValueConfigsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse.class, + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse.Builder + .class); + } + + public static final int RESOURCE_VALUE_CONFIGS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + resourceValueConfigs_; + /** + * + * + *
+   * The resource value configs created
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_configs = 1; + * + */ + @java.lang.Override + public java.util.List + getResourceValueConfigsList() { + return resourceValueConfigs_; + } + /** + * + * + *
+   * The resource value configs created
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_configs = 1; + * + */ + @java.lang.Override + public java.util.List + getResourceValueConfigsOrBuilderList() { + return resourceValueConfigs_; + } + /** + * + * + *
+   * The resource value configs created
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_configs = 1; + * + */ + @java.lang.Override + public int getResourceValueConfigsCount() { + return resourceValueConfigs_.size(); + } + /** + * + * + *
+   * The resource value configs created
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_configs = 1; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.ResourceValueConfig getResourceValueConfigs(int index) { + return resourceValueConfigs_.get(index); + } + /** + * + * + *
+   * The resource value configs created
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_configs = 1; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.ResourceValueConfigOrBuilder + getResourceValueConfigsOrBuilder(int index) { + return resourceValueConfigs_.get(index); + } + + 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 < resourceValueConfigs_.size(); i++) { + output.writeMessage(1, resourceValueConfigs_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < resourceValueConfigs_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, resourceValueConfigs_.get(i)); + } + size += getUnknownFields().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.v2.BatchCreateResourceValueConfigsResponse)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse other = + (com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse) obj; + + if (!getResourceValueConfigsList().equals(other.getResourceValueConfigsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getResourceValueConfigsCount() > 0) { + hash = (37 * hash) + RESOURCE_VALUE_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getResourceValueConfigsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse + 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.v2.BatchCreateResourceValueConfigsResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse + 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.v2.BatchCreateResourceValueConfigsResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse + 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.v2.BatchCreateResourceValueConfigsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse + 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.v2.BatchCreateResourceValueConfigsResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse + 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.v2.BatchCreateResourceValueConfigsResponse 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 BatchCreateResourceValueConfigs
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse) + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_BatchCreateResourceValueConfigsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_BatchCreateResourceValueConfigsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse.class, + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (resourceValueConfigsBuilder_ == null) { + resourceValueConfigs_ = java.util.Collections.emptyList(); + } else { + resourceValueConfigs_ = null; + resourceValueConfigsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_BatchCreateResourceValueConfigsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse + getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse build() { + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse + buildPartial() { + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse result = + new com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse result) { + if (resourceValueConfigsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + resourceValueConfigs_ = java.util.Collections.unmodifiableList(resourceValueConfigs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.resourceValueConfigs_ = resourceValueConfigs_; + } else { + result.resourceValueConfigs_ = resourceValueConfigsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse result) { + int from_bitField0_ = bitField0_; + } + + @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.v2.BatchCreateResourceValueConfigsResponse) { + return mergeFrom( + (com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse other) { + if (other + == com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse + .getDefaultInstance()) return this; + if (resourceValueConfigsBuilder_ == null) { + if (!other.resourceValueConfigs_.isEmpty()) { + if (resourceValueConfigs_.isEmpty()) { + resourceValueConfigs_ = other.resourceValueConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResourceValueConfigsIsMutable(); + resourceValueConfigs_.addAll(other.resourceValueConfigs_); + } + onChanged(); + } + } else { + if (!other.resourceValueConfigs_.isEmpty()) { + if (resourceValueConfigsBuilder_.isEmpty()) { + resourceValueConfigsBuilder_.dispose(); + resourceValueConfigsBuilder_ = null; + resourceValueConfigs_ = other.resourceValueConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + resourceValueConfigsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getResourceValueConfigsFieldBuilder() + : null; + } else { + resourceValueConfigsBuilder_.addAllMessages(other.resourceValueConfigs_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.securitycenter.v2.ResourceValueConfig m = + input.readMessage( + com.google.cloud.securitycenter.v2.ResourceValueConfig.parser(), + extensionRegistry); + if (resourceValueConfigsBuilder_ == null) { + ensureResourceValueConfigsIsMutable(); + resourceValueConfigs_.add(m); + } else { + resourceValueConfigsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + resourceValueConfigs_ = java.util.Collections.emptyList(); + + private void ensureResourceValueConfigsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + resourceValueConfigs_ = + new java.util.ArrayList( + resourceValueConfigs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.ResourceValueConfig, + com.google.cloud.securitycenter.v2.ResourceValueConfig.Builder, + com.google.cloud.securitycenter.v2.ResourceValueConfigOrBuilder> + resourceValueConfigsBuilder_; + + /** + * + * + *
+     * The resource value configs created
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_configs = 1; + * + */ + public java.util.List + getResourceValueConfigsList() { + if (resourceValueConfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList(resourceValueConfigs_); + } else { + return resourceValueConfigsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The resource value configs created
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_configs = 1; + * + */ + public int getResourceValueConfigsCount() { + if (resourceValueConfigsBuilder_ == null) { + return resourceValueConfigs_.size(); + } else { + return resourceValueConfigsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The resource value configs created
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_configs = 1; + * + */ + public com.google.cloud.securitycenter.v2.ResourceValueConfig getResourceValueConfigs( + int index) { + if (resourceValueConfigsBuilder_ == null) { + return resourceValueConfigs_.get(index); + } else { + return resourceValueConfigsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The resource value configs created
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_configs = 1; + * + */ + public Builder setResourceValueConfigs( + int index, com.google.cloud.securitycenter.v2.ResourceValueConfig value) { + if (resourceValueConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceValueConfigsIsMutable(); + resourceValueConfigs_.set(index, value); + onChanged(); + } else { + resourceValueConfigsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The resource value configs created
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_configs = 1; + * + */ + public Builder setResourceValueConfigs( + int index, com.google.cloud.securitycenter.v2.ResourceValueConfig.Builder builderForValue) { + if (resourceValueConfigsBuilder_ == null) { + ensureResourceValueConfigsIsMutable(); + resourceValueConfigs_.set(index, builderForValue.build()); + onChanged(); + } else { + resourceValueConfigsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The resource value configs created
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_configs = 1; + * + */ + public Builder addResourceValueConfigs( + com.google.cloud.securitycenter.v2.ResourceValueConfig value) { + if (resourceValueConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceValueConfigsIsMutable(); + resourceValueConfigs_.add(value); + onChanged(); + } else { + resourceValueConfigsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The resource value configs created
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_configs = 1; + * + */ + public Builder addResourceValueConfigs( + int index, com.google.cloud.securitycenter.v2.ResourceValueConfig value) { + if (resourceValueConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceValueConfigsIsMutable(); + resourceValueConfigs_.add(index, value); + onChanged(); + } else { + resourceValueConfigsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The resource value configs created
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_configs = 1; + * + */ + public Builder addResourceValueConfigs( + com.google.cloud.securitycenter.v2.ResourceValueConfig.Builder builderForValue) { + if (resourceValueConfigsBuilder_ == null) { + ensureResourceValueConfigsIsMutable(); + resourceValueConfigs_.add(builderForValue.build()); + onChanged(); + } else { + resourceValueConfigsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The resource value configs created
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_configs = 1; + * + */ + public Builder addResourceValueConfigs( + int index, com.google.cloud.securitycenter.v2.ResourceValueConfig.Builder builderForValue) { + if (resourceValueConfigsBuilder_ == null) { + ensureResourceValueConfigsIsMutable(); + resourceValueConfigs_.add(index, builderForValue.build()); + onChanged(); + } else { + resourceValueConfigsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The resource value configs created
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_configs = 1; + * + */ + public Builder addAllResourceValueConfigs( + java.lang.Iterable + values) { + if (resourceValueConfigsBuilder_ == null) { + ensureResourceValueConfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, resourceValueConfigs_); + onChanged(); + } else { + resourceValueConfigsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The resource value configs created
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_configs = 1; + * + */ + public Builder clearResourceValueConfigs() { + if (resourceValueConfigsBuilder_ == null) { + resourceValueConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + resourceValueConfigsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The resource value configs created
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_configs = 1; + * + */ + public Builder removeResourceValueConfigs(int index) { + if (resourceValueConfigsBuilder_ == null) { + ensureResourceValueConfigsIsMutable(); + resourceValueConfigs_.remove(index); + onChanged(); + } else { + resourceValueConfigsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The resource value configs created
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_configs = 1; + * + */ + public com.google.cloud.securitycenter.v2.ResourceValueConfig.Builder + getResourceValueConfigsBuilder(int index) { + return getResourceValueConfigsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The resource value configs created
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_configs = 1; + * + */ + public com.google.cloud.securitycenter.v2.ResourceValueConfigOrBuilder + getResourceValueConfigsOrBuilder(int index) { + if (resourceValueConfigsBuilder_ == null) { + return resourceValueConfigs_.get(index); + } else { + return resourceValueConfigsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The resource value configs created
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_configs = 1; + * + */ + public java.util.List + getResourceValueConfigsOrBuilderList() { + if (resourceValueConfigsBuilder_ != null) { + return resourceValueConfigsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(resourceValueConfigs_); + } + } + /** + * + * + *
+     * The resource value configs created
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_configs = 1; + * + */ + public com.google.cloud.securitycenter.v2.ResourceValueConfig.Builder + addResourceValueConfigsBuilder() { + return getResourceValueConfigsFieldBuilder() + .addBuilder(com.google.cloud.securitycenter.v2.ResourceValueConfig.getDefaultInstance()); + } + /** + * + * + *
+     * The resource value configs created
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_configs = 1; + * + */ + public com.google.cloud.securitycenter.v2.ResourceValueConfig.Builder + addResourceValueConfigsBuilder(int index) { + return getResourceValueConfigsFieldBuilder() + .addBuilder( + index, com.google.cloud.securitycenter.v2.ResourceValueConfig.getDefaultInstance()); + } + /** + * + * + *
+     * The resource value configs created
+     * 
+ * + * + * repeated .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_configs = 1; + * + */ + public java.util.List + getResourceValueConfigsBuilderList() { + return getResourceValueConfigsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.ResourceValueConfig, + com.google.cloud.securitycenter.v2.ResourceValueConfig.Builder, + com.google.cloud.securitycenter.v2.ResourceValueConfigOrBuilder> + getResourceValueConfigsFieldBuilder() { + if (resourceValueConfigsBuilder_ == null) { + resourceValueConfigsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.ResourceValueConfig, + com.google.cloud.securitycenter.v2.ResourceValueConfig.Builder, + com.google.cloud.securitycenter.v2.ResourceValueConfigOrBuilder>( + resourceValueConfigs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + resourceValueConfigs_ = null; + } + return resourceValueConfigsBuilder_; + } + + @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.v2.BatchCreateResourceValueConfigsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse) + private static final com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse(); + } + + public static com.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchCreateResourceValueConfigsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.BatchCreateResourceValueConfigsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BatchCreateResourceValueConfigsResponseOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BatchCreateResourceValueConfigsResponseOrBuilder.java new file mode 100644 index 000000000000..7018881c8748 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BatchCreateResourceValueConfigsResponseOrBuilder.java @@ -0,0 +1,85 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface BatchCreateResourceValueConfigsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource value configs created
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_configs = 1; + * + */ + java.util.List + getResourceValueConfigsList(); + /** + * + * + *
+   * The resource value configs created
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_configs = 1; + * + */ + com.google.cloud.securitycenter.v2.ResourceValueConfig getResourceValueConfigs(int index); + /** + * + * + *
+   * The resource value configs created
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_configs = 1; + * + */ + int getResourceValueConfigsCount(); + /** + * + * + *
+   * The resource value configs created
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_configs = 1; + * + */ + java.util.List + getResourceValueConfigsOrBuilderList(); + /** + * + * + *
+   * The resource value configs created
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_configs = 1; + * + */ + com.google.cloud.securitycenter.v2.ResourceValueConfigOrBuilder getResourceValueConfigsOrBuilder( + int index); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BigQueryExport.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BigQueryExport.java new file mode 100644 index 000000000000..fe06100d48b2 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BigQueryExport.java @@ -0,0 +1,2416 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/bigquery_export.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Configures how to deliver Findings to BigQuery Instance.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.BigQueryExport} + */ +public final class BigQueryExport extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.BigQueryExport) + BigQueryExportOrBuilder { + private static final long serialVersionUID = 0L; + // Use BigQueryExport.newBuilder() to construct. + private BigQueryExport(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BigQueryExport() { + name_ = ""; + description_ = ""; + filter_ = ""; + dataset_ = ""; + mostRecentEditor_ = ""; + principal_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BigQueryExport(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.BigQueryExportProto + .internal_static_google_cloud_securitycenter_v2_BigQueryExport_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.BigQueryExportProto + .internal_static_google_cloud_securitycenter_v2_BigQueryExport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.BigQueryExport.class, + com.google.cloud.securitycenter.v2.BigQueryExport.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * The relative resource name of this export. See:
+   * https://cloud.google.com/apis/design/resource_names#relative_resource_name.
+   * The following list shows some examples:
+   *
+   * +
+   * `organizations/{organization_id}/locations/{location_id}/bigQueryExports/{export_id}`
+   * + `folders/{folder_id}/locations/{location_id}/bigQueryExports/{export_id}`
+   * +
+   * `projects/{project_id}/locations/{location_id}/bigQueryExports/{export_id}`
+   *
+   * This field is provided in responses, and is ignored when provided in create
+   * requests.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * The relative resource name of this export. See:
+   * https://cloud.google.com/apis/design/resource_names#relative_resource_name.
+   * The following list shows some examples:
+   *
+   * +
+   * `organizations/{organization_id}/locations/{location_id}/bigQueryExports/{export_id}`
+   * + `folders/{folder_id}/locations/{location_id}/bigQueryExports/{export_id}`
+   * +
+   * `projects/{project_id}/locations/{location_id}/bigQueryExports/{export_id}`
+   *
+   * This field is provided in responses, and is ignored when provided in create
+   * requests.
+   * 
+ * + * 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 DESCRIPTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * The description of the export (max of 1024 characters).
+   * 
+ * + * string description = 2; + * + * @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; + } + } + /** + * + * + *
+   * The description of the export (max of 1024 characters).
+   * 
+ * + * string description = 2; + * + * @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 = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Expression that defines the filter to apply across create/update events
+   * of findings. 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 = 3; + * + * @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 defines the filter to apply across create/update events
+   * of findings. 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 = 3; + * + * @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 DATASET_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object dataset_ = ""; + /** + * + * + *
+   * The dataset to write findings' updates to. Its format is
+   * "projects/[project_id]/datasets/[bigquery_dataset_id]".
+   * BigQuery Dataset unique ID  must contain only letters (a-z, A-Z), numbers
+   * (0-9), or underscores (_).
+   * 
+ * + * string dataset = 4; + * + * @return The dataset. + */ + @java.lang.Override + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + 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(); + dataset_ = s; + return s; + } + } + /** + * + * + *
+   * The dataset to write findings' updates to. Its format is
+   * "projects/[project_id]/datasets/[bigquery_dataset_id]".
+   * BigQuery Dataset unique ID  must contain only letters (a-z, A-Z), numbers
+   * (0-9), or underscores (_).
+   * 
+ * + * string dataset = 4; + * + * @return The bytes for dataset. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataset_ = 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 BigQuery export was created.
+   * This field is set by the server and will be ignored if provided on export
+   * on 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 ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. The time at which the BigQuery export was created.
+   * This field is set by the server and will be ignored if provided on export
+   * on 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 BigQuery export was created.
+   * This field is set by the server and will be ignored if provided on export
+   * on creation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The most recent time at which the BigQuery export was updated.
+   * This field is set by the server and will be ignored if provided on export
+   * 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 ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. The most recent time at which the BigQuery export was updated.
+   * This field is set by the server and will be ignored if provided on export
+   * 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 BigQuery export was updated.
+   * This field is set by the server and will be ignored if provided on export
+   * 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 updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int MOST_RECENT_EDITOR_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object mostRecentEditor_ = ""; + /** + * + * + *
+   * Output only. Email address of the user who last edited the BigQuery export.
+   * This field is set by the server and will be ignored if provided on export
+   * 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 BigQuery export.
+   * This field is set by the server and will be ignored if provided on export
+   * 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; + } + } + + public static final int PRINCIPAL_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object principal_ = ""; + /** + * + * + *
+   * Output only. The service account that needs permission to create table and
+   * upload data to the BigQuery dataset.
+   * 
+ * + * string principal = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The principal. + */ + @java.lang.Override + public java.lang.String getPrincipal() { + java.lang.Object ref = principal_; + 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(); + principal_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The service account that needs permission to create table and
+   * upload data to the BigQuery dataset.
+   * 
+ * + * string principal = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for principal. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPrincipalBytes() { + java.lang.Object ref = principal_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + principal_ = 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(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataset_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, dataset_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mostRecentEditor_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, mostRecentEditor_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principal_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, principal_); + } + getUnknownFields().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(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataset_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, dataset_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mostRecentEditor_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, mostRecentEditor_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principal_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, principal_); + } + size += getUnknownFields().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.v2.BigQueryExport)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.BigQueryExport other = + (com.google.cloud.securitycenter.v2.BigQueryExport) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getDataset().equals(other.getDataset())) 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 (!getPrincipal().equals(other.getPrincipal())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + DATASET_FIELD_NUMBER; + hash = (53 * hash) + getDataset().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 = (37 * hash) + PRINCIPAL_FIELD_NUMBER; + hash = (53 * hash) + getPrincipal().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.BigQueryExport parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.BigQueryExport 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.v2.BigQueryExport parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.BigQueryExport 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.v2.BigQueryExport parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.BigQueryExport parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.BigQueryExport parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.BigQueryExport 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.v2.BigQueryExport parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.BigQueryExport 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.v2.BigQueryExport parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.BigQueryExport 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.v2.BigQueryExport 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; + } + /** + * + * + *
+   * Configures how to deliver Findings to BigQuery Instance.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.BigQueryExport} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.BigQueryExport) + com.google.cloud.securitycenter.v2.BigQueryExportOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.BigQueryExportProto + .internal_static_google_cloud_securitycenter_v2_BigQueryExport_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.BigQueryExportProto + .internal_static_google_cloud_securitycenter_v2_BigQueryExport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.BigQueryExport.class, + com.google.cloud.securitycenter.v2.BigQueryExport.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.BigQueryExport.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + description_ = ""; + filter_ = ""; + dataset_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + mostRecentEditor_ = ""; + principal_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.BigQueryExportProto + .internal_static_google_cloud_securitycenter_v2_BigQueryExport_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.BigQueryExport getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.BigQueryExport.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.BigQueryExport build() { + com.google.cloud.securitycenter.v2.BigQueryExport result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.BigQueryExport buildPartial() { + com.google.cloud.securitycenter.v2.BigQueryExport result = + new com.google.cloud.securitycenter.v2.BigQueryExport(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.BigQueryExport result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.dataset_ = dataset_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.mostRecentEditor_ = mostRecentEditor_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.principal_ = principal_; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v2.BigQueryExport) { + return mergeFrom((com.google.cloud.securitycenter.v2.BigQueryExport) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.BigQueryExport other) { + if (other == com.google.cloud.securitycenter.v2.BigQueryExport.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDataset().isEmpty()) { + dataset_ = other.dataset_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getMostRecentEditor().isEmpty()) { + mostRecentEditor_ = other.mostRecentEditor_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (!other.getPrincipal().isEmpty()) { + principal_ = other.principal_; + bitField0_ |= 0x00000080; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + dataset_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + mostRecentEditor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + principal_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The relative resource name of this export. See:
+     * https://cloud.google.com/apis/design/resource_names#relative_resource_name.
+     * The following list shows some examples:
+     *
+     * +
+     * `organizations/{organization_id}/locations/{location_id}/bigQueryExports/{export_id}`
+     * + `folders/{folder_id}/locations/{location_id}/bigQueryExports/{export_id}`
+     * +
+     * `projects/{project_id}/locations/{location_id}/bigQueryExports/{export_id}`
+     *
+     * This field is provided in responses, and is ignored when provided in create
+     * requests.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * The relative resource name of this export. See:
+     * https://cloud.google.com/apis/design/resource_names#relative_resource_name.
+     * The following list shows some examples:
+     *
+     * +
+     * `organizations/{organization_id}/locations/{location_id}/bigQueryExports/{export_id}`
+     * + `folders/{folder_id}/locations/{location_id}/bigQueryExports/{export_id}`
+     * +
+     * `projects/{project_id}/locations/{location_id}/bigQueryExports/{export_id}`
+     *
+     * This field is provided in responses, and is ignored when provided in create
+     * requests.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * The relative resource name of this export. See:
+     * https://cloud.google.com/apis/design/resource_names#relative_resource_name.
+     * The following list shows some examples:
+     *
+     * +
+     * `organizations/{organization_id}/locations/{location_id}/bigQueryExports/{export_id}`
+     * + `folders/{folder_id}/locations/{location_id}/bigQueryExports/{export_id}`
+     * +
+     * `projects/{project_id}/locations/{location_id}/bigQueryExports/{export_id}`
+     *
+     * This field is provided in responses, and is ignored when provided in create
+     * requests.
+     * 
+ * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The relative resource name of this export. See:
+     * https://cloud.google.com/apis/design/resource_names#relative_resource_name.
+     * The following list shows some examples:
+     *
+     * +
+     * `organizations/{organization_id}/locations/{location_id}/bigQueryExports/{export_id}`
+     * + `folders/{folder_id}/locations/{location_id}/bigQueryExports/{export_id}`
+     * +
+     * `projects/{project_id}/locations/{location_id}/bigQueryExports/{export_id}`
+     *
+     * This field is provided in responses, and is ignored when provided in create
+     * requests.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The relative resource name of this export. See:
+     * https://cloud.google.com/apis/design/resource_names#relative_resource_name.
+     * The following list shows some examples:
+     *
+     * +
+     * `organizations/{organization_id}/locations/{location_id}/bigQueryExports/{export_id}`
+     * + `folders/{folder_id}/locations/{location_id}/bigQueryExports/{export_id}`
+     * +
+     * `projects/{project_id}/locations/{location_id}/bigQueryExports/{export_id}`
+     *
+     * This field is provided in responses, and is ignored when provided in create
+     * requests.
+     * 
+ * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * The description of the export (max of 1024 characters).
+     * 
+ * + * string description = 2; + * + * @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; + } + } + /** + * + * + *
+     * The description of the export (max of 1024 characters).
+     * 
+ * + * string description = 2; + * + * @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; + } + } + /** + * + * + *
+     * The description of the export (max of 1024 characters).
+     * 
+ * + * string description = 2; + * + * @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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The description of the export (max of 1024 characters).
+     * 
+ * + * string description = 2; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The description of the export (max of 1024 characters).
+     * 
+ * + * string description = 2; + * + * @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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Expression that defines the filter to apply across create/update events
+     * of findings. 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 = 3; + * + * @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 defines the filter to apply across create/update events
+     * of findings. 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 = 3; + * + * @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 defines the filter to apply across create/update events
+     * of findings. 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 = 3; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Expression that defines the filter to apply across create/update events
+     * of findings. 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 = 3; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Expression that defines the filter to apply across create/update events
+     * of findings. 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 = 3; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object dataset_ = ""; + /** + * + * + *
+     * The dataset to write findings' updates to. Its format is
+     * "projects/[project_id]/datasets/[bigquery_dataset_id]".
+     * BigQuery Dataset unique ID  must contain only letters (a-z, A-Z), numbers
+     * (0-9), or underscores (_).
+     * 
+ * + * string dataset = 4; + * + * @return The dataset. + */ + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataset_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The dataset to write findings' updates to. Its format is
+     * "projects/[project_id]/datasets/[bigquery_dataset_id]".
+     * BigQuery Dataset unique ID  must contain only letters (a-z, A-Z), numbers
+     * (0-9), or underscores (_).
+     * 
+ * + * string dataset = 4; + * + * @return The bytes for dataset. + */ + public com.google.protobuf.ByteString getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The dataset to write findings' updates to. Its format is
+     * "projects/[project_id]/datasets/[bigquery_dataset_id]".
+     * BigQuery Dataset unique ID  must contain only letters (a-z, A-Z), numbers
+     * (0-9), or underscores (_).
+     * 
+ * + * string dataset = 4; + * + * @param value The dataset to set. + * @return This builder for chaining. + */ + public Builder setDataset(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataset_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The dataset to write findings' updates to. Its format is
+     * "projects/[project_id]/datasets/[bigquery_dataset_id]".
+     * BigQuery Dataset unique ID  must contain only letters (a-z, A-Z), numbers
+     * (0-9), or underscores (_).
+     * 
+ * + * string dataset = 4; + * + * @return This builder for chaining. + */ + public Builder clearDataset() { + dataset_ = getDefaultInstance().getDataset(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The dataset to write findings' updates to. Its format is
+     * "projects/[project_id]/datasets/[bigquery_dataset_id]".
+     * BigQuery Dataset unique ID  must contain only letters (a-z, A-Z), numbers
+     * (0-9), or underscores (_).
+     * 
+ * + * string dataset = 4; + * + * @param value The bytes for dataset to set. + * @return This builder for chaining. + */ + public Builder setDatasetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataset_ = value; + bitField0_ |= 0x00000008; + 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 BigQuery export was created.
+     * This field is set by the server and will be ignored if provided on export
+     * on creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Output only. The time at which the BigQuery export was created.
+     * This field is set by the server and will be ignored if provided on export
+     * on 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 BigQuery export was created.
+     * This field is set by the server and will be ignored if provided on export
+     * on 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; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time at which the BigQuery export was created.
+     * This field is set by the server and will be ignored if provided on export
+     * on 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(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time at which the BigQuery export was created.
+     * This field is set by the server and will be ignored if provided on export
+     * on 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 (((bitField0_ & 0x00000010) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The time at which the BigQuery export was created.
+     * This field is set by the server and will be ignored if provided on export
+     * on creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time at which the BigQuery export was created.
+     * This field is set by the server and will be ignored if provided on export
+     * on creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time at which the BigQuery export was created.
+     * This field is set by the server and will be ignored if provided on export
+     * on 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 BigQuery export was created.
+     * This field is set by the server and will be ignored if provided on export
+     * on 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 BigQuery export was updated.
+     * This field is set by the server and will be ignored if provided on export
+     * 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 ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * Output only. The most recent time at which the BigQuery export was updated.
+     * This field is set by the server and will be ignored if provided on export
+     * 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 BigQuery export was updated.
+     * This field is set by the server and will be ignored if provided on export
+     * 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; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The most recent time at which the BigQuery export was updated.
+     * This field is set by the server and will be ignored if provided on export
+     * 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(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The most recent time at which the BigQuery export was updated.
+     * This field is set by the server and will be ignored if provided on export
+     * 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 (((bitField0_ & 0x00000020) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The most recent time at which the BigQuery export was updated.
+     * This field is set by the server and will be ignored if provided on export
+     * creation or update.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The most recent time at which the BigQuery export was updated.
+     * This field is set by the server and will be ignored if provided on export
+     * creation or update.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The most recent time at which the BigQuery export was updated.
+     * This field is set by the server and will be ignored if provided on export
+     * 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 BigQuery export was updated.
+     * This field is set by the server and will be ignored if provided on export
+     * 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 BigQuery export.
+     * This field is set by the server and will be ignored if provided on export
+     * 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 BigQuery export.
+     * This field is set by the server and will be ignored if provided on export
+     * 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 BigQuery export.
+     * This field is set by the server and will be ignored if provided on export
+     * 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; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Email address of the user who last edited the BigQuery export.
+     * This field is set by the server and will be ignored if provided on export
+     * 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(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Email address of the user who last edited the BigQuery export.
+     * This field is set by the server and will be ignored if provided on export
+     * 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; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private java.lang.Object principal_ = ""; + /** + * + * + *
+     * Output only. The service account that needs permission to create table and
+     * upload data to the BigQuery dataset.
+     * 
+ * + * string principal = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The principal. + */ + public java.lang.String getPrincipal() { + java.lang.Object ref = principal_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + principal_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The service account that needs permission to create table and
+     * upload data to the BigQuery dataset.
+     * 
+ * + * string principal = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for principal. + */ + public com.google.protobuf.ByteString getPrincipalBytes() { + java.lang.Object ref = principal_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + principal_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The service account that needs permission to create table and
+     * upload data to the BigQuery dataset.
+     * 
+ * + * string principal = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The principal to set. + * @return This builder for chaining. + */ + public Builder setPrincipal(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + principal_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The service account that needs permission to create table and
+     * upload data to the BigQuery dataset.
+     * 
+ * + * string principal = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPrincipal() { + principal_ = getDefaultInstance().getPrincipal(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The service account that needs permission to create table and
+     * upload data to the BigQuery dataset.
+     * 
+ * + * string principal = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for principal to set. + * @return This builder for chaining. + */ + public Builder setPrincipalBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + principal_ = value; + bitField0_ |= 0x00000080; + 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.v2.BigQueryExport) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.BigQueryExport) + private static final com.google.cloud.securitycenter.v2.BigQueryExport DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.BigQueryExport(); + } + + public static com.google.cloud.securitycenter.v2.BigQueryExport getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigQueryExport parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.BigQueryExport getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BigQueryExportName.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BigQueryExportName.java new file mode 100644 index 000000000000..3bae76875d31 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BigQueryExportName.java @@ -0,0 +1,446 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.securitycenter.v2; + +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 BigQueryExportName implements ResourceName { + private static final PathTemplate ORGANIZATION_LOCATION_EXPORT = + PathTemplate.createWithoutUrlEncoding( + "organizations/{organization}/locations/{location}/bigQueryExports/{export}"); + private static final PathTemplate FOLDER_LOCATION_EXPORT = + PathTemplate.createWithoutUrlEncoding( + "folders/{folder}/locations/{location}/bigQueryExports/{export}"); + private static final PathTemplate PROJECT_LOCATION_EXPORT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/bigQueryExports/{export}"); + private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; + private final String organization; + private final String location; + private final String export; + private final String folder; + private final String project; + + @Deprecated + protected BigQueryExportName() { + organization = null; + location = null; + export = null; + folder = null; + project = null; + } + + private BigQueryExportName(Builder builder) { + organization = Preconditions.checkNotNull(builder.getOrganization()); + location = Preconditions.checkNotNull(builder.getLocation()); + export = Preconditions.checkNotNull(builder.getExport()); + folder = null; + project = null; + pathTemplate = ORGANIZATION_LOCATION_EXPORT; + } + + private BigQueryExportName(FolderLocationExportBuilder builder) { + folder = Preconditions.checkNotNull(builder.getFolder()); + location = Preconditions.checkNotNull(builder.getLocation()); + export = Preconditions.checkNotNull(builder.getExport()); + organization = null; + project = null; + pathTemplate = FOLDER_LOCATION_EXPORT; + } + + private BigQueryExportName(ProjectLocationExportBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + export = Preconditions.checkNotNull(builder.getExport()); + organization = null; + folder = null; + pathTemplate = PROJECT_LOCATION_EXPORT; + } + + public String getOrganization() { + return organization; + } + + public String getLocation() { + return location; + } + + public String getExport() { + return export; + } + + public String getFolder() { + return folder; + } + + public String getProject() { + return project; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public static Builder newOrganizationLocationExportBuilder() { + return new Builder(); + } + + public static FolderLocationExportBuilder newFolderLocationExportBuilder() { + return new FolderLocationExportBuilder(); + } + + public static ProjectLocationExportBuilder newProjectLocationExportBuilder() { + return new ProjectLocationExportBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static BigQueryExportName of(String organization, String location, String export) { + return newBuilder() + .setOrganization(organization) + .setLocation(location) + .setExport(export) + .build(); + } + + public static BigQueryExportName ofOrganizationLocationExportName( + String organization, String location, String export) { + return newBuilder() + .setOrganization(organization) + .setLocation(location) + .setExport(export) + .build(); + } + + public static BigQueryExportName ofFolderLocationExportName( + String folder, String location, String export) { + return newFolderLocationExportBuilder() + .setFolder(folder) + .setLocation(location) + .setExport(export) + .build(); + } + + public static BigQueryExportName ofProjectLocationExportName( + String project, String location, String export) { + return newProjectLocationExportBuilder() + .setProject(project) + .setLocation(location) + .setExport(export) + .build(); + } + + public static String format(String organization, String location, String export) { + return newBuilder() + .setOrganization(organization) + .setLocation(location) + .setExport(export) + .build() + .toString(); + } + + public static String formatOrganizationLocationExportName( + String organization, String location, String export) { + return newBuilder() + .setOrganization(organization) + .setLocation(location) + .setExport(export) + .build() + .toString(); + } + + public static String formatFolderLocationExportName( + String folder, String location, String export) { + return newFolderLocationExportBuilder() + .setFolder(folder) + .setLocation(location) + .setExport(export) + .build() + .toString(); + } + + public static String formatProjectLocationExportName( + String project, String location, String export) { + return newProjectLocationExportBuilder() + .setProject(project) + .setLocation(location) + .setExport(export) + .build() + .toString(); + } + + public static BigQueryExportName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + if (ORGANIZATION_LOCATION_EXPORT.matches(formattedString)) { + Map matchMap = ORGANIZATION_LOCATION_EXPORT.match(formattedString); + return ofOrganizationLocationExportName( + matchMap.get("organization"), matchMap.get("location"), matchMap.get("export")); + } else if (FOLDER_LOCATION_EXPORT.matches(formattedString)) { + Map matchMap = FOLDER_LOCATION_EXPORT.match(formattedString); + return ofFolderLocationExportName( + matchMap.get("folder"), matchMap.get("location"), matchMap.get("export")); + } else if (PROJECT_LOCATION_EXPORT.matches(formattedString)) { + Map matchMap = PROJECT_LOCATION_EXPORT.match(formattedString); + return ofProjectLocationExportName( + matchMap.get("project"), matchMap.get("location"), matchMap.get("export")); + } + throw new ValidationException("BigQueryExportName.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 (BigQueryExportName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return ORGANIZATION_LOCATION_EXPORT.matches(formattedString) + || FOLDER_LOCATION_EXPORT.matches(formattedString) + || PROJECT_LOCATION_EXPORT.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 (location != null) { + fieldMapBuilder.put("location", location); + } + if (export != null) { + fieldMapBuilder.put("export", export); + } + 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(java.lang.Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + BigQueryExportName that = ((BigQueryExportName) o); + return Objects.equals(this.organization, that.organization) + && Objects.equals(this.location, that.location) + && Objects.equals(this.export, that.export) + && 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(location); + h *= 1000003; + h ^= Objects.hashCode(export); + h *= 1000003; + h ^= Objects.hashCode(folder); + h *= 1000003; + h ^= Objects.hashCode(project); + return h; + } + + /** Builder for organizations/{organization}/locations/{location}/bigQueryExports/{export}. */ + public static class Builder { + private String organization; + private String location; + private String export; + + protected Builder() {} + + public String getOrganization() { + return organization; + } + + public String getLocation() { + return location; + } + + public String getExport() { + return export; + } + + public Builder setOrganization(String organization) { + this.organization = organization; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setExport(String export) { + this.export = export; + return this; + } + + private Builder(BigQueryExportName bigQueryExportName) { + Preconditions.checkArgument( + Objects.equals(bigQueryExportName.pathTemplate, ORGANIZATION_LOCATION_EXPORT), + "toBuilder is only supported when BigQueryExportName has the pattern of organizations/{organization}/locations/{location}/bigQueryExports/{export}"); + this.organization = bigQueryExportName.organization; + this.location = bigQueryExportName.location; + this.export = bigQueryExportName.export; + } + + public BigQueryExportName build() { + return new BigQueryExportName(this); + } + } + + /** Builder for folders/{folder}/locations/{location}/bigQueryExports/{export}. */ + public static class FolderLocationExportBuilder { + private String folder; + private String location; + private String export; + + protected FolderLocationExportBuilder() {} + + public String getFolder() { + return folder; + } + + public String getLocation() { + return location; + } + + public String getExport() { + return export; + } + + public FolderLocationExportBuilder setFolder(String folder) { + this.folder = folder; + return this; + } + + public FolderLocationExportBuilder setLocation(String location) { + this.location = location; + return this; + } + + public FolderLocationExportBuilder setExport(String export) { + this.export = export; + return this; + } + + public BigQueryExportName build() { + return new BigQueryExportName(this); + } + } + + /** Builder for projects/{project}/locations/{location}/bigQueryExports/{export}. */ + public static class ProjectLocationExportBuilder { + private String project; + private String location; + private String export; + + protected ProjectLocationExportBuilder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getExport() { + return export; + } + + public ProjectLocationExportBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectLocationExportBuilder setLocation(String location) { + this.location = location; + return this; + } + + public ProjectLocationExportBuilder setExport(String export) { + this.export = export; + return this; + } + + public BigQueryExportName build() { + return new BigQueryExportName(this); + } + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BigQueryExportOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BigQueryExportOrBuilder.java new file mode 100644 index 000000000000..9cbe009a2d6f --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BigQueryExportOrBuilder.java @@ -0,0 +1,336 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/bigquery_export.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface BigQueryExportOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.BigQueryExport) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The relative resource name of this export. See:
+   * https://cloud.google.com/apis/design/resource_names#relative_resource_name.
+   * The following list shows some examples:
+   *
+   * +
+   * `organizations/{organization_id}/locations/{location_id}/bigQueryExports/{export_id}`
+   * + `folders/{folder_id}/locations/{location_id}/bigQueryExports/{export_id}`
+   * +
+   * `projects/{project_id}/locations/{location_id}/bigQueryExports/{export_id}`
+   *
+   * This field is provided in responses, and is ignored when provided in create
+   * requests.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The relative resource name of this export. See:
+   * https://cloud.google.com/apis/design/resource_names#relative_resource_name.
+   * The following list shows some examples:
+   *
+   * +
+   * `organizations/{organization_id}/locations/{location_id}/bigQueryExports/{export_id}`
+   * + `folders/{folder_id}/locations/{location_id}/bigQueryExports/{export_id}`
+   * +
+   * `projects/{project_id}/locations/{location_id}/bigQueryExports/{export_id}`
+   *
+   * This field is provided in responses, and is ignored when provided in create
+   * requests.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The description of the export (max of 1024 characters).
+   * 
+ * + * string description = 2; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * The description of the export (max of 1024 characters).
+   * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Expression that defines the filter to apply across create/update events
+   * of findings. 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 = 3; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Expression that defines the filter to apply across create/update events
+   * of findings. 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 = 3; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * The dataset to write findings' updates to. Its format is
+   * "projects/[project_id]/datasets/[bigquery_dataset_id]".
+   * BigQuery Dataset unique ID  must contain only letters (a-z, A-Z), numbers
+   * (0-9), or underscores (_).
+   * 
+ * + * string dataset = 4; + * + * @return The dataset. + */ + java.lang.String getDataset(); + /** + * + * + *
+   * The dataset to write findings' updates to. Its format is
+   * "projects/[project_id]/datasets/[bigquery_dataset_id]".
+   * BigQuery Dataset unique ID  must contain only letters (a-z, A-Z), numbers
+   * (0-9), or underscores (_).
+   * 
+ * + * string dataset = 4; + * + * @return The bytes for dataset. + */ + com.google.protobuf.ByteString getDatasetBytes(); + + /** + * + * + *
+   * Output only. The time at which the BigQuery export was created.
+   * This field is set by the server and will be ignored if provided on export
+   * on 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 BigQuery export was created.
+   * This field is set by the server and will be ignored if provided on export
+   * on 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 BigQuery export was created.
+   * This field is set by the server and will be ignored if provided on export
+   * on 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 BigQuery export was updated.
+   * This field is set by the server and will be ignored if provided on export
+   * 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 BigQuery export was updated.
+   * This field is set by the server and will be ignored if provided on export
+   * 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 BigQuery export was updated.
+   * This field is set by the server and will be ignored if provided on export
+   * 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 BigQuery export.
+   * This field is set by the server and will be ignored if provided on export
+   * 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 BigQuery export.
+   * This field is set by the server and will be ignored if provided on export
+   * creation or update.
+   * 
+ * + * string most_recent_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for mostRecentEditor. + */ + com.google.protobuf.ByteString getMostRecentEditorBytes(); + + /** + * + * + *
+   * Output only. The service account that needs permission to create table and
+   * upload data to the BigQuery dataset.
+   * 
+ * + * string principal = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The principal. + */ + java.lang.String getPrincipal(); + /** + * + * + *
+   * Output only. The service account that needs permission to create table and
+   * upload data to the BigQuery dataset.
+   * 
+ * + * string principal = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for principal. + */ + com.google.protobuf.ByteString getPrincipalBytes(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BigQueryExportProto.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BigQueryExportProto.java new file mode 100644 index 000000000000..82ecd823de84 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BigQueryExportProto.java @@ -0,0 +1,105 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/bigquery_export.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public final class BigQueryExportProto { + private BigQueryExportProto() {} + + 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_v2_BigQueryExport_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_BigQueryExport_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/v2/bigquer" + + "y_export.proto\022\036google.cloud.securitycen" + + "ter.v2\032\037google/api/field_behavior.proto\032" + + "\031google/api/resource.proto\032\037google/proto" + + "buf/timestamp.proto\"\235\004\n\016BigQueryExport\022\014" + + "\n\004name\030\001 \001(\t\022\023\n\013description\030\002 \001(\t\022\016\n\006fil" + + "ter\030\003 \001(\t\022\017\n\007dataset\030\004 \001(\t\0224\n\013create_tim" + + "e\030\005 \001(\0132\032.google.protobuf.TimestampB\003\340A\003" + + "\0224\n\013update_time\030\006 \001(\0132\032.google.protobuf." + + "TimestampB\003\340A\003\022\037\n\022most_recent_editor\030\007 \001" + + "(\tB\003\340A\003\022\026\n\tprincipal\030\010 \001(\tB\003\340A\003:\241\002\352A\235\002\n," + + "securitycenter.googleapis.com/BigQueryEx" + + "port\022Jorganizations/{organization}/locat" + + "ions/{location}/bigQueryExports/{export}" + + "\022>folders/{folder}/locations/{location}/" + + "bigQueryExports/{export}\022@projects/{proj" + + "ect}/locations/{location}/bigQueryExport" + + "s/{export}*\017bigQueryExports2\016bigQueryExp" + + "ortB\355\001\n\"com.google.cloud.securitycenter." + + "v2B\023BigQueryExportProtoP\001ZJcloud.google." + + "com/go/securitycenter/apiv2/securitycent" + + "erpb;securitycenterpb\252\002\036Google.Cloud.Sec" + + "urityCenter.V2\312\002\036Google\\Cloud\\SecurityCe" + + "nter\\V2\352\002!Google::Cloud::SecurityCenter:" + + ":V2b\006proto3" + }; + 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(), + }); + internal_static_google_cloud_securitycenter_v2_BigQueryExport_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_securitycenter_v2_BigQueryExport_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_BigQueryExport_descriptor, + new java.lang.String[] { + "Name", + "Description", + "Filter", + "Dataset", + "CreateTime", + "UpdateTime", + "MostRecentEditor", + "Principal", + }); + 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(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BulkMuteFindingsRequest.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BulkMuteFindingsRequest.java new file mode 100644 index 000000000000..2b8ef8aa6422 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BulkMuteFindingsRequest.java @@ -0,0 +1,1028 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * 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.v2.BulkMuteFindingsRequest} + */ +public final class BulkMuteFindingsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.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_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BulkMuteFindingsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_BulkMuteFindingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_BulkMuteFindingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.BulkMuteFindingsRequest.class, + com.google.cloud.securitycenter.v2.BulkMuteFindingsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent, at which bulk action needs to be applied. If no
+   * location is specified, findings are updated in global. The following list
+   * shows some examples:
+   *
+   * + `organizations/[organization_id]`
+   * + `organizations/[organization_id]/locations/[location_id]`
+   * + `folders/[folder_id]`
+   * + `folders/[folder_id]/locations/[location_id]`
+   * + `projects/[project_id]`
+   * + `projects/[project_id]/locations/[location_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. If no
+   * location is specified, findings are updated in global. The following list
+   * shows some examples:
+   *
+   * + `organizations/[organization_id]`
+   * + `organizations/[organization_id]/locations/[location_id]`
+   * + `folders/[folder_id]`
+   * + `folders/[folder_id]/locations/[location_id]`
+   * + `projects/[project_id]`
+   * + `projects/[project_id]/locations/[location_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; + + @SuppressWarnings("serial") + 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; + } + } + + 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_); + } + getUnknownFields().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_); + } + size += getUnknownFields().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.v2.BulkMuteFindingsRequest)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.BulkMuteFindingsRequest other = + (com.google.cloud.securitycenter.v2.BulkMuteFindingsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.BulkMuteFindingsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.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.v2.BulkMuteFindingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.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.v2.BulkMuteFindingsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.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.v2.BulkMuteFindingsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.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.v2.BulkMuteFindingsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.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.v2.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.v2.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.v2.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.v2.BulkMuteFindingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.BulkMuteFindingsRequest) + com.google.cloud.securitycenter.v2.BulkMuteFindingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_BulkMuteFindingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_BulkMuteFindingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.BulkMuteFindingsRequest.class, + com.google.cloud.securitycenter.v2.BulkMuteFindingsRequest.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.BulkMuteFindingsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + filter_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_BulkMuteFindingsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.BulkMuteFindingsRequest getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.BulkMuteFindingsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.BulkMuteFindingsRequest build() { + com.google.cloud.securitycenter.v2.BulkMuteFindingsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.BulkMuteFindingsRequest buildPartial() { + com.google.cloud.securitycenter.v2.BulkMuteFindingsRequest result = + new com.google.cloud.securitycenter.v2.BulkMuteFindingsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.BulkMuteFindingsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.filter_ = filter_; + } + } + + @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.v2.BulkMuteFindingsRequest) { + return mergeFrom((com.google.cloud.securitycenter.v2.BulkMuteFindingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.BulkMuteFindingsRequest other) { + if (other == com.google.cloud.securitycenter.v2.BulkMuteFindingsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent, at which bulk action needs to be applied. If no
+     * location is specified, findings are updated in global. The following list
+     * shows some examples:
+     *
+     * + `organizations/[organization_id]`
+     * + `organizations/[organization_id]/locations/[location_id]`
+     * + `folders/[folder_id]`
+     * + `folders/[folder_id]/locations/[location_id]`
+     * + `projects/[project_id]`
+     * + `projects/[project_id]/locations/[location_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. If no
+     * location is specified, findings are updated in global. The following list
+     * shows some examples:
+     *
+     * + `organizations/[organization_id]`
+     * + `organizations/[organization_id]/locations/[location_id]`
+     * + `folders/[folder_id]`
+     * + `folders/[folder_id]/locations/[location_id]`
+     * + `projects/[project_id]`
+     * + `projects/[project_id]/locations/[location_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. If no
+     * location is specified, findings are updated in global. The following list
+     * shows some examples:
+     *
+     * + `organizations/[organization_id]`
+     * + `organizations/[organization_id]/locations/[location_id]`
+     * + `folders/[folder_id]`
+     * + `folders/[folder_id]/locations/[location_id]`
+     * + `projects/[project_id]`
+     * + `projects/[project_id]/locations/[location_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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent, at which bulk action needs to be applied. If no
+     * location is specified, findings are updated in global. The following list
+     * shows some examples:
+     *
+     * + `organizations/[organization_id]`
+     * + `organizations/[organization_id]/locations/[location_id]`
+     * + `folders/[folder_id]`
+     * + `folders/[folder_id]/locations/[location_id]`
+     * + `projects/[project_id]`
+     * + `projects/[project_id]/locations/[location_id]`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent, at which bulk action needs to be applied. If no
+     * location is specified, findings are updated in global. The following list
+     * shows some examples:
+     *
+     * + `organizations/[organization_id]`
+     * + `organizations/[organization_id]/locations/[location_id]`
+     * + `folders/[folder_id]`
+     * + `folders/[folder_id]/locations/[location_id]`
+     * + `projects/[project_id]`
+     * + `projects/[project_id]/locations/[location_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; + bitField0_ |= 0x00000001; + 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; + bitField0_ |= 0x00000002; + 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(); + bitField0_ = (bitField0_ & ~0x00000002); + 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; + bitField0_ |= 0x00000002; + 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.v2.BulkMuteFindingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.BulkMuteFindingsRequest) + private static final com.google.cloud.securitycenter.v2.BulkMuteFindingsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.BulkMuteFindingsRequest(); + } + + public static com.google.cloud.securitycenter.v2.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 { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.BulkMuteFindingsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BulkMuteFindingsRequestOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BulkMuteFindingsRequestOrBuilder.java new file mode 100644 index 000000000000..0f7776529ca7 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BulkMuteFindingsRequestOrBuilder.java @@ -0,0 +1,136 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface BulkMuteFindingsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.BulkMuteFindingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent, at which bulk action needs to be applied. If no
+   * location is specified, findings are updated in global. The following list
+   * shows some examples:
+   *
+   * + `organizations/[organization_id]`
+   * + `organizations/[organization_id]/locations/[location_id]`
+   * + `folders/[folder_id]`
+   * + `folders/[folder_id]/locations/[location_id]`
+   * + `projects/[project_id]`
+   * + `projects/[project_id]/locations/[location_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. If no
+   * location is specified, findings are updated in global. The following list
+   * shows some examples:
+   *
+   * + `organizations/[organization_id]`
+   * + `organizations/[organization_id]/locations/[location_id]`
+   * + `folders/[folder_id]`
+   * + `folders/[folder_id]/locations/[location_id]`
+   * + `projects/[project_id]`
+   * + `projects/[project_id]/locations/[location_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(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BulkMuteFindingsResponse.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BulkMuteFindingsResponse.java new file mode 100644 index 000000000000..3a18e8541207 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BulkMuteFindingsResponse.java @@ -0,0 +1,433 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * The response to a BulkMute request. Contains the LRO information.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.BulkMuteFindingsResponse} + */ +public final class BulkMuteFindingsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.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(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_BulkMuteFindingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_BulkMuteFindingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.BulkMuteFindingsResponse.class, + com.google.cloud.securitycenter.v2.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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().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.v2.BulkMuteFindingsResponse)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.BulkMuteFindingsResponse other = + (com.google.cloud.securitycenter.v2.BulkMuteFindingsResponse) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.BulkMuteFindingsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.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.v2.BulkMuteFindingsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.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.v2.BulkMuteFindingsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.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.v2.BulkMuteFindingsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.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.v2.BulkMuteFindingsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.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.v2.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.v2.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.v2.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.v2.BulkMuteFindingsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.BulkMuteFindingsResponse) + com.google.cloud.securitycenter.v2.BulkMuteFindingsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_BulkMuteFindingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_BulkMuteFindingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.BulkMuteFindingsResponse.class, + com.google.cloud.securitycenter.v2.BulkMuteFindingsResponse.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.BulkMuteFindingsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @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.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_BulkMuteFindingsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.BulkMuteFindingsResponse getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.BulkMuteFindingsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.BulkMuteFindingsResponse build() { + com.google.cloud.securitycenter.v2.BulkMuteFindingsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.BulkMuteFindingsResponse buildPartial() { + com.google.cloud.securitycenter.v2.BulkMuteFindingsResponse result = + new com.google.cloud.securitycenter.v2.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.v2.BulkMuteFindingsResponse) { + return mergeFrom((com.google.cloud.securitycenter.v2.BulkMuteFindingsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.BulkMuteFindingsResponse other) { + if (other == com.google.cloud.securitycenter.v2.BulkMuteFindingsResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + 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.v2.BulkMuteFindingsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.BulkMuteFindingsResponse) + private static final com.google.cloud.securitycenter.v2.BulkMuteFindingsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.BulkMuteFindingsResponse(); + } + + public static com.google.cloud.securitycenter.v2.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 { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.BulkMuteFindingsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BulkMuteFindingsResponseOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BulkMuteFindingsResponseOrBuilder.java new file mode 100644 index 000000000000..0dd0f2310221 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/BulkMuteFindingsResponseOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface BulkMuteFindingsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.BulkMuteFindingsResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CloudDlpDataProfile.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CloudDlpDataProfile.java new file mode 100644 index 000000000000..3d04a75e2d91 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CloudDlpDataProfile.java @@ -0,0 +1,951 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/cloud_dlp_data_profile.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * The [data profile](https://cloud.google.com/dlp/docs/data-profiles)
+ * associated with the finding.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.CloudDlpDataProfile} + */ +public final class CloudDlpDataProfile extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.CloudDlpDataProfile) + CloudDlpDataProfileOrBuilder { + private static final long serialVersionUID = 0L; + // Use CloudDlpDataProfile.newBuilder() to construct. + private CloudDlpDataProfile(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CloudDlpDataProfile() { + dataProfile_ = ""; + parentType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CloudDlpDataProfile(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.CloudDlpDataProfileProto + .internal_static_google_cloud_securitycenter_v2_CloudDlpDataProfile_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.CloudDlpDataProfileProto + .internal_static_google_cloud_securitycenter_v2_CloudDlpDataProfile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.CloudDlpDataProfile.class, + com.google.cloud.securitycenter.v2.CloudDlpDataProfile.Builder.class); + } + + /** + * + * + *
+   * Parents for configurations that produce data profile findings.
+   * 
+ * + * Protobuf enum {@code google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType} + */ + public enum ParentType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified parent type.
+     * 
+ * + * PARENT_TYPE_UNSPECIFIED = 0; + */ + PARENT_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Organization-level configurations.
+     * 
+ * + * ORGANIZATION = 1; + */ + ORGANIZATION(1), + /** + * + * + *
+     * Project-level configurations.
+     * 
+ * + * PROJECT = 2; + */ + PROJECT(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified parent type.
+     * 
+ * + * PARENT_TYPE_UNSPECIFIED = 0; + */ + public static final int PARENT_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Organization-level configurations.
+     * 
+ * + * ORGANIZATION = 1; + */ + public static final int ORGANIZATION_VALUE = 1; + /** + * + * + *
+     * Project-level configurations.
+     * 
+ * + * PROJECT = 2; + */ + public static final int PROJECT_VALUE = 2; + + 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 ParentType 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 ParentType forNumber(int value) { + switch (value) { + case 0: + return PARENT_TYPE_UNSPECIFIED; + case 1: + return ORGANIZATION; + case 2: + return PROJECT; + 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 ParentType findValueByNumber(int number) { + return ParentType.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.v2.CloudDlpDataProfile.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ParentType[] VALUES = values(); + + public static ParentType 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 ParentType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType) + } + + public static final int DATA_PROFILE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object dataProfile_ = ""; + /** + * + * + *
+   * Name of the data profile, for example,
+   * `projects/123/locations/europe/tableProfiles/8383929`.
+   * 
+ * + * string data_profile = 1 [(.google.api.resource_reference) = { ... } + * + * @return The dataProfile. + */ + @java.lang.Override + public java.lang.String getDataProfile() { + java.lang.Object ref = dataProfile_; + 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(); + dataProfile_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the data profile, for example,
+   * `projects/123/locations/europe/tableProfiles/8383929`.
+   * 
+ * + * string data_profile = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for dataProfile. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataProfileBytes() { + java.lang.Object ref = dataProfile_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataProfile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARENT_TYPE_FIELD_NUMBER = 2; + private int parentType_ = 0; + /** + * + * + *
+   * The resource hierarchy level at which the data profile was generated.
+   * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType parent_type = 2; + * + * @return The enum numeric value on the wire for parentType. + */ + @java.lang.Override + public int getParentTypeValue() { + return parentType_; + } + /** + * + * + *
+   * The resource hierarchy level at which the data profile was generated.
+   * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType parent_type = 2; + * + * @return The parentType. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType getParentType() { + com.google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType result = + com.google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType.forNumber(parentType_); + return result == null + ? com.google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType.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(dataProfile_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataProfile_); + } + if (parentType_ + != com.google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType.PARENT_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, parentType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataProfile_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dataProfile_); + } + if (parentType_ + != com.google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType.PARENT_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, parentType_); + } + size += getUnknownFields().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.v2.CloudDlpDataProfile)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.CloudDlpDataProfile other = + (com.google.cloud.securitycenter.v2.CloudDlpDataProfile) obj; + + if (!getDataProfile().equals(other.getDataProfile())) return false; + if (parentType_ != other.parentType_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + DATA_PROFILE_FIELD_NUMBER; + hash = (53 * hash) + getDataProfile().hashCode(); + hash = (37 * hash) + PARENT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + parentType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.CloudDlpDataProfile parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.CloudDlpDataProfile 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.v2.CloudDlpDataProfile parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.CloudDlpDataProfile 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.v2.CloudDlpDataProfile parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.CloudDlpDataProfile parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.CloudDlpDataProfile parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.CloudDlpDataProfile 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.v2.CloudDlpDataProfile parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.CloudDlpDataProfile 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.v2.CloudDlpDataProfile parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.CloudDlpDataProfile 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.v2.CloudDlpDataProfile 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 [data profile](https://cloud.google.com/dlp/docs/data-profiles)
+   * associated with the finding.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.CloudDlpDataProfile} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.CloudDlpDataProfile) + com.google.cloud.securitycenter.v2.CloudDlpDataProfileOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.CloudDlpDataProfileProto + .internal_static_google_cloud_securitycenter_v2_CloudDlpDataProfile_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.CloudDlpDataProfileProto + .internal_static_google_cloud_securitycenter_v2_CloudDlpDataProfile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.CloudDlpDataProfile.class, + com.google.cloud.securitycenter.v2.CloudDlpDataProfile.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.CloudDlpDataProfile.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + dataProfile_ = ""; + parentType_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.CloudDlpDataProfileProto + .internal_static_google_cloud_securitycenter_v2_CloudDlpDataProfile_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.CloudDlpDataProfile getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.CloudDlpDataProfile.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.CloudDlpDataProfile build() { + com.google.cloud.securitycenter.v2.CloudDlpDataProfile result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.CloudDlpDataProfile buildPartial() { + com.google.cloud.securitycenter.v2.CloudDlpDataProfile result = + new com.google.cloud.securitycenter.v2.CloudDlpDataProfile(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.CloudDlpDataProfile result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.dataProfile_ = dataProfile_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.parentType_ = parentType_; + } + } + + @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.v2.CloudDlpDataProfile) { + return mergeFrom((com.google.cloud.securitycenter.v2.CloudDlpDataProfile) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.CloudDlpDataProfile other) { + if (other == com.google.cloud.securitycenter.v2.CloudDlpDataProfile.getDefaultInstance()) + return this; + if (!other.getDataProfile().isEmpty()) { + dataProfile_ = other.dataProfile_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.parentType_ != 0) { + setParentTypeValue(other.getParentTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + dataProfile_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + parentType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object dataProfile_ = ""; + /** + * + * + *
+     * Name of the data profile, for example,
+     * `projects/123/locations/europe/tableProfiles/8383929`.
+     * 
+ * + * string data_profile = 1 [(.google.api.resource_reference) = { ... } + * + * @return The dataProfile. + */ + public java.lang.String getDataProfile() { + java.lang.Object ref = dataProfile_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataProfile_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the data profile, for example,
+     * `projects/123/locations/europe/tableProfiles/8383929`.
+     * 
+ * + * string data_profile = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for dataProfile. + */ + public com.google.protobuf.ByteString getDataProfileBytes() { + java.lang.Object ref = dataProfile_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataProfile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the data profile, for example,
+     * `projects/123/locations/europe/tableProfiles/8383929`.
+     * 
+ * + * string data_profile = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The dataProfile to set. + * @return This builder for chaining. + */ + public Builder setDataProfile(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataProfile_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the data profile, for example,
+     * `projects/123/locations/europe/tableProfiles/8383929`.
+     * 
+ * + * string data_profile = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearDataProfile() { + dataProfile_ = getDefaultInstance().getDataProfile(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the data profile, for example,
+     * `projects/123/locations/europe/tableProfiles/8383929`.
+     * 
+ * + * string data_profile = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for dataProfile to set. + * @return This builder for chaining. + */ + public Builder setDataProfileBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataProfile_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int parentType_ = 0; + /** + * + * + *
+     * The resource hierarchy level at which the data profile was generated.
+     * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType parent_type = 2; + * + * @return The enum numeric value on the wire for parentType. + */ + @java.lang.Override + public int getParentTypeValue() { + return parentType_; + } + /** + * + * + *
+     * The resource hierarchy level at which the data profile was generated.
+     * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType parent_type = 2; + * + * @param value The enum numeric value on the wire for parentType to set. + * @return This builder for chaining. + */ + public Builder setParentTypeValue(int value) { + parentType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource hierarchy level at which the data profile was generated.
+     * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType parent_type = 2; + * + * @return The parentType. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType getParentType() { + com.google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType result = + com.google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType.forNumber(parentType_); + return result == null + ? com.google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The resource hierarchy level at which the data profile was generated.
+     * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType parent_type = 2; + * + * @param value The parentType to set. + * @return This builder for chaining. + */ + public Builder setParentType( + com.google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + parentType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource hierarchy level at which the data profile was generated.
+     * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType parent_type = 2; + * + * @return This builder for chaining. + */ + public Builder clearParentType() { + bitField0_ = (bitField0_ & ~0x00000002); + parentType_ = 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.v2.CloudDlpDataProfile) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.CloudDlpDataProfile) + private static final com.google.cloud.securitycenter.v2.CloudDlpDataProfile DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.CloudDlpDataProfile(); + } + + public static com.google.cloud.securitycenter.v2.CloudDlpDataProfile getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudDlpDataProfile parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.CloudDlpDataProfile getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CloudDlpDataProfileOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CloudDlpDataProfileOrBuilder.java new file mode 100644 index 000000000000..3e96a71045dd --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CloudDlpDataProfileOrBuilder.java @@ -0,0 +1,78 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/cloud_dlp_data_profile.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface CloudDlpDataProfileOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.CloudDlpDataProfile) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the data profile, for example,
+   * `projects/123/locations/europe/tableProfiles/8383929`.
+   * 
+ * + * string data_profile = 1 [(.google.api.resource_reference) = { ... } + * + * @return The dataProfile. + */ + java.lang.String getDataProfile(); + /** + * + * + *
+   * Name of the data profile, for example,
+   * `projects/123/locations/europe/tableProfiles/8383929`.
+   * 
+ * + * string data_profile = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for dataProfile. + */ + com.google.protobuf.ByteString getDataProfileBytes(); + + /** + * + * + *
+   * The resource hierarchy level at which the data profile was generated.
+   * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType parent_type = 2; + * + * @return The enum numeric value on the wire for parentType. + */ + int getParentTypeValue(); + /** + * + * + *
+   * The resource hierarchy level at which the data profile was generated.
+   * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType parent_type = 2; + * + * @return The parentType. + */ + com.google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType getParentType(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CloudDlpDataProfileProto.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CloudDlpDataProfileProto.java new file mode 100644 index 000000000000..5e5a3dcaaa2f --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CloudDlpDataProfileProto.java @@ -0,0 +1,89 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/cloud_dlp_data_profile.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public final class CloudDlpDataProfileProto { + private CloudDlpDataProfileProto() {} + + 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_v2_CloudDlpDataProfile_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_CloudDlpDataProfile_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n;google/cloud/securitycenter/v2/cloud_d" + + "lp_data_profile.proto\022\036google.cloud.secu" + + "ritycenter.v2\032\031google/api/resource.proto" + + "\"\364\001\n\023CloudDlpDataProfile\022>\n\014data_profile" + + "\030\001 \001(\tB(\372A%\n#dlp.googleapis.com/TableDat" + + "aProfile\022S\n\013parent_type\030\002 \001(\0162>.google.c" + + "loud.securitycenter.v2.CloudDlpDataProfi" + + "le.ParentType\"H\n\nParentType\022\033\n\027PARENT_TY" + + "PE_UNSPECIFIED\020\000\022\020\n\014ORGANIZATION\020\001\022\013\n\007PR" + + "OJECT\020\002B\224\003\n\"com.google.cloud.securitycen" + + "ter.v2B\030CloudDlpDataProfileProtoP\001ZJclou" + + "d.google.com/go/securitycenter/apiv2/sec" + + "uritycenterpb;securitycenterpb\252\002\036Google." + + "Cloud.SecurityCenter.V2\312\002\036Google\\Cloud\\S" + + "ecurityCenter\\V2\352\002!Google::Cloud::Securi" + + "tyCenter::V2\352A\236\001\n#dlp.googleapis.com/Tab" + + "leDataProfile\0220projects/{project}/tableP" + + "rofiles/{table_profile}\022Eprojects/{proje" + + "ct}/locations/{location}/tableProfiles/{" + + "table_profile}b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.ResourceProto.getDescriptor(), + }); + internal_static_google_cloud_securitycenter_v2_CloudDlpDataProfile_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_securitycenter_v2_CloudDlpDataProfile_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_CloudDlpDataProfile_descriptor, + new java.lang.String[] { + "DataProfile", "ParentType", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ResourceProto.resourceDefinition); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.ResourceProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CloudDlpInspection.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CloudDlpInspection.java new file mode 100644 index 000000000000..ef4ec119be86 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CloudDlpInspection.java @@ -0,0 +1,1023 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/cloud_dlp_inspection.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Details about the Cloud Data Loss Prevention (Cloud DLP) [inspection
+ * job](https://cloud.google.com/dlp/docs/concepts-job-triggers) that produced
+ * the finding.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.CloudDlpInspection} + */ +public final class CloudDlpInspection extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.CloudDlpInspection) + CloudDlpInspectionOrBuilder { + private static final long serialVersionUID = 0L; + // Use CloudDlpInspection.newBuilder() to construct. + private CloudDlpInspection(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CloudDlpInspection() { + inspectJob_ = ""; + infoType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CloudDlpInspection(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.CloudDlpInspectionProto + .internal_static_google_cloud_securitycenter_v2_CloudDlpInspection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.CloudDlpInspectionProto + .internal_static_google_cloud_securitycenter_v2_CloudDlpInspection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.CloudDlpInspection.class, + com.google.cloud.securitycenter.v2.CloudDlpInspection.Builder.class); + } + + public static final int INSPECT_JOB_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object inspectJob_ = ""; + /** + * + * + *
+   * Name of the inspection job, for example,
+   * `projects/123/locations/europe/dlpJobs/i-8383929`.
+   * 
+ * + * string inspect_job = 1 [(.google.api.resource_reference) = { ... } + * + * @return The inspectJob. + */ + @java.lang.Override + public java.lang.String getInspectJob() { + java.lang.Object ref = inspectJob_; + 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(); + inspectJob_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the inspection job, for example,
+   * `projects/123/locations/europe/dlpJobs/i-8383929`.
+   * 
+ * + * string inspect_job = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for inspectJob. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInspectJobBytes() { + java.lang.Object ref = inspectJob_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + inspectJob_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INFO_TYPE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object infoType_ = ""; + /** + * + * + *
+   * The type of information (or
+   * *[infoType](https://cloud.google.com/dlp/docs/infotypes-reference)*) found,
+   * for example, `EMAIL_ADDRESS` or `STREET_ADDRESS`.
+   * 
+ * + * string info_type = 2; + * + * @return The infoType. + */ + @java.lang.Override + public java.lang.String getInfoType() { + java.lang.Object ref = infoType_; + 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(); + infoType_ = s; + return s; + } + } + /** + * + * + *
+   * The type of information (or
+   * *[infoType](https://cloud.google.com/dlp/docs/infotypes-reference)*) found,
+   * for example, `EMAIL_ADDRESS` or `STREET_ADDRESS`.
+   * 
+ * + * string info_type = 2; + * + * @return The bytes for infoType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInfoTypeBytes() { + java.lang.Object ref = infoType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + infoType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INFO_TYPE_COUNT_FIELD_NUMBER = 3; + private long infoTypeCount_ = 0L; + /** + * + * + *
+   * The number of times Cloud DLP found this infoType within this job
+   * and resource.
+   * 
+ * + * int64 info_type_count = 3; + * + * @return The infoTypeCount. + */ + @java.lang.Override + public long getInfoTypeCount() { + return infoTypeCount_; + } + + public static final int FULL_SCAN_FIELD_NUMBER = 4; + private boolean fullScan_ = false; + /** + * + * + *
+   * Whether Cloud DLP scanned the complete resource or a sampled subset.
+   * 
+ * + * bool full_scan = 4; + * + * @return The fullScan. + */ + @java.lang.Override + public boolean getFullScan() { + return fullScan_; + } + + 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(inspectJob_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, inspectJob_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(infoType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, infoType_); + } + if (infoTypeCount_ != 0L) { + output.writeInt64(3, infoTypeCount_); + } + if (fullScan_ != false) { + output.writeBool(4, fullScan_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(inspectJob_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, inspectJob_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(infoType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, infoType_); + } + if (infoTypeCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, infoTypeCount_); + } + if (fullScan_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, fullScan_); + } + size += getUnknownFields().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.v2.CloudDlpInspection)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.CloudDlpInspection other = + (com.google.cloud.securitycenter.v2.CloudDlpInspection) obj; + + if (!getInspectJob().equals(other.getInspectJob())) return false; + if (!getInfoType().equals(other.getInfoType())) return false; + if (getInfoTypeCount() != other.getInfoTypeCount()) return false; + if (getFullScan() != other.getFullScan()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + INSPECT_JOB_FIELD_NUMBER; + hash = (53 * hash) + getInspectJob().hashCode(); + hash = (37 * hash) + INFO_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getInfoType().hashCode(); + hash = (37 * hash) + INFO_TYPE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getInfoTypeCount()); + hash = (37 * hash) + FULL_SCAN_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getFullScan()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.CloudDlpInspection parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.CloudDlpInspection 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.v2.CloudDlpInspection parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.CloudDlpInspection 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.v2.CloudDlpInspection parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.CloudDlpInspection parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.CloudDlpInspection parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.CloudDlpInspection 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.v2.CloudDlpInspection parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.CloudDlpInspection 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.v2.CloudDlpInspection parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.CloudDlpInspection 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.v2.CloudDlpInspection 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; + } + /** + * + * + *
+   * Details about the Cloud Data Loss Prevention (Cloud DLP) [inspection
+   * job](https://cloud.google.com/dlp/docs/concepts-job-triggers) that produced
+   * the finding.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.CloudDlpInspection} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.CloudDlpInspection) + com.google.cloud.securitycenter.v2.CloudDlpInspectionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.CloudDlpInspectionProto + .internal_static_google_cloud_securitycenter_v2_CloudDlpInspection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.CloudDlpInspectionProto + .internal_static_google_cloud_securitycenter_v2_CloudDlpInspection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.CloudDlpInspection.class, + com.google.cloud.securitycenter.v2.CloudDlpInspection.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.CloudDlpInspection.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + inspectJob_ = ""; + infoType_ = ""; + infoTypeCount_ = 0L; + fullScan_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.CloudDlpInspectionProto + .internal_static_google_cloud_securitycenter_v2_CloudDlpInspection_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.CloudDlpInspection getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.CloudDlpInspection.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.CloudDlpInspection build() { + com.google.cloud.securitycenter.v2.CloudDlpInspection result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.CloudDlpInspection buildPartial() { + com.google.cloud.securitycenter.v2.CloudDlpInspection result = + new com.google.cloud.securitycenter.v2.CloudDlpInspection(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.CloudDlpInspection result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.inspectJob_ = inspectJob_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.infoType_ = infoType_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.infoTypeCount_ = infoTypeCount_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.fullScan_ = fullScan_; + } + } + + @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.v2.CloudDlpInspection) { + return mergeFrom((com.google.cloud.securitycenter.v2.CloudDlpInspection) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.CloudDlpInspection other) { + if (other == com.google.cloud.securitycenter.v2.CloudDlpInspection.getDefaultInstance()) + return this; + if (!other.getInspectJob().isEmpty()) { + inspectJob_ = other.inspectJob_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getInfoType().isEmpty()) { + infoType_ = other.infoType_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getInfoTypeCount() != 0L) { + setInfoTypeCount(other.getInfoTypeCount()); + } + if (other.getFullScan() != false) { + setFullScan(other.getFullScan()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + inspectJob_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + infoType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + infoTypeCount_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + fullScan_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object inspectJob_ = ""; + /** + * + * + *
+     * Name of the inspection job, for example,
+     * `projects/123/locations/europe/dlpJobs/i-8383929`.
+     * 
+ * + * string inspect_job = 1 [(.google.api.resource_reference) = { ... } + * + * @return The inspectJob. + */ + public java.lang.String getInspectJob() { + java.lang.Object ref = inspectJob_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + inspectJob_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the inspection job, for example,
+     * `projects/123/locations/europe/dlpJobs/i-8383929`.
+     * 
+ * + * string inspect_job = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for inspectJob. + */ + public com.google.protobuf.ByteString getInspectJobBytes() { + java.lang.Object ref = inspectJob_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + inspectJob_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the inspection job, for example,
+     * `projects/123/locations/europe/dlpJobs/i-8383929`.
+     * 
+ * + * string inspect_job = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The inspectJob to set. + * @return This builder for chaining. + */ + public Builder setInspectJob(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + inspectJob_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the inspection job, for example,
+     * `projects/123/locations/europe/dlpJobs/i-8383929`.
+     * 
+ * + * string inspect_job = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearInspectJob() { + inspectJob_ = getDefaultInstance().getInspectJob(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the inspection job, for example,
+     * `projects/123/locations/europe/dlpJobs/i-8383929`.
+     * 
+ * + * string inspect_job = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for inspectJob to set. + * @return This builder for chaining. + */ + public Builder setInspectJobBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + inspectJob_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object infoType_ = ""; + /** + * + * + *
+     * The type of information (or
+     * *[infoType](https://cloud.google.com/dlp/docs/infotypes-reference)*) found,
+     * for example, `EMAIL_ADDRESS` or `STREET_ADDRESS`.
+     * 
+ * + * string info_type = 2; + * + * @return The infoType. + */ + public java.lang.String getInfoType() { + java.lang.Object ref = infoType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + infoType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The type of information (or
+     * *[infoType](https://cloud.google.com/dlp/docs/infotypes-reference)*) found,
+     * for example, `EMAIL_ADDRESS` or `STREET_ADDRESS`.
+     * 
+ * + * string info_type = 2; + * + * @return The bytes for infoType. + */ + public com.google.protobuf.ByteString getInfoTypeBytes() { + java.lang.Object ref = infoType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + infoType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The type of information (or
+     * *[infoType](https://cloud.google.com/dlp/docs/infotypes-reference)*) found,
+     * for example, `EMAIL_ADDRESS` or `STREET_ADDRESS`.
+     * 
+ * + * string info_type = 2; + * + * @param value The infoType to set. + * @return This builder for chaining. + */ + public Builder setInfoType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + infoType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of information (or
+     * *[infoType](https://cloud.google.com/dlp/docs/infotypes-reference)*) found,
+     * for example, `EMAIL_ADDRESS` or `STREET_ADDRESS`.
+     * 
+ * + * string info_type = 2; + * + * @return This builder for chaining. + */ + public Builder clearInfoType() { + infoType_ = getDefaultInstance().getInfoType(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of information (or
+     * *[infoType](https://cloud.google.com/dlp/docs/infotypes-reference)*) found,
+     * for example, `EMAIL_ADDRESS` or `STREET_ADDRESS`.
+     * 
+ * + * string info_type = 2; + * + * @param value The bytes for infoType to set. + * @return This builder for chaining. + */ + public Builder setInfoTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + infoType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private long infoTypeCount_; + /** + * + * + *
+     * The number of times Cloud DLP found this infoType within this job
+     * and resource.
+     * 
+ * + * int64 info_type_count = 3; + * + * @return The infoTypeCount. + */ + @java.lang.Override + public long getInfoTypeCount() { + return infoTypeCount_; + } + /** + * + * + *
+     * The number of times Cloud DLP found this infoType within this job
+     * and resource.
+     * 
+ * + * int64 info_type_count = 3; + * + * @param value The infoTypeCount to set. + * @return This builder for chaining. + */ + public Builder setInfoTypeCount(long value) { + + infoTypeCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The number of times Cloud DLP found this infoType within this job
+     * and resource.
+     * 
+ * + * int64 info_type_count = 3; + * + * @return This builder for chaining. + */ + public Builder clearInfoTypeCount() { + bitField0_ = (bitField0_ & ~0x00000004); + infoTypeCount_ = 0L; + onChanged(); + return this; + } + + private boolean fullScan_; + /** + * + * + *
+     * Whether Cloud DLP scanned the complete resource or a sampled subset.
+     * 
+ * + * bool full_scan = 4; + * + * @return The fullScan. + */ + @java.lang.Override + public boolean getFullScan() { + return fullScan_; + } + /** + * + * + *
+     * Whether Cloud DLP scanned the complete resource or a sampled subset.
+     * 
+ * + * bool full_scan = 4; + * + * @param value The fullScan to set. + * @return This builder for chaining. + */ + public Builder setFullScan(boolean value) { + + fullScan_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether Cloud DLP scanned the complete resource or a sampled subset.
+     * 
+ * + * bool full_scan = 4; + * + * @return This builder for chaining. + */ + public Builder clearFullScan() { + bitField0_ = (bitField0_ & ~0x00000008); + fullScan_ = false; + 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.v2.CloudDlpInspection) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.CloudDlpInspection) + private static final com.google.cloud.securitycenter.v2.CloudDlpInspection DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.CloudDlpInspection(); + } + + public static com.google.cloud.securitycenter.v2.CloudDlpInspection getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudDlpInspection parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.CloudDlpInspection getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CloudDlpInspectionOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CloudDlpInspectionOrBuilder.java new file mode 100644 index 000000000000..5e3f5578e5c3 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CloudDlpInspectionOrBuilder.java @@ -0,0 +1,109 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/cloud_dlp_inspection.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface CloudDlpInspectionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.CloudDlpInspection) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the inspection job, for example,
+   * `projects/123/locations/europe/dlpJobs/i-8383929`.
+   * 
+ * + * string inspect_job = 1 [(.google.api.resource_reference) = { ... } + * + * @return The inspectJob. + */ + java.lang.String getInspectJob(); + /** + * + * + *
+   * Name of the inspection job, for example,
+   * `projects/123/locations/europe/dlpJobs/i-8383929`.
+   * 
+ * + * string inspect_job = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for inspectJob. + */ + com.google.protobuf.ByteString getInspectJobBytes(); + + /** + * + * + *
+   * The type of information (or
+   * *[infoType](https://cloud.google.com/dlp/docs/infotypes-reference)*) found,
+   * for example, `EMAIL_ADDRESS` or `STREET_ADDRESS`.
+   * 
+ * + * string info_type = 2; + * + * @return The infoType. + */ + java.lang.String getInfoType(); + /** + * + * + *
+   * The type of information (or
+   * *[infoType](https://cloud.google.com/dlp/docs/infotypes-reference)*) found,
+   * for example, `EMAIL_ADDRESS` or `STREET_ADDRESS`.
+   * 
+ * + * string info_type = 2; + * + * @return The bytes for infoType. + */ + com.google.protobuf.ByteString getInfoTypeBytes(); + + /** + * + * + *
+   * The number of times Cloud DLP found this infoType within this job
+   * and resource.
+   * 
+ * + * int64 info_type_count = 3; + * + * @return The infoTypeCount. + */ + long getInfoTypeCount(); + + /** + * + * + *
+   * Whether Cloud DLP scanned the complete resource or a sampled subset.
+   * 
+ * + * bool full_scan = 4; + * + * @return The fullScan. + */ + boolean getFullScan(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CloudDlpInspectionProto.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CloudDlpInspectionProto.java new file mode 100644 index 000000000000..a38d34b9cd99 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CloudDlpInspectionProto.java @@ -0,0 +1,85 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/cloud_dlp_inspection.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public final class CloudDlpInspectionProto { + private CloudDlpInspectionProto() {} + + 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_v2_CloudDlpInspection_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_CloudDlpInspection_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n9google/cloud/securitycenter/v2/cloud_d" + + "lp_inspection.proto\022\036google.cloud.securi" + + "tycenter.v2\032\031google/api/resource.proto\"\210" + + "\001\n\022CloudDlpInspection\0223\n\013inspect_job\030\001 \001" + + "(\tB\036\372A\033\n\031dlp.googleapis.com/DlpJob\022\021\n\tin" + + "fo_type\030\002 \001(\t\022\027\n\017info_type_count\030\003 \001(\003\022\021" + + "\n\tfull_scan\030\004 \001(\010B\360\002\n\"com.google.cloud.s" + + "ecuritycenter.v2B\027CloudDlpInspectionProt" + + "oP\001ZJcloud.google.com/go/securitycenter/" + + "apiv2/securitycenterpb;securitycenterpb\252" + + "\002\036Google.Cloud.SecurityCenter.V2\312\002\036Googl" + + "e\\Cloud\\SecurityCenter\\V2\352\002!Google::Clou" + + "d::SecurityCenter::V2\352A|\n\031dlp.googleapis" + + ".com/DlpJob\022$projects/{project}/dlpJobs/" + + "{dlp_job}\0229projects/{project}/locations/" + + "{location}/dlpJobs/{dlp_job}b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.ResourceProto.getDescriptor(), + }); + internal_static_google_cloud_securitycenter_v2_CloudDlpInspection_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_securitycenter_v2_CloudDlpInspection_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_CloudDlpInspection_descriptor, + new java.lang.String[] { + "InspectJob", "InfoType", "InfoTypeCount", "FullScan", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ResourceProto.resourceDefinition); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.ResourceProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CloudLoggingEntry.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CloudLoggingEntry.java new file mode 100644 index 000000000000..65e2450b1bb9 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CloudLoggingEntry.java @@ -0,0 +1,1290 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/log_entry.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Metadata taken from a [Cloud Logging
+ * LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry)
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.CloudLoggingEntry} + */ +public final class CloudLoggingEntry extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.CloudLoggingEntry) + CloudLoggingEntryOrBuilder { + private static final long serialVersionUID = 0L; + // Use CloudLoggingEntry.newBuilder() to construct. + private CloudLoggingEntry(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CloudLoggingEntry() { + insertId_ = ""; + logId_ = ""; + resourceContainer_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CloudLoggingEntry(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.LogEntryProto + .internal_static_google_cloud_securitycenter_v2_CloudLoggingEntry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.LogEntryProto + .internal_static_google_cloud_securitycenter_v2_CloudLoggingEntry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.CloudLoggingEntry.class, + com.google.cloud.securitycenter.v2.CloudLoggingEntry.Builder.class); + } + + private int bitField0_; + public static final int INSERT_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object insertId_ = ""; + /** + * + * + *
+   * A unique identifier for the log entry.
+   * 
+ * + * string insert_id = 1; + * + * @return The insertId. + */ + @java.lang.Override + public java.lang.String getInsertId() { + java.lang.Object ref = insertId_; + 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(); + insertId_ = s; + return s; + } + } + /** + * + * + *
+   * A unique identifier for the log entry.
+   * 
+ * + * string insert_id = 1; + * + * @return The bytes for insertId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInsertIdBytes() { + java.lang.Object ref = insertId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + insertId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOG_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object logId_ = ""; + /** + * + * + *
+   * The type of the log (part of `log_name`. `log_name` is the resource name of
+   * the log to which this log entry belongs). For example:
+   * `cloudresourcemanager.googleapis.com/activity` Note that this field is not
+   * URL-encoded, unlike in `LogEntry`.
+   * 
+ * + * string log_id = 2; + * + * @return The logId. + */ + @java.lang.Override + public java.lang.String getLogId() { + java.lang.Object ref = logId_; + 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(); + logId_ = s; + return s; + } + } + /** + * + * + *
+   * The type of the log (part of `log_name`. `log_name` is the resource name of
+   * the log to which this log entry belongs). For example:
+   * `cloudresourcemanager.googleapis.com/activity` Note that this field is not
+   * URL-encoded, unlike in `LogEntry`.
+   * 
+ * + * string log_id = 2; + * + * @return The bytes for logId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLogIdBytes() { + java.lang.Object ref = logId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + logId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_CONTAINER_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object resourceContainer_ = ""; + /** + * + * + *
+   * The organization, folder, or project of the monitored resource that
+   * produced this log entry.
+   * 
+ * + * string resource_container = 3; + * + * @return The resourceContainer. + */ + @java.lang.Override + public java.lang.String getResourceContainer() { + java.lang.Object ref = resourceContainer_; + 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(); + resourceContainer_ = s; + return s; + } + } + /** + * + * + *
+   * The organization, folder, or project of the monitored resource that
+   * produced this log entry.
+   * 
+ * + * string resource_container = 3; + * + * @return The bytes for resourceContainer. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceContainerBytes() { + java.lang.Object ref = resourceContainer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceContainer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIMESTAMP_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp timestamp_; + /** + * + * + *
+   * The time the event described by the log entry occurred.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 4; + * + * @return Whether the timestamp field is set. + */ + @java.lang.Override + public boolean hasTimestamp() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The time the event described by the log entry occurred.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 4; + * + * @return The timestamp. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTimestamp() { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } + /** + * + * + *
+   * The time the event described by the log entry occurred.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 4; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } + + 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(insertId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, insertId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(logId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, logId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceContainer_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, resourceContainer_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getTimestamp()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(insertId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, insertId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(logId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, logId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceContainer_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, resourceContainer_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getTimestamp()); + } + size += getUnknownFields().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.v2.CloudLoggingEntry)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.CloudLoggingEntry other = + (com.google.cloud.securitycenter.v2.CloudLoggingEntry) obj; + + if (!getInsertId().equals(other.getInsertId())) return false; + if (!getLogId().equals(other.getLogId())) return false; + if (!getResourceContainer().equals(other.getResourceContainer())) return false; + if (hasTimestamp() != other.hasTimestamp()) return false; + if (hasTimestamp()) { + if (!getTimestamp().equals(other.getTimestamp())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + INSERT_ID_FIELD_NUMBER; + hash = (53 * hash) + getInsertId().hashCode(); + hash = (37 * hash) + LOG_ID_FIELD_NUMBER; + hash = (53 * hash) + getLogId().hashCode(); + hash = (37 * hash) + RESOURCE_CONTAINER_FIELD_NUMBER; + hash = (53 * hash) + getResourceContainer().hashCode(); + if (hasTimestamp()) { + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getTimestamp().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.CloudLoggingEntry parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.CloudLoggingEntry 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.v2.CloudLoggingEntry parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.CloudLoggingEntry 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.v2.CloudLoggingEntry parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.CloudLoggingEntry parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.CloudLoggingEntry parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.CloudLoggingEntry 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.v2.CloudLoggingEntry parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.CloudLoggingEntry 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.v2.CloudLoggingEntry parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.CloudLoggingEntry 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.v2.CloudLoggingEntry 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; + } + /** + * + * + *
+   * Metadata taken from a [Cloud Logging
+   * LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry)
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.CloudLoggingEntry} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.CloudLoggingEntry) + com.google.cloud.securitycenter.v2.CloudLoggingEntryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.LogEntryProto + .internal_static_google_cloud_securitycenter_v2_CloudLoggingEntry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.LogEntryProto + .internal_static_google_cloud_securitycenter_v2_CloudLoggingEntry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.CloudLoggingEntry.class, + com.google.cloud.securitycenter.v2.CloudLoggingEntry.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.CloudLoggingEntry.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTimestampFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + insertId_ = ""; + logId_ = ""; + resourceContainer_ = ""; + timestamp_ = null; + if (timestampBuilder_ != null) { + timestampBuilder_.dispose(); + timestampBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.LogEntryProto + .internal_static_google_cloud_securitycenter_v2_CloudLoggingEntry_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.CloudLoggingEntry getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.CloudLoggingEntry.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.CloudLoggingEntry build() { + com.google.cloud.securitycenter.v2.CloudLoggingEntry result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.CloudLoggingEntry buildPartial() { + com.google.cloud.securitycenter.v2.CloudLoggingEntry result = + new com.google.cloud.securitycenter.v2.CloudLoggingEntry(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.CloudLoggingEntry result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.insertId_ = insertId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.logId_ = logId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.resourceContainer_ = resourceContainer_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.timestamp_ = timestampBuilder_ == null ? timestamp_ : timestampBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v2.CloudLoggingEntry) { + return mergeFrom((com.google.cloud.securitycenter.v2.CloudLoggingEntry) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.CloudLoggingEntry other) { + if (other == com.google.cloud.securitycenter.v2.CloudLoggingEntry.getDefaultInstance()) + return this; + if (!other.getInsertId().isEmpty()) { + insertId_ = other.insertId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getLogId().isEmpty()) { + logId_ = other.logId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getResourceContainer().isEmpty()) { + resourceContainer_ = other.resourceContainer_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasTimestamp()) { + mergeTimestamp(other.getTimestamp()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + insertId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + logId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + resourceContainer_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getTimestampFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object insertId_ = ""; + /** + * + * + *
+     * A unique identifier for the log entry.
+     * 
+ * + * string insert_id = 1; + * + * @return The insertId. + */ + public java.lang.String getInsertId() { + java.lang.Object ref = insertId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + insertId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A unique identifier for the log entry.
+     * 
+ * + * string insert_id = 1; + * + * @return The bytes for insertId. + */ + public com.google.protobuf.ByteString getInsertIdBytes() { + java.lang.Object ref = insertId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + insertId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A unique identifier for the log entry.
+     * 
+ * + * string insert_id = 1; + * + * @param value The insertId to set. + * @return This builder for chaining. + */ + public Builder setInsertId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + insertId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * A unique identifier for the log entry.
+     * 
+ * + * string insert_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearInsertId() { + insertId_ = getDefaultInstance().getInsertId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * A unique identifier for the log entry.
+     * 
+ * + * string insert_id = 1; + * + * @param value The bytes for insertId to set. + * @return This builder for chaining. + */ + public Builder setInsertIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + insertId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object logId_ = ""; + /** + * + * + *
+     * The type of the log (part of `log_name`. `log_name` is the resource name of
+     * the log to which this log entry belongs). For example:
+     * `cloudresourcemanager.googleapis.com/activity` Note that this field is not
+     * URL-encoded, unlike in `LogEntry`.
+     * 
+ * + * string log_id = 2; + * + * @return The logId. + */ + public java.lang.String getLogId() { + java.lang.Object ref = logId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + logId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The type of the log (part of `log_name`. `log_name` is the resource name of
+     * the log to which this log entry belongs). For example:
+     * `cloudresourcemanager.googleapis.com/activity` Note that this field is not
+     * URL-encoded, unlike in `LogEntry`.
+     * 
+ * + * string log_id = 2; + * + * @return The bytes for logId. + */ + public com.google.protobuf.ByteString getLogIdBytes() { + java.lang.Object ref = logId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + logId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The type of the log (part of `log_name`. `log_name` is the resource name of
+     * the log to which this log entry belongs). For example:
+     * `cloudresourcemanager.googleapis.com/activity` Note that this field is not
+     * URL-encoded, unlike in `LogEntry`.
+     * 
+ * + * string log_id = 2; + * + * @param value The logId to set. + * @return This builder for chaining. + */ + public Builder setLogId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + logId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of the log (part of `log_name`. `log_name` is the resource name of
+     * the log to which this log entry belongs). For example:
+     * `cloudresourcemanager.googleapis.com/activity` Note that this field is not
+     * URL-encoded, unlike in `LogEntry`.
+     * 
+ * + * string log_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearLogId() { + logId_ = getDefaultInstance().getLogId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of the log (part of `log_name`. `log_name` is the resource name of
+     * the log to which this log entry belongs). For example:
+     * `cloudresourcemanager.googleapis.com/activity` Note that this field is not
+     * URL-encoded, unlike in `LogEntry`.
+     * 
+ * + * string log_id = 2; + * + * @param value The bytes for logId to set. + * @return This builder for chaining. + */ + public Builder setLogIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + logId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object resourceContainer_ = ""; + /** + * + * + *
+     * The organization, folder, or project of the monitored resource that
+     * produced this log entry.
+     * 
+ * + * string resource_container = 3; + * + * @return The resourceContainer. + */ + public java.lang.String getResourceContainer() { + java.lang.Object ref = resourceContainer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceContainer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The organization, folder, or project of the monitored resource that
+     * produced this log entry.
+     * 
+ * + * string resource_container = 3; + * + * @return The bytes for resourceContainer. + */ + public com.google.protobuf.ByteString getResourceContainerBytes() { + java.lang.Object ref = resourceContainer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceContainer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The organization, folder, or project of the monitored resource that
+     * produced this log entry.
+     * 
+ * + * string resource_container = 3; + * + * @param value The resourceContainer to set. + * @return This builder for chaining. + */ + public Builder setResourceContainer(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resourceContainer_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The organization, folder, or project of the monitored resource that
+     * produced this log entry.
+     * 
+ * + * string resource_container = 3; + * + * @return This builder for chaining. + */ + public Builder clearResourceContainer() { + resourceContainer_ = getDefaultInstance().getResourceContainer(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The organization, folder, or project of the monitored resource that
+     * produced this log entry.
+     * 
+ * + * string resource_container = 3; + * + * @param value The bytes for resourceContainer to set. + * @return This builder for chaining. + */ + public Builder setResourceContainerBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resourceContainer_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp timestamp_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + timestampBuilder_; + /** + * + * + *
+     * The time the event described by the log entry occurred.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 4; + * + * @return Whether the timestamp field is set. + */ + public boolean hasTimestamp() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * The time the event described by the log entry occurred.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 4; + * + * @return The timestamp. + */ + public com.google.protobuf.Timestamp getTimestamp() { + if (timestampBuilder_ == null) { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } else { + return timestampBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time the event described by the log entry occurred.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 4; + */ + public Builder setTimestamp(com.google.protobuf.Timestamp value) { + if (timestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timestamp_ = value; + } else { + timestampBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The time the event described by the log entry occurred.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 4; + */ + public Builder setTimestamp(com.google.protobuf.Timestamp.Builder builderForValue) { + if (timestampBuilder_ == null) { + timestamp_ = builderForValue.build(); + } else { + timestampBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The time the event described by the log entry occurred.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 4; + */ + public Builder mergeTimestamp(com.google.protobuf.Timestamp value) { + if (timestampBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && timestamp_ != null + && timestamp_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getTimestampBuilder().mergeFrom(value); + } else { + timestamp_ = value; + } + } else { + timestampBuilder_.mergeFrom(value); + } + if (timestamp_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The time the event described by the log entry occurred.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 4; + */ + public Builder clearTimestamp() { + bitField0_ = (bitField0_ & ~0x00000008); + timestamp_ = null; + if (timestampBuilder_ != null) { + timestampBuilder_.dispose(); + timestampBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The time the event described by the log entry occurred.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 4; + */ + public com.google.protobuf.Timestamp.Builder getTimestampBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getTimestampFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time the event described by the log entry occurred.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 4; + */ + public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { + if (timestampBuilder_ != null) { + return timestampBuilder_.getMessageOrBuilder(); + } else { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } + } + /** + * + * + *
+     * The time the event described by the log entry occurred.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getTimestampFieldBuilder() { + if (timestampBuilder_ == null) { + timestampBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getTimestamp(), getParentForChildren(), isClean()); + timestamp_ = null; + } + return timestampBuilder_; + } + + @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.v2.CloudLoggingEntry) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.CloudLoggingEntry) + private static final com.google.cloud.securitycenter.v2.CloudLoggingEntry DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.CloudLoggingEntry(); + } + + public static com.google.cloud.securitycenter.v2.CloudLoggingEntry getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudLoggingEntry parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.CloudLoggingEntry getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CloudLoggingEntryOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CloudLoggingEntryOrBuilder.java new file mode 100644 index 000000000000..5ff5a8889e3a --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CloudLoggingEntryOrBuilder.java @@ -0,0 +1,144 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/log_entry.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface CloudLoggingEntryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.CloudLoggingEntry) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A unique identifier for the log entry.
+   * 
+ * + * string insert_id = 1; + * + * @return The insertId. + */ + java.lang.String getInsertId(); + /** + * + * + *
+   * A unique identifier for the log entry.
+   * 
+ * + * string insert_id = 1; + * + * @return The bytes for insertId. + */ + com.google.protobuf.ByteString getInsertIdBytes(); + + /** + * + * + *
+   * The type of the log (part of `log_name`. `log_name` is the resource name of
+   * the log to which this log entry belongs). For example:
+   * `cloudresourcemanager.googleapis.com/activity` Note that this field is not
+   * URL-encoded, unlike in `LogEntry`.
+   * 
+ * + * string log_id = 2; + * + * @return The logId. + */ + java.lang.String getLogId(); + /** + * + * + *
+   * The type of the log (part of `log_name`. `log_name` is the resource name of
+   * the log to which this log entry belongs). For example:
+   * `cloudresourcemanager.googleapis.com/activity` Note that this field is not
+   * URL-encoded, unlike in `LogEntry`.
+   * 
+ * + * string log_id = 2; + * + * @return The bytes for logId. + */ + com.google.protobuf.ByteString getLogIdBytes(); + + /** + * + * + *
+   * The organization, folder, or project of the monitored resource that
+   * produced this log entry.
+   * 
+ * + * string resource_container = 3; + * + * @return The resourceContainer. + */ + java.lang.String getResourceContainer(); + /** + * + * + *
+   * The organization, folder, or project of the monitored resource that
+   * produced this log entry.
+   * 
+ * + * string resource_container = 3; + * + * @return The bytes for resourceContainer. + */ + com.google.protobuf.ByteString getResourceContainerBytes(); + + /** + * + * + *
+   * The time the event described by the log entry occurred.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 4; + * + * @return Whether the timestamp field is set. + */ + boolean hasTimestamp(); + /** + * + * + *
+   * The time the event described by the log entry occurred.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 4; + * + * @return The timestamp. + */ + com.google.protobuf.Timestamp getTimestamp(); + /** + * + * + *
+   * The time the event described by the log entry occurred.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 4; + */ + com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Compliance.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Compliance.java new file mode 100644 index 000000000000..ae938abaaa16 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Compliance.java @@ -0,0 +1,1092 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/compliance.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Contains compliance information about a security standard indicating unmet
+ * recommendations.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Compliance} + */ +public final class Compliance extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.Compliance) + ComplianceOrBuilder { + private static final long serialVersionUID = 0L; + // Use Compliance.newBuilder() to construct. + private Compliance(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Compliance() { + standard_ = ""; + version_ = ""; + ids_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Compliance(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.ComplianceProto + .internal_static_google_cloud_securitycenter_v2_Compliance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.ComplianceProto + .internal_static_google_cloud_securitycenter_v2_Compliance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Compliance.class, + com.google.cloud.securitycenter.v2.Compliance.Builder.class); + } + + public static final int STANDARD_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object standard_ = ""; + /** + * + * + *
+   * Industry-wide compliance standards or benchmarks, such as CIS, PCI, and
+   * OWASP.
+   * 
+ * + * string standard = 1; + * + * @return The standard. + */ + @java.lang.Override + public java.lang.String getStandard() { + java.lang.Object ref = standard_; + 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(); + standard_ = s; + return s; + } + } + /** + * + * + *
+   * Industry-wide compliance standards or benchmarks, such as CIS, PCI, and
+   * OWASP.
+   * 
+ * + * string standard = 1; + * + * @return The bytes for standard. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStandardBytes() { + java.lang.Object ref = standard_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + standard_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + /** + * + * + *
+   * Version of the standard or benchmark, for example, 1.1
+   * 
+ * + * string version = 2; + * + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + 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(); + version_ = s; + return s; + } + } + /** + * + * + *
+   * Version of the standard or benchmark, for example, 1.1
+   * 
+ * + * string version = 2; + * + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IDS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList ids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Policies within the standard or benchmark, for example, A.12.4.1
+   * 
+ * + * repeated string ids = 3; + * + * @return A list containing the ids. + */ + public com.google.protobuf.ProtocolStringList getIdsList() { + return ids_; + } + /** + * + * + *
+   * Policies within the standard or benchmark, for example, A.12.4.1
+   * 
+ * + * repeated string ids = 3; + * + * @return The count of ids. + */ + public int getIdsCount() { + return ids_.size(); + } + /** + * + * + *
+   * Policies within the standard or benchmark, for example, A.12.4.1
+   * 
+ * + * repeated string ids = 3; + * + * @param index The index of the element to return. + * @return The ids at the given index. + */ + public java.lang.String getIds(int index) { + return ids_.get(index); + } + /** + * + * + *
+   * Policies within the standard or benchmark, for example, A.12.4.1
+   * 
+ * + * repeated string ids = 3; + * + * @param index The index of the value to return. + * @return The bytes of the ids at the given index. + */ + public com.google.protobuf.ByteString getIdsBytes(int index) { + return ids_.getByteString(index); + } + + 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(standard_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, standard_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, version_); + } + for (int i = 0; i < ids_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, ids_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(standard_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, standard_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, version_); + } + { + int dataSize = 0; + for (int i = 0; i < ids_.size(); i++) { + dataSize += computeStringSizeNoTag(ids_.getRaw(i)); + } + size += dataSize; + size += 1 * getIdsList().size(); + } + size += getUnknownFields().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.v2.Compliance)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.Compliance other = + (com.google.cloud.securitycenter.v2.Compliance) obj; + + if (!getStandard().equals(other.getStandard())) return false; + if (!getVersion().equals(other.getVersion())) return false; + if (!getIdsList().equals(other.getIdsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + STANDARD_FIELD_NUMBER; + hash = (53 * hash) + getStandard().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + if (getIdsCount() > 0) { + hash = (37 * hash) + IDS_FIELD_NUMBER; + hash = (53 * hash) + getIdsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.Compliance parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Compliance 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.v2.Compliance parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Compliance 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.v2.Compliance parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Compliance parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.Compliance parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Compliance 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.v2.Compliance parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Compliance 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.v2.Compliance parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Compliance 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.v2.Compliance 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; + } + /** + * + * + *
+   * Contains compliance information about a security standard indicating unmet
+   * recommendations.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Compliance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.Compliance) + com.google.cloud.securitycenter.v2.ComplianceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.ComplianceProto + .internal_static_google_cloud_securitycenter_v2_Compliance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.ComplianceProto + .internal_static_google_cloud_securitycenter_v2_Compliance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Compliance.class, + com.google.cloud.securitycenter.v2.Compliance.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.Compliance.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + standard_ = ""; + version_ = ""; + ids_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.ComplianceProto + .internal_static_google_cloud_securitycenter_v2_Compliance_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Compliance getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.Compliance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Compliance build() { + com.google.cloud.securitycenter.v2.Compliance result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Compliance buildPartial() { + com.google.cloud.securitycenter.v2.Compliance result = + new com.google.cloud.securitycenter.v2.Compliance(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.Compliance result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.standard_ = standard_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.version_ = version_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + ids_.makeImmutable(); + result.ids_ = ids_; + } + } + + @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.v2.Compliance) { + return mergeFrom((com.google.cloud.securitycenter.v2.Compliance) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.Compliance other) { + if (other == com.google.cloud.securitycenter.v2.Compliance.getDefaultInstance()) return this; + if (!other.getStandard().isEmpty()) { + standard_ = other.standard_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.ids_.isEmpty()) { + if (ids_.isEmpty()) { + ids_ = other.ids_; + bitField0_ |= 0x00000004; + } else { + ensureIdsIsMutable(); + ids_.addAll(other.ids_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + standard_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureIdsIsMutable(); + ids_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object standard_ = ""; + /** + * + * + *
+     * Industry-wide compliance standards or benchmarks, such as CIS, PCI, and
+     * OWASP.
+     * 
+ * + * string standard = 1; + * + * @return The standard. + */ + public java.lang.String getStandard() { + java.lang.Object ref = standard_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + standard_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Industry-wide compliance standards or benchmarks, such as CIS, PCI, and
+     * OWASP.
+     * 
+ * + * string standard = 1; + * + * @return The bytes for standard. + */ + public com.google.protobuf.ByteString getStandardBytes() { + java.lang.Object ref = standard_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + standard_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Industry-wide compliance standards or benchmarks, such as CIS, PCI, and
+     * OWASP.
+     * 
+ * + * string standard = 1; + * + * @param value The standard to set. + * @return This builder for chaining. + */ + public Builder setStandard(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + standard_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Industry-wide compliance standards or benchmarks, such as CIS, PCI, and
+     * OWASP.
+     * 
+ * + * string standard = 1; + * + * @return This builder for chaining. + */ + public Builder clearStandard() { + standard_ = getDefaultInstance().getStandard(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Industry-wide compliance standards or benchmarks, such as CIS, PCI, and
+     * OWASP.
+     * 
+ * + * string standard = 1; + * + * @param value The bytes for standard to set. + * @return This builder for chaining. + */ + public Builder setStandardBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + standard_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + * + * + *
+     * Version of the standard or benchmark, for example, 1.1
+     * 
+ * + * string version = 2; + * + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Version of the standard or benchmark, for example, 1.1
+     * 
+ * + * string version = 2; + * + * @return The bytes for version. + */ + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Version of the standard or benchmark, for example, 1.1
+     * 
+ * + * string version = 2; + * + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + version_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Version of the standard or benchmark, for example, 1.1
+     * 
+ * + * string version = 2; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Version of the standard or benchmark, for example, 1.1
+     * 
+ * + * string version = 2; + * + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList ids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureIdsIsMutable() { + if (!ids_.isModifiable()) { + ids_ = new com.google.protobuf.LazyStringArrayList(ids_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Policies within the standard or benchmark, for example, A.12.4.1
+     * 
+ * + * repeated string ids = 3; + * + * @return A list containing the ids. + */ + public com.google.protobuf.ProtocolStringList getIdsList() { + ids_.makeImmutable(); + return ids_; + } + /** + * + * + *
+     * Policies within the standard or benchmark, for example, A.12.4.1
+     * 
+ * + * repeated string ids = 3; + * + * @return The count of ids. + */ + public int getIdsCount() { + return ids_.size(); + } + /** + * + * + *
+     * Policies within the standard or benchmark, for example, A.12.4.1
+     * 
+ * + * repeated string ids = 3; + * + * @param index The index of the element to return. + * @return The ids at the given index. + */ + public java.lang.String getIds(int index) { + return ids_.get(index); + } + /** + * + * + *
+     * Policies within the standard or benchmark, for example, A.12.4.1
+     * 
+ * + * repeated string ids = 3; + * + * @param index The index of the value to return. + * @return The bytes of the ids at the given index. + */ + public com.google.protobuf.ByteString getIdsBytes(int index) { + return ids_.getByteString(index); + } + /** + * + * + *
+     * Policies within the standard or benchmark, for example, A.12.4.1
+     * 
+ * + * repeated string ids = 3; + * + * @param index The index to set the value at. + * @param value The ids to set. + * @return This builder for chaining. + */ + public Builder setIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdsIsMutable(); + ids_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Policies within the standard or benchmark, for example, A.12.4.1
+     * 
+ * + * repeated string ids = 3; + * + * @param value The ids to add. + * @return This builder for chaining. + */ + public Builder addIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdsIsMutable(); + ids_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Policies within the standard or benchmark, for example, A.12.4.1
+     * 
+ * + * repeated string ids = 3; + * + * @param values The ids to add. + * @return This builder for chaining. + */ + public Builder addAllIds(java.lang.Iterable values) { + ensureIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ids_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Policies within the standard or benchmark, for example, A.12.4.1
+     * 
+ * + * repeated string ids = 3; + * + * @return This builder for chaining. + */ + public Builder clearIds() { + ids_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Policies within the standard or benchmark, for example, A.12.4.1
+     * 
+ * + * repeated string ids = 3; + * + * @param value The bytes of the ids to add. + * @return This builder for chaining. + */ + public Builder addIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureIdsIsMutable(); + ids_.add(value); + bitField0_ |= 0x00000004; + 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.v2.Compliance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.Compliance) + private static final com.google.cloud.securitycenter.v2.Compliance DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.Compliance(); + } + + public static com.google.cloud.securitycenter.v2.Compliance getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Compliance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.Compliance getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ComplianceOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ComplianceOrBuilder.java new file mode 100644 index 000000000000..642c157e5a99 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ComplianceOrBuilder.java @@ -0,0 +1,129 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/compliance.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface ComplianceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.Compliance) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Industry-wide compliance standards or benchmarks, such as CIS, PCI, and
+   * OWASP.
+   * 
+ * + * string standard = 1; + * + * @return The standard. + */ + java.lang.String getStandard(); + /** + * + * + *
+   * Industry-wide compliance standards or benchmarks, such as CIS, PCI, and
+   * OWASP.
+   * 
+ * + * string standard = 1; + * + * @return The bytes for standard. + */ + com.google.protobuf.ByteString getStandardBytes(); + + /** + * + * + *
+   * Version of the standard or benchmark, for example, 1.1
+   * 
+ * + * string version = 2; + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+   * Version of the standard or benchmark, for example, 1.1
+   * 
+ * + * string version = 2; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); + + /** + * + * + *
+   * Policies within the standard or benchmark, for example, A.12.4.1
+   * 
+ * + * repeated string ids = 3; + * + * @return A list containing the ids. + */ + java.util.List getIdsList(); + /** + * + * + *
+   * Policies within the standard or benchmark, for example, A.12.4.1
+   * 
+ * + * repeated string ids = 3; + * + * @return The count of ids. + */ + int getIdsCount(); + /** + * + * + *
+   * Policies within the standard or benchmark, for example, A.12.4.1
+   * 
+ * + * repeated string ids = 3; + * + * @param index The index of the element to return. + * @return The ids at the given index. + */ + java.lang.String getIds(int index); + /** + * + * + *
+   * Policies within the standard or benchmark, for example, A.12.4.1
+   * 
+ * + * repeated string ids = 3; + * + * @param index The index of the value to return. + * @return The bytes of the ids at the given index. + */ + com.google.protobuf.ByteString getIdsBytes(int index); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ComplianceProto.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ComplianceProto.java new file mode 100644 index 000000000000..aef1c3a4e546 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ComplianceProto.java @@ -0,0 +1,69 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/compliance.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public final class ComplianceProto { + private ComplianceProto() {} + + 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_v2_Compliance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_Compliance_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n/google/cloud/securitycenter/v2/complia" + + "nce.proto\022\036google.cloud.securitycenter.v" + + "2\"<\n\nCompliance\022\020\n\010standard\030\001 \001(\t\022\017\n\007ver" + + "sion\030\002 \001(\t\022\013\n\003ids\030\003 \003(\tB\351\001\n\"com.google.c" + + "loud.securitycenter.v2B\017ComplianceProtoP" + + "\001ZJcloud.google.com/go/securitycenter/ap" + + "iv2/securitycenterpb;securitycenterpb\252\002\036" + + "Google.Cloud.SecurityCenter.V2\312\002\036Google\\" + + "Cloud\\SecurityCenter\\V2\352\002!Google::Cloud:" + + ":SecurityCenter::V2b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_cloud_securitycenter_v2_Compliance_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_securitycenter_v2_Compliance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_Compliance_descriptor, + new java.lang.String[] { + "Standard", "Version", "Ids", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Connection.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Connection.java new file mode 100644 index 000000000000..5ee17e495291 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Connection.java @@ -0,0 +1,1382 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/connection.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Contains information about the IP connection associated with the finding.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Connection} + */ +public final class Connection extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.Connection) + ConnectionOrBuilder { + private static final long serialVersionUID = 0L; + // Use Connection.newBuilder() to construct. + private Connection(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Connection() { + destinationIp_ = ""; + sourceIp_ = ""; + protocol_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Connection(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.ConnectionProto + .internal_static_google_cloud_securitycenter_v2_Connection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.ConnectionProto + .internal_static_google_cloud_securitycenter_v2_Connection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Connection.class, + com.google.cloud.securitycenter.v2.Connection.Builder.class); + } + + /** + * + * + *
+   * IANA Internet Protocol Number such as TCP(6) and UDP(17).
+   * 
+ * + * Protobuf enum {@code google.cloud.securitycenter.v2.Connection.Protocol} + */ + public enum Protocol implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified protocol (not HOPOPT).
+     * 
+ * + * PROTOCOL_UNSPECIFIED = 0; + */ + PROTOCOL_UNSPECIFIED(0), + /** + * + * + *
+     * Internet Control Message Protocol.
+     * 
+ * + * ICMP = 1; + */ + ICMP(1), + /** + * + * + *
+     * Transmission Control Protocol.
+     * 
+ * + * TCP = 6; + */ + TCP(6), + /** + * + * + *
+     * User Datagram Protocol.
+     * 
+ * + * UDP = 17; + */ + UDP(17), + /** + * + * + *
+     * Generic Routing Encapsulation.
+     * 
+ * + * GRE = 47; + */ + GRE(47), + /** + * + * + *
+     * Encap Security Payload.
+     * 
+ * + * ESP = 50; + */ + ESP(50), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified protocol (not HOPOPT).
+     * 
+ * + * PROTOCOL_UNSPECIFIED = 0; + */ + public static final int PROTOCOL_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Internet Control Message Protocol.
+     * 
+ * + * ICMP = 1; + */ + public static final int ICMP_VALUE = 1; + /** + * + * + *
+     * Transmission Control Protocol.
+     * 
+ * + * TCP = 6; + */ + public static final int TCP_VALUE = 6; + /** + * + * + *
+     * User Datagram Protocol.
+     * 
+ * + * UDP = 17; + */ + public static final int UDP_VALUE = 17; + /** + * + * + *
+     * Generic Routing Encapsulation.
+     * 
+ * + * GRE = 47; + */ + public static final int GRE_VALUE = 47; + /** + * + * + *
+     * Encap Security Payload.
+     * 
+ * + * ESP = 50; + */ + public static final int ESP_VALUE = 50; + + 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 Protocol 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 Protocol forNumber(int value) { + switch (value) { + case 0: + return PROTOCOL_UNSPECIFIED; + case 1: + return ICMP; + case 6: + return TCP; + case 17: + return UDP; + case 47: + return GRE; + case 50: + return ESP; + 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 Protocol findValueByNumber(int number) { + return Protocol.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.v2.Connection.getDescriptor().getEnumTypes().get(0); + } + + private static final Protocol[] VALUES = values(); + + public static Protocol 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 Protocol(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v2.Connection.Protocol) + } + + public static final int DESTINATION_IP_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object destinationIp_ = ""; + /** + * + * + *
+   * Destination IP address. Not present for sockets that are listening and not
+   * connected.
+   * 
+ * + * string destination_ip = 1; + * + * @return The destinationIp. + */ + @java.lang.Override + public java.lang.String getDestinationIp() { + java.lang.Object ref = destinationIp_; + 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(); + destinationIp_ = s; + return s; + } + } + /** + * + * + *
+   * Destination IP address. Not present for sockets that are listening and not
+   * connected.
+   * 
+ * + * string destination_ip = 1; + * + * @return The bytes for destinationIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDestinationIpBytes() { + java.lang.Object ref = destinationIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destinationIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESTINATION_PORT_FIELD_NUMBER = 2; + private int destinationPort_ = 0; + /** + * + * + *
+   * Destination port. Not present for sockets that are listening and not
+   * connected.
+   * 
+ * + * int32 destination_port = 2; + * + * @return The destinationPort. + */ + @java.lang.Override + public int getDestinationPort() { + return destinationPort_; + } + + public static final int SOURCE_IP_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object sourceIp_ = ""; + /** + * + * + *
+   * Source IP address.
+   * 
+ * + * string source_ip = 3; + * + * @return The sourceIp. + */ + @java.lang.Override + public java.lang.String getSourceIp() { + java.lang.Object ref = sourceIp_; + 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(); + sourceIp_ = s; + return s; + } + } + /** + * + * + *
+   * Source IP address.
+   * 
+ * + * string source_ip = 3; + * + * @return The bytes for sourceIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceIpBytes() { + java.lang.Object ref = sourceIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_PORT_FIELD_NUMBER = 4; + private int sourcePort_ = 0; + /** + * + * + *
+   * Source port.
+   * 
+ * + * int32 source_port = 4; + * + * @return The sourcePort. + */ + @java.lang.Override + public int getSourcePort() { + return sourcePort_; + } + + public static final int PROTOCOL_FIELD_NUMBER = 5; + private int protocol_ = 0; + /** + * + * + *
+   * IANA Internet Protocol Number such as TCP(6) and UDP(17).
+   * 
+ * + * .google.cloud.securitycenter.v2.Connection.Protocol protocol = 5; + * + * @return The enum numeric value on the wire for protocol. + */ + @java.lang.Override + public int getProtocolValue() { + return protocol_; + } + /** + * + * + *
+   * IANA Internet Protocol Number such as TCP(6) and UDP(17).
+   * 
+ * + * .google.cloud.securitycenter.v2.Connection.Protocol protocol = 5; + * + * @return The protocol. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Connection.Protocol getProtocol() { + com.google.cloud.securitycenter.v2.Connection.Protocol result = + com.google.cloud.securitycenter.v2.Connection.Protocol.forNumber(protocol_); + return result == null + ? com.google.cloud.securitycenter.v2.Connection.Protocol.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(destinationIp_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, destinationIp_); + } + if (destinationPort_ != 0) { + output.writeInt32(2, destinationPort_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceIp_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sourceIp_); + } + if (sourcePort_ != 0) { + output.writeInt32(4, sourcePort_); + } + if (protocol_ + != com.google.cloud.securitycenter.v2.Connection.Protocol.PROTOCOL_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, protocol_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationIp_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, destinationIp_); + } + if (destinationPort_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, destinationPort_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceIp_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sourceIp_); + } + if (sourcePort_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, sourcePort_); + } + if (protocol_ + != com.google.cloud.securitycenter.v2.Connection.Protocol.PROTOCOL_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, protocol_); + } + size += getUnknownFields().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.v2.Connection)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.Connection other = + (com.google.cloud.securitycenter.v2.Connection) obj; + + if (!getDestinationIp().equals(other.getDestinationIp())) return false; + if (getDestinationPort() != other.getDestinationPort()) return false; + if (!getSourceIp().equals(other.getSourceIp())) return false; + if (getSourcePort() != other.getSourcePort()) return false; + if (protocol_ != other.protocol_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + DESTINATION_IP_FIELD_NUMBER; + hash = (53 * hash) + getDestinationIp().hashCode(); + hash = (37 * hash) + DESTINATION_PORT_FIELD_NUMBER; + hash = (53 * hash) + getDestinationPort(); + hash = (37 * hash) + SOURCE_IP_FIELD_NUMBER; + hash = (53 * hash) + getSourceIp().hashCode(); + hash = (37 * hash) + SOURCE_PORT_FIELD_NUMBER; + hash = (53 * hash) + getSourcePort(); + hash = (37 * hash) + PROTOCOL_FIELD_NUMBER; + hash = (53 * hash) + protocol_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.Connection parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Connection 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.v2.Connection parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Connection 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.v2.Connection parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Connection parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.Connection parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Connection 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.v2.Connection parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Connection 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.v2.Connection parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Connection 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.v2.Connection 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; + } + /** + * + * + *
+   * Contains information about the IP connection associated with the finding.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Connection} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.Connection) + com.google.cloud.securitycenter.v2.ConnectionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.ConnectionProto + .internal_static_google_cloud_securitycenter_v2_Connection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.ConnectionProto + .internal_static_google_cloud_securitycenter_v2_Connection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Connection.class, + com.google.cloud.securitycenter.v2.Connection.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.Connection.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + destinationIp_ = ""; + destinationPort_ = 0; + sourceIp_ = ""; + sourcePort_ = 0; + protocol_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.ConnectionProto + .internal_static_google_cloud_securitycenter_v2_Connection_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Connection getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.Connection.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Connection build() { + com.google.cloud.securitycenter.v2.Connection result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Connection buildPartial() { + com.google.cloud.securitycenter.v2.Connection result = + new com.google.cloud.securitycenter.v2.Connection(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.Connection result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.destinationIp_ = destinationIp_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.destinationPort_ = destinationPort_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.sourceIp_ = sourceIp_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.sourcePort_ = sourcePort_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.protocol_ = protocol_; + } + } + + @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.v2.Connection) { + return mergeFrom((com.google.cloud.securitycenter.v2.Connection) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.Connection other) { + if (other == com.google.cloud.securitycenter.v2.Connection.getDefaultInstance()) return this; + if (!other.getDestinationIp().isEmpty()) { + destinationIp_ = other.destinationIp_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getDestinationPort() != 0) { + setDestinationPort(other.getDestinationPort()); + } + if (!other.getSourceIp().isEmpty()) { + sourceIp_ = other.sourceIp_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getSourcePort() != 0) { + setSourcePort(other.getSourcePort()); + } + if (other.protocol_ != 0) { + setProtocolValue(other.getProtocolValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + destinationIp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + destinationPort_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + sourceIp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + sourcePort_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + protocol_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object destinationIp_ = ""; + /** + * + * + *
+     * Destination IP address. Not present for sockets that are listening and not
+     * connected.
+     * 
+ * + * string destination_ip = 1; + * + * @return The destinationIp. + */ + public java.lang.String getDestinationIp() { + java.lang.Object ref = destinationIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destinationIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Destination IP address. Not present for sockets that are listening and not
+     * connected.
+     * 
+ * + * string destination_ip = 1; + * + * @return The bytes for destinationIp. + */ + public com.google.protobuf.ByteString getDestinationIpBytes() { + java.lang.Object ref = destinationIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destinationIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Destination IP address. Not present for sockets that are listening and not
+     * connected.
+     * 
+ * + * string destination_ip = 1; + * + * @param value The destinationIp to set. + * @return This builder for chaining. + */ + public Builder setDestinationIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + destinationIp_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Destination IP address. Not present for sockets that are listening and not
+     * connected.
+     * 
+ * + * string destination_ip = 1; + * + * @return This builder for chaining. + */ + public Builder clearDestinationIp() { + destinationIp_ = getDefaultInstance().getDestinationIp(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Destination IP address. Not present for sockets that are listening and not
+     * connected.
+     * 
+ * + * string destination_ip = 1; + * + * @param value The bytes for destinationIp to set. + * @return This builder for chaining. + */ + public Builder setDestinationIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + destinationIp_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int destinationPort_; + /** + * + * + *
+     * Destination port. Not present for sockets that are listening and not
+     * connected.
+     * 
+ * + * int32 destination_port = 2; + * + * @return The destinationPort. + */ + @java.lang.Override + public int getDestinationPort() { + return destinationPort_; + } + /** + * + * + *
+     * Destination port. Not present for sockets that are listening and not
+     * connected.
+     * 
+ * + * int32 destination_port = 2; + * + * @param value The destinationPort to set. + * @return This builder for chaining. + */ + public Builder setDestinationPort(int value) { + + destinationPort_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Destination port. Not present for sockets that are listening and not
+     * connected.
+     * 
+ * + * int32 destination_port = 2; + * + * @return This builder for chaining. + */ + public Builder clearDestinationPort() { + bitField0_ = (bitField0_ & ~0x00000002); + destinationPort_ = 0; + onChanged(); + return this; + } + + private java.lang.Object sourceIp_ = ""; + /** + * + * + *
+     * Source IP address.
+     * 
+ * + * string source_ip = 3; + * + * @return The sourceIp. + */ + public java.lang.String getSourceIp() { + java.lang.Object ref = sourceIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Source IP address.
+     * 
+ * + * string source_ip = 3; + * + * @return The bytes for sourceIp. + */ + public com.google.protobuf.ByteString getSourceIpBytes() { + java.lang.Object ref = sourceIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Source IP address.
+     * 
+ * + * string source_ip = 3; + * + * @param value The sourceIp to set. + * @return This builder for chaining. + */ + public Builder setSourceIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceIp_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Source IP address.
+     * 
+ * + * string source_ip = 3; + * + * @return This builder for chaining. + */ + public Builder clearSourceIp() { + sourceIp_ = getDefaultInstance().getSourceIp(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Source IP address.
+     * 
+ * + * string source_ip = 3; + * + * @param value The bytes for sourceIp to set. + * @return This builder for chaining. + */ + public Builder setSourceIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceIp_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int sourcePort_; + /** + * + * + *
+     * Source port.
+     * 
+ * + * int32 source_port = 4; + * + * @return The sourcePort. + */ + @java.lang.Override + public int getSourcePort() { + return sourcePort_; + } + /** + * + * + *
+     * Source port.
+     * 
+ * + * int32 source_port = 4; + * + * @param value The sourcePort to set. + * @return This builder for chaining. + */ + public Builder setSourcePort(int value) { + + sourcePort_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Source port.
+     * 
+ * + * int32 source_port = 4; + * + * @return This builder for chaining. + */ + public Builder clearSourcePort() { + bitField0_ = (bitField0_ & ~0x00000008); + sourcePort_ = 0; + onChanged(); + return this; + } + + private int protocol_ = 0; + /** + * + * + *
+     * IANA Internet Protocol Number such as TCP(6) and UDP(17).
+     * 
+ * + * .google.cloud.securitycenter.v2.Connection.Protocol protocol = 5; + * + * @return The enum numeric value on the wire for protocol. + */ + @java.lang.Override + public int getProtocolValue() { + return protocol_; + } + /** + * + * + *
+     * IANA Internet Protocol Number such as TCP(6) and UDP(17).
+     * 
+ * + * .google.cloud.securitycenter.v2.Connection.Protocol protocol = 5; + * + * @param value The enum numeric value on the wire for protocol to set. + * @return This builder for chaining. + */ + public Builder setProtocolValue(int value) { + protocol_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * IANA Internet Protocol Number such as TCP(6) and UDP(17).
+     * 
+ * + * .google.cloud.securitycenter.v2.Connection.Protocol protocol = 5; + * + * @return The protocol. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Connection.Protocol getProtocol() { + com.google.cloud.securitycenter.v2.Connection.Protocol result = + com.google.cloud.securitycenter.v2.Connection.Protocol.forNumber(protocol_); + return result == null + ? com.google.cloud.securitycenter.v2.Connection.Protocol.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * IANA Internet Protocol Number such as TCP(6) and UDP(17).
+     * 
+ * + * .google.cloud.securitycenter.v2.Connection.Protocol protocol = 5; + * + * @param value The protocol to set. + * @return This builder for chaining. + */ + public Builder setProtocol(com.google.cloud.securitycenter.v2.Connection.Protocol value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + protocol_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * IANA Internet Protocol Number such as TCP(6) and UDP(17).
+     * 
+ * + * .google.cloud.securitycenter.v2.Connection.Protocol protocol = 5; + * + * @return This builder for chaining. + */ + public Builder clearProtocol() { + bitField0_ = (bitField0_ & ~0x00000010); + protocol_ = 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.v2.Connection) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.Connection) + private static final com.google.cloud.securitycenter.v2.Connection DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.Connection(); + } + + public static com.google.cloud.securitycenter.v2.Connection getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Connection parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.Connection getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ConnectionOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ConnectionOrBuilder.java new file mode 100644 index 000000000000..fc0b6e5bfa8a --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ConnectionOrBuilder.java @@ -0,0 +1,130 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/connection.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface ConnectionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.Connection) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Destination IP address. Not present for sockets that are listening and not
+   * connected.
+   * 
+ * + * string destination_ip = 1; + * + * @return The destinationIp. + */ + java.lang.String getDestinationIp(); + /** + * + * + *
+   * Destination IP address. Not present for sockets that are listening and not
+   * connected.
+   * 
+ * + * string destination_ip = 1; + * + * @return The bytes for destinationIp. + */ + com.google.protobuf.ByteString getDestinationIpBytes(); + + /** + * + * + *
+   * Destination port. Not present for sockets that are listening and not
+   * connected.
+   * 
+ * + * int32 destination_port = 2; + * + * @return The destinationPort. + */ + int getDestinationPort(); + + /** + * + * + *
+   * Source IP address.
+   * 
+ * + * string source_ip = 3; + * + * @return The sourceIp. + */ + java.lang.String getSourceIp(); + /** + * + * + *
+   * Source IP address.
+   * 
+ * + * string source_ip = 3; + * + * @return The bytes for sourceIp. + */ + com.google.protobuf.ByteString getSourceIpBytes(); + + /** + * + * + *
+   * Source port.
+   * 
+ * + * int32 source_port = 4; + * + * @return The sourcePort. + */ + int getSourcePort(); + + /** + * + * + *
+   * IANA Internet Protocol Number such as TCP(6) and UDP(17).
+   * 
+ * + * .google.cloud.securitycenter.v2.Connection.Protocol protocol = 5; + * + * @return The enum numeric value on the wire for protocol. + */ + int getProtocolValue(); + /** + * + * + *
+   * IANA Internet Protocol Number such as TCP(6) and UDP(17).
+   * 
+ * + * .google.cloud.securitycenter.v2.Connection.Protocol protocol = 5; + * + * @return The protocol. + */ + com.google.cloud.securitycenter.v2.Connection.Protocol getProtocol(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ConnectionProto.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ConnectionProto.java new file mode 100644 index 000000000000..f3402ad7d82d --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ConnectionProto.java @@ -0,0 +1,74 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/connection.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public final class ConnectionProto { + private ConnectionProto() {} + + 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_v2_Connection_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_Connection_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n/google/cloud/securitycenter/v2/connect" + + "ion.proto\022\036google.cloud.securitycenter.v" + + "2\"\201\002\n\nConnection\022\026\n\016destination_ip\030\001 \001(\t" + + "\022\030\n\020destination_port\030\002 \001(\005\022\021\n\tsource_ip\030" + + "\003 \001(\t\022\023\n\013source_port\030\004 \001(\005\022E\n\010protocol\030\005" + + " \001(\01623.google.cloud.securitycenter.v2.Co" + + "nnection.Protocol\"R\n\010Protocol\022\030\n\024PROTOCO" + + "L_UNSPECIFIED\020\000\022\010\n\004ICMP\020\001\022\007\n\003TCP\020\006\022\007\n\003UD" + + "P\020\021\022\007\n\003GRE\020/\022\007\n\003ESP\0202B\351\001\n\"com.google.clo" + + "ud.securitycenter.v2B\017ConnectionProtoP\001Z" + + "Jcloud.google.com/go/securitycenter/apiv" + + "2/securitycenterpb;securitycenterpb\252\002\036Go" + + "ogle.Cloud.SecurityCenter.V2\312\002\036Google\\Cl" + + "oud\\SecurityCenter\\V2\352\002!Google::Cloud::S" + + "ecurityCenter::V2b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_cloud_securitycenter_v2_Connection_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_securitycenter_v2_Connection_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_Connection_descriptor, + new java.lang.String[] { + "DestinationIp", "DestinationPort", "SourceIp", "SourcePort", "Protocol", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Contact.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Contact.java new file mode 100644 index 000000000000..5019148bbbad --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Contact.java @@ -0,0 +1,624 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/contact_details.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * The email address of a contact.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Contact} + */ +public final class Contact extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.Contact) + ContactOrBuilder { + private static final long serialVersionUID = 0L; + // Use Contact.newBuilder() to construct. + private Contact(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Contact() { + email_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Contact(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.ContactDetailsProto + .internal_static_google_cloud_securitycenter_v2_Contact_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.ContactDetailsProto + .internal_static_google_cloud_securitycenter_v2_Contact_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Contact.class, + com.google.cloud.securitycenter.v2.Contact.Builder.class); + } + + public static final int EMAIL_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object email_ = ""; + /** + * + * + *
+   * An email address. For example, "`person123@company.com`".
+   * 
+ * + * string email = 1; + * + * @return The email. + */ + @java.lang.Override + public java.lang.String getEmail() { + java.lang.Object ref = email_; + 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(); + email_ = s; + return s; + } + } + /** + * + * + *
+   * An email address. For example, "`person123@company.com`".
+   * 
+ * + * string email = 1; + * + * @return The bytes for email. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEmailBytes() { + java.lang.Object ref = email_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + email_ = 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(email_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, email_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(email_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, email_); + } + size += getUnknownFields().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.v2.Contact)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.Contact other = + (com.google.cloud.securitycenter.v2.Contact) obj; + + if (!getEmail().equals(other.getEmail())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + EMAIL_FIELD_NUMBER; + hash = (53 * hash) + getEmail().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.Contact parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Contact 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.v2.Contact parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Contact 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.v2.Contact parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Contact parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.Contact parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Contact 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.v2.Contact parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Contact 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.v2.Contact parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Contact 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.v2.Contact 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 email address of a contact.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Contact} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.Contact) + com.google.cloud.securitycenter.v2.ContactOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.ContactDetailsProto + .internal_static_google_cloud_securitycenter_v2_Contact_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.ContactDetailsProto + .internal_static_google_cloud_securitycenter_v2_Contact_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Contact.class, + com.google.cloud.securitycenter.v2.Contact.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.Contact.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + email_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.ContactDetailsProto + .internal_static_google_cloud_securitycenter_v2_Contact_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Contact getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.Contact.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Contact build() { + com.google.cloud.securitycenter.v2.Contact result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Contact buildPartial() { + com.google.cloud.securitycenter.v2.Contact result = + new com.google.cloud.securitycenter.v2.Contact(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.Contact result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.email_ = email_; + } + } + + @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.v2.Contact) { + return mergeFrom((com.google.cloud.securitycenter.v2.Contact) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.Contact other) { + if (other == com.google.cloud.securitycenter.v2.Contact.getDefaultInstance()) return this; + if (!other.getEmail().isEmpty()) { + email_ = other.email_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + email_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object email_ = ""; + /** + * + * + *
+     * An email address. For example, "`person123@company.com`".
+     * 
+ * + * string email = 1; + * + * @return The email. + */ + public java.lang.String getEmail() { + java.lang.Object ref = email_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + email_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * An email address. For example, "`person123@company.com`".
+     * 
+ * + * string email = 1; + * + * @return The bytes for email. + */ + public com.google.protobuf.ByteString getEmailBytes() { + java.lang.Object ref = email_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + email_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * An email address. For example, "`person123@company.com`".
+     * 
+ * + * string email = 1; + * + * @param value The email to set. + * @return This builder for chaining. + */ + public Builder setEmail(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + email_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * An email address. For example, "`person123@company.com`".
+     * 
+ * + * string email = 1; + * + * @return This builder for chaining. + */ + public Builder clearEmail() { + email_ = getDefaultInstance().getEmail(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * An email address. For example, "`person123@company.com`".
+     * 
+ * + * string email = 1; + * + * @param value The bytes for email to set. + * @return This builder for chaining. + */ + public Builder setEmailBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + email_ = value; + bitField0_ |= 0x00000001; + 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.v2.Contact) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.Contact) + private static final com.google.cloud.securitycenter.v2.Contact DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.Contact(); + } + + public static com.google.cloud.securitycenter.v2.Contact getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Contact parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.Contact getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ContactDetails.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ContactDetails.java new file mode 100644 index 000000000000..706f90b62640 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ContactDetails.java @@ -0,0 +1,936 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/contact_details.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Details about specific contacts
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.ContactDetails} + */ +public final class ContactDetails extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.ContactDetails) + ContactDetailsOrBuilder { + private static final long serialVersionUID = 0L; + // Use ContactDetails.newBuilder() to construct. + private ContactDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ContactDetails() { + contacts_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ContactDetails(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.ContactDetailsProto + .internal_static_google_cloud_securitycenter_v2_ContactDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.ContactDetailsProto + .internal_static_google_cloud_securitycenter_v2_ContactDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.ContactDetails.class, + com.google.cloud.securitycenter.v2.ContactDetails.Builder.class); + } + + public static final int CONTACTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List contacts_; + /** + * + * + *
+   * A list of contacts
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Contact contacts = 1; + */ + @java.lang.Override + public java.util.List getContactsList() { + return contacts_; + } + /** + * + * + *
+   * A list of contacts
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Contact contacts = 1; + */ + @java.lang.Override + public java.util.List + getContactsOrBuilderList() { + return contacts_; + } + /** + * + * + *
+   * A list of contacts
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Contact contacts = 1; + */ + @java.lang.Override + public int getContactsCount() { + return contacts_.size(); + } + /** + * + * + *
+   * A list of contacts
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Contact contacts = 1; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Contact getContacts(int index) { + return contacts_.get(index); + } + /** + * + * + *
+   * A list of contacts
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Contact contacts = 1; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.ContactOrBuilder getContactsOrBuilder(int index) { + return contacts_.get(index); + } + + 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 < contacts_.size(); i++) { + output.writeMessage(1, contacts_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < contacts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, contacts_.get(i)); + } + size += getUnknownFields().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.v2.ContactDetails)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.ContactDetails other = + (com.google.cloud.securitycenter.v2.ContactDetails) obj; + + if (!getContactsList().equals(other.getContactsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getContactsCount() > 0) { + hash = (37 * hash) + CONTACTS_FIELD_NUMBER; + hash = (53 * hash) + getContactsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.ContactDetails parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.ContactDetails 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.v2.ContactDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.ContactDetails 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.v2.ContactDetails parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.ContactDetails parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.ContactDetails parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.ContactDetails 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.v2.ContactDetails parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.ContactDetails 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.v2.ContactDetails parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.ContactDetails 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.v2.ContactDetails 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; + } + /** + * + * + *
+   * Details about specific contacts
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.ContactDetails} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.ContactDetails) + com.google.cloud.securitycenter.v2.ContactDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.ContactDetailsProto + .internal_static_google_cloud_securitycenter_v2_ContactDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.ContactDetailsProto + .internal_static_google_cloud_securitycenter_v2_ContactDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.ContactDetails.class, + com.google.cloud.securitycenter.v2.ContactDetails.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.ContactDetails.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (contactsBuilder_ == null) { + contacts_ = java.util.Collections.emptyList(); + } else { + contacts_ = null; + contactsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.ContactDetailsProto + .internal_static_google_cloud_securitycenter_v2_ContactDetails_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.ContactDetails getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.ContactDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.ContactDetails build() { + com.google.cloud.securitycenter.v2.ContactDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.ContactDetails buildPartial() { + com.google.cloud.securitycenter.v2.ContactDetails result = + new com.google.cloud.securitycenter.v2.ContactDetails(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.securitycenter.v2.ContactDetails result) { + if (contactsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + contacts_ = java.util.Collections.unmodifiableList(contacts_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.contacts_ = contacts_; + } else { + result.contacts_ = contactsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.ContactDetails result) { + int from_bitField0_ = bitField0_; + } + + @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.v2.ContactDetails) { + return mergeFrom((com.google.cloud.securitycenter.v2.ContactDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.ContactDetails other) { + if (other == com.google.cloud.securitycenter.v2.ContactDetails.getDefaultInstance()) + return this; + if (contactsBuilder_ == null) { + if (!other.contacts_.isEmpty()) { + if (contacts_.isEmpty()) { + contacts_ = other.contacts_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureContactsIsMutable(); + contacts_.addAll(other.contacts_); + } + onChanged(); + } + } else { + if (!other.contacts_.isEmpty()) { + if (contactsBuilder_.isEmpty()) { + contactsBuilder_.dispose(); + contactsBuilder_ = null; + contacts_ = other.contacts_; + bitField0_ = (bitField0_ & ~0x00000001); + contactsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getContactsFieldBuilder() + : null; + } else { + contactsBuilder_.addAllMessages(other.contacts_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.securitycenter.v2.Contact m = + input.readMessage( + com.google.cloud.securitycenter.v2.Contact.parser(), extensionRegistry); + if (contactsBuilder_ == null) { + ensureContactsIsMutable(); + contacts_.add(m); + } else { + contactsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List contacts_ = + java.util.Collections.emptyList(); + + private void ensureContactsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + contacts_ = new java.util.ArrayList(contacts_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Contact, + com.google.cloud.securitycenter.v2.Contact.Builder, + com.google.cloud.securitycenter.v2.ContactOrBuilder> + contactsBuilder_; + + /** + * + * + *
+     * A list of contacts
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Contact contacts = 1; + */ + public java.util.List getContactsList() { + if (contactsBuilder_ == null) { + return java.util.Collections.unmodifiableList(contacts_); + } else { + return contactsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of contacts
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Contact contacts = 1; + */ + public int getContactsCount() { + if (contactsBuilder_ == null) { + return contacts_.size(); + } else { + return contactsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of contacts
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Contact contacts = 1; + */ + public com.google.cloud.securitycenter.v2.Contact getContacts(int index) { + if (contactsBuilder_ == null) { + return contacts_.get(index); + } else { + return contactsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of contacts
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Contact contacts = 1; + */ + public Builder setContacts(int index, com.google.cloud.securitycenter.v2.Contact value) { + if (contactsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContactsIsMutable(); + contacts_.set(index, value); + onChanged(); + } else { + contactsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of contacts
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Contact contacts = 1; + */ + public Builder setContacts( + int index, com.google.cloud.securitycenter.v2.Contact.Builder builderForValue) { + if (contactsBuilder_ == null) { + ensureContactsIsMutable(); + contacts_.set(index, builderForValue.build()); + onChanged(); + } else { + contactsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of contacts
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Contact contacts = 1; + */ + public Builder addContacts(com.google.cloud.securitycenter.v2.Contact value) { + if (contactsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContactsIsMutable(); + contacts_.add(value); + onChanged(); + } else { + contactsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of contacts
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Contact contacts = 1; + */ + public Builder addContacts(int index, com.google.cloud.securitycenter.v2.Contact value) { + if (contactsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContactsIsMutable(); + contacts_.add(index, value); + onChanged(); + } else { + contactsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of contacts
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Contact contacts = 1; + */ + public Builder addContacts(com.google.cloud.securitycenter.v2.Contact.Builder builderForValue) { + if (contactsBuilder_ == null) { + ensureContactsIsMutable(); + contacts_.add(builderForValue.build()); + onChanged(); + } else { + contactsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of contacts
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Contact contacts = 1; + */ + public Builder addContacts( + int index, com.google.cloud.securitycenter.v2.Contact.Builder builderForValue) { + if (contactsBuilder_ == null) { + ensureContactsIsMutable(); + contacts_.add(index, builderForValue.build()); + onChanged(); + } else { + contactsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of contacts
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Contact contacts = 1; + */ + public Builder addAllContacts( + java.lang.Iterable values) { + if (contactsBuilder_ == null) { + ensureContactsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, contacts_); + onChanged(); + } else { + contactsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of contacts
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Contact contacts = 1; + */ + public Builder clearContacts() { + if (contactsBuilder_ == null) { + contacts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + contactsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of contacts
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Contact contacts = 1; + */ + public Builder removeContacts(int index) { + if (contactsBuilder_ == null) { + ensureContactsIsMutable(); + contacts_.remove(index); + onChanged(); + } else { + contactsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of contacts
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Contact contacts = 1; + */ + public com.google.cloud.securitycenter.v2.Contact.Builder getContactsBuilder(int index) { + return getContactsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of contacts
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Contact contacts = 1; + */ + public com.google.cloud.securitycenter.v2.ContactOrBuilder getContactsOrBuilder(int index) { + if (contactsBuilder_ == null) { + return contacts_.get(index); + } else { + return contactsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of contacts
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Contact contacts = 1; + */ + public java.util.List + getContactsOrBuilderList() { + if (contactsBuilder_ != null) { + return contactsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(contacts_); + } + } + /** + * + * + *
+     * A list of contacts
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Contact contacts = 1; + */ + public com.google.cloud.securitycenter.v2.Contact.Builder addContactsBuilder() { + return getContactsFieldBuilder() + .addBuilder(com.google.cloud.securitycenter.v2.Contact.getDefaultInstance()); + } + /** + * + * + *
+     * A list of contacts
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Contact contacts = 1; + */ + public com.google.cloud.securitycenter.v2.Contact.Builder addContactsBuilder(int index) { + return getContactsFieldBuilder() + .addBuilder(index, com.google.cloud.securitycenter.v2.Contact.getDefaultInstance()); + } + /** + * + * + *
+     * A list of contacts
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Contact contacts = 1; + */ + public java.util.List + getContactsBuilderList() { + return getContactsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Contact, + com.google.cloud.securitycenter.v2.Contact.Builder, + com.google.cloud.securitycenter.v2.ContactOrBuilder> + getContactsFieldBuilder() { + if (contactsBuilder_ == null) { + contactsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Contact, + com.google.cloud.securitycenter.v2.Contact.Builder, + com.google.cloud.securitycenter.v2.ContactOrBuilder>( + contacts_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + contacts_ = null; + } + return contactsBuilder_; + } + + @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.v2.ContactDetails) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.ContactDetails) + private static final com.google.cloud.securitycenter.v2.ContactDetails DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.ContactDetails(); + } + + public static com.google.cloud.securitycenter.v2.ContactDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ContactDetails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.ContactDetails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ContactDetailsOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ContactDetailsOrBuilder.java new file mode 100644 index 000000000000..8d0fd3823ec8 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ContactDetailsOrBuilder.java @@ -0,0 +1,78 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/contact_details.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface ContactDetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.ContactDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of contacts
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Contact contacts = 1; + */ + java.util.List getContactsList(); + /** + * + * + *
+   * A list of contacts
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Contact contacts = 1; + */ + com.google.cloud.securitycenter.v2.Contact getContacts(int index); + /** + * + * + *
+   * A list of contacts
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Contact contacts = 1; + */ + int getContactsCount(); + /** + * + * + *
+   * A list of contacts
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Contact contacts = 1; + */ + java.util.List + getContactsOrBuilderList(); + /** + * + * + *
+   * A list of contacts
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Contact contacts = 1; + */ + com.google.cloud.securitycenter.v2.ContactOrBuilder getContactsOrBuilder(int index); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ContactDetailsProto.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ContactDetailsProto.java new file mode 100644 index 000000000000..fdd7a35d7a0c --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ContactDetailsProto.java @@ -0,0 +1,82 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/contact_details.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public final class ContactDetailsProto { + private ContactDetailsProto() {} + + 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_v2_ContactDetails_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_ContactDetails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v2_Contact_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_Contact_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/v2/contact" + + "_details.proto\022\036google.cloud.securitycen" + + "ter.v2\"K\n\016ContactDetails\0229\n\010contacts\030\001 \003" + + "(\0132\'.google.cloud.securitycenter.v2.Cont" + + "act\"\030\n\007Contact\022\r\n\005email\030\001 \001(\tB\355\001\n\"com.go" + + "ogle.cloud.securitycenter.v2B\023ContactDet" + + "ailsProtoP\001ZJcloud.google.com/go/securit" + + "ycenter/apiv2/securitycenterpb;securityc" + + "enterpb\252\002\036Google.Cloud.SecurityCenter.V2" + + "\312\002\036Google\\Cloud\\SecurityCenter\\V2\352\002!Goog" + + "le::Cloud::SecurityCenter::V2b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_cloud_securitycenter_v2_ContactDetails_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_securitycenter_v2_ContactDetails_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_ContactDetails_descriptor, + new java.lang.String[] { + "Contacts", + }); + internal_static_google_cloud_securitycenter_v2_Contact_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_securitycenter_v2_Contact_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_Contact_descriptor, + new java.lang.String[] { + "Email", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ContactOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ContactOrBuilder.java new file mode 100644 index 000000000000..974d2ada7919 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ContactOrBuilder.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/contact_details.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface ContactOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.Contact) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * An email address. For example, "`person123@company.com`".
+   * 
+ * + * string email = 1; + * + * @return The email. + */ + java.lang.String getEmail(); + /** + * + * + *
+   * An email address. For example, "`person123@company.com`".
+   * 
+ * + * string email = 1; + * + * @return The bytes for email. + */ + com.google.protobuf.ByteString getEmailBytes(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Container.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Container.java new file mode 100644 index 000000000000..0008d2eea954 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Container.java @@ -0,0 +1,1769 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/container.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Container associated with the finding.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Container} + */ +public final class Container extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.Container) + ContainerOrBuilder { + private static final long serialVersionUID = 0L; + // Use Container.newBuilder() to construct. + private Container(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Container() { + name_ = ""; + uri_ = ""; + imageId_ = ""; + labels_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Container(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.ContainerProto + .internal_static_google_cloud_securitycenter_v2_Container_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.ContainerProto + .internal_static_google_cloud_securitycenter_v2_Container_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Container.class, + com.google.cloud.securitycenter.v2.Container.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Name of the container.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Name of the container.
+   * 
+ * + * 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 URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * + * + *
+   * Container image URI provided when configuring a pod or container. This
+   * string can identify a container image version using mutable tags.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + 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(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * Container image URI provided when configuring a pod or container. This
+   * string can identify a container image version using mutable tags.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMAGE_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object imageId_ = ""; + /** + * + * + *
+   * Optional container image ID, if provided by the container runtime. Uniquely
+   * identifies the container image launched using a container image digest.
+   * 
+ * + * string image_id = 3; + * + * @return The imageId. + */ + @java.lang.Override + public java.lang.String getImageId() { + java.lang.Object ref = imageId_; + 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(); + imageId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional container image ID, if provided by the container runtime. Uniquely
+   * identifies the container image launched using a container image digest.
+   * 
+ * + * string image_id = 3; + * + * @return The bytes for imageId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getImageIdBytes() { + java.lang.Object ref = imageId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List labels_; + /** + * + * + *
+   * Container labels, as provided by the container runtime.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 4; + */ + @java.lang.Override + public java.util.List getLabelsList() { + return labels_; + } + /** + * + * + *
+   * Container labels, as provided by the container runtime.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 4; + */ + @java.lang.Override + public java.util.List + getLabelsOrBuilderList() { + return labels_; + } + /** + * + * + *
+   * Container labels, as provided by the container runtime.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 4; + */ + @java.lang.Override + public int getLabelsCount() { + return labels_.size(); + } + /** + * + * + *
+   * Container labels, as provided by the container runtime.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 4; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Label getLabels(int index) { + return labels_.get(index); + } + /** + * + * + *
+   * Container labels, as provided by the container runtime.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 4; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.LabelOrBuilder getLabelsOrBuilder(int index) { + return labels_.get(index); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * The time that the container was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The time that the container was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * The time that the container was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + 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(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, imageId_); + } + for (int i = 0; i < labels_.size(); i++) { + output.writeMessage(4, labels_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getCreateTime()); + } + getUnknownFields().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(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, imageId_); + } + for (int i = 0; i < labels_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime()); + } + size += getUnknownFields().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.v2.Container)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.Container other = + (com.google.cloud.securitycenter.v2.Container) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getImageId().equals(other.getImageId())) return false; + if (!getLabelsList().equals(other.getLabelsList())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + IMAGE_ID_FIELD_NUMBER; + hash = (53 * hash) + getImageId().hashCode(); + if (getLabelsCount() > 0) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + getLabelsList().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.Container parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Container 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.v2.Container parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Container 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.v2.Container parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Container parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.Container parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Container 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.v2.Container parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Container 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.v2.Container parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Container 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.v2.Container 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; + } + /** + * + * + *
+   * Container associated with the finding.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Container} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.Container) + com.google.cloud.securitycenter.v2.ContainerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.ContainerProto + .internal_static_google_cloud_securitycenter_v2_Container_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.ContainerProto + .internal_static_google_cloud_securitycenter_v2_Container_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Container.class, + com.google.cloud.securitycenter.v2.Container.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.Container.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getLabelsFieldBuilder(); + getCreateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + uri_ = ""; + imageId_ = ""; + if (labelsBuilder_ == null) { + labels_ = java.util.Collections.emptyList(); + } else { + labels_ = null; + labelsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.ContainerProto + .internal_static_google_cloud_securitycenter_v2_Container_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Container getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.Container.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Container build() { + com.google.cloud.securitycenter.v2.Container result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Container buildPartial() { + com.google.cloud.securitycenter.v2.Container result = + new com.google.cloud.securitycenter.v2.Container(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.securitycenter.v2.Container result) { + if (labelsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + labels_ = java.util.Collections.unmodifiableList(labels_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.labels_ = labels_; + } else { + result.labels_ = labelsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.Container result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.imageId_ = imageId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v2.Container) { + return mergeFrom((com.google.cloud.securitycenter.v2.Container) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.Container other) { + if (other == com.google.cloud.securitycenter.v2.Container.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getImageId().isEmpty()) { + imageId_ = other.imageId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (labelsBuilder_ == null) { + if (!other.labels_.isEmpty()) { + if (labels_.isEmpty()) { + labels_ = other.labels_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureLabelsIsMutable(); + labels_.addAll(other.labels_); + } + onChanged(); + } + } else { + if (!other.labels_.isEmpty()) { + if (labelsBuilder_.isEmpty()) { + labelsBuilder_.dispose(); + labelsBuilder_ = null; + labels_ = other.labels_; + bitField0_ = (bitField0_ & ~0x00000008); + labelsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getLabelsFieldBuilder() + : null; + } else { + labelsBuilder_.addAllMessages(other.labels_); + } + } + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + imageId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.cloud.securitycenter.v2.Label m = + input.readMessage( + com.google.cloud.securitycenter.v2.Label.parser(), extensionRegistry); + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.add(m); + } else { + labelsBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the container.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Name of the container.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Name of the container.
+     * 
+ * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the container.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the container.
+     * 
+ * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * Container image URI provided when configuring a pod or container. This
+     * string can identify a container image version using mutable tags.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Container image URI provided when configuring a pod or container. This
+     * string can identify a container image version using mutable tags.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Container image URI provided when configuring a pod or container. This
+     * string can identify a container image version using mutable tags.
+     * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Container image URI provided when configuring a pod or container. This
+     * string can identify a container image version using mutable tags.
+     * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Container image URI provided when configuring a pod or container. This
+     * string can identify a container image version using mutable tags.
+     * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object imageId_ = ""; + /** + * + * + *
+     * Optional container image ID, if provided by the container runtime. Uniquely
+     * identifies the container image launched using a container image digest.
+     * 
+ * + * string image_id = 3; + * + * @return The imageId. + */ + public java.lang.String getImageId() { + java.lang.Object ref = imageId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional container image ID, if provided by the container runtime. Uniquely
+     * identifies the container image launched using a container image digest.
+     * 
+ * + * string image_id = 3; + * + * @return The bytes for imageId. + */ + public com.google.protobuf.ByteString getImageIdBytes() { + java.lang.Object ref = imageId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional container image ID, if provided by the container runtime. Uniquely
+     * identifies the container image launched using a container image digest.
+     * 
+ * + * string image_id = 3; + * + * @param value The imageId to set. + * @return This builder for chaining. + */ + public Builder setImageId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + imageId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional container image ID, if provided by the container runtime. Uniquely
+     * identifies the container image launched using a container image digest.
+     * 
+ * + * string image_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearImageId() { + imageId_ = getDefaultInstance().getImageId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional container image ID, if provided by the container runtime. Uniquely
+     * identifies the container image launched using a container image digest.
+     * 
+ * + * string image_id = 3; + * + * @param value The bytes for imageId to set. + * @return This builder for chaining. + */ + public Builder setImageIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + imageId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.util.List labels_ = + java.util.Collections.emptyList(); + + private void ensureLabelsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + labels_ = new java.util.ArrayList(labels_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Label, + com.google.cloud.securitycenter.v2.Label.Builder, + com.google.cloud.securitycenter.v2.LabelOrBuilder> + labelsBuilder_; + + /** + * + * + *
+     * Container labels, as provided by the container runtime.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 4; + */ + public java.util.List getLabelsList() { + if (labelsBuilder_ == null) { + return java.util.Collections.unmodifiableList(labels_); + } else { + return labelsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Container labels, as provided by the container runtime.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 4; + */ + public int getLabelsCount() { + if (labelsBuilder_ == null) { + return labels_.size(); + } else { + return labelsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Container labels, as provided by the container runtime.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 4; + */ + public com.google.cloud.securitycenter.v2.Label getLabels(int index) { + if (labelsBuilder_ == null) { + return labels_.get(index); + } else { + return labelsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Container labels, as provided by the container runtime.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 4; + */ + public Builder setLabels(int index, com.google.cloud.securitycenter.v2.Label value) { + if (labelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelsIsMutable(); + labels_.set(index, value); + onChanged(); + } else { + labelsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Container labels, as provided by the container runtime.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 4; + */ + public Builder setLabels( + int index, com.google.cloud.securitycenter.v2.Label.Builder builderForValue) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.set(index, builderForValue.build()); + onChanged(); + } else { + labelsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Container labels, as provided by the container runtime.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 4; + */ + public Builder addLabels(com.google.cloud.securitycenter.v2.Label value) { + if (labelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelsIsMutable(); + labels_.add(value); + onChanged(); + } else { + labelsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Container labels, as provided by the container runtime.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 4; + */ + public Builder addLabels(int index, com.google.cloud.securitycenter.v2.Label value) { + if (labelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelsIsMutable(); + labels_.add(index, value); + onChanged(); + } else { + labelsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Container labels, as provided by the container runtime.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 4; + */ + public Builder addLabels(com.google.cloud.securitycenter.v2.Label.Builder builderForValue) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.add(builderForValue.build()); + onChanged(); + } else { + labelsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Container labels, as provided by the container runtime.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 4; + */ + public Builder addLabels( + int index, com.google.cloud.securitycenter.v2.Label.Builder builderForValue) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.add(index, builderForValue.build()); + onChanged(); + } else { + labelsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Container labels, as provided by the container runtime.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 4; + */ + public Builder addAllLabels( + java.lang.Iterable values) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, labels_); + onChanged(); + } else { + labelsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Container labels, as provided by the container runtime.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 4; + */ + public Builder clearLabels() { + if (labelsBuilder_ == null) { + labels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + labelsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Container labels, as provided by the container runtime.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 4; + */ + public Builder removeLabels(int index) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.remove(index); + onChanged(); + } else { + labelsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Container labels, as provided by the container runtime.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 4; + */ + public com.google.cloud.securitycenter.v2.Label.Builder getLabelsBuilder(int index) { + return getLabelsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Container labels, as provided by the container runtime.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 4; + */ + public com.google.cloud.securitycenter.v2.LabelOrBuilder getLabelsOrBuilder(int index) { + if (labelsBuilder_ == null) { + return labels_.get(index); + } else { + return labelsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Container labels, as provided by the container runtime.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 4; + */ + public java.util.List + getLabelsOrBuilderList() { + if (labelsBuilder_ != null) { + return labelsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(labels_); + } + } + /** + * + * + *
+     * Container labels, as provided by the container runtime.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 4; + */ + public com.google.cloud.securitycenter.v2.Label.Builder addLabelsBuilder() { + return getLabelsFieldBuilder() + .addBuilder(com.google.cloud.securitycenter.v2.Label.getDefaultInstance()); + } + /** + * + * + *
+     * Container labels, as provided by the container runtime.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 4; + */ + public com.google.cloud.securitycenter.v2.Label.Builder addLabelsBuilder(int index) { + return getLabelsFieldBuilder() + .addBuilder(index, com.google.cloud.securitycenter.v2.Label.getDefaultInstance()); + } + /** + * + * + *
+     * Container labels, as provided by the container runtime.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 4; + */ + public java.util.List getLabelsBuilderList() { + return getLabelsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Label, + com.google.cloud.securitycenter.v2.Label.Builder, + com.google.cloud.securitycenter.v2.LabelOrBuilder> + getLabelsFieldBuilder() { + if (labelsBuilder_ == null) { + labelsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Label, + com.google.cloud.securitycenter.v2.Label.Builder, + com.google.cloud.securitycenter.v2.LabelOrBuilder>( + labels_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + labels_ = null; + } + return labelsBuilder_; + } + + 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_; + /** + * + * + *
+     * The time that the container was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * The time that the container was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * + * @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(); + } + } + /** + * + * + *
+     * The time that the container was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The time that the container was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The time that the container was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The time that the container was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The time that the container was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time that the container was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * The time that the container was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + 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_; + } + + @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.v2.Container) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.Container) + private static final com.google.cloud.securitycenter.v2.Container DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.Container(); + } + + public static com.google.cloud.securitycenter.v2.Container getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Container parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.Container getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ContainerOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ContainerOrBuilder.java new file mode 100644 index 000000000000..e263a535e5f3 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ContainerOrBuilder.java @@ -0,0 +1,192 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/container.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface ContainerOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.Container) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the container.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the container.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Container image URI provided when configuring a pod or container. This
+   * string can identify a container image version using mutable tags.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * Container image URI provided when configuring a pod or container. This
+   * string can identify a container image version using mutable tags.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * Optional container image ID, if provided by the container runtime. Uniquely
+   * identifies the container image launched using a container image digest.
+   * 
+ * + * string image_id = 3; + * + * @return The imageId. + */ + java.lang.String getImageId(); + /** + * + * + *
+   * Optional container image ID, if provided by the container runtime. Uniquely
+   * identifies the container image launched using a container image digest.
+   * 
+ * + * string image_id = 3; + * + * @return The bytes for imageId. + */ + com.google.protobuf.ByteString getImageIdBytes(); + + /** + * + * + *
+   * Container labels, as provided by the container runtime.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 4; + */ + java.util.List getLabelsList(); + /** + * + * + *
+   * Container labels, as provided by the container runtime.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 4; + */ + com.google.cloud.securitycenter.v2.Label getLabels(int index); + /** + * + * + *
+   * Container labels, as provided by the container runtime.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 4; + */ + int getLabelsCount(); + /** + * + * + *
+   * Container labels, as provided by the container runtime.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 4; + */ + java.util.List + getLabelsOrBuilderList(); + /** + * + * + *
+   * Container labels, as provided by the container runtime.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 4; + */ + com.google.cloud.securitycenter.v2.LabelOrBuilder getLabelsOrBuilder(int index); + + /** + * + * + *
+   * The time that the container was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * The time that the container was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * The time that the container was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ContainerProto.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ContainerProto.java new file mode 100644 index 000000000000..f15b63b2afc8 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ContainerProto.java @@ -0,0 +1,80 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/container.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public final class ContainerProto { + private ContainerProto() {} + + 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_v2_Container_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_Container_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n.google/cloud/securitycenter/v2/contain" + + "er.proto\022\036google.cloud.securitycenter.v2" + + "\032*google/cloud/securitycenter/v2/label.p" + + "roto\032\037google/protobuf/timestamp.proto\"\240\001" + + "\n\tContainer\022\014\n\004name\030\001 \001(\t\022\013\n\003uri\030\002 \001(\t\022\020" + + "\n\010image_id\030\003 \001(\t\0225\n\006labels\030\004 \003(\0132%.googl" + + "e.cloud.securitycenter.v2.Label\022/\n\013creat" + + "e_time\030\005 \001(\0132\032.google.protobuf.Timestamp" + + "B\350\001\n\"com.google.cloud.securitycenter.v2B" + + "\016ContainerProtoP\001ZJcloud.google.com/go/s" + + "ecuritycenter/apiv2/securitycenterpb;sec" + + "uritycenterpb\252\002\036Google.Cloud.SecurityCen" + + "ter.V2\312\002\036Google\\Cloud\\SecurityCenter\\V2\352" + + "\002!Google::Cloud::SecurityCenter::V2b\006pro" + + "to3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.cloud.securitycenter.v2.LabelProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_securitycenter_v2_Container_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_securitycenter_v2_Container_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_Container_descriptor, + new java.lang.String[] { + "Name", "Uri", "ImageId", "Labels", "CreateTime", + }); + com.google.cloud.securitycenter.v2.LabelProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CreateBigQueryExportRequest.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CreateBigQueryExportRequest.java new file mode 100644 index 000000000000..4343cd47621c --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CreateBigQueryExportRequest.java @@ -0,0 +1,1176 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Request message for creating a BigQuery export.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.CreateBigQueryExportRequest} + */ +public final class CreateBigQueryExportRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.CreateBigQueryExportRequest) + CreateBigQueryExportRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateBigQueryExportRequest.newBuilder() to construct. + private CreateBigQueryExportRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateBigQueryExportRequest() { + parent_ = ""; + bigQueryExportId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateBigQueryExportRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_CreateBigQueryExportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_CreateBigQueryExportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest.class, + com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The name of the parent resource of the new BigQuery export. Its
+   * format is "organizations/[organization_id]/locations/[location_id]",
+   * "folders/[folder_id]/locations/[location_id]", or
+   * "projects/[project_id]/locations/[location_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 name of the parent resource of the new BigQuery export. Its
+   * format is "organizations/[organization_id]/locations/[location_id]",
+   * "folders/[folder_id]/locations/[location_id]", or
+   * "projects/[project_id]/locations/[location_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 BIG_QUERY_EXPORT_FIELD_NUMBER = 2; + private com.google.cloud.securitycenter.v2.BigQueryExport bigQueryExport_; + /** + * + * + *
+   * Required. The BigQuery export being created.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.BigQueryExport big_query_export = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the bigQueryExport field is set. + */ + @java.lang.Override + public boolean hasBigQueryExport() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The BigQuery export being created.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.BigQueryExport big_query_export = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bigQueryExport. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.BigQueryExport getBigQueryExport() { + return bigQueryExport_ == null + ? com.google.cloud.securitycenter.v2.BigQueryExport.getDefaultInstance() + : bigQueryExport_; + } + /** + * + * + *
+   * Required. The BigQuery export being created.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.BigQueryExport big_query_export = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.BigQueryExportOrBuilder getBigQueryExportOrBuilder() { + return bigQueryExport_ == null + ? com.google.cloud.securitycenter.v2.BigQueryExport.getDefaultInstance() + : bigQueryExport_; + } + + public static final int BIG_QUERY_EXPORT_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object bigQueryExportId_ = ""; + /** + * + * + *
+   * Required. Unique identifier provided by the client within the parent scope.
+   * It must consist of only lowercase letters, numbers, and hyphens, must start
+   * with a letter, must end with either a letter or a number, and must be 63
+   * characters or less.
+   * 
+ * + * string big_query_export_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bigQueryExportId. + */ + @java.lang.Override + public java.lang.String getBigQueryExportId() { + java.lang.Object ref = bigQueryExportId_; + 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(); + bigQueryExportId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Unique identifier provided by the client within the parent scope.
+   * It must consist of only lowercase letters, numbers, and hyphens, must start
+   * with a letter, must end with either a letter or a number, and must be 63
+   * characters or less.
+   * 
+ * + * string big_query_export_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for bigQueryExportId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBigQueryExportIdBytes() { + java.lang.Object ref = bigQueryExportId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + bigQueryExportId_ = 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getBigQueryExport()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bigQueryExportId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, bigQueryExportId_); + } + getUnknownFields().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 (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getBigQueryExport()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bigQueryExportId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, bigQueryExportId_); + } + size += getUnknownFields().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.v2.CreateBigQueryExportRequest)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest other = + (com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasBigQueryExport() != other.hasBigQueryExport()) return false; + if (hasBigQueryExport()) { + if (!getBigQueryExport().equals(other.getBigQueryExport())) return false; + } + if (!getBigQueryExportId().equals(other.getBigQueryExportId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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 (hasBigQueryExport()) { + hash = (37 * hash) + BIG_QUERY_EXPORT_FIELD_NUMBER; + hash = (53 * hash) + getBigQueryExport().hashCode(); + } + hash = (37 * hash) + BIG_QUERY_EXPORT_ID_FIELD_NUMBER; + hash = (53 * hash) + getBigQueryExportId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest 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.v2.CreateBigQueryExportRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest 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.v2.CreateBigQueryExportRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest 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.v2.CreateBigQueryExportRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest 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.v2.CreateBigQueryExportRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest 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.v2.CreateBigQueryExportRequest 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 BigQuery export.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.CreateBigQueryExportRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.CreateBigQueryExportRequest) + com.google.cloud.securitycenter.v2.CreateBigQueryExportRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_CreateBigQueryExportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_CreateBigQueryExportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest.class, + com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getBigQueryExportFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + bigQueryExport_ = null; + if (bigQueryExportBuilder_ != null) { + bigQueryExportBuilder_.dispose(); + bigQueryExportBuilder_ = null; + } + bigQueryExportId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_CreateBigQueryExportRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest + getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest build() { + com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest buildPartial() { + com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest result = + new com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.bigQueryExport_ = + bigQueryExportBuilder_ == null ? bigQueryExport_ : bigQueryExportBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.bigQueryExportId_ = bigQueryExportId_; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v2.CreateBigQueryExportRequest) { + return mergeFrom((com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest other) { + if (other + == com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasBigQueryExport()) { + mergeBigQueryExport(other.getBigQueryExport()); + } + if (!other.getBigQueryExportId().isEmpty()) { + bigQueryExportId_ = other.bigQueryExportId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getBigQueryExportFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + bigQueryExportId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The name of the parent resource of the new BigQuery export. Its
+     * format is "organizations/[organization_id]/locations/[location_id]",
+     * "folders/[folder_id]/locations/[location_id]", or
+     * "projects/[project_id]/locations/[location_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 name of the parent resource of the new BigQuery export. Its
+     * format is "organizations/[organization_id]/locations/[location_id]",
+     * "folders/[folder_id]/locations/[location_id]", or
+     * "projects/[project_id]/locations/[location_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 name of the parent resource of the new BigQuery export. Its
+     * format is "organizations/[organization_id]/locations/[location_id]",
+     * "folders/[folder_id]/locations/[location_id]", or
+     * "projects/[project_id]/locations/[location_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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the parent resource of the new BigQuery export. Its
+     * format is "organizations/[organization_id]/locations/[location_id]",
+     * "folders/[folder_id]/locations/[location_id]", or
+     * "projects/[project_id]/locations/[location_id]".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the parent resource of the new BigQuery export. Its
+     * format is "organizations/[organization_id]/locations/[location_id]",
+     * "folders/[folder_id]/locations/[location_id]", or
+     * "projects/[project_id]/locations/[location_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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.securitycenter.v2.BigQueryExport bigQueryExport_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.BigQueryExport, + com.google.cloud.securitycenter.v2.BigQueryExport.Builder, + com.google.cloud.securitycenter.v2.BigQueryExportOrBuilder> + bigQueryExportBuilder_; + /** + * + * + *
+     * Required. The BigQuery export being created.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.BigQueryExport big_query_export = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the bigQueryExport field is set. + */ + public boolean hasBigQueryExport() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The BigQuery export being created.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.BigQueryExport big_query_export = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bigQueryExport. + */ + public com.google.cloud.securitycenter.v2.BigQueryExport getBigQueryExport() { + if (bigQueryExportBuilder_ == null) { + return bigQueryExport_ == null + ? com.google.cloud.securitycenter.v2.BigQueryExport.getDefaultInstance() + : bigQueryExport_; + } else { + return bigQueryExportBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The BigQuery export being created.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.BigQueryExport big_query_export = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBigQueryExport(com.google.cloud.securitycenter.v2.BigQueryExport value) { + if (bigQueryExportBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + bigQueryExport_ = value; + } else { + bigQueryExportBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The BigQuery export being created.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.BigQueryExport big_query_export = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBigQueryExport( + com.google.cloud.securitycenter.v2.BigQueryExport.Builder builderForValue) { + if (bigQueryExportBuilder_ == null) { + bigQueryExport_ = builderForValue.build(); + } else { + bigQueryExportBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The BigQuery export being created.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.BigQueryExport big_query_export = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeBigQueryExport(com.google.cloud.securitycenter.v2.BigQueryExport value) { + if (bigQueryExportBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && bigQueryExport_ != null + && bigQueryExport_ + != com.google.cloud.securitycenter.v2.BigQueryExport.getDefaultInstance()) { + getBigQueryExportBuilder().mergeFrom(value); + } else { + bigQueryExport_ = value; + } + } else { + bigQueryExportBuilder_.mergeFrom(value); + } + if (bigQueryExport_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The BigQuery export being created.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.BigQueryExport big_query_export = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearBigQueryExport() { + bitField0_ = (bitField0_ & ~0x00000002); + bigQueryExport_ = null; + if (bigQueryExportBuilder_ != null) { + bigQueryExportBuilder_.dispose(); + bigQueryExportBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The BigQuery export being created.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.BigQueryExport big_query_export = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.securitycenter.v2.BigQueryExport.Builder getBigQueryExportBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getBigQueryExportFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The BigQuery export being created.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.BigQueryExport big_query_export = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.securitycenter.v2.BigQueryExportOrBuilder getBigQueryExportOrBuilder() { + if (bigQueryExportBuilder_ != null) { + return bigQueryExportBuilder_.getMessageOrBuilder(); + } else { + return bigQueryExport_ == null + ? com.google.cloud.securitycenter.v2.BigQueryExport.getDefaultInstance() + : bigQueryExport_; + } + } + /** + * + * + *
+     * Required. The BigQuery export being created.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.BigQueryExport big_query_export = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.BigQueryExport, + com.google.cloud.securitycenter.v2.BigQueryExport.Builder, + com.google.cloud.securitycenter.v2.BigQueryExportOrBuilder> + getBigQueryExportFieldBuilder() { + if (bigQueryExportBuilder_ == null) { + bigQueryExportBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.BigQueryExport, + com.google.cloud.securitycenter.v2.BigQueryExport.Builder, + com.google.cloud.securitycenter.v2.BigQueryExportOrBuilder>( + getBigQueryExport(), getParentForChildren(), isClean()); + bigQueryExport_ = null; + } + return bigQueryExportBuilder_; + } + + private java.lang.Object bigQueryExportId_ = ""; + /** + * + * + *
+     * Required. Unique identifier provided by the client within the parent scope.
+     * It must consist of only lowercase letters, numbers, and hyphens, must start
+     * with a letter, must end with either a letter or a number, and must be 63
+     * characters or less.
+     * 
+ * + * string big_query_export_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bigQueryExportId. + */ + public java.lang.String getBigQueryExportId() { + java.lang.Object ref = bigQueryExportId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bigQueryExportId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Unique identifier provided by the client within the parent scope.
+     * It must consist of only lowercase letters, numbers, and hyphens, must start
+     * with a letter, must end with either a letter or a number, and must be 63
+     * characters or less.
+     * 
+ * + * string big_query_export_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for bigQueryExportId. + */ + public com.google.protobuf.ByteString getBigQueryExportIdBytes() { + java.lang.Object ref = bigQueryExportId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + bigQueryExportId_ = 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 only lowercase letters, numbers, and hyphens, must start
+     * with a letter, must end with either a letter or a number, and must be 63
+     * characters or less.
+     * 
+ * + * string big_query_export_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bigQueryExportId to set. + * @return This builder for chaining. + */ + public Builder setBigQueryExportId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bigQueryExportId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Unique identifier provided by the client within the parent scope.
+     * It must consist of only lowercase letters, numbers, and hyphens, must start
+     * with a letter, must end with either a letter or a number, and must be 63
+     * characters or less.
+     * 
+ * + * string big_query_export_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearBigQueryExportId() { + bigQueryExportId_ = getDefaultInstance().getBigQueryExportId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Unique identifier provided by the client within the parent scope.
+     * It must consist of only lowercase letters, numbers, and hyphens, must start
+     * with a letter, must end with either a letter or a number, and must be 63
+     * characters or less.
+     * 
+ * + * string big_query_export_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for bigQueryExportId to set. + * @return This builder for chaining. + */ + public Builder setBigQueryExportIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + bigQueryExportId_ = value; + bitField0_ |= 0x00000004; + 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.v2.CreateBigQueryExportRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.CreateBigQueryExportRequest) + private static final com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest(); + } + + public static com.google.cloud.securitycenter.v2.CreateBigQueryExportRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateBigQueryExportRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.CreateBigQueryExportRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CreateBigQueryExportRequestOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CreateBigQueryExportRequestOrBuilder.java new file mode 100644 index 000000000000..47df3e5d1d38 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CreateBigQueryExportRequestOrBuilder.java @@ -0,0 +1,133 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface CreateBigQueryExportRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.CreateBigQueryExportRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the parent resource of the new BigQuery export. Its
+   * format is "organizations/[organization_id]/locations/[location_id]",
+   * "folders/[folder_id]/locations/[location_id]", or
+   * "projects/[project_id]/locations/[location_id]".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The name of the parent resource of the new BigQuery export. Its
+   * format is "organizations/[organization_id]/locations/[location_id]",
+   * "folders/[folder_id]/locations/[location_id]", or
+   * "projects/[project_id]/locations/[location_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 BigQuery export being created.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.BigQueryExport big_query_export = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the bigQueryExport field is set. + */ + boolean hasBigQueryExport(); + /** + * + * + *
+   * Required. The BigQuery export being created.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.BigQueryExport big_query_export = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bigQueryExport. + */ + com.google.cloud.securitycenter.v2.BigQueryExport getBigQueryExport(); + /** + * + * + *
+   * Required. The BigQuery export being created.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.BigQueryExport big_query_export = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.securitycenter.v2.BigQueryExportOrBuilder getBigQueryExportOrBuilder(); + + /** + * + * + *
+   * Required. Unique identifier provided by the client within the parent scope.
+   * It must consist of only lowercase letters, numbers, and hyphens, must start
+   * with a letter, must end with either a letter or a number, and must be 63
+   * characters or less.
+   * 
+ * + * string big_query_export_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bigQueryExportId. + */ + java.lang.String getBigQueryExportId(); + /** + * + * + *
+   * Required. Unique identifier provided by the client within the parent scope.
+   * It must consist of only lowercase letters, numbers, and hyphens, must start
+   * with a letter, must end with either a letter or a number, and must be 63
+   * characters or less.
+   * 
+ * + * string big_query_export_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for bigQueryExportId. + */ + com.google.protobuf.ByteString getBigQueryExportIdBytes(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CreateFindingRequest.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CreateFindingRequest.java new file mode 100644 index 000000000000..de57afa68b6d --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CreateFindingRequest.java @@ -0,0 +1,1186 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Request message for creating a finding.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.CreateFindingRequest} + */ +public final class CreateFindingRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.CreateFindingRequest) + CreateFindingRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateFindingRequest.newBuilder() to construct. + private CreateFindingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateFindingRequest() { + parent_ = ""; + findingId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateFindingRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_CreateFindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_CreateFindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.CreateFindingRequest.class, + com.google.cloud.securitycenter.v2.CreateFindingRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Resource name of the new finding's parent. The following list
+   * shows some examples of the format:
+   * +
+   * `organizations/[organization_id]/sources/[source_id]`
+   * +
+   * `organizations/[organization_id]/sources/[source_id]/locations/[location_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 finding's parent. The following list
+   * shows some examples of the format:
+   * +
+   * `organizations/[organization_id]/sources/[source_id]`
+   * +
+   * `organizations/[organization_id]/sources/[source_id]/locations/[location_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 FINDING_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object findingId_ = ""; + /** + * + * + *
+   * Required. Unique identifier provided by the client within the parent scope.
+   * It must be alphanumeric and less than or equal to 32 characters and
+   * greater than 0 characters in length.
+   * 
+ * + * string finding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The findingId. + */ + @java.lang.Override + public java.lang.String getFindingId() { + java.lang.Object ref = findingId_; + 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(); + findingId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Unique identifier provided by the client within the parent scope.
+   * It must be alphanumeric and less than or equal to 32 characters and
+   * greater than 0 characters in length.
+   * 
+ * + * string finding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for findingId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFindingIdBytes() { + java.lang.Object ref = findingId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + findingId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FINDING_FIELD_NUMBER = 3; + private com.google.cloud.securitycenter.v2.Finding finding_; + /** + * + * + *
+   * Required. The Finding being created. The name and security_marks will be
+   * ignored as they are both output only fields on this resource.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the finding field is set. + */ + @java.lang.Override + public boolean hasFinding() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The Finding being created. The name and security_marks will be
+   * ignored as they are both output only fields on this resource.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The finding. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Finding getFinding() { + return finding_ == null + ? com.google.cloud.securitycenter.v2.Finding.getDefaultInstance() + : finding_; + } + /** + * + * + *
+   * Required. The Finding being created. The name and security_marks will be
+   * ignored as they are both output only fields on this resource.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.FindingOrBuilder getFindingOrBuilder() { + return finding_ == null + ? com.google.cloud.securitycenter.v2.Finding.getDefaultInstance() + : finding_; + } + + 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(findingId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, findingId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getFinding()); + } + getUnknownFields().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(findingId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, findingId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getFinding()); + } + size += getUnknownFields().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.v2.CreateFindingRequest)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.CreateFindingRequest other = + (com.google.cloud.securitycenter.v2.CreateFindingRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFindingId().equals(other.getFindingId())) return false; + if (hasFinding() != other.hasFinding()) return false; + if (hasFinding()) { + if (!getFinding().equals(other.getFinding())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + FINDING_ID_FIELD_NUMBER; + hash = (53 * hash) + getFindingId().hashCode(); + if (hasFinding()) { + hash = (37 * hash) + FINDING_FIELD_NUMBER; + hash = (53 * hash) + getFinding().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.CreateFindingRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.CreateFindingRequest 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.v2.CreateFindingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.CreateFindingRequest 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.v2.CreateFindingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.CreateFindingRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.CreateFindingRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.CreateFindingRequest 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.v2.CreateFindingRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.CreateFindingRequest 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.v2.CreateFindingRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.CreateFindingRequest 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.v2.CreateFindingRequest 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 finding.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.CreateFindingRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.CreateFindingRequest) + com.google.cloud.securitycenter.v2.CreateFindingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_CreateFindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_CreateFindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.CreateFindingRequest.class, + com.google.cloud.securitycenter.v2.CreateFindingRequest.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.CreateFindingRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getFindingFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + findingId_ = ""; + finding_ = null; + if (findingBuilder_ != null) { + findingBuilder_.dispose(); + findingBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_CreateFindingRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.CreateFindingRequest getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.CreateFindingRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.CreateFindingRequest build() { + com.google.cloud.securitycenter.v2.CreateFindingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.CreateFindingRequest buildPartial() { + com.google.cloud.securitycenter.v2.CreateFindingRequest result = + new com.google.cloud.securitycenter.v2.CreateFindingRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.CreateFindingRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.findingId_ = findingId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.finding_ = findingBuilder_ == null ? finding_ : findingBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v2.CreateFindingRequest) { + return mergeFrom((com.google.cloud.securitycenter.v2.CreateFindingRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.CreateFindingRequest other) { + if (other == com.google.cloud.securitycenter.v2.CreateFindingRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFindingId().isEmpty()) { + findingId_ = other.findingId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasFinding()) { + mergeFinding(other.getFinding()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + findingId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getFindingFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Resource name of the new finding's parent. The following list
+     * shows some examples of the format:
+     * +
+     * `organizations/[organization_id]/sources/[source_id]`
+     * +
+     * `organizations/[organization_id]/sources/[source_id]/locations/[location_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 finding's parent. The following list
+     * shows some examples of the format:
+     * +
+     * `organizations/[organization_id]/sources/[source_id]`
+     * +
+     * `organizations/[organization_id]/sources/[source_id]/locations/[location_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 finding's parent. The following list
+     * shows some examples of the format:
+     * +
+     * `organizations/[organization_id]/sources/[source_id]`
+     * +
+     * `organizations/[organization_id]/sources/[source_id]/locations/[location_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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the new finding's parent. The following list
+     * shows some examples of the format:
+     * +
+     * `organizations/[organization_id]/sources/[source_id]`
+     * +
+     * `organizations/[organization_id]/sources/[source_id]/locations/[location_id]`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the new finding's parent. The following list
+     * shows some examples of the format:
+     * +
+     * `organizations/[organization_id]/sources/[source_id]`
+     * +
+     * `organizations/[organization_id]/sources/[source_id]/locations/[location_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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object findingId_ = ""; + /** + * + * + *
+     * Required. Unique identifier provided by the client within the parent scope.
+     * It must be alphanumeric and less than or equal to 32 characters and
+     * greater than 0 characters in length.
+     * 
+ * + * string finding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The findingId. + */ + public java.lang.String getFindingId() { + java.lang.Object ref = findingId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + findingId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Unique identifier provided by the client within the parent scope.
+     * It must be alphanumeric and less than or equal to 32 characters and
+     * greater than 0 characters in length.
+     * 
+ * + * string finding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for findingId. + */ + public com.google.protobuf.ByteString getFindingIdBytes() { + java.lang.Object ref = findingId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + findingId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Unique identifier provided by the client within the parent scope.
+     * It must be alphanumeric and less than or equal to 32 characters and
+     * greater than 0 characters in length.
+     * 
+ * + * string finding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The findingId to set. + * @return This builder for chaining. + */ + public Builder setFindingId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + findingId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Unique identifier provided by the client within the parent scope.
+     * It must be alphanumeric and less than or equal to 32 characters and
+     * greater than 0 characters in length.
+     * 
+ * + * string finding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearFindingId() { + findingId_ = getDefaultInstance().getFindingId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Unique identifier provided by the client within the parent scope.
+     * It must be alphanumeric and less than or equal to 32 characters and
+     * greater than 0 characters in length.
+     * 
+ * + * string finding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for findingId to set. + * @return This builder for chaining. + */ + public Builder setFindingIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + findingId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.securitycenter.v2.Finding finding_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Finding, + com.google.cloud.securitycenter.v2.Finding.Builder, + com.google.cloud.securitycenter.v2.FindingOrBuilder> + findingBuilder_; + /** + * + * + *
+     * Required. The Finding being created. The name and security_marks will be
+     * ignored as they are both output only fields on this resource.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the finding field is set. + */ + public boolean hasFinding() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The Finding being created. The name and security_marks will be
+     * ignored as they are both output only fields on this resource.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The finding. + */ + public com.google.cloud.securitycenter.v2.Finding getFinding() { + if (findingBuilder_ == null) { + return finding_ == null + ? com.google.cloud.securitycenter.v2.Finding.getDefaultInstance() + : finding_; + } else { + return findingBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The Finding being created. The name and security_marks will be
+     * ignored as they are both output only fields on this resource.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFinding(com.google.cloud.securitycenter.v2.Finding value) { + if (findingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + finding_ = value; + } else { + findingBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Finding being created. The name and security_marks will be
+     * ignored as they are both output only fields on this resource.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFinding(com.google.cloud.securitycenter.v2.Finding.Builder builderForValue) { + if (findingBuilder_ == null) { + finding_ = builderForValue.build(); + } else { + findingBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Finding being created. The name and security_marks will be
+     * ignored as they are both output only fields on this resource.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeFinding(com.google.cloud.securitycenter.v2.Finding value) { + if (findingBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && finding_ != null + && finding_ != com.google.cloud.securitycenter.v2.Finding.getDefaultInstance()) { + getFindingBuilder().mergeFrom(value); + } else { + finding_ = value; + } + } else { + findingBuilder_.mergeFrom(value); + } + if (finding_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The Finding being created. The name and security_marks will be
+     * ignored as they are both output only fields on this resource.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearFinding() { + bitField0_ = (bitField0_ & ~0x00000004); + finding_ = null; + if (findingBuilder_ != null) { + findingBuilder_.dispose(); + findingBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Finding being created. The name and security_marks will be
+     * ignored as they are both output only fields on this resource.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.securitycenter.v2.Finding.Builder getFindingBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getFindingFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The Finding being created. The name and security_marks will be
+     * ignored as they are both output only fields on this resource.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.securitycenter.v2.FindingOrBuilder getFindingOrBuilder() { + if (findingBuilder_ != null) { + return findingBuilder_.getMessageOrBuilder(); + } else { + return finding_ == null + ? com.google.cloud.securitycenter.v2.Finding.getDefaultInstance() + : finding_; + } + } + /** + * + * + *
+     * Required. The Finding being created. The name and security_marks will be
+     * ignored as they are both output only fields on this resource.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Finding, + com.google.cloud.securitycenter.v2.Finding.Builder, + com.google.cloud.securitycenter.v2.FindingOrBuilder> + getFindingFieldBuilder() { + if (findingBuilder_ == null) { + findingBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Finding, + com.google.cloud.securitycenter.v2.Finding.Builder, + com.google.cloud.securitycenter.v2.FindingOrBuilder>( + getFinding(), getParentForChildren(), isClean()); + finding_ = null; + } + return findingBuilder_; + } + + @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.v2.CreateFindingRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.CreateFindingRequest) + private static final com.google.cloud.securitycenter.v2.CreateFindingRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.CreateFindingRequest(); + } + + public static com.google.cloud.securitycenter.v2.CreateFindingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateFindingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.CreateFindingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CreateFindingRequestOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CreateFindingRequestOrBuilder.java new file mode 100644 index 000000000000..86375a788ea5 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CreateFindingRequestOrBuilder.java @@ -0,0 +1,138 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface CreateFindingRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.CreateFindingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Resource name of the new finding's parent. The following list
+   * shows some examples of the format:
+   * +
+   * `organizations/[organization_id]/sources/[source_id]`
+   * +
+   * `organizations/[organization_id]/sources/[source_id]/locations/[location_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 finding's parent. The following list
+   * shows some examples of the format:
+   * +
+   * `organizations/[organization_id]/sources/[source_id]`
+   * +
+   * `organizations/[organization_id]/sources/[source_id]/locations/[location_id]`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Unique identifier provided by the client within the parent scope.
+   * It must be alphanumeric and less than or equal to 32 characters and
+   * greater than 0 characters in length.
+   * 
+ * + * string finding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The findingId. + */ + java.lang.String getFindingId(); + /** + * + * + *
+   * Required. Unique identifier provided by the client within the parent scope.
+   * It must be alphanumeric and less than or equal to 32 characters and
+   * greater than 0 characters in length.
+   * 
+ * + * string finding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for findingId. + */ + com.google.protobuf.ByteString getFindingIdBytes(); + + /** + * + * + *
+   * Required. The Finding being created. The name and security_marks will be
+   * ignored as they are both output only fields on this resource.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the finding field is set. + */ + boolean hasFinding(); + /** + * + * + *
+   * Required. The Finding being created. The name and security_marks will be
+   * ignored as they are both output only fields on this resource.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The finding. + */ + com.google.cloud.securitycenter.v2.Finding getFinding(); + /** + * + * + *
+   * Required. The Finding being created. The name and security_marks will be
+   * ignored as they are both output only fields on this resource.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.securitycenter.v2.FindingOrBuilder getFindingOrBuilder(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CreateMuteConfigRequest.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CreateMuteConfigRequest.java new file mode 100644 index 000000000000..408223cd4bd3 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CreateMuteConfigRequest.java @@ -0,0 +1,1168 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Request message for creating a mute config.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.CreateMuteConfigRequest} + */ +public final class CreateMuteConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.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(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_CreateMuteConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_CreateMuteConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.CreateMuteConfigRequest.class, + com.google.cloud.securitycenter.v2.CreateMuteConfigRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Resource name of the new mute configs's parent. Its format is
+   * "organizations/[organization_id]/locations/[location_id]",
+   * "folders/[folder_id]/locations/[location_id]", or
+   * "projects/[project_id]/locations/[location_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]/locations/[location_id]",
+   * "folders/[folder_id]/locations/[location_id]", or
+   * "projects/[project_id]/locations/[location_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.v2.MuteConfig muteConfig_; + /** + * + * + *
+   * Required. The mute config being created.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the muteConfig field is set. + */ + @java.lang.Override + public boolean hasMuteConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The mute config being created.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The muteConfig. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.MuteConfig getMuteConfig() { + return muteConfig_ == null + ? com.google.cloud.securitycenter.v2.MuteConfig.getDefaultInstance() + : muteConfig_; + } + /** + * + * + *
+   * Required. The mute config being created.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.MuteConfigOrBuilder getMuteConfigOrBuilder() { + return muteConfig_ == null + ? com.google.cloud.securitycenter.v2.MuteConfig.getDefaultInstance() + : muteConfig_; + } + + public static final int MUTE_CONFIG_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object muteConfigId_ = ""; + /** + * + * + *
+   * Required. Unique identifier provided by the client within the parent scope.
+   * It must consist of only lowercase letters, numbers, and hyphens, must start
+   * with a letter, must end with either a letter or a number, and must be 63
+   * characters or less.
+   * 
+ * + * 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 only lowercase letters, numbers, and hyphens, must start
+   * with a letter, must end with either a letter or a number, and must be 63
+   * characters or less.
+   * 
+ * + * 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getMuteConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(muteConfigId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, muteConfigId_); + } + getUnknownFields().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 (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMuteConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(muteConfigId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, muteConfigId_); + } + size += getUnknownFields().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.v2.CreateMuteConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.CreateMuteConfigRequest other = + (com.google.cloud.securitycenter.v2.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 (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.CreateMuteConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.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.v2.CreateMuteConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.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.v2.CreateMuteConfigRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.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.v2.CreateMuteConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.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.v2.CreateMuteConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.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.v2.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.v2.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.v2.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.v2.CreateMuteConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.CreateMuteConfigRequest) + com.google.cloud.securitycenter.v2.CreateMuteConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_CreateMuteConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_CreateMuteConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.CreateMuteConfigRequest.class, + com.google.cloud.securitycenter.v2.CreateMuteConfigRequest.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.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) { + getMuteConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + muteConfig_ = null; + if (muteConfigBuilder_ != null) { + muteConfigBuilder_.dispose(); + muteConfigBuilder_ = null; + } + muteConfigId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_CreateMuteConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.CreateMuteConfigRequest getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.CreateMuteConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.CreateMuteConfigRequest build() { + com.google.cloud.securitycenter.v2.CreateMuteConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.CreateMuteConfigRequest buildPartial() { + com.google.cloud.securitycenter.v2.CreateMuteConfigRequest result = + new com.google.cloud.securitycenter.v2.CreateMuteConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.CreateMuteConfigRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.muteConfig_ = muteConfigBuilder_ == null ? muteConfig_ : muteConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.muteConfigId_ = muteConfigId_; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v2.CreateMuteConfigRequest) { + return mergeFrom((com.google.cloud.securitycenter.v2.CreateMuteConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.CreateMuteConfigRequest other) { + if (other == com.google.cloud.securitycenter.v2.CreateMuteConfigRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasMuteConfig()) { + mergeMuteConfig(other.getMuteConfig()); + } + if (!other.getMuteConfigId().isEmpty()) { + muteConfigId_ = other.muteConfigId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getMuteConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + muteConfigId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Resource name of the new mute configs's parent. Its format is
+     * "organizations/[organization_id]/locations/[location_id]",
+     * "folders/[folder_id]/locations/[location_id]", or
+     * "projects/[project_id]/locations/[location_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]/locations/[location_id]",
+     * "folders/[folder_id]/locations/[location_id]", or
+     * "projects/[project_id]/locations/[location_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]/locations/[location_id]",
+     * "folders/[folder_id]/locations/[location_id]", or
+     * "projects/[project_id]/locations/[location_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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the new mute configs's parent. Its format is
+     * "organizations/[organization_id]/locations/[location_id]",
+     * "folders/[folder_id]/locations/[location_id]", or
+     * "projects/[project_id]/locations/[location_id]".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the new mute configs's parent. Its format is
+     * "organizations/[organization_id]/locations/[location_id]",
+     * "folders/[folder_id]/locations/[location_id]", or
+     * "projects/[project_id]/locations/[location_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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.securitycenter.v2.MuteConfig muteConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.MuteConfig, + com.google.cloud.securitycenter.v2.MuteConfig.Builder, + com.google.cloud.securitycenter.v2.MuteConfigOrBuilder> + muteConfigBuilder_; + /** + * + * + *
+     * Required. The mute config being created.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the muteConfig field is set. + */ + public boolean hasMuteConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The mute config being created.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The muteConfig. + */ + public com.google.cloud.securitycenter.v2.MuteConfig getMuteConfig() { + if (muteConfigBuilder_ == null) { + return muteConfig_ == null + ? com.google.cloud.securitycenter.v2.MuteConfig.getDefaultInstance() + : muteConfig_; + } else { + return muteConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The mute config being created.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMuteConfig(com.google.cloud.securitycenter.v2.MuteConfig value) { + if (muteConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + muteConfig_ = value; + } else { + muteConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The mute config being created.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMuteConfig( + com.google.cloud.securitycenter.v2.MuteConfig.Builder builderForValue) { + if (muteConfigBuilder_ == null) { + muteConfig_ = builderForValue.build(); + } else { + muteConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The mute config being created.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeMuteConfig(com.google.cloud.securitycenter.v2.MuteConfig value) { + if (muteConfigBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && muteConfig_ != null + && muteConfig_ != com.google.cloud.securitycenter.v2.MuteConfig.getDefaultInstance()) { + getMuteConfigBuilder().mergeFrom(value); + } else { + muteConfig_ = value; + } + } else { + muteConfigBuilder_.mergeFrom(value); + } + if (muteConfig_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The mute config being created.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearMuteConfig() { + bitField0_ = (bitField0_ & ~0x00000002); + muteConfig_ = null; + if (muteConfigBuilder_ != null) { + muteConfigBuilder_.dispose(); + muteConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The mute config being created.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.securitycenter.v2.MuteConfig.Builder getMuteConfigBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getMuteConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The mute config being created.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.securitycenter.v2.MuteConfigOrBuilder getMuteConfigOrBuilder() { + if (muteConfigBuilder_ != null) { + return muteConfigBuilder_.getMessageOrBuilder(); + } else { + return muteConfig_ == null + ? com.google.cloud.securitycenter.v2.MuteConfig.getDefaultInstance() + : muteConfig_; + } + } + /** + * + * + *
+     * Required. The mute config being created.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.MuteConfig, + com.google.cloud.securitycenter.v2.MuteConfig.Builder, + com.google.cloud.securitycenter.v2.MuteConfigOrBuilder> + getMuteConfigFieldBuilder() { + if (muteConfigBuilder_ == null) { + muteConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.MuteConfig, + com.google.cloud.securitycenter.v2.MuteConfig.Builder, + com.google.cloud.securitycenter.v2.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 only lowercase letters, numbers, and hyphens, must start
+     * with a letter, must end with either a letter or a number, and must be 63
+     * characters or less.
+     * 
+ * + * 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 only lowercase letters, numbers, and hyphens, must start
+     * with a letter, must end with either a letter or a number, and must be 63
+     * characters or less.
+     * 
+ * + * 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 only lowercase letters, numbers, and hyphens, must start
+     * with a letter, must end with either a letter or a number, and must be 63
+     * characters or less.
+     * 
+ * + * 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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Unique identifier provided by the client within the parent scope.
+     * It must consist of only lowercase letters, numbers, and hyphens, must start
+     * with a letter, must end with either a letter or a number, and must be 63
+     * characters or less.
+     * 
+ * + * string mute_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMuteConfigId() { + muteConfigId_ = getDefaultInstance().getMuteConfigId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Unique identifier provided by the client within the parent scope.
+     * It must consist of only lowercase letters, numbers, and hyphens, must start
+     * with a letter, must end with either a letter or a number, and must be 63
+     * characters or less.
+     * 
+ * + * 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; + bitField0_ |= 0x00000004; + 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.v2.CreateMuteConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.CreateMuteConfigRequest) + private static final com.google.cloud.securitycenter.v2.CreateMuteConfigRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.CreateMuteConfigRequest(); + } + + public static com.google.cloud.securitycenter.v2.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 { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.CreateMuteConfigRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CreateMuteConfigRequestOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CreateMuteConfigRequestOrBuilder.java new file mode 100644 index 000000000000..d58c0fe8fe2e --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CreateMuteConfigRequestOrBuilder.java @@ -0,0 +1,133 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface CreateMuteConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.CreateMuteConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Resource name of the new mute configs's parent. Its format is
+   * "organizations/[organization_id]/locations/[location_id]",
+   * "folders/[folder_id]/locations/[location_id]", or
+   * "projects/[project_id]/locations/[location_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]/locations/[location_id]",
+   * "folders/[folder_id]/locations/[location_id]", or
+   * "projects/[project_id]/locations/[location_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.v2.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.v2.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The muteConfig. + */ + com.google.cloud.securitycenter.v2.MuteConfig getMuteConfig(); + /** + * + * + *
+   * Required. The mute config being created.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.securitycenter.v2.MuteConfigOrBuilder getMuteConfigOrBuilder(); + + /** + * + * + *
+   * Required. Unique identifier provided by the client within the parent scope.
+   * It must consist of only lowercase letters, numbers, and hyphens, must start
+   * with a letter, must end with either a letter or a number, and must be 63
+   * characters or less.
+   * 
+ * + * 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 only lowercase letters, numbers, and hyphens, must start
+   * with a letter, must end with either a letter or a number, and must be 63
+   * characters or less.
+   * 
+ * + * string mute_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for muteConfigId. + */ + com.google.protobuf.ByteString getMuteConfigIdBytes(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CreateNotificationConfigRequest.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CreateNotificationConfigRequest.java new file mode 100644 index 000000000000..020532d103d7 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CreateNotificationConfigRequest.java @@ -0,0 +1,1214 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Request message for creating a notification config.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.CreateNotificationConfigRequest} + */ +public final class CreateNotificationConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.CreateNotificationConfigRequest) + CreateNotificationConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateNotificationConfigRequest.newBuilder() to construct. + private CreateNotificationConfigRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateNotificationConfigRequest() { + parent_ = ""; + configId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateNotificationConfigRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_CreateNotificationConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_CreateNotificationConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest.class, + com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Resource name of the new notification config's parent. Its format
+   * is "organizations/[organization_id]/locations/[location_id]",
+   * "folders/[folder_id]/locations/[location_id]", or
+   * "projects/[project_id]/locations/[location_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 notification config's parent. Its format
+   * is "organizations/[organization_id]/locations/[location_id]",
+   * "folders/[folder_id]/locations/[location_id]", or
+   * "projects/[project_id]/locations/[location_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 CONFIG_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object configId_ = ""; + /** + * + * + *
+   * Required.
+   * Unique identifier provided by the client within the parent scope.
+   * It must be between 1 and 128 characters and contain alphanumeric
+   * characters, underscores, or hyphens only.
+   * 
+ * + * string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The configId. + */ + @java.lang.Override + public java.lang.String getConfigId() { + java.lang.Object ref = configId_; + 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(); + configId_ = s; + return s; + } + } + /** + * + * + *
+   * Required.
+   * Unique identifier provided by the client within the parent scope.
+   * It must be between 1 and 128 characters and contain alphanumeric
+   * characters, underscores, or hyphens only.
+   * 
+ * + * string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for configId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConfigIdBytes() { + java.lang.Object ref = configId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + configId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NOTIFICATION_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.securitycenter.v2.NotificationConfig notificationConfig_; + /** + * + * + *
+   * Required. The notification config being created. The name and the service
+   * account will be ignored as they are both output only fields on this
+   * resource.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the notificationConfig field is set. + */ + @java.lang.Override + public boolean hasNotificationConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The notification config being created. The name and the service
+   * account will be ignored as they are both output only fields on this
+   * resource.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The notificationConfig. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.NotificationConfig getNotificationConfig() { + return notificationConfig_ == null + ? com.google.cloud.securitycenter.v2.NotificationConfig.getDefaultInstance() + : notificationConfig_; + } + /** + * + * + *
+   * Required. The notification config being created. The name and the service
+   * account will be ignored as they are both output only fields on this
+   * resource.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.NotificationConfigOrBuilder + getNotificationConfigOrBuilder() { + return notificationConfig_ == null + ? com.google.cloud.securitycenter.v2.NotificationConfig.getDefaultInstance() + : notificationConfig_; + } + + 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(configId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, configId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getNotificationConfig()); + } + getUnknownFields().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(configId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, configId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getNotificationConfig()); + } + size += getUnknownFields().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.v2.CreateNotificationConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest other = + (com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getConfigId().equals(other.getConfigId())) return false; + if (hasNotificationConfig() != other.hasNotificationConfig()) return false; + if (hasNotificationConfig()) { + if (!getNotificationConfig().equals(other.getNotificationConfig())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + CONFIG_ID_FIELD_NUMBER; + hash = (53 * hash) + getConfigId().hashCode(); + if (hasNotificationConfig()) { + hash = (37 * hash) + NOTIFICATION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getNotificationConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest 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.v2.CreateNotificationConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest 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.v2.CreateNotificationConfigRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest 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.v2.CreateNotificationConfigRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest + 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.v2.CreateNotificationConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest 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.v2.CreateNotificationConfigRequest 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 notification config.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.CreateNotificationConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.CreateNotificationConfigRequest) + com.google.cloud.securitycenter.v2.CreateNotificationConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_CreateNotificationConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_CreateNotificationConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest.class, + com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest.Builder.class); + } + + // Construct using + // com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getNotificationConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + configId_ = ""; + notificationConfig_ = null; + if (notificationConfigBuilder_ != null) { + notificationConfigBuilder_.dispose(); + notificationConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_CreateNotificationConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest + getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest build() { + com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest buildPartial() { + com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest result = + new com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.configId_ = configId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.notificationConfig_ = + notificationConfigBuilder_ == null + ? notificationConfig_ + : notificationConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v2.CreateNotificationConfigRequest) { + return mergeFrom( + (com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest other) { + if (other + == com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getConfigId().isEmpty()) { + configId_ = other.configId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasNotificationConfig()) { + mergeNotificationConfig(other.getNotificationConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + configId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + getNotificationConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Resource name of the new notification config's parent. Its format
+     * is "organizations/[organization_id]/locations/[location_id]",
+     * "folders/[folder_id]/locations/[location_id]", or
+     * "projects/[project_id]/locations/[location_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 notification config's parent. Its format
+     * is "organizations/[organization_id]/locations/[location_id]",
+     * "folders/[folder_id]/locations/[location_id]", or
+     * "projects/[project_id]/locations/[location_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 notification config's parent. Its format
+     * is "organizations/[organization_id]/locations/[location_id]",
+     * "folders/[folder_id]/locations/[location_id]", or
+     * "projects/[project_id]/locations/[location_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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the new notification config's parent. Its format
+     * is "organizations/[organization_id]/locations/[location_id]",
+     * "folders/[folder_id]/locations/[location_id]", or
+     * "projects/[project_id]/locations/[location_id]".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the new notification config's parent. Its format
+     * is "organizations/[organization_id]/locations/[location_id]",
+     * "folders/[folder_id]/locations/[location_id]", or
+     * "projects/[project_id]/locations/[location_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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object configId_ = ""; + /** + * + * + *
+     * Required.
+     * Unique identifier provided by the client within the parent scope.
+     * It must be between 1 and 128 characters and contain alphanumeric
+     * characters, underscores, or hyphens only.
+     * 
+ * + * string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The configId. + */ + public java.lang.String getConfigId() { + java.lang.Object ref = configId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + configId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required.
+     * Unique identifier provided by the client within the parent scope.
+     * It must be between 1 and 128 characters and contain alphanumeric
+     * characters, underscores, or hyphens only.
+     * 
+ * + * string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for configId. + */ + public com.google.protobuf.ByteString getConfigIdBytes() { + java.lang.Object ref = configId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + configId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required.
+     * Unique identifier provided by the client within the parent scope.
+     * It must be between 1 and 128 characters and contain alphanumeric
+     * characters, underscores, or hyphens only.
+     * 
+ * + * string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The configId to set. + * @return This builder for chaining. + */ + public Builder setConfigId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + configId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required.
+     * Unique identifier provided by the client within the parent scope.
+     * It must be between 1 and 128 characters and contain alphanumeric
+     * characters, underscores, or hyphens only.
+     * 
+ * + * string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearConfigId() { + configId_ = getDefaultInstance().getConfigId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required.
+     * Unique identifier provided by the client within the parent scope.
+     * It must be between 1 and 128 characters and contain alphanumeric
+     * characters, underscores, or hyphens only.
+     * 
+ * + * string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for configId to set. + * @return This builder for chaining. + */ + public Builder setConfigIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + configId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.securitycenter.v2.NotificationConfig notificationConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.NotificationConfig, + com.google.cloud.securitycenter.v2.NotificationConfig.Builder, + com.google.cloud.securitycenter.v2.NotificationConfigOrBuilder> + notificationConfigBuilder_; + /** + * + * + *
+     * Required. The notification config being created. The name and the service
+     * account will be ignored as they are both output only fields on this
+     * resource.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the notificationConfig field is set. + */ + public boolean hasNotificationConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The notification config being created. The name and the service
+     * account will be ignored as they are both output only fields on this
+     * resource.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The notificationConfig. + */ + public com.google.cloud.securitycenter.v2.NotificationConfig getNotificationConfig() { + if (notificationConfigBuilder_ == null) { + return notificationConfig_ == null + ? com.google.cloud.securitycenter.v2.NotificationConfig.getDefaultInstance() + : notificationConfig_; + } else { + return notificationConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The notification config being created. The name and the service
+     * account will be ignored as they are both output only fields on this
+     * resource.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setNotificationConfig( + com.google.cloud.securitycenter.v2.NotificationConfig value) { + if (notificationConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + notificationConfig_ = value; + } else { + notificationConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The notification config being created. The name and the service
+     * account will be ignored as they are both output only fields on this
+     * resource.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setNotificationConfig( + com.google.cloud.securitycenter.v2.NotificationConfig.Builder builderForValue) { + if (notificationConfigBuilder_ == null) { + notificationConfig_ = builderForValue.build(); + } else { + notificationConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The notification config being created. The name and the service
+     * account will be ignored as they are both output only fields on this
+     * resource.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeNotificationConfig( + com.google.cloud.securitycenter.v2.NotificationConfig value) { + if (notificationConfigBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && notificationConfig_ != null + && notificationConfig_ + != com.google.cloud.securitycenter.v2.NotificationConfig.getDefaultInstance()) { + getNotificationConfigBuilder().mergeFrom(value); + } else { + notificationConfig_ = value; + } + } else { + notificationConfigBuilder_.mergeFrom(value); + } + if (notificationConfig_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The notification config being created. The name and the service
+     * account will be ignored as they are both output only fields on this
+     * resource.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearNotificationConfig() { + bitField0_ = (bitField0_ & ~0x00000004); + notificationConfig_ = null; + if (notificationConfigBuilder_ != null) { + notificationConfigBuilder_.dispose(); + notificationConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The notification config being created. The name and the service
+     * account will be ignored as they are both output only fields on this
+     * resource.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.securitycenter.v2.NotificationConfig.Builder + getNotificationConfigBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getNotificationConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The notification config being created. The name and the service
+     * account will be ignored as they are both output only fields on this
+     * resource.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.securitycenter.v2.NotificationConfigOrBuilder + getNotificationConfigOrBuilder() { + if (notificationConfigBuilder_ != null) { + return notificationConfigBuilder_.getMessageOrBuilder(); + } else { + return notificationConfig_ == null + ? com.google.cloud.securitycenter.v2.NotificationConfig.getDefaultInstance() + : notificationConfig_; + } + } + /** + * + * + *
+     * Required. The notification config being created. The name and the service
+     * account will be ignored as they are both output only fields on this
+     * resource.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.NotificationConfig, + com.google.cloud.securitycenter.v2.NotificationConfig.Builder, + com.google.cloud.securitycenter.v2.NotificationConfigOrBuilder> + getNotificationConfigFieldBuilder() { + if (notificationConfigBuilder_ == null) { + notificationConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.NotificationConfig, + com.google.cloud.securitycenter.v2.NotificationConfig.Builder, + com.google.cloud.securitycenter.v2.NotificationConfigOrBuilder>( + getNotificationConfig(), getParentForChildren(), isClean()); + notificationConfig_ = null; + } + return notificationConfigBuilder_; + } + + @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.v2.CreateNotificationConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.CreateNotificationConfigRequest) + private static final com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest(); + } + + public static com.google.cloud.securitycenter.v2.CreateNotificationConfigRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateNotificationConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.CreateNotificationConfigRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CreateNotificationConfigRequestOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CreateNotificationConfigRequestOrBuilder.java new file mode 100644 index 000000000000..136d6c946e29 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CreateNotificationConfigRequestOrBuilder.java @@ -0,0 +1,139 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface CreateNotificationConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.CreateNotificationConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Resource name of the new notification config's parent. Its format
+   * is "organizations/[organization_id]/locations/[location_id]",
+   * "folders/[folder_id]/locations/[location_id]", or
+   * "projects/[project_id]/locations/[location_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 notification config's parent. Its format
+   * is "organizations/[organization_id]/locations/[location_id]",
+   * "folders/[folder_id]/locations/[location_id]", or
+   * "projects/[project_id]/locations/[location_id]".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required.
+   * Unique identifier provided by the client within the parent scope.
+   * It must be between 1 and 128 characters and contain alphanumeric
+   * characters, underscores, or hyphens only.
+   * 
+ * + * string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The configId. + */ + java.lang.String getConfigId(); + /** + * + * + *
+   * Required.
+   * Unique identifier provided by the client within the parent scope.
+   * It must be between 1 and 128 characters and contain alphanumeric
+   * characters, underscores, or hyphens only.
+   * 
+ * + * string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for configId. + */ + com.google.protobuf.ByteString getConfigIdBytes(); + + /** + * + * + *
+   * Required. The notification config being created. The name and the service
+   * account will be ignored as they are both output only fields on this
+   * resource.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the notificationConfig field is set. + */ + boolean hasNotificationConfig(); + /** + * + * + *
+   * Required. The notification config being created. The name and the service
+   * account will be ignored as they are both output only fields on this
+   * resource.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The notificationConfig. + */ + com.google.cloud.securitycenter.v2.NotificationConfig getNotificationConfig(); + /** + * + * + *
+   * Required. The notification config being created. The name and the service
+   * account will be ignored as they are both output only fields on this
+   * resource.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.securitycenter.v2.NotificationConfigOrBuilder getNotificationConfigOrBuilder(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CreateResourceValueConfigRequest.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CreateResourceValueConfigRequest.java new file mode 100644 index 000000000000..766e1dc53b43 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CreateResourceValueConfigRequest.java @@ -0,0 +1,966 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Request message to create single resource value config
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.CreateResourceValueConfigRequest} + */ +public final class CreateResourceValueConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.CreateResourceValueConfigRequest) + CreateResourceValueConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateResourceValueConfigRequest.newBuilder() to construct. + private CreateResourceValueConfigRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateResourceValueConfigRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateResourceValueConfigRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_CreateResourceValueConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_CreateResourceValueConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest.class, + com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Resource name of the new ResourceValueConfig's parent.
+   * 
+ * + * + * 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 ResourceValueConfig's parent.
+   * 
+ * + * + * 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 RESOURCE_VALUE_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.securitycenter.v2.ResourceValueConfig resourceValueConfig_; + /** + * + * + *
+   * Required. The resource value config being created.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the resourceValueConfig field is set. + */ + @java.lang.Override + public boolean hasResourceValueConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The resource value config being created.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The resourceValueConfig. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.ResourceValueConfig getResourceValueConfig() { + return resourceValueConfig_ == null + ? com.google.cloud.securitycenter.v2.ResourceValueConfig.getDefaultInstance() + : resourceValueConfig_; + } + /** + * + * + *
+   * Required. The resource value config being created.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.ResourceValueConfigOrBuilder + getResourceValueConfigOrBuilder() { + return resourceValueConfig_ == null + ? com.google.cloud.securitycenter.v2.ResourceValueConfig.getDefaultInstance() + : resourceValueConfig_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getResourceValueConfig()); + } + getUnknownFields().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 (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getResourceValueConfig()); + } + size += getUnknownFields().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.v2.CreateResourceValueConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest other = + (com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasResourceValueConfig() != other.hasResourceValueConfig()) return false; + if (hasResourceValueConfig()) { + if (!getResourceValueConfig().equals(other.getResourceValueConfig())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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 (hasResourceValueConfig()) { + hash = (37 * hash) + RESOURCE_VALUE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getResourceValueConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest 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.v2.CreateResourceValueConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest 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.v2.CreateResourceValueConfigRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest 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.v2.CreateResourceValueConfigRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest + 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.v2.CreateResourceValueConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest 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.v2.CreateResourceValueConfigRequest 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 to create single resource value config
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.CreateResourceValueConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.CreateResourceValueConfigRequest) + com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_CreateResourceValueConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_CreateResourceValueConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest.class, + com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest.Builder.class); + } + + // Construct using + // com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getResourceValueConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + resourceValueConfig_ = null; + if (resourceValueConfigBuilder_ != null) { + resourceValueConfigBuilder_.dispose(); + resourceValueConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_CreateResourceValueConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest + getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest build() { + com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest buildPartial() { + com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest result = + new com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.resourceValueConfig_ = + resourceValueConfigBuilder_ == null + ? resourceValueConfig_ + : resourceValueConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v2.CreateResourceValueConfigRequest) { + return mergeFrom( + (com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest other) { + if (other + == com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasResourceValueConfig()) { + mergeResourceValueConfig(other.getResourceValueConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + getResourceValueConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Resource name of the new ResourceValueConfig's parent.
+     * 
+ * + * + * 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 ResourceValueConfig's parent.
+     * 
+ * + * + * 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 ResourceValueConfig's parent.
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the new ResourceValueConfig's parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the new ResourceValueConfig's parent.
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.securitycenter.v2.ResourceValueConfig resourceValueConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.ResourceValueConfig, + com.google.cloud.securitycenter.v2.ResourceValueConfig.Builder, + com.google.cloud.securitycenter.v2.ResourceValueConfigOrBuilder> + resourceValueConfigBuilder_; + /** + * + * + *
+     * Required. The resource value config being created.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the resourceValueConfig field is set. + */ + public boolean hasResourceValueConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The resource value config being created.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The resourceValueConfig. + */ + public com.google.cloud.securitycenter.v2.ResourceValueConfig getResourceValueConfig() { + if (resourceValueConfigBuilder_ == null) { + return resourceValueConfig_ == null + ? com.google.cloud.securitycenter.v2.ResourceValueConfig.getDefaultInstance() + : resourceValueConfig_; + } else { + return resourceValueConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The resource value config being created.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setResourceValueConfig( + com.google.cloud.securitycenter.v2.ResourceValueConfig value) { + if (resourceValueConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resourceValueConfig_ = value; + } else { + resourceValueConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource value config being created.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setResourceValueConfig( + com.google.cloud.securitycenter.v2.ResourceValueConfig.Builder builderForValue) { + if (resourceValueConfigBuilder_ == null) { + resourceValueConfig_ = builderForValue.build(); + } else { + resourceValueConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource value config being created.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeResourceValueConfig( + com.google.cloud.securitycenter.v2.ResourceValueConfig value) { + if (resourceValueConfigBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && resourceValueConfig_ != null + && resourceValueConfig_ + != com.google.cloud.securitycenter.v2.ResourceValueConfig.getDefaultInstance()) { + getResourceValueConfigBuilder().mergeFrom(value); + } else { + resourceValueConfig_ = value; + } + } else { + resourceValueConfigBuilder_.mergeFrom(value); + } + if (resourceValueConfig_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The resource value config being created.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearResourceValueConfig() { + bitField0_ = (bitField0_ & ~0x00000002); + resourceValueConfig_ = null; + if (resourceValueConfigBuilder_ != null) { + resourceValueConfigBuilder_.dispose(); + resourceValueConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource value config being created.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.securitycenter.v2.ResourceValueConfig.Builder + getResourceValueConfigBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getResourceValueConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The resource value config being created.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.securitycenter.v2.ResourceValueConfigOrBuilder + getResourceValueConfigOrBuilder() { + if (resourceValueConfigBuilder_ != null) { + return resourceValueConfigBuilder_.getMessageOrBuilder(); + } else { + return resourceValueConfig_ == null + ? com.google.cloud.securitycenter.v2.ResourceValueConfig.getDefaultInstance() + : resourceValueConfig_; + } + } + /** + * + * + *
+     * Required. The resource value config being created.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.ResourceValueConfig, + com.google.cloud.securitycenter.v2.ResourceValueConfig.Builder, + com.google.cloud.securitycenter.v2.ResourceValueConfigOrBuilder> + getResourceValueConfigFieldBuilder() { + if (resourceValueConfigBuilder_ == null) { + resourceValueConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.ResourceValueConfig, + com.google.cloud.securitycenter.v2.ResourceValueConfig.Builder, + com.google.cloud.securitycenter.v2.ResourceValueConfigOrBuilder>( + getResourceValueConfig(), getParentForChildren(), isClean()); + resourceValueConfig_ = null; + } + return resourceValueConfigBuilder_; + } + + @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.v2.CreateResourceValueConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.CreateResourceValueConfigRequest) + private static final com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest(); + } + + public static com.google.cloud.securitycenter.v2.CreateResourceValueConfigRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateResourceValueConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.CreateResourceValueConfigRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CreateResourceValueConfigRequestOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CreateResourceValueConfigRequestOrBuilder.java new file mode 100644 index 000000000000..77c008b0c36a --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CreateResourceValueConfigRequestOrBuilder.java @@ -0,0 +1,96 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface CreateResourceValueConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.CreateResourceValueConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Resource name of the new ResourceValueConfig's parent.
+   * 
+ * + * + * 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 ResourceValueConfig's parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The resource value config being created.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the resourceValueConfig field is set. + */ + boolean hasResourceValueConfig(); + /** + * + * + *
+   * Required. The resource value config being created.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The resourceValueConfig. + */ + com.google.cloud.securitycenter.v2.ResourceValueConfig getResourceValueConfig(); + /** + * + * + *
+   * Required. The resource value config being created.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.ResourceValueConfig resource_value_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.securitycenter.v2.ResourceValueConfigOrBuilder getResourceValueConfigOrBuilder(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CreateSourceRequest.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CreateSourceRequest.java new file mode 100644 index 000000000000..e1ae1dee7386 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CreateSourceRequest.java @@ -0,0 +1,962 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Request message for creating a source.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.CreateSourceRequest} + */ +public final class CreateSourceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.CreateSourceRequest) + CreateSourceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateSourceRequest.newBuilder() to construct. + private CreateSourceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateSourceRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateSourceRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_CreateSourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_CreateSourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.CreateSourceRequest.class, + com.google.cloud.securitycenter.v2.CreateSourceRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Resource name of the new source's parent. Its format should be
+   * "organizations/[organization_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 source's parent. Its format should be
+   * "organizations/[organization_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 SOURCE_FIELD_NUMBER = 2; + private com.google.cloud.securitycenter.v2.Source source_; + /** + * + * + *
+   * Required. The Source being created, only the display_name and description
+   * will be used. All other fields will be ignored.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the source field is set. + */ + @java.lang.Override + public boolean hasSource() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The Source being created, only the display_name and description
+   * will be used. All other fields will be ignored.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The source. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Source getSource() { + return source_ == null + ? com.google.cloud.securitycenter.v2.Source.getDefaultInstance() + : source_; + } + /** + * + * + *
+   * Required. The Source being created, only the display_name and description
+   * will be used. All other fields will be ignored.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.SourceOrBuilder getSourceOrBuilder() { + return source_ == null + ? com.google.cloud.securitycenter.v2.Source.getDefaultInstance() + : source_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getSource()); + } + getUnknownFields().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 (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSource()); + } + size += getUnknownFields().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.v2.CreateSourceRequest)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.CreateSourceRequest other = + (com.google.cloud.securitycenter.v2.CreateSourceRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasSource() != other.hasSource()) return false; + if (hasSource()) { + if (!getSource().equals(other.getSource())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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 (hasSource()) { + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.CreateSourceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.CreateSourceRequest 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.v2.CreateSourceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.CreateSourceRequest 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.v2.CreateSourceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.CreateSourceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.CreateSourceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.CreateSourceRequest 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.v2.CreateSourceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.CreateSourceRequest 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.v2.CreateSourceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.CreateSourceRequest 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.v2.CreateSourceRequest 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 source.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.CreateSourceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.CreateSourceRequest) + com.google.cloud.securitycenter.v2.CreateSourceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_CreateSourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_CreateSourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.CreateSourceRequest.class, + com.google.cloud.securitycenter.v2.CreateSourceRequest.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.CreateSourceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSourceFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + source_ = null; + if (sourceBuilder_ != null) { + sourceBuilder_.dispose(); + sourceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_CreateSourceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.CreateSourceRequest getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.CreateSourceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.CreateSourceRequest build() { + com.google.cloud.securitycenter.v2.CreateSourceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.CreateSourceRequest buildPartial() { + com.google.cloud.securitycenter.v2.CreateSourceRequest result = + new com.google.cloud.securitycenter.v2.CreateSourceRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.CreateSourceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.source_ = sourceBuilder_ == null ? source_ : sourceBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v2.CreateSourceRequest) { + return mergeFrom((com.google.cloud.securitycenter.v2.CreateSourceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.CreateSourceRequest other) { + if (other == com.google.cloud.securitycenter.v2.CreateSourceRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasSource()) { + mergeSource(other.getSource()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getSourceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Resource name of the new source's parent. Its format should be
+     * "organizations/[organization_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 source's parent. Its format should be
+     * "organizations/[organization_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 source's parent. Its format should be
+     * "organizations/[organization_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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the new source's parent. Its format should be
+     * "organizations/[organization_id]".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the new source's parent. Its format should be
+     * "organizations/[organization_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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.securitycenter.v2.Source source_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Source, + com.google.cloud.securitycenter.v2.Source.Builder, + com.google.cloud.securitycenter.v2.SourceOrBuilder> + sourceBuilder_; + /** + * + * + *
+     * Required. The Source being created, only the display_name and description
+     * will be used. All other fields will be ignored.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the source field is set. + */ + public boolean hasSource() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The Source being created, only the display_name and description
+     * will be used. All other fields will be ignored.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The source. + */ + public com.google.cloud.securitycenter.v2.Source getSource() { + if (sourceBuilder_ == null) { + return source_ == null + ? com.google.cloud.securitycenter.v2.Source.getDefaultInstance() + : source_; + } else { + return sourceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The Source being created, only the display_name and description
+     * will be used. All other fields will be ignored.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSource(com.google.cloud.securitycenter.v2.Source value) { + if (sourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + } else { + sourceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Source being created, only the display_name and description
+     * will be used. All other fields will be ignored.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSource(com.google.cloud.securitycenter.v2.Source.Builder builderForValue) { + if (sourceBuilder_ == null) { + source_ = builderForValue.build(); + } else { + sourceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Source being created, only the display_name and description
+     * will be used. All other fields will be ignored.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSource(com.google.cloud.securitycenter.v2.Source value) { + if (sourceBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && source_ != null + && source_ != com.google.cloud.securitycenter.v2.Source.getDefaultInstance()) { + getSourceBuilder().mergeFrom(value); + } else { + source_ = value; + } + } else { + sourceBuilder_.mergeFrom(value); + } + if (source_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The Source being created, only the display_name and description
+     * will be used. All other fields will be ignored.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSource() { + bitField0_ = (bitField0_ & ~0x00000002); + source_ = null; + if (sourceBuilder_ != null) { + sourceBuilder_.dispose(); + sourceBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Source being created, only the display_name and description
+     * will be used. All other fields will be ignored.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.securitycenter.v2.Source.Builder getSourceBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The Source being created, only the display_name and description
+     * will be used. All other fields will be ignored.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.securitycenter.v2.SourceOrBuilder getSourceOrBuilder() { + if (sourceBuilder_ != null) { + return sourceBuilder_.getMessageOrBuilder(); + } else { + return source_ == null + ? com.google.cloud.securitycenter.v2.Source.getDefaultInstance() + : source_; + } + } + /** + * + * + *
+     * Required. The Source being created, only the display_name and description
+     * will be used. All other fields will be ignored.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Source, + com.google.cloud.securitycenter.v2.Source.Builder, + com.google.cloud.securitycenter.v2.SourceOrBuilder> + getSourceFieldBuilder() { + if (sourceBuilder_ == null) { + sourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Source, + com.google.cloud.securitycenter.v2.Source.Builder, + com.google.cloud.securitycenter.v2.SourceOrBuilder>( + getSource(), getParentForChildren(), isClean()); + source_ = null; + } + return sourceBuilder_; + } + + @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.v2.CreateSourceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.CreateSourceRequest) + private static final com.google.cloud.securitycenter.v2.CreateSourceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.CreateSourceRequest(); + } + + public static com.google.cloud.securitycenter.v2.CreateSourceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateSourceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.CreateSourceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CreateSourceRequestOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CreateSourceRequestOrBuilder.java new file mode 100644 index 000000000000..78846378ea04 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CreateSourceRequestOrBuilder.java @@ -0,0 +1,101 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface CreateSourceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.CreateSourceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Resource name of the new source's parent. Its format should be
+   * "organizations/[organization_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 source's parent. Its format should be
+   * "organizations/[organization_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 Source being created, only the display_name and description
+   * will be used. All other fields will be ignored.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the source field is set. + */ + boolean hasSource(); + /** + * + * + *
+   * Required. The Source being created, only the display_name and description
+   * will be used. All other fields will be ignored.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The source. + */ + com.google.cloud.securitycenter.v2.Source getSource(); + /** + * + * + *
+   * Required. The Source being created, only the display_name and description
+   * will be used. All other fields will be ignored.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.securitycenter.v2.SourceOrBuilder getSourceOrBuilder(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Cve.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Cve.java new file mode 100644 index 000000000000..118298320d3e --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Cve.java @@ -0,0 +1,2480 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/vulnerability.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * CVE stands for Common Vulnerabilities and Exposures.
+ * Information from the [CVE
+ * record](https://www.cve.org/ResourcesSupport/Glossary) that describes this
+ * vulnerability.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Cve} + */ +public final class Cve extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.Cve) + CveOrBuilder { + private static final long serialVersionUID = 0L; + // Use Cve.newBuilder() to construct. + private Cve(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Cve() { + id_ = ""; + references_ = java.util.Collections.emptyList(); + impact_ = 0; + exploitationActivity_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Cve(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.VulnerabilityProto + .internal_static_google_cloud_securitycenter_v2_Cve_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.VulnerabilityProto + .internal_static_google_cloud_securitycenter_v2_Cve_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Cve.class, + com.google.cloud.securitycenter.v2.Cve.Builder.class); + } + + /** + * + * + *
+   * The possible values of impact of the vulnerability if it was to be
+   * exploited.
+   * 
+ * + * Protobuf enum {@code google.cloud.securitycenter.v2.Cve.RiskRating} + */ + public enum RiskRating implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Invalid or empty value.
+     * 
+ * + * RISK_RATING_UNSPECIFIED = 0; + */ + RISK_RATING_UNSPECIFIED(0), + /** + * + * + *
+     * Exploitation would have little to no security impact.
+     * 
+ * + * LOW = 1; + */ + LOW(1), + /** + * + * + *
+     * Exploitation would enable attackers to perform activities, or could allow
+     * attackers to have a direct impact, but would require additional steps.
+     * 
+ * + * MEDIUM = 2; + */ + MEDIUM(2), + /** + * + * + *
+     * Exploitation would enable attackers to have a notable direct impact
+     * without needing to overcome any major mitigating factors.
+     * 
+ * + * HIGH = 3; + */ + HIGH(3), + /** + * + * + *
+     * Exploitation would fundamentally undermine the security of affected
+     * systems, enable actors to perform significant attacks with minimal
+     * effort, with little to no mitigating factors to overcome.
+     * 
+ * + * CRITICAL = 4; + */ + CRITICAL(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Invalid or empty value.
+     * 
+ * + * RISK_RATING_UNSPECIFIED = 0; + */ + public static final int RISK_RATING_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Exploitation would have little to no security impact.
+     * 
+ * + * LOW = 1; + */ + public static final int LOW_VALUE = 1; + /** + * + * + *
+     * Exploitation would enable attackers to perform activities, or could allow
+     * attackers to have a direct impact, but would require additional steps.
+     * 
+ * + * MEDIUM = 2; + */ + public static final int MEDIUM_VALUE = 2; + /** + * + * + *
+     * Exploitation would enable attackers to have a notable direct impact
+     * without needing to overcome any major mitigating factors.
+     * 
+ * + * HIGH = 3; + */ + public static final int HIGH_VALUE = 3; + /** + * + * + *
+     * Exploitation would fundamentally undermine the security of affected
+     * systems, enable actors to perform significant attacks with minimal
+     * effort, with little to no mitigating factors to overcome.
+     * 
+ * + * CRITICAL = 4; + */ + public static final int CRITICAL_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 RiskRating 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 RiskRating forNumber(int value) { + switch (value) { + case 0: + return RISK_RATING_UNSPECIFIED; + case 1: + return LOW; + case 2: + return MEDIUM; + case 3: + return HIGH; + case 4: + return CRITICAL; + 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 RiskRating findValueByNumber(int number) { + return RiskRating.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.v2.Cve.getDescriptor().getEnumTypes().get(0); + } + + private static final RiskRating[] VALUES = values(); + + public static RiskRating 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 RiskRating(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v2.Cve.RiskRating) + } + + /** + * + * + *
+   * The possible values of exploitation activity of the vulnerability in the
+   * wild.
+   * 
+ * + * Protobuf enum {@code google.cloud.securitycenter.v2.Cve.ExploitationActivity} + */ + public enum ExploitationActivity implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Invalid or empty value.
+     * 
+ * + * EXPLOITATION_ACTIVITY_UNSPECIFIED = 0; + */ + EXPLOITATION_ACTIVITY_UNSPECIFIED(0), + /** + * + * + *
+     * Exploitation has been reported or confirmed to widely occur.
+     * 
+ * + * WIDE = 1; + */ + WIDE(1), + /** + * + * + *
+     * Limited reported or confirmed exploitation activities.
+     * 
+ * + * CONFIRMED = 2; + */ + CONFIRMED(2), + /** + * + * + *
+     * Exploit is publicly available.
+     * 
+ * + * AVAILABLE = 3; + */ + AVAILABLE(3), + /** + * + * + *
+     * No known exploitation activity, but has a high potential for
+     * exploitation.
+     * 
+ * + * ANTICIPATED = 4; + */ + ANTICIPATED(4), + /** + * + * + *
+     * No known exploitation activity.
+     * 
+ * + * NO_KNOWN = 5; + */ + NO_KNOWN(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Invalid or empty value.
+     * 
+ * + * EXPLOITATION_ACTIVITY_UNSPECIFIED = 0; + */ + public static final int EXPLOITATION_ACTIVITY_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Exploitation has been reported or confirmed to widely occur.
+     * 
+ * + * WIDE = 1; + */ + public static final int WIDE_VALUE = 1; + /** + * + * + *
+     * Limited reported or confirmed exploitation activities.
+     * 
+ * + * CONFIRMED = 2; + */ + public static final int CONFIRMED_VALUE = 2; + /** + * + * + *
+     * Exploit is publicly available.
+     * 
+ * + * AVAILABLE = 3; + */ + public static final int AVAILABLE_VALUE = 3; + /** + * + * + *
+     * No known exploitation activity, but has a high potential for
+     * exploitation.
+     * 
+ * + * ANTICIPATED = 4; + */ + public static final int ANTICIPATED_VALUE = 4; + /** + * + * + *
+     * No known exploitation activity.
+     * 
+ * + * NO_KNOWN = 5; + */ + public static final int NO_KNOWN_VALUE = 5; + + 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 ExploitationActivity 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 ExploitationActivity forNumber(int value) { + switch (value) { + case 0: + return EXPLOITATION_ACTIVITY_UNSPECIFIED; + case 1: + return WIDE; + case 2: + return CONFIRMED; + case 3: + return AVAILABLE; + case 4: + return ANTICIPATED; + case 5: + return NO_KNOWN; + 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 ExploitationActivity findValueByNumber(int number) { + return ExploitationActivity.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.v2.Cve.getDescriptor().getEnumTypes().get(1); + } + + private static final ExploitationActivity[] VALUES = values(); + + public static ExploitationActivity 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 ExploitationActivity(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v2.Cve.ExploitationActivity) + } + + private int bitField0_; + public static final int ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * + * + *
+   * The unique identifier for the vulnerability. e.g. CVE-2021-34527
+   * 
+ * + * string id = 1; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + 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(); + id_ = s; + return s; + } + } + /** + * + * + *
+   * The unique identifier for the vulnerability. e.g. CVE-2021-34527
+   * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REFERENCES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List references_; + /** + * + * + *
+   * Additional information about the CVE.
+   * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Reference references = 2; + */ + @java.lang.Override + public java.util.List getReferencesList() { + return references_; + } + /** + * + * + *
+   * Additional information about the CVE.
+   * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Reference references = 2; + */ + @java.lang.Override + public java.util.List + getReferencesOrBuilderList() { + return references_; + } + /** + * + * + *
+   * Additional information about the CVE.
+   * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Reference references = 2; + */ + @java.lang.Override + public int getReferencesCount() { + return references_.size(); + } + /** + * + * + *
+   * Additional information about the CVE.
+   * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Reference references = 2; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Reference getReferences(int index) { + return references_.get(index); + } + /** + * + * + *
+   * Additional information about the CVE.
+   * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Reference references = 2; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.ReferenceOrBuilder getReferencesOrBuilder(int index) { + return references_.get(index); + } + + public static final int CVSSV3_FIELD_NUMBER = 3; + private com.google.cloud.securitycenter.v2.Cvssv3 cvssv3_; + /** + * + * + *
+   * Describe Common Vulnerability Scoring System specified at
+   * https://www.first.org/cvss/v3.1/specification-document
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3 cvssv3 = 3; + * + * @return Whether the cvssv3 field is set. + */ + @java.lang.Override + public boolean hasCvssv3() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Describe Common Vulnerability Scoring System specified at
+   * https://www.first.org/cvss/v3.1/specification-document
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3 cvssv3 = 3; + * + * @return The cvssv3. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Cvssv3 getCvssv3() { + return cvssv3_ == null + ? com.google.cloud.securitycenter.v2.Cvssv3.getDefaultInstance() + : cvssv3_; + } + /** + * + * + *
+   * Describe Common Vulnerability Scoring System specified at
+   * https://www.first.org/cvss/v3.1/specification-document
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3 cvssv3 = 3; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Cvssv3OrBuilder getCvssv3OrBuilder() { + return cvssv3_ == null + ? com.google.cloud.securitycenter.v2.Cvssv3.getDefaultInstance() + : cvssv3_; + } + + public static final int UPSTREAM_FIX_AVAILABLE_FIELD_NUMBER = 4; + private boolean upstreamFixAvailable_ = false; + /** + * + * + *
+   * Whether upstream fix is available for the CVE.
+   * 
+ * + * bool upstream_fix_available = 4; + * + * @return The upstreamFixAvailable. + */ + @java.lang.Override + public boolean getUpstreamFixAvailable() { + return upstreamFixAvailable_; + } + + public static final int IMPACT_FIELD_NUMBER = 5; + private int impact_ = 0; + /** + * + * + *
+   * The potential impact of the vulnerability if it was to be exploited.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cve.RiskRating impact = 5; + * + * @return The enum numeric value on the wire for impact. + */ + @java.lang.Override + public int getImpactValue() { + return impact_; + } + /** + * + * + *
+   * The potential impact of the vulnerability if it was to be exploited.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cve.RiskRating impact = 5; + * + * @return The impact. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Cve.RiskRating getImpact() { + com.google.cloud.securitycenter.v2.Cve.RiskRating result = + com.google.cloud.securitycenter.v2.Cve.RiskRating.forNumber(impact_); + return result == null ? com.google.cloud.securitycenter.v2.Cve.RiskRating.UNRECOGNIZED : result; + } + + public static final int EXPLOITATION_ACTIVITY_FIELD_NUMBER = 6; + private int exploitationActivity_ = 0; + /** + * + * + *
+   * The exploitation activity of the vulnerability in the wild.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cve.ExploitationActivity exploitation_activity = 6; + * + * + * @return The enum numeric value on the wire for exploitationActivity. + */ + @java.lang.Override + public int getExploitationActivityValue() { + return exploitationActivity_; + } + /** + * + * + *
+   * The exploitation activity of the vulnerability in the wild.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cve.ExploitationActivity exploitation_activity = 6; + * + * + * @return The exploitationActivity. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Cve.ExploitationActivity getExploitationActivity() { + com.google.cloud.securitycenter.v2.Cve.ExploitationActivity result = + com.google.cloud.securitycenter.v2.Cve.ExploitationActivity.forNumber( + exploitationActivity_); + return result == null + ? com.google.cloud.securitycenter.v2.Cve.ExploitationActivity.UNRECOGNIZED + : result; + } + + public static final int OBSERVED_IN_THE_WILD_FIELD_NUMBER = 7; + private boolean observedInTheWild_ = false; + /** + * + * + *
+   * Whether or not the vulnerability has been observed in the wild.
+   * 
+ * + * bool observed_in_the_wild = 7; + * + * @return The observedInTheWild. + */ + @java.lang.Override + public boolean getObservedInTheWild() { + return observedInTheWild_; + } + + public static final int ZERO_DAY_FIELD_NUMBER = 8; + private boolean zeroDay_ = false; + /** + * + * + *
+   * Whether or not the vulnerability was zero day when the finding was
+   * published.
+   * 
+ * + * bool zero_day = 8; + * + * @return The zeroDay. + */ + @java.lang.Override + public boolean getZeroDay() { + return zeroDay_; + } + + 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(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + for (int i = 0; i < references_.size(); i++) { + output.writeMessage(2, references_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getCvssv3()); + } + if (upstreamFixAvailable_ != false) { + output.writeBool(4, upstreamFixAvailable_); + } + if (impact_ + != com.google.cloud.securitycenter.v2.Cve.RiskRating.RISK_RATING_UNSPECIFIED.getNumber()) { + output.writeEnum(5, impact_); + } + if (exploitationActivity_ + != com.google.cloud.securitycenter.v2.Cve.ExploitationActivity + .EXPLOITATION_ACTIVITY_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, exploitationActivity_); + } + if (observedInTheWild_ != false) { + output.writeBool(7, observedInTheWild_); + } + if (zeroDay_ != false) { + output.writeBool(8, zeroDay_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + for (int i = 0; i < references_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, references_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCvssv3()); + } + if (upstreamFixAvailable_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, upstreamFixAvailable_); + } + if (impact_ + != com.google.cloud.securitycenter.v2.Cve.RiskRating.RISK_RATING_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, impact_); + } + if (exploitationActivity_ + != com.google.cloud.securitycenter.v2.Cve.ExploitationActivity + .EXPLOITATION_ACTIVITY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, exploitationActivity_); + } + if (observedInTheWild_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, observedInTheWild_); + } + if (zeroDay_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, zeroDay_); + } + size += getUnknownFields().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.v2.Cve)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.Cve other = (com.google.cloud.securitycenter.v2.Cve) obj; + + if (!getId().equals(other.getId())) return false; + if (!getReferencesList().equals(other.getReferencesList())) return false; + if (hasCvssv3() != other.hasCvssv3()) return false; + if (hasCvssv3()) { + if (!getCvssv3().equals(other.getCvssv3())) return false; + } + if (getUpstreamFixAvailable() != other.getUpstreamFixAvailable()) return false; + if (impact_ != other.impact_) return false; + if (exploitationActivity_ != other.exploitationActivity_) return false; + if (getObservedInTheWild() != other.getObservedInTheWild()) return false; + if (getZeroDay() != other.getZeroDay()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (getReferencesCount() > 0) { + hash = (37 * hash) + REFERENCES_FIELD_NUMBER; + hash = (53 * hash) + getReferencesList().hashCode(); + } + if (hasCvssv3()) { + hash = (37 * hash) + CVSSV3_FIELD_NUMBER; + hash = (53 * hash) + getCvssv3().hashCode(); + } + hash = (37 * hash) + UPSTREAM_FIX_AVAILABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUpstreamFixAvailable()); + hash = (37 * hash) + IMPACT_FIELD_NUMBER; + hash = (53 * hash) + impact_; + hash = (37 * hash) + EXPLOITATION_ACTIVITY_FIELD_NUMBER; + hash = (53 * hash) + exploitationActivity_; + hash = (37 * hash) + OBSERVED_IN_THE_WILD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getObservedInTheWild()); + hash = (37 * hash) + ZERO_DAY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getZeroDay()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.Cve parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Cve 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.v2.Cve parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Cve 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.v2.Cve parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Cve parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.Cve parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Cve 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.v2.Cve parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Cve 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.v2.Cve parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Cve 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.v2.Cve 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; + } + /** + * + * + *
+   * CVE stands for Common Vulnerabilities and Exposures.
+   * Information from the [CVE
+   * record](https://www.cve.org/ResourcesSupport/Glossary) that describes this
+   * vulnerability.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Cve} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.Cve) + com.google.cloud.securitycenter.v2.CveOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.VulnerabilityProto + .internal_static_google_cloud_securitycenter_v2_Cve_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.VulnerabilityProto + .internal_static_google_cloud_securitycenter_v2_Cve_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Cve.class, + com.google.cloud.securitycenter.v2.Cve.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.Cve.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getReferencesFieldBuilder(); + getCvssv3FieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + if (referencesBuilder_ == null) { + references_ = java.util.Collections.emptyList(); + } else { + references_ = null; + referencesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + cvssv3_ = null; + if (cvssv3Builder_ != null) { + cvssv3Builder_.dispose(); + cvssv3Builder_ = null; + } + upstreamFixAvailable_ = false; + impact_ = 0; + exploitationActivity_ = 0; + observedInTheWild_ = false; + zeroDay_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.VulnerabilityProto + .internal_static_google_cloud_securitycenter_v2_Cve_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Cve getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.Cve.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Cve build() { + com.google.cloud.securitycenter.v2.Cve result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Cve buildPartial() { + com.google.cloud.securitycenter.v2.Cve result = + new com.google.cloud.securitycenter.v2.Cve(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.securitycenter.v2.Cve result) { + if (referencesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + references_ = java.util.Collections.unmodifiableList(references_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.references_ = references_; + } else { + result.references_ = referencesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.Cve result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.cvssv3_ = cvssv3Builder_ == null ? cvssv3_ : cvssv3Builder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.upstreamFixAvailable_ = upstreamFixAvailable_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.impact_ = impact_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.exploitationActivity_ = exploitationActivity_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.observedInTheWild_ = observedInTheWild_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.zeroDay_ = zeroDay_; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v2.Cve) { + return mergeFrom((com.google.cloud.securitycenter.v2.Cve) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.Cve other) { + if (other == com.google.cloud.securitycenter.v2.Cve.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (referencesBuilder_ == null) { + if (!other.references_.isEmpty()) { + if (references_.isEmpty()) { + references_ = other.references_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureReferencesIsMutable(); + references_.addAll(other.references_); + } + onChanged(); + } + } else { + if (!other.references_.isEmpty()) { + if (referencesBuilder_.isEmpty()) { + referencesBuilder_.dispose(); + referencesBuilder_ = null; + references_ = other.references_; + bitField0_ = (bitField0_ & ~0x00000002); + referencesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getReferencesFieldBuilder() + : null; + } else { + referencesBuilder_.addAllMessages(other.references_); + } + } + } + if (other.hasCvssv3()) { + mergeCvssv3(other.getCvssv3()); + } + if (other.getUpstreamFixAvailable() != false) { + setUpstreamFixAvailable(other.getUpstreamFixAvailable()); + } + if (other.impact_ != 0) { + setImpactValue(other.getImpactValue()); + } + if (other.exploitationActivity_ != 0) { + setExploitationActivityValue(other.getExploitationActivityValue()); + } + if (other.getObservedInTheWild() != false) { + setObservedInTheWild(other.getObservedInTheWild()); + } + if (other.getZeroDay() != false) { + setZeroDay(other.getZeroDay()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.securitycenter.v2.Reference m = + input.readMessage( + com.google.cloud.securitycenter.v2.Reference.parser(), extensionRegistry); + if (referencesBuilder_ == null) { + ensureReferencesIsMutable(); + references_.add(m); + } else { + referencesBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + input.readMessage(getCvssv3FieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + upstreamFixAvailable_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + impact_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: + { + exploitationActivity_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: + { + observedInTheWild_ = input.readBool(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 64: + { + zeroDay_ = input.readBool(); + bitField0_ |= 0x00000080; + break; + } // case 64 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * + * + *
+     * The unique identifier for the vulnerability. e.g. CVE-2021-34527
+     * 
+ * + * string id = 1; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The unique identifier for the vulnerability. e.g. CVE-2021-34527
+     * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The unique identifier for the vulnerability. e.g. CVE-2021-34527
+     * 
+ * + * string id = 1; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier for the vulnerability. e.g. CVE-2021-34527
+     * 
+ * + * string id = 1; + * + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier for the vulnerability. e.g. CVE-2021-34527
+     * 
+ * + * string id = 1; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List references_ = + java.util.Collections.emptyList(); + + private void ensureReferencesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + references_ = + new java.util.ArrayList(references_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Reference, + com.google.cloud.securitycenter.v2.Reference.Builder, + com.google.cloud.securitycenter.v2.ReferenceOrBuilder> + referencesBuilder_; + + /** + * + * + *
+     * Additional information about the CVE.
+     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Reference references = 2; + */ + public java.util.List getReferencesList() { + if (referencesBuilder_ == null) { + return java.util.Collections.unmodifiableList(references_); + } else { + return referencesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Additional information about the CVE.
+     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Reference references = 2; + */ + public int getReferencesCount() { + if (referencesBuilder_ == null) { + return references_.size(); + } else { + return referencesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Additional information about the CVE.
+     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Reference references = 2; + */ + public com.google.cloud.securitycenter.v2.Reference getReferences(int index) { + if (referencesBuilder_ == null) { + return references_.get(index); + } else { + return referencesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Additional information about the CVE.
+     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Reference references = 2; + */ + public Builder setReferences(int index, com.google.cloud.securitycenter.v2.Reference value) { + if (referencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferencesIsMutable(); + references_.set(index, value); + onChanged(); + } else { + referencesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Additional information about the CVE.
+     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Reference references = 2; + */ + public Builder setReferences( + int index, com.google.cloud.securitycenter.v2.Reference.Builder builderForValue) { + if (referencesBuilder_ == null) { + ensureReferencesIsMutable(); + references_.set(index, builderForValue.build()); + onChanged(); + } else { + referencesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Additional information about the CVE.
+     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Reference references = 2; + */ + public Builder addReferences(com.google.cloud.securitycenter.v2.Reference value) { + if (referencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferencesIsMutable(); + references_.add(value); + onChanged(); + } else { + referencesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Additional information about the CVE.
+     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Reference references = 2; + */ + public Builder addReferences(int index, com.google.cloud.securitycenter.v2.Reference value) { + if (referencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferencesIsMutable(); + references_.add(index, value); + onChanged(); + } else { + referencesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Additional information about the CVE.
+     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Reference references = 2; + */ + public Builder addReferences( + com.google.cloud.securitycenter.v2.Reference.Builder builderForValue) { + if (referencesBuilder_ == null) { + ensureReferencesIsMutable(); + references_.add(builderForValue.build()); + onChanged(); + } else { + referencesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Additional information about the CVE.
+     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Reference references = 2; + */ + public Builder addReferences( + int index, com.google.cloud.securitycenter.v2.Reference.Builder builderForValue) { + if (referencesBuilder_ == null) { + ensureReferencesIsMutable(); + references_.add(index, builderForValue.build()); + onChanged(); + } else { + referencesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Additional information about the CVE.
+     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Reference references = 2; + */ + public Builder addAllReferences( + java.lang.Iterable values) { + if (referencesBuilder_ == null) { + ensureReferencesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, references_); + onChanged(); + } else { + referencesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Additional information about the CVE.
+     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Reference references = 2; + */ + public Builder clearReferences() { + if (referencesBuilder_ == null) { + references_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + referencesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Additional information about the CVE.
+     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Reference references = 2; + */ + public Builder removeReferences(int index) { + if (referencesBuilder_ == null) { + ensureReferencesIsMutable(); + references_.remove(index); + onChanged(); + } else { + referencesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Additional information about the CVE.
+     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Reference references = 2; + */ + public com.google.cloud.securitycenter.v2.Reference.Builder getReferencesBuilder(int index) { + return getReferencesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Additional information about the CVE.
+     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Reference references = 2; + */ + public com.google.cloud.securitycenter.v2.ReferenceOrBuilder getReferencesOrBuilder(int index) { + if (referencesBuilder_ == null) { + return references_.get(index); + } else { + return referencesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Additional information about the CVE.
+     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Reference references = 2; + */ + public java.util.List + getReferencesOrBuilderList() { + if (referencesBuilder_ != null) { + return referencesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(references_); + } + } + /** + * + * + *
+     * Additional information about the CVE.
+     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Reference references = 2; + */ + public com.google.cloud.securitycenter.v2.Reference.Builder addReferencesBuilder() { + return getReferencesFieldBuilder() + .addBuilder(com.google.cloud.securitycenter.v2.Reference.getDefaultInstance()); + } + /** + * + * + *
+     * Additional information about the CVE.
+     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Reference references = 2; + */ + public com.google.cloud.securitycenter.v2.Reference.Builder addReferencesBuilder(int index) { + return getReferencesFieldBuilder() + .addBuilder(index, com.google.cloud.securitycenter.v2.Reference.getDefaultInstance()); + } + /** + * + * + *
+     * Additional information about the CVE.
+     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Reference references = 2; + */ + public java.util.List + getReferencesBuilderList() { + return getReferencesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Reference, + com.google.cloud.securitycenter.v2.Reference.Builder, + com.google.cloud.securitycenter.v2.ReferenceOrBuilder> + getReferencesFieldBuilder() { + if (referencesBuilder_ == null) { + referencesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Reference, + com.google.cloud.securitycenter.v2.Reference.Builder, + com.google.cloud.securitycenter.v2.ReferenceOrBuilder>( + references_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + references_ = null; + } + return referencesBuilder_; + } + + private com.google.cloud.securitycenter.v2.Cvssv3 cvssv3_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Cvssv3, + com.google.cloud.securitycenter.v2.Cvssv3.Builder, + com.google.cloud.securitycenter.v2.Cvssv3OrBuilder> + cvssv3Builder_; + /** + * + * + *
+     * Describe Common Vulnerability Scoring System specified at
+     * https://www.first.org/cvss/v3.1/specification-document
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3 cvssv3 = 3; + * + * @return Whether the cvssv3 field is set. + */ + public boolean hasCvssv3() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Describe Common Vulnerability Scoring System specified at
+     * https://www.first.org/cvss/v3.1/specification-document
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3 cvssv3 = 3; + * + * @return The cvssv3. + */ + public com.google.cloud.securitycenter.v2.Cvssv3 getCvssv3() { + if (cvssv3Builder_ == null) { + return cvssv3_ == null + ? com.google.cloud.securitycenter.v2.Cvssv3.getDefaultInstance() + : cvssv3_; + } else { + return cvssv3Builder_.getMessage(); + } + } + /** + * + * + *
+     * Describe Common Vulnerability Scoring System specified at
+     * https://www.first.org/cvss/v3.1/specification-document
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3 cvssv3 = 3; + */ + public Builder setCvssv3(com.google.cloud.securitycenter.v2.Cvssv3 value) { + if (cvssv3Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cvssv3_ = value; + } else { + cvssv3Builder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Describe Common Vulnerability Scoring System specified at
+     * https://www.first.org/cvss/v3.1/specification-document
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3 cvssv3 = 3; + */ + public Builder setCvssv3(com.google.cloud.securitycenter.v2.Cvssv3.Builder builderForValue) { + if (cvssv3Builder_ == null) { + cvssv3_ = builderForValue.build(); + } else { + cvssv3Builder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Describe Common Vulnerability Scoring System specified at
+     * https://www.first.org/cvss/v3.1/specification-document
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3 cvssv3 = 3; + */ + public Builder mergeCvssv3(com.google.cloud.securitycenter.v2.Cvssv3 value) { + if (cvssv3Builder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && cvssv3_ != null + && cvssv3_ != com.google.cloud.securitycenter.v2.Cvssv3.getDefaultInstance()) { + getCvssv3Builder().mergeFrom(value); + } else { + cvssv3_ = value; + } + } else { + cvssv3Builder_.mergeFrom(value); + } + if (cvssv3_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Describe Common Vulnerability Scoring System specified at
+     * https://www.first.org/cvss/v3.1/specification-document
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3 cvssv3 = 3; + */ + public Builder clearCvssv3() { + bitField0_ = (bitField0_ & ~0x00000004); + cvssv3_ = null; + if (cvssv3Builder_ != null) { + cvssv3Builder_.dispose(); + cvssv3Builder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Describe Common Vulnerability Scoring System specified at
+     * https://www.first.org/cvss/v3.1/specification-document
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3 cvssv3 = 3; + */ + public com.google.cloud.securitycenter.v2.Cvssv3.Builder getCvssv3Builder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCvssv3FieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Describe Common Vulnerability Scoring System specified at
+     * https://www.first.org/cvss/v3.1/specification-document
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3 cvssv3 = 3; + */ + public com.google.cloud.securitycenter.v2.Cvssv3OrBuilder getCvssv3OrBuilder() { + if (cvssv3Builder_ != null) { + return cvssv3Builder_.getMessageOrBuilder(); + } else { + return cvssv3_ == null + ? com.google.cloud.securitycenter.v2.Cvssv3.getDefaultInstance() + : cvssv3_; + } + } + /** + * + * + *
+     * Describe Common Vulnerability Scoring System specified at
+     * https://www.first.org/cvss/v3.1/specification-document
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3 cvssv3 = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Cvssv3, + com.google.cloud.securitycenter.v2.Cvssv3.Builder, + com.google.cloud.securitycenter.v2.Cvssv3OrBuilder> + getCvssv3FieldBuilder() { + if (cvssv3Builder_ == null) { + cvssv3Builder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Cvssv3, + com.google.cloud.securitycenter.v2.Cvssv3.Builder, + com.google.cloud.securitycenter.v2.Cvssv3OrBuilder>( + getCvssv3(), getParentForChildren(), isClean()); + cvssv3_ = null; + } + return cvssv3Builder_; + } + + private boolean upstreamFixAvailable_; + /** + * + * + *
+     * Whether upstream fix is available for the CVE.
+     * 
+ * + * bool upstream_fix_available = 4; + * + * @return The upstreamFixAvailable. + */ + @java.lang.Override + public boolean getUpstreamFixAvailable() { + return upstreamFixAvailable_; + } + /** + * + * + *
+     * Whether upstream fix is available for the CVE.
+     * 
+ * + * bool upstream_fix_available = 4; + * + * @param value The upstreamFixAvailable to set. + * @return This builder for chaining. + */ + public Builder setUpstreamFixAvailable(boolean value) { + + upstreamFixAvailable_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether upstream fix is available for the CVE.
+     * 
+ * + * bool upstream_fix_available = 4; + * + * @return This builder for chaining. + */ + public Builder clearUpstreamFixAvailable() { + bitField0_ = (bitField0_ & ~0x00000008); + upstreamFixAvailable_ = false; + onChanged(); + return this; + } + + private int impact_ = 0; + /** + * + * + *
+     * The potential impact of the vulnerability if it was to be exploited.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cve.RiskRating impact = 5; + * + * @return The enum numeric value on the wire for impact. + */ + @java.lang.Override + public int getImpactValue() { + return impact_; + } + /** + * + * + *
+     * The potential impact of the vulnerability if it was to be exploited.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cve.RiskRating impact = 5; + * + * @param value The enum numeric value on the wire for impact to set. + * @return This builder for chaining. + */ + public Builder setImpactValue(int value) { + impact_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The potential impact of the vulnerability if it was to be exploited.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cve.RiskRating impact = 5; + * + * @return The impact. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Cve.RiskRating getImpact() { + com.google.cloud.securitycenter.v2.Cve.RiskRating result = + com.google.cloud.securitycenter.v2.Cve.RiskRating.forNumber(impact_); + return result == null + ? com.google.cloud.securitycenter.v2.Cve.RiskRating.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The potential impact of the vulnerability if it was to be exploited.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cve.RiskRating impact = 5; + * + * @param value The impact to set. + * @return This builder for chaining. + */ + public Builder setImpact(com.google.cloud.securitycenter.v2.Cve.RiskRating value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + impact_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The potential impact of the vulnerability if it was to be exploited.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cve.RiskRating impact = 5; + * + * @return This builder for chaining. + */ + public Builder clearImpact() { + bitField0_ = (bitField0_ & ~0x00000010); + impact_ = 0; + onChanged(); + return this; + } + + private int exploitationActivity_ = 0; + /** + * + * + *
+     * The exploitation activity of the vulnerability in the wild.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cve.ExploitationActivity exploitation_activity = 6; + * + * + * @return The enum numeric value on the wire for exploitationActivity. + */ + @java.lang.Override + public int getExploitationActivityValue() { + return exploitationActivity_; + } + /** + * + * + *
+     * The exploitation activity of the vulnerability in the wild.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cve.ExploitationActivity exploitation_activity = 6; + * + * + * @param value The enum numeric value on the wire for exploitationActivity to set. + * @return This builder for chaining. + */ + public Builder setExploitationActivityValue(int value) { + exploitationActivity_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The exploitation activity of the vulnerability in the wild.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cve.ExploitationActivity exploitation_activity = 6; + * + * + * @return The exploitationActivity. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Cve.ExploitationActivity getExploitationActivity() { + com.google.cloud.securitycenter.v2.Cve.ExploitationActivity result = + com.google.cloud.securitycenter.v2.Cve.ExploitationActivity.forNumber( + exploitationActivity_); + return result == null + ? com.google.cloud.securitycenter.v2.Cve.ExploitationActivity.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The exploitation activity of the vulnerability in the wild.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cve.ExploitationActivity exploitation_activity = 6; + * + * + * @param value The exploitationActivity to set. + * @return This builder for chaining. + */ + public Builder setExploitationActivity( + com.google.cloud.securitycenter.v2.Cve.ExploitationActivity value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + exploitationActivity_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The exploitation activity of the vulnerability in the wild.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cve.ExploitationActivity exploitation_activity = 6; + * + * + * @return This builder for chaining. + */ + public Builder clearExploitationActivity() { + bitField0_ = (bitField0_ & ~0x00000020); + exploitationActivity_ = 0; + onChanged(); + return this; + } + + private boolean observedInTheWild_; + /** + * + * + *
+     * Whether or not the vulnerability has been observed in the wild.
+     * 
+ * + * bool observed_in_the_wild = 7; + * + * @return The observedInTheWild. + */ + @java.lang.Override + public boolean getObservedInTheWild() { + return observedInTheWild_; + } + /** + * + * + *
+     * Whether or not the vulnerability has been observed in the wild.
+     * 
+ * + * bool observed_in_the_wild = 7; + * + * @param value The observedInTheWild to set. + * @return This builder for chaining. + */ + public Builder setObservedInTheWild(boolean value) { + + observedInTheWild_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether or not the vulnerability has been observed in the wild.
+     * 
+ * + * bool observed_in_the_wild = 7; + * + * @return This builder for chaining. + */ + public Builder clearObservedInTheWild() { + bitField0_ = (bitField0_ & ~0x00000040); + observedInTheWild_ = false; + onChanged(); + return this; + } + + private boolean zeroDay_; + /** + * + * + *
+     * Whether or not the vulnerability was zero day when the finding was
+     * published.
+     * 
+ * + * bool zero_day = 8; + * + * @return The zeroDay. + */ + @java.lang.Override + public boolean getZeroDay() { + return zeroDay_; + } + /** + * + * + *
+     * Whether or not the vulnerability was zero day when the finding was
+     * published.
+     * 
+ * + * bool zero_day = 8; + * + * @param value The zeroDay to set. + * @return This builder for chaining. + */ + public Builder setZeroDay(boolean value) { + + zeroDay_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether or not the vulnerability was zero day when the finding was
+     * published.
+     * 
+ * + * bool zero_day = 8; + * + * @return This builder for chaining. + */ + public Builder clearZeroDay() { + bitField0_ = (bitField0_ & ~0x00000080); + zeroDay_ = false; + 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.v2.Cve) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.Cve) + private static final com.google.cloud.securitycenter.v2.Cve DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.Cve(); + } + + public static com.google.cloud.securitycenter.v2.Cve getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Cve parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.Cve getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CveOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CveOrBuilder.java new file mode 100644 index 000000000000..a0649556bcd4 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/CveOrBuilder.java @@ -0,0 +1,238 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/vulnerability.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface CveOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.Cve) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The unique identifier for the vulnerability. e.g. CVE-2021-34527
+   * 
+ * + * string id = 1; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * The unique identifier for the vulnerability. e.g. CVE-2021-34527
+   * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * Additional information about the CVE.
+   * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Reference references = 2; + */ + java.util.List getReferencesList(); + /** + * + * + *
+   * Additional information about the CVE.
+   * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Reference references = 2; + */ + com.google.cloud.securitycenter.v2.Reference getReferences(int index); + /** + * + * + *
+   * Additional information about the CVE.
+   * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Reference references = 2; + */ + int getReferencesCount(); + /** + * + * + *
+   * Additional information about the CVE.
+   * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Reference references = 2; + */ + java.util.List + getReferencesOrBuilderList(); + /** + * + * + *
+   * Additional information about the CVE.
+   * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Reference references = 2; + */ + com.google.cloud.securitycenter.v2.ReferenceOrBuilder getReferencesOrBuilder(int index); + + /** + * + * + *
+   * Describe Common Vulnerability Scoring System specified at
+   * https://www.first.org/cvss/v3.1/specification-document
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3 cvssv3 = 3; + * + * @return Whether the cvssv3 field is set. + */ + boolean hasCvssv3(); + /** + * + * + *
+   * Describe Common Vulnerability Scoring System specified at
+   * https://www.first.org/cvss/v3.1/specification-document
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3 cvssv3 = 3; + * + * @return The cvssv3. + */ + com.google.cloud.securitycenter.v2.Cvssv3 getCvssv3(); + /** + * + * + *
+   * Describe Common Vulnerability Scoring System specified at
+   * https://www.first.org/cvss/v3.1/specification-document
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3 cvssv3 = 3; + */ + com.google.cloud.securitycenter.v2.Cvssv3OrBuilder getCvssv3OrBuilder(); + + /** + * + * + *
+   * Whether upstream fix is available for the CVE.
+   * 
+ * + * bool upstream_fix_available = 4; + * + * @return The upstreamFixAvailable. + */ + boolean getUpstreamFixAvailable(); + + /** + * + * + *
+   * The potential impact of the vulnerability if it was to be exploited.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cve.RiskRating impact = 5; + * + * @return The enum numeric value on the wire for impact. + */ + int getImpactValue(); + /** + * + * + *
+   * The potential impact of the vulnerability if it was to be exploited.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cve.RiskRating impact = 5; + * + * @return The impact. + */ + com.google.cloud.securitycenter.v2.Cve.RiskRating getImpact(); + + /** + * + * + *
+   * The exploitation activity of the vulnerability in the wild.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cve.ExploitationActivity exploitation_activity = 6; + * + * + * @return The enum numeric value on the wire for exploitationActivity. + */ + int getExploitationActivityValue(); + /** + * + * + *
+   * The exploitation activity of the vulnerability in the wild.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cve.ExploitationActivity exploitation_activity = 6; + * + * + * @return The exploitationActivity. + */ + com.google.cloud.securitycenter.v2.Cve.ExploitationActivity getExploitationActivity(); + + /** + * + * + *
+   * Whether or not the vulnerability has been observed in the wild.
+   * 
+ * + * bool observed_in_the_wild = 7; + * + * @return The observedInTheWild. + */ + boolean getObservedInTheWild(); + + /** + * + * + *
+   * Whether or not the vulnerability was zero day when the finding was
+   * published.
+   * 
+ * + * bool zero_day = 8; + * + * @return The zeroDay. + */ + boolean getZeroDay(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Cvssv3.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Cvssv3.java new file mode 100644 index 000000000000..c9b1cd8bd9db --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Cvssv3.java @@ -0,0 +1,2957 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/vulnerability.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Common Vulnerability Scoring System version 3.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Cvssv3} + */ +public final class Cvssv3 extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.Cvssv3) + Cvssv3OrBuilder { + private static final long serialVersionUID = 0L; + // Use Cvssv3.newBuilder() to construct. + private Cvssv3(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Cvssv3() { + attackVector_ = 0; + attackComplexity_ = 0; + privilegesRequired_ = 0; + userInteraction_ = 0; + scope_ = 0; + confidentialityImpact_ = 0; + integrityImpact_ = 0; + availabilityImpact_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Cvssv3(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.VulnerabilityProto + .internal_static_google_cloud_securitycenter_v2_Cvssv3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.VulnerabilityProto + .internal_static_google_cloud_securitycenter_v2_Cvssv3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Cvssv3.class, + com.google.cloud.securitycenter.v2.Cvssv3.Builder.class); + } + + /** + * + * + *
+   * This metric reflects the context by which vulnerability exploitation is
+   * possible.
+   * 
+ * + * Protobuf enum {@code google.cloud.securitycenter.v2.Cvssv3.AttackVector} + */ + public enum AttackVector implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Invalid value.
+     * 
+ * + * ATTACK_VECTOR_UNSPECIFIED = 0; + */ + ATTACK_VECTOR_UNSPECIFIED(0), + /** + * + * + *
+     * The vulnerable component is bound to the network stack and the set of
+     * possible attackers extends beyond the other options listed below, up to
+     * and including the entire Internet.
+     * 
+ * + * ATTACK_VECTOR_NETWORK = 1; + */ + ATTACK_VECTOR_NETWORK(1), + /** + * + * + *
+     * The vulnerable component is bound to the network stack, but the attack is
+     * limited at the protocol level to a logically adjacent topology.
+     * 
+ * + * ATTACK_VECTOR_ADJACENT = 2; + */ + ATTACK_VECTOR_ADJACENT(2), + /** + * + * + *
+     * The vulnerable component is not bound to the network stack and the
+     * attacker's path is via read/write/execute capabilities.
+     * 
+ * + * ATTACK_VECTOR_LOCAL = 3; + */ + ATTACK_VECTOR_LOCAL(3), + /** + * + * + *
+     * The attack requires the attacker to physically touch or manipulate the
+     * vulnerable component.
+     * 
+ * + * ATTACK_VECTOR_PHYSICAL = 4; + */ + ATTACK_VECTOR_PHYSICAL(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Invalid value.
+     * 
+ * + * ATTACK_VECTOR_UNSPECIFIED = 0; + */ + public static final int ATTACK_VECTOR_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The vulnerable component is bound to the network stack and the set of
+     * possible attackers extends beyond the other options listed below, up to
+     * and including the entire Internet.
+     * 
+ * + * ATTACK_VECTOR_NETWORK = 1; + */ + public static final int ATTACK_VECTOR_NETWORK_VALUE = 1; + /** + * + * + *
+     * The vulnerable component is bound to the network stack, but the attack is
+     * limited at the protocol level to a logically adjacent topology.
+     * 
+ * + * ATTACK_VECTOR_ADJACENT = 2; + */ + public static final int ATTACK_VECTOR_ADJACENT_VALUE = 2; + /** + * + * + *
+     * The vulnerable component is not bound to the network stack and the
+     * attacker's path is via read/write/execute capabilities.
+     * 
+ * + * ATTACK_VECTOR_LOCAL = 3; + */ + public static final int ATTACK_VECTOR_LOCAL_VALUE = 3; + /** + * + * + *
+     * The attack requires the attacker to physically touch or manipulate the
+     * vulnerable component.
+     * 
+ * + * ATTACK_VECTOR_PHYSICAL = 4; + */ + public static final int ATTACK_VECTOR_PHYSICAL_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 AttackVector 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 AttackVector forNumber(int value) { + switch (value) { + case 0: + return ATTACK_VECTOR_UNSPECIFIED; + case 1: + return ATTACK_VECTOR_NETWORK; + case 2: + return ATTACK_VECTOR_ADJACENT; + case 3: + return ATTACK_VECTOR_LOCAL; + case 4: + return ATTACK_VECTOR_PHYSICAL; + 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 AttackVector findValueByNumber(int number) { + return AttackVector.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.v2.Cvssv3.getDescriptor().getEnumTypes().get(0); + } + + private static final AttackVector[] VALUES = values(); + + public static AttackVector 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 AttackVector(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v2.Cvssv3.AttackVector) + } + + /** + * + * + *
+   * This metric describes the conditions beyond the attacker's control that
+   * must exist in order to exploit the vulnerability.
+   * 
+ * + * Protobuf enum {@code google.cloud.securitycenter.v2.Cvssv3.AttackComplexity} + */ + public enum AttackComplexity implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Invalid value.
+     * 
+ * + * ATTACK_COMPLEXITY_UNSPECIFIED = 0; + */ + ATTACK_COMPLEXITY_UNSPECIFIED(0), + /** + * + * + *
+     * Specialized access conditions or extenuating circumstances do not exist.
+     * An attacker can expect repeatable success when attacking the vulnerable
+     * component.
+     * 
+ * + * ATTACK_COMPLEXITY_LOW = 1; + */ + ATTACK_COMPLEXITY_LOW(1), + /** + * + * + *
+     * A successful attack depends on conditions beyond the attacker's control.
+     * That is, a successful attack cannot be accomplished at will, but requires
+     * the attacker to invest in some measurable amount of effort in preparation
+     * or execution against the vulnerable component before a successful attack
+     * can be expected.
+     * 
+ * + * ATTACK_COMPLEXITY_HIGH = 2; + */ + ATTACK_COMPLEXITY_HIGH(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Invalid value.
+     * 
+ * + * ATTACK_COMPLEXITY_UNSPECIFIED = 0; + */ + public static final int ATTACK_COMPLEXITY_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Specialized access conditions or extenuating circumstances do not exist.
+     * An attacker can expect repeatable success when attacking the vulnerable
+     * component.
+     * 
+ * + * ATTACK_COMPLEXITY_LOW = 1; + */ + public static final int ATTACK_COMPLEXITY_LOW_VALUE = 1; + /** + * + * + *
+     * A successful attack depends on conditions beyond the attacker's control.
+     * That is, a successful attack cannot be accomplished at will, but requires
+     * the attacker to invest in some measurable amount of effort in preparation
+     * or execution against the vulnerable component before a successful attack
+     * can be expected.
+     * 
+ * + * ATTACK_COMPLEXITY_HIGH = 2; + */ + public static final int ATTACK_COMPLEXITY_HIGH_VALUE = 2; + + 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 AttackComplexity 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 AttackComplexity forNumber(int value) { + switch (value) { + case 0: + return ATTACK_COMPLEXITY_UNSPECIFIED; + case 1: + return ATTACK_COMPLEXITY_LOW; + case 2: + return ATTACK_COMPLEXITY_HIGH; + 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 AttackComplexity findValueByNumber(int number) { + return AttackComplexity.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.v2.Cvssv3.getDescriptor().getEnumTypes().get(1); + } + + private static final AttackComplexity[] VALUES = values(); + + public static AttackComplexity 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 AttackComplexity(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v2.Cvssv3.AttackComplexity) + } + + /** + * + * + *
+   * This metric describes the level of privileges an attacker must possess
+   * before successfully exploiting the vulnerability.
+   * 
+ * + * Protobuf enum {@code google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired} + */ + public enum PrivilegesRequired implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Invalid value.
+     * 
+ * + * PRIVILEGES_REQUIRED_UNSPECIFIED = 0; + */ + PRIVILEGES_REQUIRED_UNSPECIFIED(0), + /** + * + * + *
+     * The attacker is unauthorized prior to attack, and therefore does not
+     * require any access to settings or files of the vulnerable system to
+     * carry out an attack.
+     * 
+ * + * PRIVILEGES_REQUIRED_NONE = 1; + */ + PRIVILEGES_REQUIRED_NONE(1), + /** + * + * + *
+     * The attacker requires privileges that provide basic user capabilities
+     * that could normally affect only settings and files owned by a user.
+     * Alternatively, an attacker with Low privileges has the ability to access
+     * only non-sensitive resources.
+     * 
+ * + * PRIVILEGES_REQUIRED_LOW = 2; + */ + PRIVILEGES_REQUIRED_LOW(2), + /** + * + * + *
+     * The attacker requires privileges that provide significant (e.g.,
+     * administrative) control over the vulnerable component allowing access to
+     * component-wide settings and files.
+     * 
+ * + * PRIVILEGES_REQUIRED_HIGH = 3; + */ + PRIVILEGES_REQUIRED_HIGH(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Invalid value.
+     * 
+ * + * PRIVILEGES_REQUIRED_UNSPECIFIED = 0; + */ + public static final int PRIVILEGES_REQUIRED_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The attacker is unauthorized prior to attack, and therefore does not
+     * require any access to settings or files of the vulnerable system to
+     * carry out an attack.
+     * 
+ * + * PRIVILEGES_REQUIRED_NONE = 1; + */ + public static final int PRIVILEGES_REQUIRED_NONE_VALUE = 1; + /** + * + * + *
+     * The attacker requires privileges that provide basic user capabilities
+     * that could normally affect only settings and files owned by a user.
+     * Alternatively, an attacker with Low privileges has the ability to access
+     * only non-sensitive resources.
+     * 
+ * + * PRIVILEGES_REQUIRED_LOW = 2; + */ + public static final int PRIVILEGES_REQUIRED_LOW_VALUE = 2; + /** + * + * + *
+     * The attacker requires privileges that provide significant (e.g.,
+     * administrative) control over the vulnerable component allowing access to
+     * component-wide settings and files.
+     * 
+ * + * PRIVILEGES_REQUIRED_HIGH = 3; + */ + public static final int PRIVILEGES_REQUIRED_HIGH_VALUE = 3; + + 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 PrivilegesRequired 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 PrivilegesRequired forNumber(int value) { + switch (value) { + case 0: + return PRIVILEGES_REQUIRED_UNSPECIFIED; + case 1: + return PRIVILEGES_REQUIRED_NONE; + case 2: + return PRIVILEGES_REQUIRED_LOW; + case 3: + return PRIVILEGES_REQUIRED_HIGH; + 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 PrivilegesRequired findValueByNumber(int number) { + return PrivilegesRequired.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.v2.Cvssv3.getDescriptor().getEnumTypes().get(2); + } + + private static final PrivilegesRequired[] VALUES = values(); + + public static PrivilegesRequired 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 PrivilegesRequired(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired) + } + + /** + * + * + *
+   * This metric captures the requirement for a human user, other than the
+   * attacker, to participate in the successful compromise of the vulnerable
+   * component.
+   * 
+ * + * Protobuf enum {@code google.cloud.securitycenter.v2.Cvssv3.UserInteraction} + */ + public enum UserInteraction implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Invalid value.
+     * 
+ * + * USER_INTERACTION_UNSPECIFIED = 0; + */ + USER_INTERACTION_UNSPECIFIED(0), + /** + * + * + *
+     * The vulnerable system can be exploited without interaction from any user.
+     * 
+ * + * USER_INTERACTION_NONE = 1; + */ + USER_INTERACTION_NONE(1), + /** + * + * + *
+     * Successful exploitation of this vulnerability requires a user to take
+     * some action before the vulnerability can be exploited.
+     * 
+ * + * USER_INTERACTION_REQUIRED = 2; + */ + USER_INTERACTION_REQUIRED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Invalid value.
+     * 
+ * + * USER_INTERACTION_UNSPECIFIED = 0; + */ + public static final int USER_INTERACTION_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The vulnerable system can be exploited without interaction from any user.
+     * 
+ * + * USER_INTERACTION_NONE = 1; + */ + public static final int USER_INTERACTION_NONE_VALUE = 1; + /** + * + * + *
+     * Successful exploitation of this vulnerability requires a user to take
+     * some action before the vulnerability can be exploited.
+     * 
+ * + * USER_INTERACTION_REQUIRED = 2; + */ + public static final int USER_INTERACTION_REQUIRED_VALUE = 2; + + 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 UserInteraction 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 UserInteraction forNumber(int value) { + switch (value) { + case 0: + return USER_INTERACTION_UNSPECIFIED; + case 1: + return USER_INTERACTION_NONE; + case 2: + return USER_INTERACTION_REQUIRED; + 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 UserInteraction findValueByNumber(int number) { + return UserInteraction.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.v2.Cvssv3.getDescriptor().getEnumTypes().get(3); + } + + private static final UserInteraction[] VALUES = values(); + + public static UserInteraction 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 UserInteraction(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v2.Cvssv3.UserInteraction) + } + + /** + * + * + *
+   * The Scope metric captures whether a vulnerability in one vulnerable
+   * component impacts resources in components beyond its security scope.
+   * 
+ * + * Protobuf enum {@code google.cloud.securitycenter.v2.Cvssv3.Scope} + */ + public enum Scope implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Invalid value.
+     * 
+ * + * SCOPE_UNSPECIFIED = 0; + */ + SCOPE_UNSPECIFIED(0), + /** + * + * + *
+     * An exploited vulnerability can only affect resources managed by the same
+     * security authority.
+     * 
+ * + * SCOPE_UNCHANGED = 1; + */ + SCOPE_UNCHANGED(1), + /** + * + * + *
+     * An exploited vulnerability can affect resources beyond the security scope
+     * managed by the security authority of the vulnerable component.
+     * 
+ * + * SCOPE_CHANGED = 2; + */ + SCOPE_CHANGED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Invalid value.
+     * 
+ * + * SCOPE_UNSPECIFIED = 0; + */ + public static final int SCOPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * An exploited vulnerability can only affect resources managed by the same
+     * security authority.
+     * 
+ * + * SCOPE_UNCHANGED = 1; + */ + public static final int SCOPE_UNCHANGED_VALUE = 1; + /** + * + * + *
+     * An exploited vulnerability can affect resources beyond the security scope
+     * managed by the security authority of the vulnerable component.
+     * 
+ * + * SCOPE_CHANGED = 2; + */ + public static final int SCOPE_CHANGED_VALUE = 2; + + 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 Scope 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 Scope forNumber(int value) { + switch (value) { + case 0: + return SCOPE_UNSPECIFIED; + case 1: + return SCOPE_UNCHANGED; + case 2: + return SCOPE_CHANGED; + 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 Scope findValueByNumber(int number) { + return Scope.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.v2.Cvssv3.getDescriptor().getEnumTypes().get(4); + } + + private static final Scope[] VALUES = values(); + + public static Scope 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 Scope(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v2.Cvssv3.Scope) + } + + /** + * + * + *
+   * The Impact metrics capture the effects of a successfully exploited
+   * vulnerability on the component that suffers the worst outcome that is most
+   * directly and predictably associated with the attack.
+   * 
+ * + * Protobuf enum {@code google.cloud.securitycenter.v2.Cvssv3.Impact} + */ + public enum Impact implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Invalid value.
+     * 
+ * + * IMPACT_UNSPECIFIED = 0; + */ + IMPACT_UNSPECIFIED(0), + /** + * + * + *
+     * High impact.
+     * 
+ * + * IMPACT_HIGH = 1; + */ + IMPACT_HIGH(1), + /** + * + * + *
+     * Low impact.
+     * 
+ * + * IMPACT_LOW = 2; + */ + IMPACT_LOW(2), + /** + * + * + *
+     * No impact.
+     * 
+ * + * IMPACT_NONE = 3; + */ + IMPACT_NONE(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Invalid value.
+     * 
+ * + * IMPACT_UNSPECIFIED = 0; + */ + public static final int IMPACT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * High impact.
+     * 
+ * + * IMPACT_HIGH = 1; + */ + public static final int IMPACT_HIGH_VALUE = 1; + /** + * + * + *
+     * Low impact.
+     * 
+ * + * IMPACT_LOW = 2; + */ + public static final int IMPACT_LOW_VALUE = 2; + /** + * + * + *
+     * No impact.
+     * 
+ * + * IMPACT_NONE = 3; + */ + public static final int IMPACT_NONE_VALUE = 3; + + 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 Impact 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 Impact forNumber(int value) { + switch (value) { + case 0: + return IMPACT_UNSPECIFIED; + case 1: + return IMPACT_HIGH; + case 2: + return IMPACT_LOW; + case 3: + return IMPACT_NONE; + 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 Impact findValueByNumber(int number) { + return Impact.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.v2.Cvssv3.getDescriptor().getEnumTypes().get(5); + } + + private static final Impact[] VALUES = values(); + + public static Impact 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 Impact(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v2.Cvssv3.Impact) + } + + public static final int BASE_SCORE_FIELD_NUMBER = 1; + private double baseScore_ = 0D; + /** + * + * + *
+   * The base score is a function of the base metric scores.
+   * 
+ * + * double base_score = 1; + * + * @return The baseScore. + */ + @java.lang.Override + public double getBaseScore() { + return baseScore_; + } + + public static final int ATTACK_VECTOR_FIELD_NUMBER = 2; + private int attackVector_ = 0; + /** + * + * + *
+   * Base Metrics
+   * Represents the intrinsic characteristics of a vulnerability that are
+   * constant over time and across user environments.
+   * This metric reflects the context by which vulnerability exploitation is
+   * possible.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.AttackVector attack_vector = 2; + * + * @return The enum numeric value on the wire for attackVector. + */ + @java.lang.Override + public int getAttackVectorValue() { + return attackVector_; + } + /** + * + * + *
+   * Base Metrics
+   * Represents the intrinsic characteristics of a vulnerability that are
+   * constant over time and across user environments.
+   * This metric reflects the context by which vulnerability exploitation is
+   * possible.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.AttackVector attack_vector = 2; + * + * @return The attackVector. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Cvssv3.AttackVector getAttackVector() { + com.google.cloud.securitycenter.v2.Cvssv3.AttackVector result = + com.google.cloud.securitycenter.v2.Cvssv3.AttackVector.forNumber(attackVector_); + return result == null + ? com.google.cloud.securitycenter.v2.Cvssv3.AttackVector.UNRECOGNIZED + : result; + } + + public static final int ATTACK_COMPLEXITY_FIELD_NUMBER = 3; + private int attackComplexity_ = 0; + /** + * + * + *
+   * This metric describes the conditions beyond the attacker's control that
+   * must exist in order to exploit the vulnerability.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.AttackComplexity attack_complexity = 3; + * + * @return The enum numeric value on the wire for attackComplexity. + */ + @java.lang.Override + public int getAttackComplexityValue() { + return attackComplexity_; + } + /** + * + * + *
+   * This metric describes the conditions beyond the attacker's control that
+   * must exist in order to exploit the vulnerability.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.AttackComplexity attack_complexity = 3; + * + * @return The attackComplexity. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Cvssv3.AttackComplexity getAttackComplexity() { + com.google.cloud.securitycenter.v2.Cvssv3.AttackComplexity result = + com.google.cloud.securitycenter.v2.Cvssv3.AttackComplexity.forNumber(attackComplexity_); + return result == null + ? com.google.cloud.securitycenter.v2.Cvssv3.AttackComplexity.UNRECOGNIZED + : result; + } + + public static final int PRIVILEGES_REQUIRED_FIELD_NUMBER = 4; + private int privilegesRequired_ = 0; + /** + * + * + *
+   * This metric describes the level of privileges an attacker must possess
+   * before successfully exploiting the vulnerability.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired privileges_required = 4; + * + * @return The enum numeric value on the wire for privilegesRequired. + */ + @java.lang.Override + public int getPrivilegesRequiredValue() { + return privilegesRequired_; + } + /** + * + * + *
+   * This metric describes the level of privileges an attacker must possess
+   * before successfully exploiting the vulnerability.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired privileges_required = 4; + * + * @return The privilegesRequired. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired getPrivilegesRequired() { + com.google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired result = + com.google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired.forNumber(privilegesRequired_); + return result == null + ? com.google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired.UNRECOGNIZED + : result; + } + + public static final int USER_INTERACTION_FIELD_NUMBER = 5; + private int userInteraction_ = 0; + /** + * + * + *
+   * This metric captures the requirement for a human user, other than the
+   * attacker, to participate in the successful compromise of the vulnerable
+   * component.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.UserInteraction user_interaction = 5; + * + * @return The enum numeric value on the wire for userInteraction. + */ + @java.lang.Override + public int getUserInteractionValue() { + return userInteraction_; + } + /** + * + * + *
+   * This metric captures the requirement for a human user, other than the
+   * attacker, to participate in the successful compromise of the vulnerable
+   * component.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.UserInteraction user_interaction = 5; + * + * @return The userInteraction. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Cvssv3.UserInteraction getUserInteraction() { + com.google.cloud.securitycenter.v2.Cvssv3.UserInteraction result = + com.google.cloud.securitycenter.v2.Cvssv3.UserInteraction.forNumber(userInteraction_); + return result == null + ? com.google.cloud.securitycenter.v2.Cvssv3.UserInteraction.UNRECOGNIZED + : result; + } + + public static final int SCOPE_FIELD_NUMBER = 6; + private int scope_ = 0; + /** + * + * + *
+   * The Scope metric captures whether a vulnerability in one vulnerable
+   * component impacts resources in components beyond its security scope.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.Scope scope = 6; + * + * @return The enum numeric value on the wire for scope. + */ + @java.lang.Override + public int getScopeValue() { + return scope_; + } + /** + * + * + *
+   * The Scope metric captures whether a vulnerability in one vulnerable
+   * component impacts resources in components beyond its security scope.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.Scope scope = 6; + * + * @return The scope. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Cvssv3.Scope getScope() { + com.google.cloud.securitycenter.v2.Cvssv3.Scope result = + com.google.cloud.securitycenter.v2.Cvssv3.Scope.forNumber(scope_); + return result == null ? com.google.cloud.securitycenter.v2.Cvssv3.Scope.UNRECOGNIZED : result; + } + + public static final int CONFIDENTIALITY_IMPACT_FIELD_NUMBER = 7; + private int confidentialityImpact_ = 0; + /** + * + * + *
+   * This metric measures the impact to the confidentiality of the information
+   * resources managed by a software component due to a successfully exploited
+   * vulnerability.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.Impact confidentiality_impact = 7; + * + * @return The enum numeric value on the wire for confidentialityImpact. + */ + @java.lang.Override + public int getConfidentialityImpactValue() { + return confidentialityImpact_; + } + /** + * + * + *
+   * This metric measures the impact to the confidentiality of the information
+   * resources managed by a software component due to a successfully exploited
+   * vulnerability.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.Impact confidentiality_impact = 7; + * + * @return The confidentialityImpact. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Cvssv3.Impact getConfidentialityImpact() { + com.google.cloud.securitycenter.v2.Cvssv3.Impact result = + com.google.cloud.securitycenter.v2.Cvssv3.Impact.forNumber(confidentialityImpact_); + return result == null ? com.google.cloud.securitycenter.v2.Cvssv3.Impact.UNRECOGNIZED : result; + } + + public static final int INTEGRITY_IMPACT_FIELD_NUMBER = 8; + private int integrityImpact_ = 0; + /** + * + * + *
+   * This metric measures the impact to integrity of a successfully exploited
+   * vulnerability.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.Impact integrity_impact = 8; + * + * @return The enum numeric value on the wire for integrityImpact. + */ + @java.lang.Override + public int getIntegrityImpactValue() { + return integrityImpact_; + } + /** + * + * + *
+   * This metric measures the impact to integrity of a successfully exploited
+   * vulnerability.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.Impact integrity_impact = 8; + * + * @return The integrityImpact. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Cvssv3.Impact getIntegrityImpact() { + com.google.cloud.securitycenter.v2.Cvssv3.Impact result = + com.google.cloud.securitycenter.v2.Cvssv3.Impact.forNumber(integrityImpact_); + return result == null ? com.google.cloud.securitycenter.v2.Cvssv3.Impact.UNRECOGNIZED : result; + } + + public static final int AVAILABILITY_IMPACT_FIELD_NUMBER = 9; + private int availabilityImpact_ = 0; + /** + * + * + *
+   * This metric measures the impact to the availability of the impacted
+   * component resulting from a successfully exploited vulnerability.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.Impact availability_impact = 9; + * + * @return The enum numeric value on the wire for availabilityImpact. + */ + @java.lang.Override + public int getAvailabilityImpactValue() { + return availabilityImpact_; + } + /** + * + * + *
+   * This metric measures the impact to the availability of the impacted
+   * component resulting from a successfully exploited vulnerability.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.Impact availability_impact = 9; + * + * @return The availabilityImpact. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Cvssv3.Impact getAvailabilityImpact() { + com.google.cloud.securitycenter.v2.Cvssv3.Impact result = + com.google.cloud.securitycenter.v2.Cvssv3.Impact.forNumber(availabilityImpact_); + return result == null ? com.google.cloud.securitycenter.v2.Cvssv3.Impact.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 (java.lang.Double.doubleToRawLongBits(baseScore_) != 0) { + output.writeDouble(1, baseScore_); + } + if (attackVector_ + != com.google.cloud.securitycenter.v2.Cvssv3.AttackVector.ATTACK_VECTOR_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, attackVector_); + } + if (attackComplexity_ + != com.google.cloud.securitycenter.v2.Cvssv3.AttackComplexity.ATTACK_COMPLEXITY_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, attackComplexity_); + } + if (privilegesRequired_ + != com.google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired + .PRIVILEGES_REQUIRED_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, privilegesRequired_); + } + if (userInteraction_ + != com.google.cloud.securitycenter.v2.Cvssv3.UserInteraction.USER_INTERACTION_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, userInteraction_); + } + if (scope_ != com.google.cloud.securitycenter.v2.Cvssv3.Scope.SCOPE_UNSPECIFIED.getNumber()) { + output.writeEnum(6, scope_); + } + if (confidentialityImpact_ + != com.google.cloud.securitycenter.v2.Cvssv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { + output.writeEnum(7, confidentialityImpact_); + } + if (integrityImpact_ + != com.google.cloud.securitycenter.v2.Cvssv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { + output.writeEnum(8, integrityImpact_); + } + if (availabilityImpact_ + != com.google.cloud.securitycenter.v2.Cvssv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { + output.writeEnum(9, availabilityImpact_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Double.doubleToRawLongBits(baseScore_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, baseScore_); + } + if (attackVector_ + != com.google.cloud.securitycenter.v2.Cvssv3.AttackVector.ATTACK_VECTOR_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, attackVector_); + } + if (attackComplexity_ + != com.google.cloud.securitycenter.v2.Cvssv3.AttackComplexity.ATTACK_COMPLEXITY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, attackComplexity_); + } + if (privilegesRequired_ + != com.google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired + .PRIVILEGES_REQUIRED_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, privilegesRequired_); + } + if (userInteraction_ + != com.google.cloud.securitycenter.v2.Cvssv3.UserInteraction.USER_INTERACTION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, userInteraction_); + } + if (scope_ != com.google.cloud.securitycenter.v2.Cvssv3.Scope.SCOPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, scope_); + } + if (confidentialityImpact_ + != com.google.cloud.securitycenter.v2.Cvssv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, confidentialityImpact_); + } + if (integrityImpact_ + != com.google.cloud.securitycenter.v2.Cvssv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, integrityImpact_); + } + if (availabilityImpact_ + != com.google.cloud.securitycenter.v2.Cvssv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, availabilityImpact_); + } + size += getUnknownFields().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.v2.Cvssv3)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.Cvssv3 other = + (com.google.cloud.securitycenter.v2.Cvssv3) obj; + + if (java.lang.Double.doubleToLongBits(getBaseScore()) + != java.lang.Double.doubleToLongBits(other.getBaseScore())) return false; + if (attackVector_ != other.attackVector_) return false; + if (attackComplexity_ != other.attackComplexity_) return false; + if (privilegesRequired_ != other.privilegesRequired_) return false; + if (userInteraction_ != other.userInteraction_) return false; + if (scope_ != other.scope_) return false; + if (confidentialityImpact_ != other.confidentialityImpact_) return false; + if (integrityImpact_ != other.integrityImpact_) return false; + if (availabilityImpact_ != other.availabilityImpact_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + BASE_SCORE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getBaseScore())); + hash = (37 * hash) + ATTACK_VECTOR_FIELD_NUMBER; + hash = (53 * hash) + attackVector_; + hash = (37 * hash) + ATTACK_COMPLEXITY_FIELD_NUMBER; + hash = (53 * hash) + attackComplexity_; + hash = (37 * hash) + PRIVILEGES_REQUIRED_FIELD_NUMBER; + hash = (53 * hash) + privilegesRequired_; + hash = (37 * hash) + USER_INTERACTION_FIELD_NUMBER; + hash = (53 * hash) + userInteraction_; + hash = (37 * hash) + SCOPE_FIELD_NUMBER; + hash = (53 * hash) + scope_; + hash = (37 * hash) + CONFIDENTIALITY_IMPACT_FIELD_NUMBER; + hash = (53 * hash) + confidentialityImpact_; + hash = (37 * hash) + INTEGRITY_IMPACT_FIELD_NUMBER; + hash = (53 * hash) + integrityImpact_; + hash = (37 * hash) + AVAILABILITY_IMPACT_FIELD_NUMBER; + hash = (53 * hash) + availabilityImpact_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.Cvssv3 parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Cvssv3 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.v2.Cvssv3 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Cvssv3 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.v2.Cvssv3 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Cvssv3 parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.Cvssv3 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Cvssv3 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.v2.Cvssv3 parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Cvssv3 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.v2.Cvssv3 parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Cvssv3 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.v2.Cvssv3 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; + } + /** + * + * + *
+   * Common Vulnerability Scoring System version 3.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Cvssv3} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.Cvssv3) + com.google.cloud.securitycenter.v2.Cvssv3OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.VulnerabilityProto + .internal_static_google_cloud_securitycenter_v2_Cvssv3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.VulnerabilityProto + .internal_static_google_cloud_securitycenter_v2_Cvssv3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Cvssv3.class, + com.google.cloud.securitycenter.v2.Cvssv3.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.Cvssv3.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + baseScore_ = 0D; + attackVector_ = 0; + attackComplexity_ = 0; + privilegesRequired_ = 0; + userInteraction_ = 0; + scope_ = 0; + confidentialityImpact_ = 0; + integrityImpact_ = 0; + availabilityImpact_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.VulnerabilityProto + .internal_static_google_cloud_securitycenter_v2_Cvssv3_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Cvssv3 getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.Cvssv3.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Cvssv3 build() { + com.google.cloud.securitycenter.v2.Cvssv3 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Cvssv3 buildPartial() { + com.google.cloud.securitycenter.v2.Cvssv3 result = + new com.google.cloud.securitycenter.v2.Cvssv3(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.Cvssv3 result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.baseScore_ = baseScore_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.attackVector_ = attackVector_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.attackComplexity_ = attackComplexity_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.privilegesRequired_ = privilegesRequired_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.userInteraction_ = userInteraction_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.scope_ = scope_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.confidentialityImpact_ = confidentialityImpact_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.integrityImpact_ = integrityImpact_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.availabilityImpact_ = availabilityImpact_; + } + } + + @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.v2.Cvssv3) { + return mergeFrom((com.google.cloud.securitycenter.v2.Cvssv3) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.Cvssv3 other) { + if (other == com.google.cloud.securitycenter.v2.Cvssv3.getDefaultInstance()) return this; + if (other.getBaseScore() != 0D) { + setBaseScore(other.getBaseScore()); + } + if (other.attackVector_ != 0) { + setAttackVectorValue(other.getAttackVectorValue()); + } + if (other.attackComplexity_ != 0) { + setAttackComplexityValue(other.getAttackComplexityValue()); + } + if (other.privilegesRequired_ != 0) { + setPrivilegesRequiredValue(other.getPrivilegesRequiredValue()); + } + if (other.userInteraction_ != 0) { + setUserInteractionValue(other.getUserInteractionValue()); + } + if (other.scope_ != 0) { + setScopeValue(other.getScopeValue()); + } + if (other.confidentialityImpact_ != 0) { + setConfidentialityImpactValue(other.getConfidentialityImpactValue()); + } + if (other.integrityImpact_ != 0) { + setIntegrityImpactValue(other.getIntegrityImpactValue()); + } + if (other.availabilityImpact_ != 0) { + setAvailabilityImpactValue(other.getAvailabilityImpactValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: + { + baseScore_ = input.readDouble(); + bitField0_ |= 0x00000001; + break; + } // case 9 + case 16: + { + attackVector_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + attackComplexity_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + privilegesRequired_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + userInteraction_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: + { + scope_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: + { + confidentialityImpact_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 64: + { + integrityImpact_ = input.readEnum(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 72: + { + availabilityImpact_ = input.readEnum(); + bitField0_ |= 0x00000100; + break; + } // case 72 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private double baseScore_; + /** + * + * + *
+     * The base score is a function of the base metric scores.
+     * 
+ * + * double base_score = 1; + * + * @return The baseScore. + */ + @java.lang.Override + public double getBaseScore() { + return baseScore_; + } + /** + * + * + *
+     * The base score is a function of the base metric scores.
+     * 
+ * + * double base_score = 1; + * + * @param value The baseScore to set. + * @return This builder for chaining. + */ + public Builder setBaseScore(double value) { + + baseScore_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The base score is a function of the base metric scores.
+     * 
+ * + * double base_score = 1; + * + * @return This builder for chaining. + */ + public Builder clearBaseScore() { + bitField0_ = (bitField0_ & ~0x00000001); + baseScore_ = 0D; + onChanged(); + return this; + } + + private int attackVector_ = 0; + /** + * + * + *
+     * Base Metrics
+     * Represents the intrinsic characteristics of a vulnerability that are
+     * constant over time and across user environments.
+     * This metric reflects the context by which vulnerability exploitation is
+     * possible.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.AttackVector attack_vector = 2; + * + * @return The enum numeric value on the wire for attackVector. + */ + @java.lang.Override + public int getAttackVectorValue() { + return attackVector_; + } + /** + * + * + *
+     * Base Metrics
+     * Represents the intrinsic characteristics of a vulnerability that are
+     * constant over time and across user environments.
+     * This metric reflects the context by which vulnerability exploitation is
+     * possible.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.AttackVector attack_vector = 2; + * + * @param value The enum numeric value on the wire for attackVector to set. + * @return This builder for chaining. + */ + public Builder setAttackVectorValue(int value) { + attackVector_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Base Metrics
+     * Represents the intrinsic characteristics of a vulnerability that are
+     * constant over time and across user environments.
+     * This metric reflects the context by which vulnerability exploitation is
+     * possible.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.AttackVector attack_vector = 2; + * + * @return The attackVector. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Cvssv3.AttackVector getAttackVector() { + com.google.cloud.securitycenter.v2.Cvssv3.AttackVector result = + com.google.cloud.securitycenter.v2.Cvssv3.AttackVector.forNumber(attackVector_); + return result == null + ? com.google.cloud.securitycenter.v2.Cvssv3.AttackVector.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Base Metrics
+     * Represents the intrinsic characteristics of a vulnerability that are
+     * constant over time and across user environments.
+     * This metric reflects the context by which vulnerability exploitation is
+     * possible.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.AttackVector attack_vector = 2; + * + * @param value The attackVector to set. + * @return This builder for chaining. + */ + public Builder setAttackVector(com.google.cloud.securitycenter.v2.Cvssv3.AttackVector value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + attackVector_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Base Metrics
+     * Represents the intrinsic characteristics of a vulnerability that are
+     * constant over time and across user environments.
+     * This metric reflects the context by which vulnerability exploitation is
+     * possible.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.AttackVector attack_vector = 2; + * + * @return This builder for chaining. + */ + public Builder clearAttackVector() { + bitField0_ = (bitField0_ & ~0x00000002); + attackVector_ = 0; + onChanged(); + return this; + } + + private int attackComplexity_ = 0; + /** + * + * + *
+     * This metric describes the conditions beyond the attacker's control that
+     * must exist in order to exploit the vulnerability.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.AttackComplexity attack_complexity = 3; + * + * @return The enum numeric value on the wire for attackComplexity. + */ + @java.lang.Override + public int getAttackComplexityValue() { + return attackComplexity_; + } + /** + * + * + *
+     * This metric describes the conditions beyond the attacker's control that
+     * must exist in order to exploit the vulnerability.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.AttackComplexity attack_complexity = 3; + * + * @param value The enum numeric value on the wire for attackComplexity to set. + * @return This builder for chaining. + */ + public Builder setAttackComplexityValue(int value) { + attackComplexity_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * This metric describes the conditions beyond the attacker's control that
+     * must exist in order to exploit the vulnerability.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.AttackComplexity attack_complexity = 3; + * + * @return The attackComplexity. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Cvssv3.AttackComplexity getAttackComplexity() { + com.google.cloud.securitycenter.v2.Cvssv3.AttackComplexity result = + com.google.cloud.securitycenter.v2.Cvssv3.AttackComplexity.forNumber(attackComplexity_); + return result == null + ? com.google.cloud.securitycenter.v2.Cvssv3.AttackComplexity.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * This metric describes the conditions beyond the attacker's control that
+     * must exist in order to exploit the vulnerability.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.AttackComplexity attack_complexity = 3; + * + * @param value The attackComplexity to set. + * @return This builder for chaining. + */ + public Builder setAttackComplexity( + com.google.cloud.securitycenter.v2.Cvssv3.AttackComplexity value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + attackComplexity_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * This metric describes the conditions beyond the attacker's control that
+     * must exist in order to exploit the vulnerability.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.AttackComplexity attack_complexity = 3; + * + * @return This builder for chaining. + */ + public Builder clearAttackComplexity() { + bitField0_ = (bitField0_ & ~0x00000004); + attackComplexity_ = 0; + onChanged(); + return this; + } + + private int privilegesRequired_ = 0; + /** + * + * + *
+     * This metric describes the level of privileges an attacker must possess
+     * before successfully exploiting the vulnerability.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired privileges_required = 4; + * + * + * @return The enum numeric value on the wire for privilegesRequired. + */ + @java.lang.Override + public int getPrivilegesRequiredValue() { + return privilegesRequired_; + } + /** + * + * + *
+     * This metric describes the level of privileges an attacker must possess
+     * before successfully exploiting the vulnerability.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired privileges_required = 4; + * + * + * @param value The enum numeric value on the wire for privilegesRequired to set. + * @return This builder for chaining. + */ + public Builder setPrivilegesRequiredValue(int value) { + privilegesRequired_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * This metric describes the level of privileges an attacker must possess
+     * before successfully exploiting the vulnerability.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired privileges_required = 4; + * + * + * @return The privilegesRequired. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired getPrivilegesRequired() { + com.google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired result = + com.google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired.forNumber( + privilegesRequired_); + return result == null + ? com.google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * This metric describes the level of privileges an attacker must possess
+     * before successfully exploiting the vulnerability.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired privileges_required = 4; + * + * + * @param value The privilegesRequired to set. + * @return This builder for chaining. + */ + public Builder setPrivilegesRequired( + com.google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + privilegesRequired_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * This metric describes the level of privileges an attacker must possess
+     * before successfully exploiting the vulnerability.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired privileges_required = 4; + * + * + * @return This builder for chaining. + */ + public Builder clearPrivilegesRequired() { + bitField0_ = (bitField0_ & ~0x00000008); + privilegesRequired_ = 0; + onChanged(); + return this; + } + + private int userInteraction_ = 0; + /** + * + * + *
+     * This metric captures the requirement for a human user, other than the
+     * attacker, to participate in the successful compromise of the vulnerable
+     * component.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.UserInteraction user_interaction = 5; + * + * @return The enum numeric value on the wire for userInteraction. + */ + @java.lang.Override + public int getUserInteractionValue() { + return userInteraction_; + } + /** + * + * + *
+     * This metric captures the requirement for a human user, other than the
+     * attacker, to participate in the successful compromise of the vulnerable
+     * component.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.UserInteraction user_interaction = 5; + * + * @param value The enum numeric value on the wire for userInteraction to set. + * @return This builder for chaining. + */ + public Builder setUserInteractionValue(int value) { + userInteraction_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * This metric captures the requirement for a human user, other than the
+     * attacker, to participate in the successful compromise of the vulnerable
+     * component.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.UserInteraction user_interaction = 5; + * + * @return The userInteraction. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Cvssv3.UserInteraction getUserInteraction() { + com.google.cloud.securitycenter.v2.Cvssv3.UserInteraction result = + com.google.cloud.securitycenter.v2.Cvssv3.UserInteraction.forNumber(userInteraction_); + return result == null + ? com.google.cloud.securitycenter.v2.Cvssv3.UserInteraction.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * This metric captures the requirement for a human user, other than the
+     * attacker, to participate in the successful compromise of the vulnerable
+     * component.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.UserInteraction user_interaction = 5; + * + * @param value The userInteraction to set. + * @return This builder for chaining. + */ + public Builder setUserInteraction( + com.google.cloud.securitycenter.v2.Cvssv3.UserInteraction value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + userInteraction_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * This metric captures the requirement for a human user, other than the
+     * attacker, to participate in the successful compromise of the vulnerable
+     * component.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.UserInteraction user_interaction = 5; + * + * @return This builder for chaining. + */ + public Builder clearUserInteraction() { + bitField0_ = (bitField0_ & ~0x00000010); + userInteraction_ = 0; + onChanged(); + return this; + } + + private int scope_ = 0; + /** + * + * + *
+     * The Scope metric captures whether a vulnerability in one vulnerable
+     * component impacts resources in components beyond its security scope.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.Scope scope = 6; + * + * @return The enum numeric value on the wire for scope. + */ + @java.lang.Override + public int getScopeValue() { + return scope_; + } + /** + * + * + *
+     * The Scope metric captures whether a vulnerability in one vulnerable
+     * component impacts resources in components beyond its security scope.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.Scope scope = 6; + * + * @param value The enum numeric value on the wire for scope to set. + * @return This builder for chaining. + */ + public Builder setScopeValue(int value) { + scope_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The Scope metric captures whether a vulnerability in one vulnerable
+     * component impacts resources in components beyond its security scope.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.Scope scope = 6; + * + * @return The scope. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Cvssv3.Scope getScope() { + com.google.cloud.securitycenter.v2.Cvssv3.Scope result = + com.google.cloud.securitycenter.v2.Cvssv3.Scope.forNumber(scope_); + return result == null ? com.google.cloud.securitycenter.v2.Cvssv3.Scope.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The Scope metric captures whether a vulnerability in one vulnerable
+     * component impacts resources in components beyond its security scope.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.Scope scope = 6; + * + * @param value The scope to set. + * @return This builder for chaining. + */ + public Builder setScope(com.google.cloud.securitycenter.v2.Cvssv3.Scope value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + scope_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The Scope metric captures whether a vulnerability in one vulnerable
+     * component impacts resources in components beyond its security scope.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.Scope scope = 6; + * + * @return This builder for chaining. + */ + public Builder clearScope() { + bitField0_ = (bitField0_ & ~0x00000020); + scope_ = 0; + onChanged(); + return this; + } + + private int confidentialityImpact_ = 0; + /** + * + * + *
+     * This metric measures the impact to the confidentiality of the information
+     * resources managed by a software component due to a successfully exploited
+     * vulnerability.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.Impact confidentiality_impact = 7; + * + * @return The enum numeric value on the wire for confidentialityImpact. + */ + @java.lang.Override + public int getConfidentialityImpactValue() { + return confidentialityImpact_; + } + /** + * + * + *
+     * This metric measures the impact to the confidentiality of the information
+     * resources managed by a software component due to a successfully exploited
+     * vulnerability.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.Impact confidentiality_impact = 7; + * + * @param value The enum numeric value on the wire for confidentialityImpact to set. + * @return This builder for chaining. + */ + public Builder setConfidentialityImpactValue(int value) { + confidentialityImpact_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * This metric measures the impact to the confidentiality of the information
+     * resources managed by a software component due to a successfully exploited
+     * vulnerability.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.Impact confidentiality_impact = 7; + * + * @return The confidentialityImpact. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Cvssv3.Impact getConfidentialityImpact() { + com.google.cloud.securitycenter.v2.Cvssv3.Impact result = + com.google.cloud.securitycenter.v2.Cvssv3.Impact.forNumber(confidentialityImpact_); + return result == null + ? com.google.cloud.securitycenter.v2.Cvssv3.Impact.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * This metric measures the impact to the confidentiality of the information
+     * resources managed by a software component due to a successfully exploited
+     * vulnerability.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.Impact confidentiality_impact = 7; + * + * @param value The confidentialityImpact to set. + * @return This builder for chaining. + */ + public Builder setConfidentialityImpact( + com.google.cloud.securitycenter.v2.Cvssv3.Impact value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + confidentialityImpact_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * This metric measures the impact to the confidentiality of the information
+     * resources managed by a software component due to a successfully exploited
+     * vulnerability.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.Impact confidentiality_impact = 7; + * + * @return This builder for chaining. + */ + public Builder clearConfidentialityImpact() { + bitField0_ = (bitField0_ & ~0x00000040); + confidentialityImpact_ = 0; + onChanged(); + return this; + } + + private int integrityImpact_ = 0; + /** + * + * + *
+     * This metric measures the impact to integrity of a successfully exploited
+     * vulnerability.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.Impact integrity_impact = 8; + * + * @return The enum numeric value on the wire for integrityImpact. + */ + @java.lang.Override + public int getIntegrityImpactValue() { + return integrityImpact_; + } + /** + * + * + *
+     * This metric measures the impact to integrity of a successfully exploited
+     * vulnerability.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.Impact integrity_impact = 8; + * + * @param value The enum numeric value on the wire for integrityImpact to set. + * @return This builder for chaining. + */ + public Builder setIntegrityImpactValue(int value) { + integrityImpact_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * This metric measures the impact to integrity of a successfully exploited
+     * vulnerability.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.Impact integrity_impact = 8; + * + * @return The integrityImpact. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Cvssv3.Impact getIntegrityImpact() { + com.google.cloud.securitycenter.v2.Cvssv3.Impact result = + com.google.cloud.securitycenter.v2.Cvssv3.Impact.forNumber(integrityImpact_); + return result == null + ? com.google.cloud.securitycenter.v2.Cvssv3.Impact.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * This metric measures the impact to integrity of a successfully exploited
+     * vulnerability.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.Impact integrity_impact = 8; + * + * @param value The integrityImpact to set. + * @return This builder for chaining. + */ + public Builder setIntegrityImpact(com.google.cloud.securitycenter.v2.Cvssv3.Impact value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + integrityImpact_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * This metric measures the impact to integrity of a successfully exploited
+     * vulnerability.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.Impact integrity_impact = 8; + * + * @return This builder for chaining. + */ + public Builder clearIntegrityImpact() { + bitField0_ = (bitField0_ & ~0x00000080); + integrityImpact_ = 0; + onChanged(); + return this; + } + + private int availabilityImpact_ = 0; + /** + * + * + *
+     * This metric measures the impact to the availability of the impacted
+     * component resulting from a successfully exploited vulnerability.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.Impact availability_impact = 9; + * + * @return The enum numeric value on the wire for availabilityImpact. + */ + @java.lang.Override + public int getAvailabilityImpactValue() { + return availabilityImpact_; + } + /** + * + * + *
+     * This metric measures the impact to the availability of the impacted
+     * component resulting from a successfully exploited vulnerability.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.Impact availability_impact = 9; + * + * @param value The enum numeric value on the wire for availabilityImpact to set. + * @return This builder for chaining. + */ + public Builder setAvailabilityImpactValue(int value) { + availabilityImpact_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * This metric measures the impact to the availability of the impacted
+     * component resulting from a successfully exploited vulnerability.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.Impact availability_impact = 9; + * + * @return The availabilityImpact. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Cvssv3.Impact getAvailabilityImpact() { + com.google.cloud.securitycenter.v2.Cvssv3.Impact result = + com.google.cloud.securitycenter.v2.Cvssv3.Impact.forNumber(availabilityImpact_); + return result == null + ? com.google.cloud.securitycenter.v2.Cvssv3.Impact.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * This metric measures the impact to the availability of the impacted
+     * component resulting from a successfully exploited vulnerability.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.Impact availability_impact = 9; + * + * @param value The availabilityImpact to set. + * @return This builder for chaining. + */ + public Builder setAvailabilityImpact(com.google.cloud.securitycenter.v2.Cvssv3.Impact value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + availabilityImpact_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * This metric measures the impact to the availability of the impacted
+     * component resulting from a successfully exploited vulnerability.
+     * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.Impact availability_impact = 9; + * + * @return This builder for chaining. + */ + public Builder clearAvailabilityImpact() { + bitField0_ = (bitField0_ & ~0x00000100); + availabilityImpact_ = 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.v2.Cvssv3) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.Cvssv3) + private static final com.google.cloud.securitycenter.v2.Cvssv3 DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.Cvssv3(); + } + + public static com.google.cloud.securitycenter.v2.Cvssv3 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Cvssv3 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.Cvssv3 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Cvssv3OrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Cvssv3OrBuilder.java new file mode 100644 index 000000000000..6a392224dd37 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Cvssv3OrBuilder.java @@ -0,0 +1,265 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/vulnerability.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface Cvssv3OrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.Cvssv3) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The base score is a function of the base metric scores.
+   * 
+ * + * double base_score = 1; + * + * @return The baseScore. + */ + double getBaseScore(); + + /** + * + * + *
+   * Base Metrics
+   * Represents the intrinsic characteristics of a vulnerability that are
+   * constant over time and across user environments.
+   * This metric reflects the context by which vulnerability exploitation is
+   * possible.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.AttackVector attack_vector = 2; + * + * @return The enum numeric value on the wire for attackVector. + */ + int getAttackVectorValue(); + /** + * + * + *
+   * Base Metrics
+   * Represents the intrinsic characteristics of a vulnerability that are
+   * constant over time and across user environments.
+   * This metric reflects the context by which vulnerability exploitation is
+   * possible.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.AttackVector attack_vector = 2; + * + * @return The attackVector. + */ + com.google.cloud.securitycenter.v2.Cvssv3.AttackVector getAttackVector(); + + /** + * + * + *
+   * This metric describes the conditions beyond the attacker's control that
+   * must exist in order to exploit the vulnerability.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.AttackComplexity attack_complexity = 3; + * + * @return The enum numeric value on the wire for attackComplexity. + */ + int getAttackComplexityValue(); + /** + * + * + *
+   * This metric describes the conditions beyond the attacker's control that
+   * must exist in order to exploit the vulnerability.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.AttackComplexity attack_complexity = 3; + * + * @return The attackComplexity. + */ + com.google.cloud.securitycenter.v2.Cvssv3.AttackComplexity getAttackComplexity(); + + /** + * + * + *
+   * This metric describes the level of privileges an attacker must possess
+   * before successfully exploiting the vulnerability.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired privileges_required = 4; + * + * @return The enum numeric value on the wire for privilegesRequired. + */ + int getPrivilegesRequiredValue(); + /** + * + * + *
+   * This metric describes the level of privileges an attacker must possess
+   * before successfully exploiting the vulnerability.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired privileges_required = 4; + * + * @return The privilegesRequired. + */ + com.google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired getPrivilegesRequired(); + + /** + * + * + *
+   * This metric captures the requirement for a human user, other than the
+   * attacker, to participate in the successful compromise of the vulnerable
+   * component.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.UserInteraction user_interaction = 5; + * + * @return The enum numeric value on the wire for userInteraction. + */ + int getUserInteractionValue(); + /** + * + * + *
+   * This metric captures the requirement for a human user, other than the
+   * attacker, to participate in the successful compromise of the vulnerable
+   * component.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.UserInteraction user_interaction = 5; + * + * @return The userInteraction. + */ + com.google.cloud.securitycenter.v2.Cvssv3.UserInteraction getUserInteraction(); + + /** + * + * + *
+   * The Scope metric captures whether a vulnerability in one vulnerable
+   * component impacts resources in components beyond its security scope.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.Scope scope = 6; + * + * @return The enum numeric value on the wire for scope. + */ + int getScopeValue(); + /** + * + * + *
+   * The Scope metric captures whether a vulnerability in one vulnerable
+   * component impacts resources in components beyond its security scope.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.Scope scope = 6; + * + * @return The scope. + */ + com.google.cloud.securitycenter.v2.Cvssv3.Scope getScope(); + + /** + * + * + *
+   * This metric measures the impact to the confidentiality of the information
+   * resources managed by a software component due to a successfully exploited
+   * vulnerability.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.Impact confidentiality_impact = 7; + * + * @return The enum numeric value on the wire for confidentialityImpact. + */ + int getConfidentialityImpactValue(); + /** + * + * + *
+   * This metric measures the impact to the confidentiality of the information
+   * resources managed by a software component due to a successfully exploited
+   * vulnerability.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.Impact confidentiality_impact = 7; + * + * @return The confidentialityImpact. + */ + com.google.cloud.securitycenter.v2.Cvssv3.Impact getConfidentialityImpact(); + + /** + * + * + *
+   * This metric measures the impact to integrity of a successfully exploited
+   * vulnerability.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.Impact integrity_impact = 8; + * + * @return The enum numeric value on the wire for integrityImpact. + */ + int getIntegrityImpactValue(); + /** + * + * + *
+   * This metric measures the impact to integrity of a successfully exploited
+   * vulnerability.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.Impact integrity_impact = 8; + * + * @return The integrityImpact. + */ + com.google.cloud.securitycenter.v2.Cvssv3.Impact getIntegrityImpact(); + + /** + * + * + *
+   * This metric measures the impact to the availability of the impacted
+   * component resulting from a successfully exploited vulnerability.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.Impact availability_impact = 9; + * + * @return The enum numeric value on the wire for availabilityImpact. + */ + int getAvailabilityImpactValue(); + /** + * + * + *
+   * This metric measures the impact to the availability of the impacted
+   * component resulting from a successfully exploited vulnerability.
+   * 
+ * + * .google.cloud.securitycenter.v2.Cvssv3.Impact availability_impact = 9; + * + * @return The availabilityImpact. + */ + com.google.cloud.securitycenter.v2.Cvssv3.Impact getAvailabilityImpact(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Database.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Database.java new file mode 100644 index 000000000000..2029bdd80b3b --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Database.java @@ -0,0 +1,1724 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/database.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Represents database access information, such as queries. A database may be a
+ * sub-resource of an instance (as in the case of Cloud SQL instances or Cloud
+ * Spanner instances), or the database instance itself. Some database resources
+ * might not have the [full resource
+ * name](https://google.aip.dev/122#full-resource-names) populated because these
+ * resource types, such as Cloud SQL databases, are not yet supported by Cloud
+ * Asset Inventory. In these cases only the display name is provided.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Database} + */ +public final class Database extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.Database) + DatabaseOrBuilder { + private static final long serialVersionUID = 0L; + // Use Database.newBuilder() to construct. + private Database(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Database() { + name_ = ""; + displayName_ = ""; + userName_ = ""; + query_ = ""; + grantees_ = com.google.protobuf.LazyStringArrayList.emptyList(); + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Database(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.DatabaseProto + .internal_static_google_cloud_securitycenter_v2_Database_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.DatabaseProto + .internal_static_google_cloud_securitycenter_v2_Database_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Database.class, + com.google.cloud.securitycenter.v2.Database.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Some database resources may not have the [full resource
+   * name](https://google.aip.dev/122#full-resource-names) populated because
+   * these resource types are not yet supported by Cloud Asset Inventory (e.g.
+   * Cloud SQL databases). In these cases only the display name will be
+   * provided.
+   * The [full resource name](https://google.aip.dev/122#full-resource-names) of
+   * the database that the user connected to, if it is supported by Cloud Asset
+   * Inventory.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Some database resources may not have the [full resource
+   * name](https://google.aip.dev/122#full-resource-names) populated because
+   * these resource types are not yet supported by Cloud Asset Inventory (e.g.
+   * Cloud SQL databases). In these cases only the display name will be
+   * provided.
+   * The [full resource name](https://google.aip.dev/122#full-resource-names) of
+   * the database that the user connected to, if it is supported by Cloud Asset
+   * Inventory.
+   * 
+ * + * 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; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * The human-readable name of the database that the user connected to.
+   * 
+ * + * string display_name = 2; + * + * @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 database that the user connected to.
+   * 
+ * + * string display_name = 2; + * + * @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; + } + } + + public static final int USER_NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object userName_ = ""; + /** + * + * + *
+   * The username used to connect to the database. The username might not be an
+   * IAM principal and does not have a set format.
+   * 
+ * + * string user_name = 3; + * + * @return The userName. + */ + @java.lang.Override + public java.lang.String getUserName() { + java.lang.Object ref = userName_; + 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(); + userName_ = s; + return s; + } + } + /** + * + * + *
+   * The username used to connect to the database. The username might not be an
+   * IAM principal and does not have a set format.
+   * 
+ * + * string user_name = 3; + * + * @return The bytes for userName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserNameBytes() { + java.lang.Object ref = userName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUERY_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object query_ = ""; + /** + * + * + *
+   * The SQL statement that is associated with the database access.
+   * 
+ * + * string query = 4; + * + * @return The query. + */ + @java.lang.Override + public java.lang.String getQuery() { + java.lang.Object ref = query_; + 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(); + query_ = s; + return s; + } + } + /** + * + * + *
+   * The SQL statement that is associated with the database access.
+   * 
+ * + * string query = 4; + * + * @return The bytes for query. + */ + @java.lang.Override + public com.google.protobuf.ByteString getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GRANTEES_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList grantees_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * The target usernames, roles, or groups of an SQL privilege grant, which is
+   * not an IAM policy change.
+   * 
+ * + * repeated string grantees = 5; + * + * @return A list containing the grantees. + */ + public com.google.protobuf.ProtocolStringList getGranteesList() { + return grantees_; + } + /** + * + * + *
+   * The target usernames, roles, or groups of an SQL privilege grant, which is
+   * not an IAM policy change.
+   * 
+ * + * repeated string grantees = 5; + * + * @return The count of grantees. + */ + public int getGranteesCount() { + return grantees_.size(); + } + /** + * + * + *
+   * The target usernames, roles, or groups of an SQL privilege grant, which is
+   * not an IAM policy change.
+   * 
+ * + * repeated string grantees = 5; + * + * @param index The index of the element to return. + * @return The grantees at the given index. + */ + public java.lang.String getGrantees(int index) { + return grantees_.get(index); + } + /** + * + * + *
+   * The target usernames, roles, or groups of an SQL privilege grant, which is
+   * not an IAM policy change.
+   * 
+ * + * repeated string grantees = 5; + * + * @param index The index of the value to return. + * @return The bytes of the grantees at the given index. + */ + public com.google.protobuf.ByteString getGranteesBytes(int index) { + return grantees_.getByteString(index); + } + + public static final int VERSION_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + /** + * + * + *
+   * The version of the database, for example, POSTGRES_14.
+   * See [the complete
+   * list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion).
+   * 
+ * + * string version = 6; + * + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + 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(); + version_ = s; + return s; + } + } + /** + * + * + *
+   * The version of the database, for example, POSTGRES_14.
+   * See [the complete
+   * list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion).
+   * 
+ * + * string version = 6; + * + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = 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(userName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, userName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, query_); + } + for (int i = 0; i < grantees_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, grantees_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, version_); + } + getUnknownFields().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(userName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, userName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, query_); + } + { + int dataSize = 0; + for (int i = 0; i < grantees_.size(); i++) { + dataSize += computeStringSizeNoTag(grantees_.getRaw(i)); + } + size += dataSize; + size += 1 * getGranteesList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, version_); + } + size += getUnknownFields().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.v2.Database)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.Database other = + (com.google.cloud.securitycenter.v2.Database) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUserName().equals(other.getUserName())) return false; + if (!getQuery().equals(other.getQuery())) return false; + if (!getGranteesList().equals(other.getGranteesList())) return false; + if (!getVersion().equals(other.getVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + USER_NAME_FIELD_NUMBER; + hash = (53 * hash) + getUserName().hashCode(); + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + if (getGranteesCount() > 0) { + hash = (37 * hash) + GRANTEES_FIELD_NUMBER; + hash = (53 * hash) + getGranteesList().hashCode(); + } + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.Database parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Database 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.v2.Database parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Database 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.v2.Database parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Database parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.Database parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Database 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.v2.Database parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Database 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.v2.Database parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Database 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.v2.Database 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; + } + /** + * + * + *
+   * Represents database access information, such as queries. A database may be a
+   * sub-resource of an instance (as in the case of Cloud SQL instances or Cloud
+   * Spanner instances), or the database instance itself. Some database resources
+   * might not have the [full resource
+   * name](https://google.aip.dev/122#full-resource-names) populated because these
+   * resource types, such as Cloud SQL databases, are not yet supported by Cloud
+   * Asset Inventory. In these cases only the display name is provided.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Database} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.Database) + com.google.cloud.securitycenter.v2.DatabaseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.DatabaseProto + .internal_static_google_cloud_securitycenter_v2_Database_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.DatabaseProto + .internal_static_google_cloud_securitycenter_v2_Database_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Database.class, + com.google.cloud.securitycenter.v2.Database.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.Database.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + userName_ = ""; + query_ = ""; + grantees_ = com.google.protobuf.LazyStringArrayList.emptyList(); + version_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.DatabaseProto + .internal_static_google_cloud_securitycenter_v2_Database_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Database getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.Database.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Database build() { + com.google.cloud.securitycenter.v2.Database result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Database buildPartial() { + com.google.cloud.securitycenter.v2.Database result = + new com.google.cloud.securitycenter.v2.Database(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.Database result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.userName_ = userName_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.query_ = query_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + grantees_.makeImmutable(); + result.grantees_ = grantees_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.version_ = version_; + } + } + + @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.v2.Database) { + return mergeFrom((com.google.cloud.securitycenter.v2.Database) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.Database other) { + if (other == com.google.cloud.securitycenter.v2.Database.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getUserName().isEmpty()) { + userName_ = other.userName_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getQuery().isEmpty()) { + query_ = other.query_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.grantees_.isEmpty()) { + if (grantees_.isEmpty()) { + grantees_ = other.grantees_; + bitField0_ |= 0x00000010; + } else { + ensureGranteesIsMutable(); + grantees_.addAll(other.grantees_); + } + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00000020; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + userName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + query_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureGranteesIsMutable(); + grantees_.add(s); + break; + } // case 42 + case 50: + { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Some database resources may not have the [full resource
+     * name](https://google.aip.dev/122#full-resource-names) populated because
+     * these resource types are not yet supported by Cloud Asset Inventory (e.g.
+     * Cloud SQL databases). In these cases only the display name will be
+     * provided.
+     * The [full resource name](https://google.aip.dev/122#full-resource-names) of
+     * the database that the user connected to, if it is supported by Cloud Asset
+     * Inventory.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Some database resources may not have the [full resource
+     * name](https://google.aip.dev/122#full-resource-names) populated because
+     * these resource types are not yet supported by Cloud Asset Inventory (e.g.
+     * Cloud SQL databases). In these cases only the display name will be
+     * provided.
+     * The [full resource name](https://google.aip.dev/122#full-resource-names) of
+     * the database that the user connected to, if it is supported by Cloud Asset
+     * Inventory.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Some database resources may not have the [full resource
+     * name](https://google.aip.dev/122#full-resource-names) populated because
+     * these resource types are not yet supported by Cloud Asset Inventory (e.g.
+     * Cloud SQL databases). In these cases only the display name will be
+     * provided.
+     * The [full resource name](https://google.aip.dev/122#full-resource-names) of
+     * the database that the user connected to, if it is supported by Cloud Asset
+     * Inventory.
+     * 
+ * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Some database resources may not have the [full resource
+     * name](https://google.aip.dev/122#full-resource-names) populated because
+     * these resource types are not yet supported by Cloud Asset Inventory (e.g.
+     * Cloud SQL databases). In these cases only the display name will be
+     * provided.
+     * The [full resource name](https://google.aip.dev/122#full-resource-names) of
+     * the database that the user connected to, if it is supported by Cloud Asset
+     * Inventory.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Some database resources may not have the [full resource
+     * name](https://google.aip.dev/122#full-resource-names) populated because
+     * these resource types are not yet supported by Cloud Asset Inventory (e.g.
+     * Cloud SQL databases). In these cases only the display name will be
+     * provided.
+     * The [full resource name](https://google.aip.dev/122#full-resource-names) of
+     * the database that the user connected to, if it is supported by Cloud Asset
+     * Inventory.
+     * 
+ * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * The human-readable name of the database that the user connected to.
+     * 
+ * + * string display_name = 2; + * + * @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 database that the user connected to.
+     * 
+ * + * string display_name = 2; + * + * @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 database that the user connected to.
+     * 
+ * + * string display_name = 2; + * + * @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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The human-readable name of the database that the user connected to.
+     * 
+ * + * string display_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The human-readable name of the database that the user connected to.
+     * 
+ * + * string display_name = 2; + * + * @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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object userName_ = ""; + /** + * + * + *
+     * The username used to connect to the database. The username might not be an
+     * IAM principal and does not have a set format.
+     * 
+ * + * string user_name = 3; + * + * @return The userName. + */ + public java.lang.String getUserName() { + java.lang.Object ref = userName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The username used to connect to the database. The username might not be an
+     * IAM principal and does not have a set format.
+     * 
+ * + * string user_name = 3; + * + * @return The bytes for userName. + */ + public com.google.protobuf.ByteString getUserNameBytes() { + java.lang.Object ref = userName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The username used to connect to the database. The username might not be an
+     * IAM principal and does not have a set format.
+     * 
+ * + * string user_name = 3; + * + * @param value The userName to set. + * @return This builder for chaining. + */ + public Builder setUserName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + userName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The username used to connect to the database. The username might not be an
+     * IAM principal and does not have a set format.
+     * 
+ * + * string user_name = 3; + * + * @return This builder for chaining. + */ + public Builder clearUserName() { + userName_ = getDefaultInstance().getUserName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The username used to connect to the database. The username might not be an
+     * IAM principal and does not have a set format.
+     * 
+ * + * string user_name = 3; + * + * @param value The bytes for userName to set. + * @return This builder for chaining. + */ + public Builder setUserNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + userName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object query_ = ""; + /** + * + * + *
+     * The SQL statement that is associated with the database access.
+     * 
+ * + * string query = 4; + * + * @return The query. + */ + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + query_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The SQL statement that is associated with the database access.
+     * 
+ * + * string query = 4; + * + * @return The bytes for query. + */ + public com.google.protobuf.ByteString getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The SQL statement that is associated with the database access.
+     * 
+ * + * string query = 4; + * + * @param value The query to set. + * @return This builder for chaining. + */ + public Builder setQuery(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + query_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The SQL statement that is associated with the database access.
+     * 
+ * + * string query = 4; + * + * @return This builder for chaining. + */ + public Builder clearQuery() { + query_ = getDefaultInstance().getQuery(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The SQL statement that is associated with the database access.
+     * 
+ * + * string query = 4; + * + * @param value The bytes for query to set. + * @return This builder for chaining. + */ + public Builder setQueryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + query_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList grantees_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureGranteesIsMutable() { + if (!grantees_.isModifiable()) { + grantees_ = new com.google.protobuf.LazyStringArrayList(grantees_); + } + bitField0_ |= 0x00000010; + } + /** + * + * + *
+     * The target usernames, roles, or groups of an SQL privilege grant, which is
+     * not an IAM policy change.
+     * 
+ * + * repeated string grantees = 5; + * + * @return A list containing the grantees. + */ + public com.google.protobuf.ProtocolStringList getGranteesList() { + grantees_.makeImmutable(); + return grantees_; + } + /** + * + * + *
+     * The target usernames, roles, or groups of an SQL privilege grant, which is
+     * not an IAM policy change.
+     * 
+ * + * repeated string grantees = 5; + * + * @return The count of grantees. + */ + public int getGranteesCount() { + return grantees_.size(); + } + /** + * + * + *
+     * The target usernames, roles, or groups of an SQL privilege grant, which is
+     * not an IAM policy change.
+     * 
+ * + * repeated string grantees = 5; + * + * @param index The index of the element to return. + * @return The grantees at the given index. + */ + public java.lang.String getGrantees(int index) { + return grantees_.get(index); + } + /** + * + * + *
+     * The target usernames, roles, or groups of an SQL privilege grant, which is
+     * not an IAM policy change.
+     * 
+ * + * repeated string grantees = 5; + * + * @param index The index of the value to return. + * @return The bytes of the grantees at the given index. + */ + public com.google.protobuf.ByteString getGranteesBytes(int index) { + return grantees_.getByteString(index); + } + /** + * + * + *
+     * The target usernames, roles, or groups of an SQL privilege grant, which is
+     * not an IAM policy change.
+     * 
+ * + * repeated string grantees = 5; + * + * @param index The index to set the value at. + * @param value The grantees to set. + * @return This builder for chaining. + */ + public Builder setGrantees(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureGranteesIsMutable(); + grantees_.set(index, value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The target usernames, roles, or groups of an SQL privilege grant, which is
+     * not an IAM policy change.
+     * 
+ * + * repeated string grantees = 5; + * + * @param value The grantees to add. + * @return This builder for chaining. + */ + public Builder addGrantees(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureGranteesIsMutable(); + grantees_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The target usernames, roles, or groups of an SQL privilege grant, which is
+     * not an IAM policy change.
+     * 
+ * + * repeated string grantees = 5; + * + * @param values The grantees to add. + * @return This builder for chaining. + */ + public Builder addAllGrantees(java.lang.Iterable values) { + ensureGranteesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, grantees_); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The target usernames, roles, or groups of an SQL privilege grant, which is
+     * not an IAM policy change.
+     * 
+ * + * repeated string grantees = 5; + * + * @return This builder for chaining. + */ + public Builder clearGrantees() { + grantees_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * The target usernames, roles, or groups of an SQL privilege grant, which is
+     * not an IAM policy change.
+     * 
+ * + * repeated string grantees = 5; + * + * @param value The bytes of the grantees to add. + * @return This builder for chaining. + */ + public Builder addGranteesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureGranteesIsMutable(); + grantees_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + * + * + *
+     * The version of the database, for example, POSTGRES_14.
+     * See [the complete
+     * list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion).
+     * 
+ * + * string version = 6; + * + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The version of the database, for example, POSTGRES_14.
+     * See [the complete
+     * list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion).
+     * 
+ * + * string version = 6; + * + * @return The bytes for version. + */ + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The version of the database, for example, POSTGRES_14.
+     * See [the complete
+     * list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion).
+     * 
+ * + * string version = 6; + * + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + version_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The version of the database, for example, POSTGRES_14.
+     * See [the complete
+     * list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion).
+     * 
+ * + * string version = 6; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * The version of the database, for example, POSTGRES_14.
+     * See [the complete
+     * list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion).
+     * 
+ * + * string version = 6; + * + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00000020; + 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.v2.Database) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.Database) + private static final com.google.cloud.securitycenter.v2.Database DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.Database(); + } + + public static com.google.cloud.securitycenter.v2.Database getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Database parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.Database getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/DatabaseOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/DatabaseOrBuilder.java new file mode 100644 index 000000000000..d86c3be409c2 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/DatabaseOrBuilder.java @@ -0,0 +1,226 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/database.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface DatabaseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.Database) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Some database resources may not have the [full resource
+   * name](https://google.aip.dev/122#full-resource-names) populated because
+   * these resource types are not yet supported by Cloud Asset Inventory (e.g.
+   * Cloud SQL databases). In these cases only the display name will be
+   * provided.
+   * The [full resource name](https://google.aip.dev/122#full-resource-names) of
+   * the database that the user connected to, if it is supported by Cloud Asset
+   * Inventory.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Some database resources may not have the [full resource
+   * name](https://google.aip.dev/122#full-resource-names) populated because
+   * these resource types are not yet supported by Cloud Asset Inventory (e.g.
+   * Cloud SQL databases). In these cases only the display name will be
+   * provided.
+   * The [full resource name](https://google.aip.dev/122#full-resource-names) of
+   * the database that the user connected to, if it is supported by Cloud Asset
+   * Inventory.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The human-readable name of the database that the user connected to.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * The human-readable name of the database that the user connected to.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * The username used to connect to the database. The username might not be an
+   * IAM principal and does not have a set format.
+   * 
+ * + * string user_name = 3; + * + * @return The userName. + */ + java.lang.String getUserName(); + /** + * + * + *
+   * The username used to connect to the database. The username might not be an
+   * IAM principal and does not have a set format.
+   * 
+ * + * string user_name = 3; + * + * @return The bytes for userName. + */ + com.google.protobuf.ByteString getUserNameBytes(); + + /** + * + * + *
+   * The SQL statement that is associated with the database access.
+   * 
+ * + * string query = 4; + * + * @return The query. + */ + java.lang.String getQuery(); + /** + * + * + *
+   * The SQL statement that is associated with the database access.
+   * 
+ * + * string query = 4; + * + * @return The bytes for query. + */ + com.google.protobuf.ByteString getQueryBytes(); + + /** + * + * + *
+   * The target usernames, roles, or groups of an SQL privilege grant, which is
+   * not an IAM policy change.
+   * 
+ * + * repeated string grantees = 5; + * + * @return A list containing the grantees. + */ + java.util.List getGranteesList(); + /** + * + * + *
+   * The target usernames, roles, or groups of an SQL privilege grant, which is
+   * not an IAM policy change.
+   * 
+ * + * repeated string grantees = 5; + * + * @return The count of grantees. + */ + int getGranteesCount(); + /** + * + * + *
+   * The target usernames, roles, or groups of an SQL privilege grant, which is
+   * not an IAM policy change.
+   * 
+ * + * repeated string grantees = 5; + * + * @param index The index of the element to return. + * @return The grantees at the given index. + */ + java.lang.String getGrantees(int index); + /** + * + * + *
+   * The target usernames, roles, or groups of an SQL privilege grant, which is
+   * not an IAM policy change.
+   * 
+ * + * repeated string grantees = 5; + * + * @param index The index of the value to return. + * @return The bytes of the grantees at the given index. + */ + com.google.protobuf.ByteString getGranteesBytes(int index); + + /** + * + * + *
+   * The version of the database, for example, POSTGRES_14.
+   * See [the complete
+   * list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion).
+   * 
+ * + * string version = 6; + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+   * The version of the database, for example, POSTGRES_14.
+   * See [the complete
+   * list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion).
+   * 
+ * + * string version = 6; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/DatabaseProto.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/DatabaseProto.java new file mode 100644 index 000000000000..5ba3834e1b14 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/DatabaseProto.java @@ -0,0 +1,70 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/database.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public final class DatabaseProto { + private DatabaseProto() {} + + 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_v2_Database_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_Database_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n-google/cloud/securitycenter/v2/databas" + + "e.proto\022\036google.cloud.securitycenter.v2\"" + + "s\n\010Database\022\014\n\004name\030\001 \001(\t\022\024\n\014display_nam" + + "e\030\002 \001(\t\022\021\n\tuser_name\030\003 \001(\t\022\r\n\005query\030\004 \001(" + + "\t\022\020\n\010grantees\030\005 \003(\t\022\017\n\007version\030\006 \001(\tB\347\001\n" + + "\"com.google.cloud.securitycenter.v2B\rDat" + + "abaseProtoP\001ZJcloud.google.com/go/securi" + + "tycenter/apiv2/securitycenterpb;security" + + "centerpb\252\002\036Google.Cloud.SecurityCenter.V" + + "2\312\002\036Google\\Cloud\\SecurityCenter\\V2\352\002!Goo" + + "gle::Cloud::SecurityCenter::V2b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_cloud_securitycenter_v2_Database_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_securitycenter_v2_Database_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_Database_descriptor, + new java.lang.String[] { + "Name", "DisplayName", "UserName", "Query", "Grantees", "Version", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/DeleteBigQueryExportRequest.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/DeleteBigQueryExportRequest.java new file mode 100644 index 000000000000..6c348906502b --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/DeleteBigQueryExportRequest.java @@ -0,0 +1,688 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Request message for deleting a BigQuery export.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.DeleteBigQueryExportRequest} + */ +public final class DeleteBigQueryExportRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.DeleteBigQueryExportRequest) + DeleteBigQueryExportRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteBigQueryExportRequest.newBuilder() to construct. + private DeleteBigQueryExportRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteBigQueryExportRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteBigQueryExportRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_DeleteBigQueryExportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_DeleteBigQueryExportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest.class, + com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the BigQuery export to delete. The following list
+   * shows some examples of the format:
+   *
+   * +
+   * `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}`
+   * + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}`
+   * + `projects/{project}/locations/{location}/bigQueryExports/{export_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 name of the BigQuery export to delete. The following list
+   * shows some examples of the format:
+   *
+   * +
+   * `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}`
+   * + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}`
+   * + `projects/{project}/locations/{location}/bigQueryExports/{export_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_); + } + getUnknownFields().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 += getUnknownFields().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.v2.DeleteBigQueryExportRequest)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest other = + (com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest 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.v2.DeleteBigQueryExportRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest 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.v2.DeleteBigQueryExportRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest 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.v2.DeleteBigQueryExportRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest 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.v2.DeleteBigQueryExportRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest 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.v2.DeleteBigQueryExportRequest 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 BigQuery export.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.DeleteBigQueryExportRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.DeleteBigQueryExportRequest) + com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_DeleteBigQueryExportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_DeleteBigQueryExportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest.class, + com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_DeleteBigQueryExportRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest + getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest build() { + com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest buildPartial() { + com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest result = + new com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.v2.DeleteBigQueryExportRequest) { + return mergeFrom((com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest other) { + if (other + == com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the BigQuery export to delete. The following list
+     * shows some examples of the format:
+     *
+     * +
+     * `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}`
+     * + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}`
+     * + `projects/{project}/locations/{location}/bigQueryExports/{export_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 name of the BigQuery export to delete. The following list
+     * shows some examples of the format:
+     *
+     * +
+     * `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}`
+     * + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}`
+     * + `projects/{project}/locations/{location}/bigQueryExports/{export_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 name of the BigQuery export to delete. The following list
+     * shows some examples of the format:
+     *
+     * +
+     * `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}`
+     * + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}`
+     * + `projects/{project}/locations/{location}/bigQueryExports/{export_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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the BigQuery export to delete. The following list
+     * shows some examples of the format:
+     *
+     * +
+     * `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}`
+     * + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}`
+     * + `projects/{project}/locations/{location}/bigQueryExports/{export_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the BigQuery export to delete. The following list
+     * shows some examples of the format:
+     *
+     * +
+     * `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}`
+     * + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}`
+     * + `projects/{project}/locations/{location}/bigQueryExports/{export_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; + bitField0_ |= 0x00000001; + 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.v2.DeleteBigQueryExportRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.DeleteBigQueryExportRequest) + private static final com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest(); + } + + public static com.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteBigQueryExportRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.DeleteBigQueryExportRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/DeleteBigQueryExportRequestOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/DeleteBigQueryExportRequestOrBuilder.java new file mode 100644 index 000000000000..e7303bfb68c3 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/DeleteBigQueryExportRequestOrBuilder.java @@ -0,0 +1,67 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface DeleteBigQueryExportRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.DeleteBigQueryExportRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the BigQuery export to delete. The following list
+   * shows some examples of the format:
+   *
+   * +
+   * `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}`
+   * + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}`
+   * + `projects/{project}/locations/{location}/bigQueryExports/{export_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the BigQuery export to delete. The following list
+   * shows some examples of the format:
+   *
+   * +
+   * `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}`
+   * + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}`
+   * + `projects/{project}/locations/{location}/bigQueryExports/{export_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/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/DeleteMuteConfigRequest.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/DeleteMuteConfigRequest.java new file mode 100644 index 000000000000..d134ef040285 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/DeleteMuteConfigRequest.java @@ -0,0 +1,705 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Request message for deleting a mute config. If no location is specified,
+ * default is global.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.DeleteMuteConfigRequest} + */ +public final class DeleteMuteConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.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(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_DeleteMuteConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_DeleteMuteConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.DeleteMuteConfigRequest.class, + com.google.cloud.securitycenter.v2.DeleteMuteConfigRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the mute config to delete. The following list shows some
+   * examples of the format:
+   *
+   * + `organizations/{organization}/muteConfigs/{config_id}`
+   * +
+   * `organizations/{organization}/locations/{location}/muteConfigs/{config_id}`
+   * + `folders/{folder}/muteConfigs/{config_id}`
+   * + `folders/{folder}/locations/{location}/muteConfigs/{config_id}`
+   * + `projects/{project}/muteConfigs/{config_id}`
+   * + `projects/{project}/locations/{location}/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. The following list shows some
+   * examples of the format:
+   *
+   * + `organizations/{organization}/muteConfigs/{config_id}`
+   * +
+   * `organizations/{organization}/locations/{location}/muteConfigs/{config_id}`
+   * + `folders/{folder}/muteConfigs/{config_id}`
+   * + `folders/{folder}/locations/{location}/muteConfigs/{config_id}`
+   * + `projects/{project}/muteConfigs/{config_id}`
+   * + `projects/{project}/locations/{location}/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_); + } + getUnknownFields().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 += getUnknownFields().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.v2.DeleteMuteConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.DeleteMuteConfigRequest other = + (com.google.cloud.securitycenter.v2.DeleteMuteConfigRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.DeleteMuteConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.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.v2.DeleteMuteConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.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.v2.DeleteMuteConfigRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.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.v2.DeleteMuteConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.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.v2.DeleteMuteConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.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.v2.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.v2.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.v2.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. If no location is specified,
+   * default is global.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.DeleteMuteConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.DeleteMuteConfigRequest) + com.google.cloud.securitycenter.v2.DeleteMuteConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_DeleteMuteConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_DeleteMuteConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.DeleteMuteConfigRequest.class, + com.google.cloud.securitycenter.v2.DeleteMuteConfigRequest.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.DeleteMuteConfigRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_DeleteMuteConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.DeleteMuteConfigRequest getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.DeleteMuteConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.DeleteMuteConfigRequest build() { + com.google.cloud.securitycenter.v2.DeleteMuteConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.DeleteMuteConfigRequest buildPartial() { + com.google.cloud.securitycenter.v2.DeleteMuteConfigRequest result = + new com.google.cloud.securitycenter.v2.DeleteMuteConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.DeleteMuteConfigRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.v2.DeleteMuteConfigRequest) { + return mergeFrom((com.google.cloud.securitycenter.v2.DeleteMuteConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.DeleteMuteConfigRequest other) { + if (other == com.google.cloud.securitycenter.v2.DeleteMuteConfigRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the mute config to delete. The following list shows some
+     * examples of the format:
+     *
+     * + `organizations/{organization}/muteConfigs/{config_id}`
+     * +
+     * `organizations/{organization}/locations/{location}/muteConfigs/{config_id}`
+     * + `folders/{folder}/muteConfigs/{config_id}`
+     * + `folders/{folder}/locations/{location}/muteConfigs/{config_id}`
+     * + `projects/{project}/muteConfigs/{config_id}`
+     * + `projects/{project}/locations/{location}/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. The following list shows some
+     * examples of the format:
+     *
+     * + `organizations/{organization}/muteConfigs/{config_id}`
+     * +
+     * `organizations/{organization}/locations/{location}/muteConfigs/{config_id}`
+     * + `folders/{folder}/muteConfigs/{config_id}`
+     * + `folders/{folder}/locations/{location}/muteConfigs/{config_id}`
+     * + `projects/{project}/muteConfigs/{config_id}`
+     * + `projects/{project}/locations/{location}/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. The following list shows some
+     * examples of the format:
+     *
+     * + `organizations/{organization}/muteConfigs/{config_id}`
+     * +
+     * `organizations/{organization}/locations/{location}/muteConfigs/{config_id}`
+     * + `folders/{folder}/muteConfigs/{config_id}`
+     * + `folders/{folder}/locations/{location}/muteConfigs/{config_id}`
+     * + `projects/{project}/muteConfigs/{config_id}`
+     * + `projects/{project}/locations/{location}/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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the mute config to delete. The following list shows some
+     * examples of the format:
+     *
+     * + `organizations/{organization}/muteConfigs/{config_id}`
+     * +
+     * `organizations/{organization}/locations/{location}/muteConfigs/{config_id}`
+     * + `folders/{folder}/muteConfigs/{config_id}`
+     * + `folders/{folder}/locations/{location}/muteConfigs/{config_id}`
+     * + `projects/{project}/muteConfigs/{config_id}`
+     * + `projects/{project}/locations/{location}/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(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the mute config to delete. The following list shows some
+     * examples of the format:
+     *
+     * + `organizations/{organization}/muteConfigs/{config_id}`
+     * +
+     * `organizations/{organization}/locations/{location}/muteConfigs/{config_id}`
+     * + `folders/{folder}/muteConfigs/{config_id}`
+     * + `folders/{folder}/locations/{location}/muteConfigs/{config_id}`
+     * + `projects/{project}/muteConfigs/{config_id}`
+     * + `projects/{project}/locations/{location}/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; + bitField0_ |= 0x00000001; + 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.v2.DeleteMuteConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.DeleteMuteConfigRequest) + private static final com.google.cloud.securitycenter.v2.DeleteMuteConfigRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.DeleteMuteConfigRequest(); + } + + public static com.google.cloud.securitycenter.v2.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 { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.DeleteMuteConfigRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/DeleteMuteConfigRequestOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/DeleteMuteConfigRequestOrBuilder.java new file mode 100644 index 000000000000..0c7903ab9672 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/DeleteMuteConfigRequestOrBuilder.java @@ -0,0 +1,73 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface DeleteMuteConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.DeleteMuteConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the mute config to delete. The following list shows some
+   * examples of the format:
+   *
+   * + `organizations/{organization}/muteConfigs/{config_id}`
+   * +
+   * `organizations/{organization}/locations/{location}/muteConfigs/{config_id}`
+   * + `folders/{folder}/muteConfigs/{config_id}`
+   * + `folders/{folder}/locations/{location}/muteConfigs/{config_id}`
+   * + `projects/{project}/muteConfigs/{config_id}`
+   * + `projects/{project}/locations/{location}/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. The following list shows some
+   * examples of the format:
+   *
+   * + `organizations/{organization}/muteConfigs/{config_id}`
+   * +
+   * `organizations/{organization}/locations/{location}/muteConfigs/{config_id}`
+   * + `folders/{folder}/muteConfigs/{config_id}`
+   * + `folders/{folder}/locations/{location}/muteConfigs/{config_id}`
+   * + `projects/{project}/muteConfigs/{config_id}`
+   * + `projects/{project}/locations/{location}/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/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/DeleteNotificationConfigRequest.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/DeleteNotificationConfigRequest.java new file mode 100644 index 000000000000..908b5da97b54 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/DeleteNotificationConfigRequest.java @@ -0,0 +1,708 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Request message for deleting a notification config.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.DeleteNotificationConfigRequest} + */ +public final class DeleteNotificationConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.DeleteNotificationConfigRequest) + DeleteNotificationConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteNotificationConfigRequest.newBuilder() to construct. + private DeleteNotificationConfigRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteNotificationConfigRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteNotificationConfigRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_DeleteNotificationConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_DeleteNotificationConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest.class, + com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the notification config to delete. The following list
+   * shows some examples of the format:
+   *
+   * +
+   * `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]`
+   * +
+   * `folders/[folder_id]/locations/[location_id]notificationConfigs/[config_id]`
+   * +
+   * `projects/[project_id]/locations/[location_id]notificationConfigs/[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 notification config to delete. The following list
+   * shows some examples of the format:
+   *
+   * +
+   * `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]`
+   * +
+   * `folders/[folder_id]/locations/[location_id]notificationConfigs/[config_id]`
+   * +
+   * `projects/[project_id]/locations/[location_id]notificationConfigs/[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_); + } + getUnknownFields().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 += getUnknownFields().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.v2.DeleteNotificationConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest other = + (com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest 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.v2.DeleteNotificationConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest 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.v2.DeleteNotificationConfigRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest 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.v2.DeleteNotificationConfigRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest + 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.v2.DeleteNotificationConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest 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.v2.DeleteNotificationConfigRequest 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 notification config.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.DeleteNotificationConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.DeleteNotificationConfigRequest) + com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_DeleteNotificationConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_DeleteNotificationConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest.class, + com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest.Builder.class); + } + + // Construct using + // com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_DeleteNotificationConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest + getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest build() { + com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest buildPartial() { + com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest result = + new com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.v2.DeleteNotificationConfigRequest) { + return mergeFrom( + (com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest other) { + if (other + == com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the notification config to delete. The following list
+     * shows some examples of the format:
+     *
+     * +
+     * `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]`
+     * +
+     * `folders/[folder_id]/locations/[location_id]notificationConfigs/[config_id]`
+     * +
+     * `projects/[project_id]/locations/[location_id]notificationConfigs/[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 notification config to delete. The following list
+     * shows some examples of the format:
+     *
+     * +
+     * `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]`
+     * +
+     * `folders/[folder_id]/locations/[location_id]notificationConfigs/[config_id]`
+     * +
+     * `projects/[project_id]/locations/[location_id]notificationConfigs/[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 notification config to delete. The following list
+     * shows some examples of the format:
+     *
+     * +
+     * `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]`
+     * +
+     * `folders/[folder_id]/locations/[location_id]notificationConfigs/[config_id]`
+     * +
+     * `projects/[project_id]/locations/[location_id]notificationConfigs/[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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the notification config to delete. The following list
+     * shows some examples of the format:
+     *
+     * +
+     * `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]`
+     * +
+     * `folders/[folder_id]/locations/[location_id]notificationConfigs/[config_id]`
+     * +
+     * `projects/[project_id]/locations/[location_id]notificationConfigs/[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(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the notification config to delete. The following list
+     * shows some examples of the format:
+     *
+     * +
+     * `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]`
+     * +
+     * `folders/[folder_id]/locations/[location_id]notificationConfigs/[config_id]`
+     * +
+     * `projects/[project_id]/locations/[location_id]notificationConfigs/[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; + bitField0_ |= 0x00000001; + 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.v2.DeleteNotificationConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.DeleteNotificationConfigRequest) + private static final com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest(); + } + + public static com.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteNotificationConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.DeleteNotificationConfigRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/DeleteNotificationConfigRequestOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/DeleteNotificationConfigRequestOrBuilder.java new file mode 100644 index 000000000000..4059c2bb5ab3 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/DeleteNotificationConfigRequestOrBuilder.java @@ -0,0 +1,71 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface DeleteNotificationConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.DeleteNotificationConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the notification config to delete. The following list
+   * shows some examples of the format:
+   *
+   * +
+   * `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]`
+   * +
+   * `folders/[folder_id]/locations/[location_id]notificationConfigs/[config_id]`
+   * +
+   * `projects/[project_id]/locations/[location_id]notificationConfigs/[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 notification config to delete. The following list
+   * shows some examples of the format:
+   *
+   * +
+   * `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]`
+   * +
+   * `folders/[folder_id]/locations/[location_id]notificationConfigs/[config_id]`
+   * +
+   * `projects/[project_id]/locations/[location_id]notificationConfigs/[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/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/DeleteResourceValueConfigRequest.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/DeleteResourceValueConfigRequest.java new file mode 100644 index 000000000000..d00441ab51d7 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/DeleteResourceValueConfigRequest.java @@ -0,0 +1,652 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Request message to delete resource value config
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest} + */ +public final class DeleteResourceValueConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest) + DeleteResourceValueConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteResourceValueConfigRequest.newBuilder() to construct. + private DeleteResourceValueConfigRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteResourceValueConfigRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteResourceValueConfigRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_DeleteResourceValueConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_DeleteResourceValueConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest.class, + com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the ResourceValueConfig to delete
+   * 
+ * + * + * 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 ResourceValueConfig to delete
+   * 
+ * + * + * 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_); + } + getUnknownFields().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 += getUnknownFields().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.v2.DeleteResourceValueConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest other = + (com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest 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.v2.DeleteResourceValueConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest 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.v2.DeleteResourceValueConfigRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest 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.v2.DeleteResourceValueConfigRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest + 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.v2.DeleteResourceValueConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest 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.v2.DeleteResourceValueConfigRequest 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 to delete resource value config
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest) + com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_DeleteResourceValueConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_DeleteResourceValueConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest.class, + com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest.Builder.class); + } + + // Construct using + // com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_DeleteResourceValueConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest + getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest build() { + com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest buildPartial() { + com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest result = + new com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.v2.DeleteResourceValueConfigRequest) { + return mergeFrom( + (com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest other) { + if (other + == com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the ResourceValueConfig to delete
+     * 
+ * + * + * 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 ResourceValueConfig to delete
+     * 
+ * + * + * 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 ResourceValueConfig to delete
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the ResourceValueConfig to delete
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the ResourceValueConfig to delete
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + 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.v2.DeleteResourceValueConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest) + private static final com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest(); + } + + public static com.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteResourceValueConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.DeleteResourceValueConfigRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/DeleteResourceValueConfigRequestOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/DeleteResourceValueConfigRequestOrBuilder.java new file mode 100644 index 000000000000..c9de7b1dee70 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/DeleteResourceValueConfigRequestOrBuilder.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface DeleteResourceValueConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the ResourceValueConfig to delete
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the ResourceValueConfig to delete
+   * 
+ * + * + * 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/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/EnvironmentVariable.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/EnvironmentVariable.java new file mode 100644 index 000000000000..3e9208b80baa --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/EnvironmentVariable.java @@ -0,0 +1,810 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/process.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * A name-value pair representing an environment variable used in an operating
+ * system process.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.EnvironmentVariable} + */ +public final class EnvironmentVariable extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.EnvironmentVariable) + EnvironmentVariableOrBuilder { + private static final long serialVersionUID = 0L; + // Use EnvironmentVariable.newBuilder() to construct. + private EnvironmentVariable(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EnvironmentVariable() { + name_ = ""; + val_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EnvironmentVariable(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.ProcessProto + .internal_static_google_cloud_securitycenter_v2_EnvironmentVariable_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.ProcessProto + .internal_static_google_cloud_securitycenter_v2_EnvironmentVariable_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.EnvironmentVariable.class, + com.google.cloud.securitycenter.v2.EnvironmentVariable.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Environment variable name as a JSON encoded string.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Environment variable name as a JSON encoded string.
+   * 
+ * + * 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 VAL_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object val_ = ""; + /** + * + * + *
+   * Environment variable value as a JSON encoded string.
+   * 
+ * + * string val = 2; + * + * @return The val. + */ + @java.lang.Override + public java.lang.String getVal() { + java.lang.Object ref = val_; + 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(); + val_ = s; + return s; + } + } + /** + * + * + *
+   * Environment variable value as a JSON encoded string.
+   * 
+ * + * string val = 2; + * + * @return The bytes for val. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValBytes() { + java.lang.Object ref = val_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + val_ = 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(val_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, val_); + } + getUnknownFields().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(val_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, val_); + } + size += getUnknownFields().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.v2.EnvironmentVariable)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.EnvironmentVariable other = + (com.google.cloud.securitycenter.v2.EnvironmentVariable) obj; + + if (!getName().equals(other.getName())) return false; + if (!getVal().equals(other.getVal())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getVal().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.EnvironmentVariable parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.EnvironmentVariable 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.v2.EnvironmentVariable parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.EnvironmentVariable 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.v2.EnvironmentVariable parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.EnvironmentVariable parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.EnvironmentVariable parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.EnvironmentVariable 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.v2.EnvironmentVariable parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.EnvironmentVariable 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.v2.EnvironmentVariable parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.EnvironmentVariable 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.v2.EnvironmentVariable 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 name-value pair representing an environment variable used in an operating
+   * system process.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.EnvironmentVariable} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.EnvironmentVariable) + com.google.cloud.securitycenter.v2.EnvironmentVariableOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.ProcessProto + .internal_static_google_cloud_securitycenter_v2_EnvironmentVariable_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.ProcessProto + .internal_static_google_cloud_securitycenter_v2_EnvironmentVariable_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.EnvironmentVariable.class, + com.google.cloud.securitycenter.v2.EnvironmentVariable.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.EnvironmentVariable.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + val_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.ProcessProto + .internal_static_google_cloud_securitycenter_v2_EnvironmentVariable_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.EnvironmentVariable getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.EnvironmentVariable.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.EnvironmentVariable build() { + com.google.cloud.securitycenter.v2.EnvironmentVariable result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.EnvironmentVariable buildPartial() { + com.google.cloud.securitycenter.v2.EnvironmentVariable result = + new com.google.cloud.securitycenter.v2.EnvironmentVariable(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.EnvironmentVariable result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.val_ = val_; + } + } + + @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.v2.EnvironmentVariable) { + return mergeFrom((com.google.cloud.securitycenter.v2.EnvironmentVariable) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.EnvironmentVariable other) { + if (other == com.google.cloud.securitycenter.v2.EnvironmentVariable.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getVal().isEmpty()) { + val_ = other.val_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + val_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Environment variable name as a JSON encoded string.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Environment variable name as a JSON encoded string.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Environment variable name as a JSON encoded string.
+     * 
+ * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Environment variable name as a JSON encoded string.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Environment variable name as a JSON encoded string.
+     * 
+ * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object val_ = ""; + /** + * + * + *
+     * Environment variable value as a JSON encoded string.
+     * 
+ * + * string val = 2; + * + * @return The val. + */ + public java.lang.String getVal() { + java.lang.Object ref = val_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + val_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Environment variable value as a JSON encoded string.
+     * 
+ * + * string val = 2; + * + * @return The bytes for val. + */ + public com.google.protobuf.ByteString getValBytes() { + java.lang.Object ref = val_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + val_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Environment variable value as a JSON encoded string.
+     * 
+ * + * string val = 2; + * + * @param value The val to set. + * @return This builder for chaining. + */ + public Builder setVal(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + val_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Environment variable value as a JSON encoded string.
+     * 
+ * + * string val = 2; + * + * @return This builder for chaining. + */ + public Builder clearVal() { + val_ = getDefaultInstance().getVal(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Environment variable value as a JSON encoded string.
+     * 
+ * + * string val = 2; + * + * @param value The bytes for val to set. + * @return This builder for chaining. + */ + public Builder setValBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + val_ = value; + bitField0_ |= 0x00000002; + 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.v2.EnvironmentVariable) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.EnvironmentVariable) + private static final com.google.cloud.securitycenter.v2.EnvironmentVariable DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.EnvironmentVariable(); + } + + public static com.google.cloud.securitycenter.v2.EnvironmentVariable getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EnvironmentVariable parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.EnvironmentVariable getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/EnvironmentVariableOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/EnvironmentVariableOrBuilder.java new file mode 100644 index 000000000000..18c29aa35f58 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/EnvironmentVariableOrBuilder.java @@ -0,0 +1,76 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/process.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface EnvironmentVariableOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.EnvironmentVariable) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Environment variable name as a JSON encoded string.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Environment variable name as a JSON encoded string.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Environment variable value as a JSON encoded string.
+   * 
+ * + * string val = 2; + * + * @return The val. + */ + java.lang.String getVal(); + /** + * + * + *
+   * Environment variable value as a JSON encoded string.
+   * 
+ * + * string val = 2; + * + * @return The bytes for val. + */ + com.google.protobuf.ByteString getValBytes(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ExfilResource.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ExfilResource.java new file mode 100644 index 000000000000..08d35aa3ce92 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ExfilResource.java @@ -0,0 +1,961 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/exfiltration.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Resource where data was exfiltrated from or exfiltrated to.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.ExfilResource} + */ +public final class ExfilResource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.ExfilResource) + ExfilResourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExfilResource.newBuilder() to construct. + private ExfilResource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExfilResource() { + name_ = ""; + components_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExfilResource(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.ExfiltrationProto + .internal_static_google_cloud_securitycenter_v2_ExfilResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.ExfiltrationProto + .internal_static_google_cloud_securitycenter_v2_ExfilResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.ExfilResource.class, + com.google.cloud.securitycenter.v2.ExfilResource.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * The resource's [full resource
+   * name](https://cloud.google.com/apis/design/resource_names#full_resource_name).
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * The resource's [full resource
+   * name](https://cloud.google.com/apis/design/resource_names#full_resource_name).
+   * 
+ * + * 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 COMPONENTS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList components_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Subcomponents of the asset that was exfiltrated, like URIs used during
+   * exfiltration, table names, databases, and filenames. For example, multiple
+   * tables might have been exfiltrated from the same Cloud SQL instance, or
+   * multiple files might have been exfiltrated from the same Cloud Storage
+   * bucket.
+   * 
+ * + * repeated string components = 2; + * + * @return A list containing the components. + */ + public com.google.protobuf.ProtocolStringList getComponentsList() { + return components_; + } + /** + * + * + *
+   * Subcomponents of the asset that was exfiltrated, like URIs used during
+   * exfiltration, table names, databases, and filenames. For example, multiple
+   * tables might have been exfiltrated from the same Cloud SQL instance, or
+   * multiple files might have been exfiltrated from the same Cloud Storage
+   * bucket.
+   * 
+ * + * repeated string components = 2; + * + * @return The count of components. + */ + public int getComponentsCount() { + return components_.size(); + } + /** + * + * + *
+   * Subcomponents of the asset that was exfiltrated, like URIs used during
+   * exfiltration, table names, databases, and filenames. For example, multiple
+   * tables might have been exfiltrated from the same Cloud SQL instance, or
+   * multiple files might have been exfiltrated from the same Cloud Storage
+   * bucket.
+   * 
+ * + * repeated string components = 2; + * + * @param index The index of the element to return. + * @return The components at the given index. + */ + public java.lang.String getComponents(int index) { + return components_.get(index); + } + /** + * + * + *
+   * Subcomponents of the asset that was exfiltrated, like URIs used during
+   * exfiltration, table names, databases, and filenames. For example, multiple
+   * tables might have been exfiltrated from the same Cloud SQL instance, or
+   * multiple files might have been exfiltrated from the same Cloud Storage
+   * bucket.
+   * 
+ * + * repeated string components = 2; + * + * @param index The index of the value to return. + * @return The bytes of the components at the given index. + */ + public com.google.protobuf.ByteString getComponentsBytes(int index) { + return components_.getByteString(index); + } + + 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 < components_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, components_.getRaw(i)); + } + getUnknownFields().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 < components_.size(); i++) { + dataSize += computeStringSizeNoTag(components_.getRaw(i)); + } + size += dataSize; + size += 1 * getComponentsList().size(); + } + size += getUnknownFields().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.v2.ExfilResource)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.ExfilResource other = + (com.google.cloud.securitycenter.v2.ExfilResource) obj; + + if (!getName().equals(other.getName())) return false; + if (!getComponentsList().equals(other.getComponentsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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 (getComponentsCount() > 0) { + hash = (37 * hash) + COMPONENTS_FIELD_NUMBER; + hash = (53 * hash) + getComponentsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.ExfilResource parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.ExfilResource 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.v2.ExfilResource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.ExfilResource 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.v2.ExfilResource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.ExfilResource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.ExfilResource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.ExfilResource 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.v2.ExfilResource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.ExfilResource 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.v2.ExfilResource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.ExfilResource 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.v2.ExfilResource 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; + } + /** + * + * + *
+   * Resource where data was exfiltrated from or exfiltrated to.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.ExfilResource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.ExfilResource) + com.google.cloud.securitycenter.v2.ExfilResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.ExfiltrationProto + .internal_static_google_cloud_securitycenter_v2_ExfilResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.ExfiltrationProto + .internal_static_google_cloud_securitycenter_v2_ExfilResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.ExfilResource.class, + com.google.cloud.securitycenter.v2.ExfilResource.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.ExfilResource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + components_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.ExfiltrationProto + .internal_static_google_cloud_securitycenter_v2_ExfilResource_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.ExfilResource getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.ExfilResource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.ExfilResource build() { + com.google.cloud.securitycenter.v2.ExfilResource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.ExfilResource buildPartial() { + com.google.cloud.securitycenter.v2.ExfilResource result = + new com.google.cloud.securitycenter.v2.ExfilResource(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.ExfilResource result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + components_.makeImmutable(); + result.components_ = components_; + } + } + + @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.v2.ExfilResource) { + return mergeFrom((com.google.cloud.securitycenter.v2.ExfilResource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.ExfilResource other) { + if (other == com.google.cloud.securitycenter.v2.ExfilResource.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.components_.isEmpty()) { + if (components_.isEmpty()) { + components_ = other.components_; + bitField0_ |= 0x00000002; + } else { + ensureComponentsIsMutable(); + components_.addAll(other.components_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureComponentsIsMutable(); + components_.add(s); + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The resource's [full resource
+     * name](https://cloud.google.com/apis/design/resource_names#full_resource_name).
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * The resource's [full resource
+     * name](https://cloud.google.com/apis/design/resource_names#full_resource_name).
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * The resource's [full resource
+     * name](https://cloud.google.com/apis/design/resource_names#full_resource_name).
+     * 
+ * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource's [full resource
+     * name](https://cloud.google.com/apis/design/resource_names#full_resource_name).
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource's [full resource
+     * name](https://cloud.google.com/apis/design/resource_names#full_resource_name).
+     * 
+ * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList components_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureComponentsIsMutable() { + if (!components_.isModifiable()) { + components_ = new com.google.protobuf.LazyStringArrayList(components_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * Subcomponents of the asset that was exfiltrated, like URIs used during
+     * exfiltration, table names, databases, and filenames. For example, multiple
+     * tables might have been exfiltrated from the same Cloud SQL instance, or
+     * multiple files might have been exfiltrated from the same Cloud Storage
+     * bucket.
+     * 
+ * + * repeated string components = 2; + * + * @return A list containing the components. + */ + public com.google.protobuf.ProtocolStringList getComponentsList() { + components_.makeImmutable(); + return components_; + } + /** + * + * + *
+     * Subcomponents of the asset that was exfiltrated, like URIs used during
+     * exfiltration, table names, databases, and filenames. For example, multiple
+     * tables might have been exfiltrated from the same Cloud SQL instance, or
+     * multiple files might have been exfiltrated from the same Cloud Storage
+     * bucket.
+     * 
+ * + * repeated string components = 2; + * + * @return The count of components. + */ + public int getComponentsCount() { + return components_.size(); + } + /** + * + * + *
+     * Subcomponents of the asset that was exfiltrated, like URIs used during
+     * exfiltration, table names, databases, and filenames. For example, multiple
+     * tables might have been exfiltrated from the same Cloud SQL instance, or
+     * multiple files might have been exfiltrated from the same Cloud Storage
+     * bucket.
+     * 
+ * + * repeated string components = 2; + * + * @param index The index of the element to return. + * @return The components at the given index. + */ + public java.lang.String getComponents(int index) { + return components_.get(index); + } + /** + * + * + *
+     * Subcomponents of the asset that was exfiltrated, like URIs used during
+     * exfiltration, table names, databases, and filenames. For example, multiple
+     * tables might have been exfiltrated from the same Cloud SQL instance, or
+     * multiple files might have been exfiltrated from the same Cloud Storage
+     * bucket.
+     * 
+ * + * repeated string components = 2; + * + * @param index The index of the value to return. + * @return The bytes of the components at the given index. + */ + public com.google.protobuf.ByteString getComponentsBytes(int index) { + return components_.getByteString(index); + } + /** + * + * + *
+     * Subcomponents of the asset that was exfiltrated, like URIs used during
+     * exfiltration, table names, databases, and filenames. For example, multiple
+     * tables might have been exfiltrated from the same Cloud SQL instance, or
+     * multiple files might have been exfiltrated from the same Cloud Storage
+     * bucket.
+     * 
+ * + * repeated string components = 2; + * + * @param index The index to set the value at. + * @param value The components to set. + * @return This builder for chaining. + */ + public Builder setComponents(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureComponentsIsMutable(); + components_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Subcomponents of the asset that was exfiltrated, like URIs used during
+     * exfiltration, table names, databases, and filenames. For example, multiple
+     * tables might have been exfiltrated from the same Cloud SQL instance, or
+     * multiple files might have been exfiltrated from the same Cloud Storage
+     * bucket.
+     * 
+ * + * repeated string components = 2; + * + * @param value The components to add. + * @return This builder for chaining. + */ + public Builder addComponents(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureComponentsIsMutable(); + components_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Subcomponents of the asset that was exfiltrated, like URIs used during
+     * exfiltration, table names, databases, and filenames. For example, multiple
+     * tables might have been exfiltrated from the same Cloud SQL instance, or
+     * multiple files might have been exfiltrated from the same Cloud Storage
+     * bucket.
+     * 
+ * + * repeated string components = 2; + * + * @param values The components to add. + * @return This builder for chaining. + */ + public Builder addAllComponents(java.lang.Iterable values) { + ensureComponentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, components_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Subcomponents of the asset that was exfiltrated, like URIs used during
+     * exfiltration, table names, databases, and filenames. For example, multiple
+     * tables might have been exfiltrated from the same Cloud SQL instance, or
+     * multiple files might have been exfiltrated from the same Cloud Storage
+     * bucket.
+     * 
+ * + * repeated string components = 2; + * + * @return This builder for chaining. + */ + public Builder clearComponents() { + components_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Subcomponents of the asset that was exfiltrated, like URIs used during
+     * exfiltration, table names, databases, and filenames. For example, multiple
+     * tables might have been exfiltrated from the same Cloud SQL instance, or
+     * multiple files might have been exfiltrated from the same Cloud Storage
+     * bucket.
+     * 
+ * + * repeated string components = 2; + * + * @param value The bytes of the components to add. + * @return This builder for chaining. + */ + public Builder addComponentsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureComponentsIsMutable(); + components_.add(value); + bitField0_ |= 0x00000002; + 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.v2.ExfilResource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.ExfilResource) + private static final com.google.cloud.securitycenter.v2.ExfilResource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.ExfilResource(); + } + + public static com.google.cloud.securitycenter.v2.ExfilResource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExfilResource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.ExfilResource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ExfilResourceOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ExfilResourceOrBuilder.java new file mode 100644 index 000000000000..b375c6685fc5 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ExfilResourceOrBuilder.java @@ -0,0 +1,120 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/exfiltration.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface ExfilResourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.ExfilResource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource's [full resource
+   * name](https://cloud.google.com/apis/design/resource_names#full_resource_name).
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The resource's [full resource
+   * name](https://cloud.google.com/apis/design/resource_names#full_resource_name).
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Subcomponents of the asset that was exfiltrated, like URIs used during
+   * exfiltration, table names, databases, and filenames. For example, multiple
+   * tables might have been exfiltrated from the same Cloud SQL instance, or
+   * multiple files might have been exfiltrated from the same Cloud Storage
+   * bucket.
+   * 
+ * + * repeated string components = 2; + * + * @return A list containing the components. + */ + java.util.List getComponentsList(); + /** + * + * + *
+   * Subcomponents of the asset that was exfiltrated, like URIs used during
+   * exfiltration, table names, databases, and filenames. For example, multiple
+   * tables might have been exfiltrated from the same Cloud SQL instance, or
+   * multiple files might have been exfiltrated from the same Cloud Storage
+   * bucket.
+   * 
+ * + * repeated string components = 2; + * + * @return The count of components. + */ + int getComponentsCount(); + /** + * + * + *
+   * Subcomponents of the asset that was exfiltrated, like URIs used during
+   * exfiltration, table names, databases, and filenames. For example, multiple
+   * tables might have been exfiltrated from the same Cloud SQL instance, or
+   * multiple files might have been exfiltrated from the same Cloud Storage
+   * bucket.
+   * 
+ * + * repeated string components = 2; + * + * @param index The index of the element to return. + * @return The components at the given index. + */ + java.lang.String getComponents(int index); + /** + * + * + *
+   * Subcomponents of the asset that was exfiltrated, like URIs used during
+   * exfiltration, table names, databases, and filenames. For example, multiple
+   * tables might have been exfiltrated from the same Cloud SQL instance, or
+   * multiple files might have been exfiltrated from the same Cloud Storage
+   * bucket.
+   * 
+ * + * repeated string components = 2; + * + * @param index The index of the value to return. + * @return The bytes of the components at the given index. + */ + com.google.protobuf.ByteString getComponentsBytes(int index); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Exfiltration.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Exfiltration.java new file mode 100644 index 000000000000..4b58986d7bd1 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Exfiltration.java @@ -0,0 +1,1600 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/exfiltration.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Exfiltration represents a data exfiltration attempt from one or more sources
+ * to one or more targets. The `sources` attribute lists the sources of the
+ * exfiltrated data. The `targets` attribute lists the destinations the data was
+ * copied to.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Exfiltration} + */ +public final class Exfiltration extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.Exfiltration) + ExfiltrationOrBuilder { + private static final long serialVersionUID = 0L; + // Use Exfiltration.newBuilder() to construct. + private Exfiltration(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Exfiltration() { + sources_ = java.util.Collections.emptyList(); + targets_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Exfiltration(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.ExfiltrationProto + .internal_static_google_cloud_securitycenter_v2_Exfiltration_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.ExfiltrationProto + .internal_static_google_cloud_securitycenter_v2_Exfiltration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Exfiltration.class, + com.google.cloud.securitycenter.v2.Exfiltration.Builder.class); + } + + public static final int SOURCES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List sources_; + /** + * + * + *
+   * If there are multiple sources, then the data is considered "joined" between
+   * them. For instance, BigQuery can join multiple tables, and each
+   * table would be considered a source.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource sources = 1; + */ + @java.lang.Override + public java.util.List getSourcesList() { + return sources_; + } + /** + * + * + *
+   * If there are multiple sources, then the data is considered "joined" between
+   * them. For instance, BigQuery can join multiple tables, and each
+   * table would be considered a source.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource sources = 1; + */ + @java.lang.Override + public java.util.List + getSourcesOrBuilderList() { + return sources_; + } + /** + * + * + *
+   * If there are multiple sources, then the data is considered "joined" between
+   * them. For instance, BigQuery can join multiple tables, and each
+   * table would be considered a source.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource sources = 1; + */ + @java.lang.Override + public int getSourcesCount() { + return sources_.size(); + } + /** + * + * + *
+   * If there are multiple sources, then the data is considered "joined" between
+   * them. For instance, BigQuery can join multiple tables, and each
+   * table would be considered a source.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource sources = 1; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.ExfilResource getSources(int index) { + return sources_.get(index); + } + /** + * + * + *
+   * If there are multiple sources, then the data is considered "joined" between
+   * them. For instance, BigQuery can join multiple tables, and each
+   * table would be considered a source.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource sources = 1; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.ExfilResourceOrBuilder getSourcesOrBuilder(int index) { + return sources_.get(index); + } + + public static final int TARGETS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List targets_; + /** + * + * + *
+   * If there are multiple targets, each target would get a complete copy of the
+   * "joined" source data.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource targets = 2; + */ + @java.lang.Override + public java.util.List getTargetsList() { + return targets_; + } + /** + * + * + *
+   * If there are multiple targets, each target would get a complete copy of the
+   * "joined" source data.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource targets = 2; + */ + @java.lang.Override + public java.util.List + getTargetsOrBuilderList() { + return targets_; + } + /** + * + * + *
+   * If there are multiple targets, each target would get a complete copy of the
+   * "joined" source data.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource targets = 2; + */ + @java.lang.Override + public int getTargetsCount() { + return targets_.size(); + } + /** + * + * + *
+   * If there are multiple targets, each target would get a complete copy of the
+   * "joined" source data.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource targets = 2; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.ExfilResource getTargets(int index) { + return targets_.get(index); + } + /** + * + * + *
+   * If there are multiple targets, each target would get a complete copy of the
+   * "joined" source data.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource targets = 2; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.ExfilResourceOrBuilder getTargetsOrBuilder(int index) { + return targets_.get(index); + } + + public static final int TOTAL_EXFILTRATED_BYTES_FIELD_NUMBER = 3; + private long totalExfiltratedBytes_ = 0L; + /** + * + * + *
+   * Total exfiltrated bytes processed for the entire job.
+   * 
+ * + * int64 total_exfiltrated_bytes = 3; + * + * @return The totalExfiltratedBytes. + */ + @java.lang.Override + public long getTotalExfiltratedBytes() { + return totalExfiltratedBytes_; + } + + 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 < sources_.size(); i++) { + output.writeMessage(1, sources_.get(i)); + } + for (int i = 0; i < targets_.size(); i++) { + output.writeMessage(2, targets_.get(i)); + } + if (totalExfiltratedBytes_ != 0L) { + output.writeInt64(3, totalExfiltratedBytes_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < sources_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, sources_.get(i)); + } + for (int i = 0; i < targets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, targets_.get(i)); + } + if (totalExfiltratedBytes_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, totalExfiltratedBytes_); + } + size += getUnknownFields().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.v2.Exfiltration)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.Exfiltration other = + (com.google.cloud.securitycenter.v2.Exfiltration) obj; + + if (!getSourcesList().equals(other.getSourcesList())) return false; + if (!getTargetsList().equals(other.getTargetsList())) return false; + if (getTotalExfiltratedBytes() != other.getTotalExfiltratedBytes()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSourcesCount() > 0) { + hash = (37 * hash) + SOURCES_FIELD_NUMBER; + hash = (53 * hash) + getSourcesList().hashCode(); + } + if (getTargetsCount() > 0) { + hash = (37 * hash) + TARGETS_FIELD_NUMBER; + hash = (53 * hash) + getTargetsList().hashCode(); + } + hash = (37 * hash) + TOTAL_EXFILTRATED_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalExfiltratedBytes()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.Exfiltration parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Exfiltration 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.v2.Exfiltration parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Exfiltration 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.v2.Exfiltration parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Exfiltration parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.Exfiltration parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Exfiltration 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.v2.Exfiltration parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Exfiltration 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.v2.Exfiltration parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Exfiltration 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.v2.Exfiltration 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; + } + /** + * + * + *
+   * Exfiltration represents a data exfiltration attempt from one or more sources
+   * to one or more targets. The `sources` attribute lists the sources of the
+   * exfiltrated data. The `targets` attribute lists the destinations the data was
+   * copied to.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Exfiltration} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.Exfiltration) + com.google.cloud.securitycenter.v2.ExfiltrationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.ExfiltrationProto + .internal_static_google_cloud_securitycenter_v2_Exfiltration_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.ExfiltrationProto + .internal_static_google_cloud_securitycenter_v2_Exfiltration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Exfiltration.class, + com.google.cloud.securitycenter.v2.Exfiltration.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.Exfiltration.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (sourcesBuilder_ == null) { + sources_ = java.util.Collections.emptyList(); + } else { + sources_ = null; + sourcesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (targetsBuilder_ == null) { + targets_ = java.util.Collections.emptyList(); + } else { + targets_ = null; + targetsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + totalExfiltratedBytes_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.ExfiltrationProto + .internal_static_google_cloud_securitycenter_v2_Exfiltration_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Exfiltration getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.Exfiltration.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Exfiltration build() { + com.google.cloud.securitycenter.v2.Exfiltration result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Exfiltration buildPartial() { + com.google.cloud.securitycenter.v2.Exfiltration result = + new com.google.cloud.securitycenter.v2.Exfiltration(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.securitycenter.v2.Exfiltration result) { + if (sourcesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + sources_ = java.util.Collections.unmodifiableList(sources_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.sources_ = sources_; + } else { + result.sources_ = sourcesBuilder_.build(); + } + if (targetsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + targets_ = java.util.Collections.unmodifiableList(targets_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.targets_ = targets_; + } else { + result.targets_ = targetsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.Exfiltration result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.totalExfiltratedBytes_ = totalExfiltratedBytes_; + } + } + + @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.v2.Exfiltration) { + return mergeFrom((com.google.cloud.securitycenter.v2.Exfiltration) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.Exfiltration other) { + if (other == com.google.cloud.securitycenter.v2.Exfiltration.getDefaultInstance()) + return this; + if (sourcesBuilder_ == null) { + if (!other.sources_.isEmpty()) { + if (sources_.isEmpty()) { + sources_ = other.sources_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSourcesIsMutable(); + sources_.addAll(other.sources_); + } + onChanged(); + } + } else { + if (!other.sources_.isEmpty()) { + if (sourcesBuilder_.isEmpty()) { + sourcesBuilder_.dispose(); + sourcesBuilder_ = null; + sources_ = other.sources_; + bitField0_ = (bitField0_ & ~0x00000001); + sourcesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSourcesFieldBuilder() + : null; + } else { + sourcesBuilder_.addAllMessages(other.sources_); + } + } + } + if (targetsBuilder_ == null) { + if (!other.targets_.isEmpty()) { + if (targets_.isEmpty()) { + targets_ = other.targets_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTargetsIsMutable(); + targets_.addAll(other.targets_); + } + onChanged(); + } + } else { + if (!other.targets_.isEmpty()) { + if (targetsBuilder_.isEmpty()) { + targetsBuilder_.dispose(); + targetsBuilder_ = null; + targets_ = other.targets_; + bitField0_ = (bitField0_ & ~0x00000002); + targetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTargetsFieldBuilder() + : null; + } else { + targetsBuilder_.addAllMessages(other.targets_); + } + } + } + if (other.getTotalExfiltratedBytes() != 0L) { + setTotalExfiltratedBytes(other.getTotalExfiltratedBytes()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.securitycenter.v2.ExfilResource m = + input.readMessage( + com.google.cloud.securitycenter.v2.ExfilResource.parser(), + extensionRegistry); + if (sourcesBuilder_ == null) { + ensureSourcesIsMutable(); + sources_.add(m); + } else { + sourcesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + com.google.cloud.securitycenter.v2.ExfilResource m = + input.readMessage( + com.google.cloud.securitycenter.v2.ExfilResource.parser(), + extensionRegistry); + if (targetsBuilder_ == null) { + ensureTargetsIsMutable(); + targets_.add(m); + } else { + targetsBuilder_.addMessage(m); + } + break; + } // case 18 + case 24: + { + totalExfiltratedBytes_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List sources_ = + java.util.Collections.emptyList(); + + private void ensureSourcesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + sources_ = + new java.util.ArrayList(sources_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.ExfilResource, + com.google.cloud.securitycenter.v2.ExfilResource.Builder, + com.google.cloud.securitycenter.v2.ExfilResourceOrBuilder> + sourcesBuilder_; + + /** + * + * + *
+     * If there are multiple sources, then the data is considered "joined" between
+     * them. For instance, BigQuery can join multiple tables, and each
+     * table would be considered a source.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource sources = 1; + */ + public java.util.List getSourcesList() { + if (sourcesBuilder_ == null) { + return java.util.Collections.unmodifiableList(sources_); + } else { + return sourcesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * If there are multiple sources, then the data is considered "joined" between
+     * them. For instance, BigQuery can join multiple tables, and each
+     * table would be considered a source.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource sources = 1; + */ + public int getSourcesCount() { + if (sourcesBuilder_ == null) { + return sources_.size(); + } else { + return sourcesBuilder_.getCount(); + } + } + /** + * + * + *
+     * If there are multiple sources, then the data is considered "joined" between
+     * them. For instance, BigQuery can join multiple tables, and each
+     * table would be considered a source.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource sources = 1; + */ + public com.google.cloud.securitycenter.v2.ExfilResource getSources(int index) { + if (sourcesBuilder_ == null) { + return sources_.get(index); + } else { + return sourcesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * If there are multiple sources, then the data is considered "joined" between
+     * them. For instance, BigQuery can join multiple tables, and each
+     * table would be considered a source.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource sources = 1; + */ + public Builder setSources(int index, com.google.cloud.securitycenter.v2.ExfilResource value) { + if (sourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourcesIsMutable(); + sources_.set(index, value); + onChanged(); + } else { + sourcesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * If there are multiple sources, then the data is considered "joined" between
+     * them. For instance, BigQuery can join multiple tables, and each
+     * table would be considered a source.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource sources = 1; + */ + public Builder setSources( + int index, com.google.cloud.securitycenter.v2.ExfilResource.Builder builderForValue) { + if (sourcesBuilder_ == null) { + ensureSourcesIsMutable(); + sources_.set(index, builderForValue.build()); + onChanged(); + } else { + sourcesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * If there are multiple sources, then the data is considered "joined" between
+     * them. For instance, BigQuery can join multiple tables, and each
+     * table would be considered a source.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource sources = 1; + */ + public Builder addSources(com.google.cloud.securitycenter.v2.ExfilResource value) { + if (sourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourcesIsMutable(); + sources_.add(value); + onChanged(); + } else { + sourcesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * If there are multiple sources, then the data is considered "joined" between
+     * them. For instance, BigQuery can join multiple tables, and each
+     * table would be considered a source.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource sources = 1; + */ + public Builder addSources(int index, com.google.cloud.securitycenter.v2.ExfilResource value) { + if (sourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourcesIsMutable(); + sources_.add(index, value); + onChanged(); + } else { + sourcesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * If there are multiple sources, then the data is considered "joined" between
+     * them. For instance, BigQuery can join multiple tables, and each
+     * table would be considered a source.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource sources = 1; + */ + public Builder addSources( + com.google.cloud.securitycenter.v2.ExfilResource.Builder builderForValue) { + if (sourcesBuilder_ == null) { + ensureSourcesIsMutable(); + sources_.add(builderForValue.build()); + onChanged(); + } else { + sourcesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * If there are multiple sources, then the data is considered "joined" between
+     * them. For instance, BigQuery can join multiple tables, and each
+     * table would be considered a source.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource sources = 1; + */ + public Builder addSources( + int index, com.google.cloud.securitycenter.v2.ExfilResource.Builder builderForValue) { + if (sourcesBuilder_ == null) { + ensureSourcesIsMutable(); + sources_.add(index, builderForValue.build()); + onChanged(); + } else { + sourcesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * If there are multiple sources, then the data is considered "joined" between
+     * them. For instance, BigQuery can join multiple tables, and each
+     * table would be considered a source.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource sources = 1; + */ + public Builder addAllSources( + java.lang.Iterable values) { + if (sourcesBuilder_ == null) { + ensureSourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sources_); + onChanged(); + } else { + sourcesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * If there are multiple sources, then the data is considered "joined" between
+     * them. For instance, BigQuery can join multiple tables, and each
+     * table would be considered a source.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource sources = 1; + */ + public Builder clearSources() { + if (sourcesBuilder_ == null) { + sources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + sourcesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * If there are multiple sources, then the data is considered "joined" between
+     * them. For instance, BigQuery can join multiple tables, and each
+     * table would be considered a source.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource sources = 1; + */ + public Builder removeSources(int index) { + if (sourcesBuilder_ == null) { + ensureSourcesIsMutable(); + sources_.remove(index); + onChanged(); + } else { + sourcesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * If there are multiple sources, then the data is considered "joined" between
+     * them. For instance, BigQuery can join multiple tables, and each
+     * table would be considered a source.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource sources = 1; + */ + public com.google.cloud.securitycenter.v2.ExfilResource.Builder getSourcesBuilder(int index) { + return getSourcesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * If there are multiple sources, then the data is considered "joined" between
+     * them. For instance, BigQuery can join multiple tables, and each
+     * table would be considered a source.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource sources = 1; + */ + public com.google.cloud.securitycenter.v2.ExfilResourceOrBuilder getSourcesOrBuilder( + int index) { + if (sourcesBuilder_ == null) { + return sources_.get(index); + } else { + return sourcesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * If there are multiple sources, then the data is considered "joined" between
+     * them. For instance, BigQuery can join multiple tables, and each
+     * table would be considered a source.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource sources = 1; + */ + public java.util.List + getSourcesOrBuilderList() { + if (sourcesBuilder_ != null) { + return sourcesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(sources_); + } + } + /** + * + * + *
+     * If there are multiple sources, then the data is considered "joined" between
+     * them. For instance, BigQuery can join multiple tables, and each
+     * table would be considered a source.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource sources = 1; + */ + public com.google.cloud.securitycenter.v2.ExfilResource.Builder addSourcesBuilder() { + return getSourcesFieldBuilder() + .addBuilder(com.google.cloud.securitycenter.v2.ExfilResource.getDefaultInstance()); + } + /** + * + * + *
+     * If there are multiple sources, then the data is considered "joined" between
+     * them. For instance, BigQuery can join multiple tables, and each
+     * table would be considered a source.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource sources = 1; + */ + public com.google.cloud.securitycenter.v2.ExfilResource.Builder addSourcesBuilder(int index) { + return getSourcesFieldBuilder() + .addBuilder(index, com.google.cloud.securitycenter.v2.ExfilResource.getDefaultInstance()); + } + /** + * + * + *
+     * If there are multiple sources, then the data is considered "joined" between
+     * them. For instance, BigQuery can join multiple tables, and each
+     * table would be considered a source.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource sources = 1; + */ + public java.util.List + getSourcesBuilderList() { + return getSourcesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.ExfilResource, + com.google.cloud.securitycenter.v2.ExfilResource.Builder, + com.google.cloud.securitycenter.v2.ExfilResourceOrBuilder> + getSourcesFieldBuilder() { + if (sourcesBuilder_ == null) { + sourcesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.ExfilResource, + com.google.cloud.securitycenter.v2.ExfilResource.Builder, + com.google.cloud.securitycenter.v2.ExfilResourceOrBuilder>( + sources_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + sources_ = null; + } + return sourcesBuilder_; + } + + private java.util.List targets_ = + java.util.Collections.emptyList(); + + private void ensureTargetsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + targets_ = + new java.util.ArrayList(targets_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.ExfilResource, + com.google.cloud.securitycenter.v2.ExfilResource.Builder, + com.google.cloud.securitycenter.v2.ExfilResourceOrBuilder> + targetsBuilder_; + + /** + * + * + *
+     * If there are multiple targets, each target would get a complete copy of the
+     * "joined" source data.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource targets = 2; + */ + public java.util.List getTargetsList() { + if (targetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(targets_); + } else { + return targetsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * If there are multiple targets, each target would get a complete copy of the
+     * "joined" source data.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource targets = 2; + */ + public int getTargetsCount() { + if (targetsBuilder_ == null) { + return targets_.size(); + } else { + return targetsBuilder_.getCount(); + } + } + /** + * + * + *
+     * If there are multiple targets, each target would get a complete copy of the
+     * "joined" source data.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource targets = 2; + */ + public com.google.cloud.securitycenter.v2.ExfilResource getTargets(int index) { + if (targetsBuilder_ == null) { + return targets_.get(index); + } else { + return targetsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * If there are multiple targets, each target would get a complete copy of the
+     * "joined" source data.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource targets = 2; + */ + public Builder setTargets(int index, com.google.cloud.securitycenter.v2.ExfilResource value) { + if (targetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetsIsMutable(); + targets_.set(index, value); + onChanged(); + } else { + targetsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * If there are multiple targets, each target would get a complete copy of the
+     * "joined" source data.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource targets = 2; + */ + public Builder setTargets( + int index, com.google.cloud.securitycenter.v2.ExfilResource.Builder builderForValue) { + if (targetsBuilder_ == null) { + ensureTargetsIsMutable(); + targets_.set(index, builderForValue.build()); + onChanged(); + } else { + targetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * If there are multiple targets, each target would get a complete copy of the
+     * "joined" source data.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource targets = 2; + */ + public Builder addTargets(com.google.cloud.securitycenter.v2.ExfilResource value) { + if (targetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetsIsMutable(); + targets_.add(value); + onChanged(); + } else { + targetsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * If there are multiple targets, each target would get a complete copy of the
+     * "joined" source data.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource targets = 2; + */ + public Builder addTargets(int index, com.google.cloud.securitycenter.v2.ExfilResource value) { + if (targetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetsIsMutable(); + targets_.add(index, value); + onChanged(); + } else { + targetsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * If there are multiple targets, each target would get a complete copy of the
+     * "joined" source data.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource targets = 2; + */ + public Builder addTargets( + com.google.cloud.securitycenter.v2.ExfilResource.Builder builderForValue) { + if (targetsBuilder_ == null) { + ensureTargetsIsMutable(); + targets_.add(builderForValue.build()); + onChanged(); + } else { + targetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * If there are multiple targets, each target would get a complete copy of the
+     * "joined" source data.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource targets = 2; + */ + public Builder addTargets( + int index, com.google.cloud.securitycenter.v2.ExfilResource.Builder builderForValue) { + if (targetsBuilder_ == null) { + ensureTargetsIsMutable(); + targets_.add(index, builderForValue.build()); + onChanged(); + } else { + targetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * If there are multiple targets, each target would get a complete copy of the
+     * "joined" source data.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource targets = 2; + */ + public Builder addAllTargets( + java.lang.Iterable values) { + if (targetsBuilder_ == null) { + ensureTargetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, targets_); + onChanged(); + } else { + targetsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * If there are multiple targets, each target would get a complete copy of the
+     * "joined" source data.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource targets = 2; + */ + public Builder clearTargets() { + if (targetsBuilder_ == null) { + targets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + targetsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * If there are multiple targets, each target would get a complete copy of the
+     * "joined" source data.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource targets = 2; + */ + public Builder removeTargets(int index) { + if (targetsBuilder_ == null) { + ensureTargetsIsMutable(); + targets_.remove(index); + onChanged(); + } else { + targetsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * If there are multiple targets, each target would get a complete copy of the
+     * "joined" source data.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource targets = 2; + */ + public com.google.cloud.securitycenter.v2.ExfilResource.Builder getTargetsBuilder(int index) { + return getTargetsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * If there are multiple targets, each target would get a complete copy of the
+     * "joined" source data.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource targets = 2; + */ + public com.google.cloud.securitycenter.v2.ExfilResourceOrBuilder getTargetsOrBuilder( + int index) { + if (targetsBuilder_ == null) { + return targets_.get(index); + } else { + return targetsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * If there are multiple targets, each target would get a complete copy of the
+     * "joined" source data.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource targets = 2; + */ + public java.util.List + getTargetsOrBuilderList() { + if (targetsBuilder_ != null) { + return targetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(targets_); + } + } + /** + * + * + *
+     * If there are multiple targets, each target would get a complete copy of the
+     * "joined" source data.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource targets = 2; + */ + public com.google.cloud.securitycenter.v2.ExfilResource.Builder addTargetsBuilder() { + return getTargetsFieldBuilder() + .addBuilder(com.google.cloud.securitycenter.v2.ExfilResource.getDefaultInstance()); + } + /** + * + * + *
+     * If there are multiple targets, each target would get a complete copy of the
+     * "joined" source data.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource targets = 2; + */ + public com.google.cloud.securitycenter.v2.ExfilResource.Builder addTargetsBuilder(int index) { + return getTargetsFieldBuilder() + .addBuilder(index, com.google.cloud.securitycenter.v2.ExfilResource.getDefaultInstance()); + } + /** + * + * + *
+     * If there are multiple targets, each target would get a complete copy of the
+     * "joined" source data.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource targets = 2; + */ + public java.util.List + getTargetsBuilderList() { + return getTargetsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.ExfilResource, + com.google.cloud.securitycenter.v2.ExfilResource.Builder, + com.google.cloud.securitycenter.v2.ExfilResourceOrBuilder> + getTargetsFieldBuilder() { + if (targetsBuilder_ == null) { + targetsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.ExfilResource, + com.google.cloud.securitycenter.v2.ExfilResource.Builder, + com.google.cloud.securitycenter.v2.ExfilResourceOrBuilder>( + targets_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + targets_ = null; + } + return targetsBuilder_; + } + + private long totalExfiltratedBytes_; + /** + * + * + *
+     * Total exfiltrated bytes processed for the entire job.
+     * 
+ * + * int64 total_exfiltrated_bytes = 3; + * + * @return The totalExfiltratedBytes. + */ + @java.lang.Override + public long getTotalExfiltratedBytes() { + return totalExfiltratedBytes_; + } + /** + * + * + *
+     * Total exfiltrated bytes processed for the entire job.
+     * 
+ * + * int64 total_exfiltrated_bytes = 3; + * + * @param value The totalExfiltratedBytes to set. + * @return This builder for chaining. + */ + public Builder setTotalExfiltratedBytes(long value) { + + totalExfiltratedBytes_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Total exfiltrated bytes processed for the entire job.
+     * 
+ * + * int64 total_exfiltrated_bytes = 3; + * + * @return This builder for chaining. + */ + public Builder clearTotalExfiltratedBytes() { + bitField0_ = (bitField0_ & ~0x00000004); + totalExfiltratedBytes_ = 0L; + 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.v2.Exfiltration) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.Exfiltration) + private static final com.google.cloud.securitycenter.v2.Exfiltration DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.Exfiltration(); + } + + public static com.google.cloud.securitycenter.v2.Exfiltration getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Exfiltration parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.Exfiltration getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ExfiltrationOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ExfiltrationOrBuilder.java new file mode 100644 index 000000000000..b4c95ebcffb9 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ExfiltrationOrBuilder.java @@ -0,0 +1,158 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/exfiltration.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface ExfiltrationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.Exfiltration) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * If there are multiple sources, then the data is considered "joined" between
+   * them. For instance, BigQuery can join multiple tables, and each
+   * table would be considered a source.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource sources = 1; + */ + java.util.List getSourcesList(); + /** + * + * + *
+   * If there are multiple sources, then the data is considered "joined" between
+   * them. For instance, BigQuery can join multiple tables, and each
+   * table would be considered a source.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource sources = 1; + */ + com.google.cloud.securitycenter.v2.ExfilResource getSources(int index); + /** + * + * + *
+   * If there are multiple sources, then the data is considered "joined" between
+   * them. For instance, BigQuery can join multiple tables, and each
+   * table would be considered a source.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource sources = 1; + */ + int getSourcesCount(); + /** + * + * + *
+   * If there are multiple sources, then the data is considered "joined" between
+   * them. For instance, BigQuery can join multiple tables, and each
+   * table would be considered a source.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource sources = 1; + */ + java.util.List + getSourcesOrBuilderList(); + /** + * + * + *
+   * If there are multiple sources, then the data is considered "joined" between
+   * them. For instance, BigQuery can join multiple tables, and each
+   * table would be considered a source.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource sources = 1; + */ + com.google.cloud.securitycenter.v2.ExfilResourceOrBuilder getSourcesOrBuilder(int index); + + /** + * + * + *
+   * If there are multiple targets, each target would get a complete copy of the
+   * "joined" source data.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource targets = 2; + */ + java.util.List getTargetsList(); + /** + * + * + *
+   * If there are multiple targets, each target would get a complete copy of the
+   * "joined" source data.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource targets = 2; + */ + com.google.cloud.securitycenter.v2.ExfilResource getTargets(int index); + /** + * + * + *
+   * If there are multiple targets, each target would get a complete copy of the
+   * "joined" source data.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource targets = 2; + */ + int getTargetsCount(); + /** + * + * + *
+   * If there are multiple targets, each target would get a complete copy of the
+   * "joined" source data.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource targets = 2; + */ + java.util.List + getTargetsOrBuilderList(); + /** + * + * + *
+   * If there are multiple targets, each target would get a complete copy of the
+   * "joined" source data.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.ExfilResource targets = 2; + */ + com.google.cloud.securitycenter.v2.ExfilResourceOrBuilder getTargetsOrBuilder(int index); + + /** + * + * + *
+   * Total exfiltrated bytes processed for the entire job.
+   * 
+ * + * int64 total_exfiltrated_bytes = 3; + * + * @return The totalExfiltratedBytes. + */ + long getTotalExfiltratedBytes(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ExfiltrationProto.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ExfiltrationProto.java new file mode 100644 index 000000000000..e684f51994de --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ExfiltrationProto.java @@ -0,0 +1,85 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/exfiltration.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public final class ExfiltrationProto { + private ExfiltrationProto() {} + + 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_v2_Exfiltration_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_Exfiltration_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v2_ExfilResource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_ExfilResource_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n1google/cloud/securitycenter/v2/exfiltr" + + "ation.proto\022\036google.cloud.securitycenter" + + ".v2\"\257\001\n\014Exfiltration\022>\n\007sources\030\001 \003(\0132-." + + "google.cloud.securitycenter.v2.ExfilReso" + + "urce\022>\n\007targets\030\002 \003(\0132-.google.cloud.sec" + + "uritycenter.v2.ExfilResource\022\037\n\027total_ex" + + "filtrated_bytes\030\003 \001(\003\"1\n\rExfilResource\022\014" + + "\n\004name\030\001 \001(\t\022\022\n\ncomponents\030\002 \003(\tB\353\001\n\"com" + + ".google.cloud.securitycenter.v2B\021Exfiltr" + + "ationProtoP\001ZJcloud.google.com/go/securi" + + "tycenter/apiv2/securitycenterpb;security" + + "centerpb\252\002\036Google.Cloud.SecurityCenter.V" + + "2\312\002\036Google\\Cloud\\SecurityCenter\\V2\352\002!Goo" + + "gle::Cloud::SecurityCenter::V2b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_cloud_securitycenter_v2_Exfiltration_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_securitycenter_v2_Exfiltration_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_Exfiltration_descriptor, + new java.lang.String[] { + "Sources", "Targets", "TotalExfiltratedBytes", + }); + internal_static_google_cloud_securitycenter_v2_ExfilResource_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_securitycenter_v2_ExfilResource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_ExfilResource_descriptor, + new java.lang.String[] { + "Name", "Components", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ExternalSystem.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ExternalSystem.java new file mode 100644 index 000000000000..6ea175aebe3e --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ExternalSystem.java @@ -0,0 +1,4909 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/external_system.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Representation of third party SIEM/SOAR fields within SCC.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.ExternalSystem} + */ +public final class ExternalSystem extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.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.emptyList(); + externalUid_ = ""; + status_ = ""; + caseUri_ = ""; + casePriority_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExternalSystem(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.ExternalSystemProto + .internal_static_google_cloud_securitycenter_v2_ExternalSystem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.ExternalSystemProto + .internal_static_google_cloud_securitycenter_v2_ExternalSystem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.ExternalSystem.class, + com.google.cloud.securitycenter.v2.ExternalSystem.Builder.class); + } + + public interface TicketInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.ExternalSystem.TicketInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The identifier of the ticket in the ticket system.
+     * 
+ * + * string id = 1; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+     * The identifier of the ticket in the ticket system.
+     * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+     * The assignee of the ticket in the ticket system.
+     * 
+ * + * string assignee = 2; + * + * @return The assignee. + */ + java.lang.String getAssignee(); + /** + * + * + *
+     * The assignee of the ticket in the ticket system.
+     * 
+ * + * string assignee = 2; + * + * @return The bytes for assignee. + */ + com.google.protobuf.ByteString getAssigneeBytes(); + + /** + * + * + *
+     * The description of the ticket in the ticket system.
+     * 
+ * + * string description = 3; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+     * The description of the ticket in the ticket system.
+     * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+     * The link to the ticket in the ticket system.
+     * 
+ * + * string uri = 4; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+     * The link to the ticket in the ticket system.
+     * 
+ * + * string uri = 4; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+     * The latest status of the ticket, as reported by the ticket system.
+     * 
+ * + * string status = 5; + * + * @return The status. + */ + java.lang.String getStatus(); + /** + * + * + *
+     * The latest status of the ticket, as reported by the ticket system.
+     * 
+ * + * string status = 5; + * + * @return The bytes for status. + */ + com.google.protobuf.ByteString getStatusBytes(); + + /** + * + * + *
+     * The time when the ticket was last updated, as reported by the ticket
+     * system.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+     * The time when the ticket was last updated, as reported by the ticket
+     * system.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+     * The time when the ticket was last updated, as reported by the ticket
+     * system.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + } + /** + * + * + *
+   * Information about the ticket, if any, that is being used to track the
+   * resolution of the issue that is identified by this finding.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.ExternalSystem.TicketInfo} + */ + public static final class TicketInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.ExternalSystem.TicketInfo) + TicketInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use TicketInfo.newBuilder() to construct. + private TicketInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TicketInfo() { + id_ = ""; + assignee_ = ""; + description_ = ""; + uri_ = ""; + status_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TicketInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.ExternalSystemProto + .internal_static_google_cloud_securitycenter_v2_ExternalSystem_TicketInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.ExternalSystemProto + .internal_static_google_cloud_securitycenter_v2_ExternalSystem_TicketInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo.class, + com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo.Builder.class); + } + + private int bitField0_; + public static final int ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * + * + *
+     * The identifier of the ticket in the ticket system.
+     * 
+ * + * string id = 1; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + 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(); + id_ = s; + return s; + } + } + /** + * + * + *
+     * The identifier of the ticket in the ticket system.
+     * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ASSIGNEE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object assignee_ = ""; + /** + * + * + *
+     * The assignee of the ticket in the ticket system.
+     * 
+ * + * string assignee = 2; + * + * @return The assignee. + */ + @java.lang.Override + public java.lang.String getAssignee() { + java.lang.Object ref = assignee_; + 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(); + assignee_ = s; + return s; + } + } + /** + * + * + *
+     * The assignee of the ticket in the ticket system.
+     * 
+ * + * string assignee = 2; + * + * @return The bytes for assignee. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAssigneeBytes() { + java.lang.Object ref = assignee_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + assignee_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+     * The description of the ticket in the ticket system.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * The description of the ticket in the ticket system.
+     * 
+ * + * 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 URI_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * + * + *
+     * The link to the ticket in the ticket system.
+     * 
+ * + * string uri = 4; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + 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(); + uri_ = s; + return s; + } + } + /** + * + * + *
+     * The link to the ticket in the ticket system.
+     * 
+ * + * string uri = 4; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object status_ = ""; + /** + * + * + *
+     * The latest status of the ticket, as reported by the ticket system.
+     * 
+ * + * string status = 5; + * + * @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; + } + } + /** + * + * + *
+     * The latest status of the ticket, as reported by the ticket system.
+     * 
+ * + * string status = 5; + * + * @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 UPDATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+     * The time when the ticket was last updated, as reported by the ticket
+     * system.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The time when the ticket was last updated, as reported by the ticket
+     * system.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+     * The time when the ticket was last updated, as reported by the ticket
+     * system.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + 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(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assignee_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, assignee_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(status_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, status_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(6, getUpdateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assignee_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, assignee_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(status_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, status_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getUpdateTime()); + } + size += getUnknownFields().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.v2.ExternalSystem.TicketInfo)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo other = + (com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo) obj; + + if (!getId().equals(other.getId())) return false; + if (!getAssignee().equals(other.getAssignee())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getStatus().equals(other.getStatus())) return false; + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + ASSIGNEE_FIELD_NUMBER; + hash = (53 * hash) + getAssignee().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus().hashCode(); + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo 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.v2.ExternalSystem.TicketInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo 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.v2.ExternalSystem.TicketInfo parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo 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.v2.ExternalSystem.TicketInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo 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.v2.ExternalSystem.TicketInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo 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.v2.ExternalSystem.TicketInfo 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; + } + /** + * + * + *
+     * Information about the ticket, if any, that is being used to track the
+     * resolution of the issue that is identified by this finding.
+     * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.ExternalSystem.TicketInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.ExternalSystem.TicketInfo) + com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.ExternalSystemProto + .internal_static_google_cloud_securitycenter_v2_ExternalSystem_TicketInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.ExternalSystemProto + .internal_static_google_cloud_securitycenter_v2_ExternalSystem_TicketInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo.class, + com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + assignee_ = ""; + description_ = ""; + uri_ = ""; + status_ = ""; + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.ExternalSystemProto + .internal_static_google_cloud_securitycenter_v2_ExternalSystem_TicketInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo + getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo build() { + com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo buildPartial() { + com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo result = + new com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.assignee_ = assignee_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.status_ = status_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.updateTime_ = + updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v2.ExternalSystem.TicketInfo) { + return mergeFrom((com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo other) { + if (other + == com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo.getDefaultInstance()) + return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAssignee().isEmpty()) { + assignee_ = other.assignee_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getStatus().isEmpty()) { + status_ = other.status_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + assignee_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + status_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * + * + *
+       * The identifier of the ticket in the ticket system.
+       * 
+ * + * string id = 1; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The identifier of the ticket in the ticket system.
+       * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The identifier of the ticket in the ticket system.
+       * 
+ * + * string id = 1; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The identifier of the ticket in the ticket system.
+       * 
+ * + * string id = 1; + * + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The identifier of the ticket in the ticket system.
+       * 
+ * + * string id = 1; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object assignee_ = ""; + /** + * + * + *
+       * The assignee of the ticket in the ticket system.
+       * 
+ * + * string assignee = 2; + * + * @return The assignee. + */ + public java.lang.String getAssignee() { + java.lang.Object ref = assignee_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assignee_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The assignee of the ticket in the ticket system.
+       * 
+ * + * string assignee = 2; + * + * @return The bytes for assignee. + */ + public com.google.protobuf.ByteString getAssigneeBytes() { + java.lang.Object ref = assignee_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + assignee_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The assignee of the ticket in the ticket system.
+       * 
+ * + * string assignee = 2; + * + * @param value The assignee to set. + * @return This builder for chaining. + */ + public Builder setAssignee(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + assignee_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The assignee of the ticket in the ticket system.
+       * 
+ * + * string assignee = 2; + * + * @return This builder for chaining. + */ + public Builder clearAssignee() { + assignee_ = getDefaultInstance().getAssignee(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * The assignee of the ticket in the ticket system.
+       * 
+ * + * string assignee = 2; + * + * @param value The bytes for assignee to set. + * @return This builder for chaining. + */ + public Builder setAssigneeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + assignee_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+       * The description of the ticket in the ticket system.
+       * 
+ * + * 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; + } + } + /** + * + * + *
+       * The description of the ticket in the ticket system.
+       * 
+ * + * 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; + } + } + /** + * + * + *
+       * The description of the ticket in the ticket system.
+       * 
+ * + * 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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The description of the ticket in the ticket system.
+       * 
+ * + * string description = 3; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * The description of the ticket in the ticket system.
+       * 
+ * + * 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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+       * The link to the ticket in the ticket system.
+       * 
+ * + * string uri = 4; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The link to the ticket in the ticket system.
+       * 
+ * + * string uri = 4; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The link to the ticket in the ticket system.
+       * 
+ * + * string uri = 4; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * The link to the ticket in the ticket system.
+       * 
+ * + * string uri = 4; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+       * The link to the ticket in the ticket system.
+       * 
+ * + * string uri = 4; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object status_ = ""; + /** + * + * + *
+       * The latest status of the ticket, as reported by the ticket system.
+       * 
+ * + * string status = 5; + * + * @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; + } + } + /** + * + * + *
+       * The latest status of the ticket, as reported by the ticket system.
+       * 
+ * + * string status = 5; + * + * @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; + } + } + /** + * + * + *
+       * The latest status of the ticket, as reported by the ticket system.
+       * 
+ * + * string status = 5; + * + * @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; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * The latest status of the ticket, as reported by the ticket system.
+       * 
+ * + * string status = 5; + * + * @return This builder for chaining. + */ + public Builder clearStatus() { + status_ = getDefaultInstance().getStatus(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+       * The latest status of the ticket, as reported by the ticket system.
+       * 
+ * + * string status = 5; + * + * @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; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + 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_; + /** + * + * + *
+       * The time when the ticket was last updated, as reported by the ticket
+       * system.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+       * The time when the ticket was last updated, as reported by the ticket
+       * system.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * + * @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(); + } + } + /** + * + * + *
+       * The time when the ticket was last updated, as reported by the ticket
+       * system.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * The time when the ticket was last updated, as reported by the ticket
+       * system.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * The time when the ticket was last updated, as reported by the ticket
+       * system.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + * + * + *
+       * The time when the ticket was last updated, as reported by the ticket
+       * system.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * The time when the ticket was last updated, as reported by the ticket
+       * system.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The time when the ticket was last updated, as reported by the ticket
+       * system.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+       * The time when the ticket was last updated, as reported by the ticket
+       * system.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + 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_; + } + + @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.v2.ExternalSystem.TicketInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.ExternalSystem.TicketInfo) + private static final com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo(); + } + + public static com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TicketInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.ExternalSystem.TicketInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Full resource name of the external system. The following list
+   * shows some examples:
+   *
+   * + `organizations/1234/sources/5678/findings/123456/externalSystems/jira`
+   * +
+   * `organizations/1234/sources/5678/locations/us/findings/123456/externalSystems/jira`
+   * + `folders/1234/sources/5678/findings/123456/externalSystems/jira`
+   * +
+   * `folders/1234/sources/5678/locations/us/findings/123456/externalSystems/jira`
+   * + `projects/1234/sources/5678/findings/123456/externalSystems/jira`
+   * +
+   * `projects/1234/sources/5678/locations/us/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; + } + } + /** + * + * + *
+   * Full resource name of the external system. The following list
+   * shows some examples:
+   *
+   * + `organizations/1234/sources/5678/findings/123456/externalSystems/jira`
+   * +
+   * `organizations/1234/sources/5678/locations/us/findings/123456/externalSystems/jira`
+   * + `folders/1234/sources/5678/findings/123456/externalSystems/jira`
+   * +
+   * `folders/1234/sources/5678/locations/us/findings/123456/externalSystems/jira`
+   * + `projects/1234/sources/5678/findings/123456/externalSystems/jira`
+   * +
+   * `projects/1234/sources/5678/locations/us/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; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList assignees_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * 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; + + @SuppressWarnings("serial") + private volatile java.lang.Object externalUid_ = ""; + /** + * + * + *
+   * The identifier that's used to track the finding's corresponding case 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; + } + } + /** + * + * + *
+   * The identifier that's used to track the finding's corresponding case 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; + + @SuppressWarnings("serial") + private volatile java.lang.Object status_ = ""; + /** + * + * + *
+   * The most recent status of the finding's corresponding case, as reported by
+   * 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; + } + } + /** + * + * + *
+   * The most recent status of the finding's corresponding case, as reported by
+   * 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 time when the case was last updated, as reported by 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 ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The time when the case was last updated, as reported by 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 time when the case was last updated, as reported by the external
+   * system.
+   * 
+ * + * .google.protobuf.Timestamp external_system_update_time = 5; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getExternalSystemUpdateTimeOrBuilder() { + return externalSystemUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : externalSystemUpdateTime_; + } + + public static final int CASE_URI_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object caseUri_ = ""; + /** + * + * + *
+   * The link to the finding's corresponding case in the external system.
+   * 
+ * + * string case_uri = 6; + * + * @return The caseUri. + */ + @java.lang.Override + public java.lang.String getCaseUri() { + java.lang.Object ref = caseUri_; + 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(); + caseUri_ = s; + return s; + } + } + /** + * + * + *
+   * The link to the finding's corresponding case in the external system.
+   * 
+ * + * string case_uri = 6; + * + * @return The bytes for caseUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCaseUriBytes() { + java.lang.Object ref = caseUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + caseUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CASE_PRIORITY_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object casePriority_ = ""; + /** + * + * + *
+   * The priority of the finding's corresponding case in the external system.
+   * 
+ * + * string case_priority = 7; + * + * @return The casePriority. + */ + @java.lang.Override + public java.lang.String getCasePriority() { + java.lang.Object ref = casePriority_; + 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(); + casePriority_ = s; + return s; + } + } + /** + * + * + *
+   * The priority of the finding's corresponding case in the external system.
+   * 
+ * + * string case_priority = 7; + * + * @return The bytes for casePriority. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCasePriorityBytes() { + java.lang.Object ref = casePriority_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + casePriority_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CASE_SLA_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp caseSla_; + /** + * + * + *
+   * The SLA of the finding's corresponding case in the external system.
+   * 
+ * + * .google.protobuf.Timestamp case_sla = 9; + * + * @return Whether the caseSla field is set. + */ + @java.lang.Override + public boolean hasCaseSla() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * The SLA of the finding's corresponding case in the external system.
+   * 
+ * + * .google.protobuf.Timestamp case_sla = 9; + * + * @return The caseSla. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCaseSla() { + return caseSla_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : caseSla_; + } + /** + * + * + *
+   * The SLA of the finding's corresponding case in the external system.
+   * 
+ * + * .google.protobuf.Timestamp case_sla = 9; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCaseSlaOrBuilder() { + return caseSla_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : caseSla_; + } + + public static final int CASE_CREATE_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp caseCreateTime_; + /** + * + * + *
+   * The time when the case was created, as reported by the external system.
+   * 
+ * + * .google.protobuf.Timestamp case_create_time = 10; + * + * @return Whether the caseCreateTime field is set. + */ + @java.lang.Override + public boolean hasCaseCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * The time when the case was created, as reported by the external system.
+   * 
+ * + * .google.protobuf.Timestamp case_create_time = 10; + * + * @return The caseCreateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCaseCreateTime() { + return caseCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : caseCreateTime_; + } + /** + * + * + *
+   * The time when the case was created, as reported by the external system.
+   * 
+ * + * .google.protobuf.Timestamp case_create_time = 10; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCaseCreateTimeOrBuilder() { + return caseCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : caseCreateTime_; + } + + public static final int CASE_CLOSE_TIME_FIELD_NUMBER = 11; + private com.google.protobuf.Timestamp caseCloseTime_; + /** + * + * + *
+   * The time when the case was closed, as reported by the external system.
+   * 
+ * + * .google.protobuf.Timestamp case_close_time = 11; + * + * @return Whether the caseCloseTime field is set. + */ + @java.lang.Override + public boolean hasCaseCloseTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * The time when the case was closed, as reported by the external system.
+   * 
+ * + * .google.protobuf.Timestamp case_close_time = 11; + * + * @return The caseCloseTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCaseCloseTime() { + return caseCloseTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : caseCloseTime_; + } + /** + * + * + *
+   * The time when the case was closed, as reported by the external system.
+   * 
+ * + * .google.protobuf.Timestamp case_close_time = 11; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCaseCloseTimeOrBuilder() { + return caseCloseTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : caseCloseTime_; + } + + public static final int TICKET_INFO_FIELD_NUMBER = 8; + private com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo ticketInfo_; + /** + * + * + *
+   * Information about the ticket, if any, that is being used to track the
+   * resolution of the issue that is identified by this finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.ExternalSystem.TicketInfo ticket_info = 8; + * + * @return Whether the ticketInfo field is set. + */ + @java.lang.Override + public boolean hasTicketInfo() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+   * Information about the ticket, if any, that is being used to track the
+   * resolution of the issue that is identified by this finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.ExternalSystem.TicketInfo ticket_info = 8; + * + * @return The ticketInfo. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo getTicketInfo() { + return ticketInfo_ == null + ? com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo.getDefaultInstance() + : ticketInfo_; + } + /** + * + * + *
+   * Information about the ticket, if any, that is being used to track the
+   * resolution of the issue that is identified by this finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.ExternalSystem.TicketInfo ticket_info = 8; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfoOrBuilder + getTicketInfoOrBuilder() { + return ticketInfo_ == null + ? com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo.getDefaultInstance() + : ticketInfo_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getExternalSystemUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(caseUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, caseUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(casePriority_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, casePriority_); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(8, getTicketInfo()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(9, getCaseSla()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(10, getCaseCreateTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(11, getCaseCloseTime()); + } + getUnknownFields().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 (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, getExternalSystemUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(caseUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, caseUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(casePriority_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, casePriority_); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getTicketInfo()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getCaseSla()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getCaseCreateTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getCaseCloseTime()); + } + size += getUnknownFields().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.v2.ExternalSystem)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.ExternalSystem other = + (com.google.cloud.securitycenter.v2.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 (!getCaseUri().equals(other.getCaseUri())) return false; + if (!getCasePriority().equals(other.getCasePriority())) return false; + if (hasCaseSla() != other.hasCaseSla()) return false; + if (hasCaseSla()) { + if (!getCaseSla().equals(other.getCaseSla())) return false; + } + if (hasCaseCreateTime() != other.hasCaseCreateTime()) return false; + if (hasCaseCreateTime()) { + if (!getCaseCreateTime().equals(other.getCaseCreateTime())) return false; + } + if (hasCaseCloseTime() != other.hasCaseCloseTime()) return false; + if (hasCaseCloseTime()) { + if (!getCaseCloseTime().equals(other.getCaseCloseTime())) return false; + } + if (hasTicketInfo() != other.hasTicketInfo()) return false; + if (hasTicketInfo()) { + if (!getTicketInfo().equals(other.getTicketInfo())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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 = (37 * hash) + CASE_URI_FIELD_NUMBER; + hash = (53 * hash) + getCaseUri().hashCode(); + hash = (37 * hash) + CASE_PRIORITY_FIELD_NUMBER; + hash = (53 * hash) + getCasePriority().hashCode(); + if (hasCaseSla()) { + hash = (37 * hash) + CASE_SLA_FIELD_NUMBER; + hash = (53 * hash) + getCaseSla().hashCode(); + } + if (hasCaseCreateTime()) { + hash = (37 * hash) + CASE_CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCaseCreateTime().hashCode(); + } + if (hasCaseCloseTime()) { + hash = (37 * hash) + CASE_CLOSE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCaseCloseTime().hashCode(); + } + if (hasTicketInfo()) { + hash = (37 * hash) + TICKET_INFO_FIELD_NUMBER; + hash = (53 * hash) + getTicketInfo().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.ExternalSystem parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.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.v2.ExternalSystem parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.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.v2.ExternalSystem parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.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.v2.ExternalSystem parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.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.v2.ExternalSystem parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.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.v2.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.v2.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.v2.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.v2.ExternalSystem} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.ExternalSystem) + com.google.cloud.securitycenter.v2.ExternalSystemOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.ExternalSystemProto + .internal_static_google_cloud_securitycenter_v2_ExternalSystem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.ExternalSystemProto + .internal_static_google_cloud_securitycenter_v2_ExternalSystem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.ExternalSystem.class, + com.google.cloud.securitycenter.v2.ExternalSystem.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.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) { + getExternalSystemUpdateTimeFieldBuilder(); + getCaseSlaFieldBuilder(); + getCaseCreateTimeFieldBuilder(); + getCaseCloseTimeFieldBuilder(); + getTicketInfoFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + assignees_ = com.google.protobuf.LazyStringArrayList.emptyList(); + externalUid_ = ""; + status_ = ""; + externalSystemUpdateTime_ = null; + if (externalSystemUpdateTimeBuilder_ != null) { + externalSystemUpdateTimeBuilder_.dispose(); + externalSystemUpdateTimeBuilder_ = null; + } + caseUri_ = ""; + casePriority_ = ""; + caseSla_ = null; + if (caseSlaBuilder_ != null) { + caseSlaBuilder_.dispose(); + caseSlaBuilder_ = null; + } + caseCreateTime_ = null; + if (caseCreateTimeBuilder_ != null) { + caseCreateTimeBuilder_.dispose(); + caseCreateTimeBuilder_ = null; + } + caseCloseTime_ = null; + if (caseCloseTimeBuilder_ != null) { + caseCloseTimeBuilder_.dispose(); + caseCloseTimeBuilder_ = null; + } + ticketInfo_ = null; + if (ticketInfoBuilder_ != null) { + ticketInfoBuilder_.dispose(); + ticketInfoBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.ExternalSystemProto + .internal_static_google_cloud_securitycenter_v2_ExternalSystem_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.ExternalSystem getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.ExternalSystem.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.ExternalSystem build() { + com.google.cloud.securitycenter.v2.ExternalSystem result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.ExternalSystem buildPartial() { + com.google.cloud.securitycenter.v2.ExternalSystem result = + new com.google.cloud.securitycenter.v2.ExternalSystem(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.ExternalSystem result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + assignees_.makeImmutable(); + result.assignees_ = assignees_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.externalUid_ = externalUid_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.status_ = status_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.externalSystemUpdateTime_ = + externalSystemUpdateTimeBuilder_ == null + ? externalSystemUpdateTime_ + : externalSystemUpdateTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.caseUri_ = caseUri_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.casePriority_ = casePriority_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.caseSla_ = caseSlaBuilder_ == null ? caseSla_ : caseSlaBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.caseCreateTime_ = + caseCreateTimeBuilder_ == null ? caseCreateTime_ : caseCreateTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.caseCloseTime_ = + caseCloseTimeBuilder_ == null ? caseCloseTime_ : caseCloseTimeBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.ticketInfo_ = ticketInfoBuilder_ == null ? ticketInfo_ : ticketInfoBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v2.ExternalSystem) { + return mergeFrom((com.google.cloud.securitycenter.v2.ExternalSystem) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.ExternalSystem other) { + if (other == com.google.cloud.securitycenter.v2.ExternalSystem.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.assignees_.isEmpty()) { + if (assignees_.isEmpty()) { + assignees_ = other.assignees_; + bitField0_ |= 0x00000002; + } else { + ensureAssigneesIsMutable(); + assignees_.addAll(other.assignees_); + } + onChanged(); + } + if (!other.getExternalUid().isEmpty()) { + externalUid_ = other.externalUid_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getStatus().isEmpty()) { + status_ = other.status_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasExternalSystemUpdateTime()) { + mergeExternalSystemUpdateTime(other.getExternalSystemUpdateTime()); + } + if (!other.getCaseUri().isEmpty()) { + caseUri_ = other.caseUri_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getCasePriority().isEmpty()) { + casePriority_ = other.casePriority_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.hasCaseSla()) { + mergeCaseSla(other.getCaseSla()); + } + if (other.hasCaseCreateTime()) { + mergeCaseCreateTime(other.getCaseCreateTime()); + } + if (other.hasCaseCloseTime()) { + mergeCaseCloseTime(other.getCaseCloseTime()); + } + if (other.hasTicketInfo()) { + mergeTicketInfo(other.getTicketInfo()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAssigneesIsMutable(); + assignees_.add(s); + break; + } // case 18 + case 26: + { + externalUid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + status_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage( + getExternalSystemUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + caseUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + casePriority_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + input.readMessage(getTicketInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 66 + case 74: + { + input.readMessage(getCaseSlaFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 74 + case 82: + { + input.readMessage(getCaseCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 82 + case 90: + { + input.readMessage(getCaseCloseTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 90 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Full resource name of the external system. The following list
+     * shows some examples:
+     *
+     * + `organizations/1234/sources/5678/findings/123456/externalSystems/jira`
+     * +
+     * `organizations/1234/sources/5678/locations/us/findings/123456/externalSystems/jira`
+     * + `folders/1234/sources/5678/findings/123456/externalSystems/jira`
+     * +
+     * `folders/1234/sources/5678/locations/us/findings/123456/externalSystems/jira`
+     * + `projects/1234/sources/5678/findings/123456/externalSystems/jira`
+     * +
+     * `projects/1234/sources/5678/locations/us/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; + } + } + /** + * + * + *
+     * Full resource name of the external system. The following list
+     * shows some examples:
+     *
+     * + `organizations/1234/sources/5678/findings/123456/externalSystems/jira`
+     * +
+     * `organizations/1234/sources/5678/locations/us/findings/123456/externalSystems/jira`
+     * + `folders/1234/sources/5678/findings/123456/externalSystems/jira`
+     * +
+     * `folders/1234/sources/5678/locations/us/findings/123456/externalSystems/jira`
+     * + `projects/1234/sources/5678/findings/123456/externalSystems/jira`
+     * +
+     * `projects/1234/sources/5678/locations/us/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; + } + } + /** + * + * + *
+     * Full resource name of the external system. The following list
+     * shows some examples:
+     *
+     * + `organizations/1234/sources/5678/findings/123456/externalSystems/jira`
+     * +
+     * `organizations/1234/sources/5678/locations/us/findings/123456/externalSystems/jira`
+     * + `folders/1234/sources/5678/findings/123456/externalSystems/jira`
+     * +
+     * `folders/1234/sources/5678/locations/us/findings/123456/externalSystems/jira`
+     * + `projects/1234/sources/5678/findings/123456/externalSystems/jira`
+     * +
+     * `projects/1234/sources/5678/locations/us/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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Full resource name of the external system. The following list
+     * shows some examples:
+     *
+     * + `organizations/1234/sources/5678/findings/123456/externalSystems/jira`
+     * +
+     * `organizations/1234/sources/5678/locations/us/findings/123456/externalSystems/jira`
+     * + `folders/1234/sources/5678/findings/123456/externalSystems/jira`
+     * +
+     * `folders/1234/sources/5678/locations/us/findings/123456/externalSystems/jira`
+     * + `projects/1234/sources/5678/findings/123456/externalSystems/jira`
+     * +
+     * `projects/1234/sources/5678/locations/us/findings/123456/externalSystems/jira`
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Full resource name of the external system. The following list
+     * shows some examples:
+     *
+     * + `organizations/1234/sources/5678/findings/123456/externalSystems/jira`
+     * +
+     * `organizations/1234/sources/5678/locations/us/findings/123456/externalSystems/jira`
+     * + `folders/1234/sources/5678/findings/123456/externalSystems/jira`
+     * +
+     * `folders/1234/sources/5678/locations/us/findings/123456/externalSystems/jira`
+     * + `projects/1234/sources/5678/findings/123456/externalSystems/jira`
+     * +
+     * `projects/1234/sources/5678/locations/us/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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList assignees_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureAssigneesIsMutable() { + if (!assignees_.isModifiable()) { + assignees_ = new com.google.protobuf.LazyStringArrayList(assignees_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * 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() { + assignees_.makeImmutable(); + 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); + } + /** + * + * + *
+     * 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); + bitField0_ |= 0x00000002; + 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); + bitField0_ |= 0x00000002; + 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_); + bitField0_ |= 0x00000002; + 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.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + 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); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object externalUid_ = ""; + /** + * + * + *
+     * The identifier that's used to track the finding's corresponding case 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; + } + } + /** + * + * + *
+     * The identifier that's used to track the finding's corresponding case 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; + } + } + /** + * + * + *
+     * The identifier that's used to track the finding's corresponding case 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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The identifier that's used to track the finding's corresponding case in the
+     * external system.
+     * 
+ * + * string external_uid = 3; + * + * @return This builder for chaining. + */ + public Builder clearExternalUid() { + externalUid_ = getDefaultInstance().getExternalUid(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The identifier that's used to track the finding's corresponding case 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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object status_ = ""; + /** + * + * + *
+     * The most recent status of the finding's corresponding case, as reported by
+     * 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; + } + } + /** + * + * + *
+     * The most recent status of the finding's corresponding case, as reported by
+     * 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; + } + } + /** + * + * + *
+     * The most recent status of the finding's corresponding case, as reported by
+     * 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; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The most recent status of the finding's corresponding case, as reported by
+     * the external system.
+     * 
+ * + * string status = 4; + * + * @return This builder for chaining. + */ + public Builder clearStatus() { + status_ = getDefaultInstance().getStatus(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The most recent status of the finding's corresponding case, as reported by
+     * 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; + bitField0_ |= 0x00000008; + 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 time when the case was last updated, as reported by the external
+     * system.
+     * 
+ * + * .google.protobuf.Timestamp external_system_update_time = 5; + * + * @return Whether the externalSystemUpdateTime field is set. + */ + public boolean hasExternalSystemUpdateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * The time when the case was last updated, as reported by 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 time when the case was last updated, as reported by 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; + } else { + externalSystemUpdateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The time when the case was last updated, as reported by 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(); + } else { + externalSystemUpdateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The time when the case was last updated, as reported by the external
+     * system.
+     * 
+ * + * .google.protobuf.Timestamp external_system_update_time = 5; + */ + public Builder mergeExternalSystemUpdateTime(com.google.protobuf.Timestamp value) { + if (externalSystemUpdateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && externalSystemUpdateTime_ != null + && externalSystemUpdateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getExternalSystemUpdateTimeBuilder().mergeFrom(value); + } else { + externalSystemUpdateTime_ = value; + } + } else { + externalSystemUpdateTimeBuilder_.mergeFrom(value); + } + if (externalSystemUpdateTime_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The time when the case was last updated, as reported by the external
+     * system.
+     * 
+ * + * .google.protobuf.Timestamp external_system_update_time = 5; + */ + public Builder clearExternalSystemUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + externalSystemUpdateTime_ = null; + if (externalSystemUpdateTimeBuilder_ != null) { + externalSystemUpdateTimeBuilder_.dispose(); + externalSystemUpdateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The time when the case was last updated, as reported by the external
+     * system.
+     * 
+ * + * .google.protobuf.Timestamp external_system_update_time = 5; + */ + public com.google.protobuf.Timestamp.Builder getExternalSystemUpdateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getExternalSystemUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time when the case was last updated, as reported by 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 time when the case was last updated, as reported by 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_; + } + + private java.lang.Object caseUri_ = ""; + /** + * + * + *
+     * The link to the finding's corresponding case in the external system.
+     * 
+ * + * string case_uri = 6; + * + * @return The caseUri. + */ + public java.lang.String getCaseUri() { + java.lang.Object ref = caseUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + caseUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The link to the finding's corresponding case in the external system.
+     * 
+ * + * string case_uri = 6; + * + * @return The bytes for caseUri. + */ + public com.google.protobuf.ByteString getCaseUriBytes() { + java.lang.Object ref = caseUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + caseUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The link to the finding's corresponding case in the external system.
+     * 
+ * + * string case_uri = 6; + * + * @param value The caseUri to set. + * @return This builder for chaining. + */ + public Builder setCaseUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + caseUri_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The link to the finding's corresponding case in the external system.
+     * 
+ * + * string case_uri = 6; + * + * @return This builder for chaining. + */ + public Builder clearCaseUri() { + caseUri_ = getDefaultInstance().getCaseUri(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * The link to the finding's corresponding case in the external system.
+     * 
+ * + * string case_uri = 6; + * + * @param value The bytes for caseUri to set. + * @return This builder for chaining. + */ + public Builder setCaseUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + caseUri_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object casePriority_ = ""; + /** + * + * + *
+     * The priority of the finding's corresponding case in the external system.
+     * 
+ * + * string case_priority = 7; + * + * @return The casePriority. + */ + public java.lang.String getCasePriority() { + java.lang.Object ref = casePriority_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + casePriority_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The priority of the finding's corresponding case in the external system.
+     * 
+ * + * string case_priority = 7; + * + * @return The bytes for casePriority. + */ + public com.google.protobuf.ByteString getCasePriorityBytes() { + java.lang.Object ref = casePriority_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + casePriority_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The priority of the finding's corresponding case in the external system.
+     * 
+ * + * string case_priority = 7; + * + * @param value The casePriority to set. + * @return This builder for chaining. + */ + public Builder setCasePriority(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + casePriority_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * The priority of the finding's corresponding case in the external system.
+     * 
+ * + * string case_priority = 7; + * + * @return This builder for chaining. + */ + public Builder clearCasePriority() { + casePriority_ = getDefaultInstance().getCasePriority(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * The priority of the finding's corresponding case in the external system.
+     * 
+ * + * string case_priority = 7; + * + * @param value The bytes for casePriority to set. + * @return This builder for chaining. + */ + public Builder setCasePriorityBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + casePriority_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp caseSla_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + caseSlaBuilder_; + /** + * + * + *
+     * The SLA of the finding's corresponding case in the external system.
+     * 
+ * + * .google.protobuf.Timestamp case_sla = 9; + * + * @return Whether the caseSla field is set. + */ + public boolean hasCaseSla() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * The SLA of the finding's corresponding case in the external system.
+     * 
+ * + * .google.protobuf.Timestamp case_sla = 9; + * + * @return The caseSla. + */ + public com.google.protobuf.Timestamp getCaseSla() { + if (caseSlaBuilder_ == null) { + return caseSla_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : caseSla_; + } else { + return caseSlaBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The SLA of the finding's corresponding case in the external system.
+     * 
+ * + * .google.protobuf.Timestamp case_sla = 9; + */ + public Builder setCaseSla(com.google.protobuf.Timestamp value) { + if (caseSlaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + caseSla_ = value; + } else { + caseSlaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * The SLA of the finding's corresponding case in the external system.
+     * 
+ * + * .google.protobuf.Timestamp case_sla = 9; + */ + public Builder setCaseSla(com.google.protobuf.Timestamp.Builder builderForValue) { + if (caseSlaBuilder_ == null) { + caseSla_ = builderForValue.build(); + } else { + caseSlaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * The SLA of the finding's corresponding case in the external system.
+     * 
+ * + * .google.protobuf.Timestamp case_sla = 9; + */ + public Builder mergeCaseSla(com.google.protobuf.Timestamp value) { + if (caseSlaBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && caseSla_ != null + && caseSla_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCaseSlaBuilder().mergeFrom(value); + } else { + caseSla_ = value; + } + } else { + caseSlaBuilder_.mergeFrom(value); + } + if (caseSla_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The SLA of the finding's corresponding case in the external system.
+     * 
+ * + * .google.protobuf.Timestamp case_sla = 9; + */ + public Builder clearCaseSla() { + bitField0_ = (bitField0_ & ~0x00000080); + caseSla_ = null; + if (caseSlaBuilder_ != null) { + caseSlaBuilder_.dispose(); + caseSlaBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The SLA of the finding's corresponding case in the external system.
+     * 
+ * + * .google.protobuf.Timestamp case_sla = 9; + */ + public com.google.protobuf.Timestamp.Builder getCaseSlaBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getCaseSlaFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The SLA of the finding's corresponding case in the external system.
+     * 
+ * + * .google.protobuf.Timestamp case_sla = 9; + */ + public com.google.protobuf.TimestampOrBuilder getCaseSlaOrBuilder() { + if (caseSlaBuilder_ != null) { + return caseSlaBuilder_.getMessageOrBuilder(); + } else { + return caseSla_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : caseSla_; + } + } + /** + * + * + *
+     * The SLA of the finding's corresponding case in the external system.
+     * 
+ * + * .google.protobuf.Timestamp case_sla = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCaseSlaFieldBuilder() { + if (caseSlaBuilder_ == null) { + caseSlaBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCaseSla(), getParentForChildren(), isClean()); + caseSla_ = null; + } + return caseSlaBuilder_; + } + + private com.google.protobuf.Timestamp caseCreateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + caseCreateTimeBuilder_; + /** + * + * + *
+     * The time when the case was created, as reported by the external system.
+     * 
+ * + * .google.protobuf.Timestamp case_create_time = 10; + * + * @return Whether the caseCreateTime field is set. + */ + public boolean hasCaseCreateTime() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+     * The time when the case was created, as reported by the external system.
+     * 
+ * + * .google.protobuf.Timestamp case_create_time = 10; + * + * @return The caseCreateTime. + */ + public com.google.protobuf.Timestamp getCaseCreateTime() { + if (caseCreateTimeBuilder_ == null) { + return caseCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : caseCreateTime_; + } else { + return caseCreateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time when the case was created, as reported by the external system.
+     * 
+ * + * .google.protobuf.Timestamp case_create_time = 10; + */ + public Builder setCaseCreateTime(com.google.protobuf.Timestamp value) { + if (caseCreateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + caseCreateTime_ = value; + } else { + caseCreateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * The time when the case was created, as reported by the external system.
+     * 
+ * + * .google.protobuf.Timestamp case_create_time = 10; + */ + public Builder setCaseCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (caseCreateTimeBuilder_ == null) { + caseCreateTime_ = builderForValue.build(); + } else { + caseCreateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * The time when the case was created, as reported by the external system.
+     * 
+ * + * .google.protobuf.Timestamp case_create_time = 10; + */ + public Builder mergeCaseCreateTime(com.google.protobuf.Timestamp value) { + if (caseCreateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && caseCreateTime_ != null + && caseCreateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCaseCreateTimeBuilder().mergeFrom(value); + } else { + caseCreateTime_ = value; + } + } else { + caseCreateTimeBuilder_.mergeFrom(value); + } + if (caseCreateTime_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The time when the case was created, as reported by the external system.
+     * 
+ * + * .google.protobuf.Timestamp case_create_time = 10; + */ + public Builder clearCaseCreateTime() { + bitField0_ = (bitField0_ & ~0x00000100); + caseCreateTime_ = null; + if (caseCreateTimeBuilder_ != null) { + caseCreateTimeBuilder_.dispose(); + caseCreateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The time when the case was created, as reported by the external system.
+     * 
+ * + * .google.protobuf.Timestamp case_create_time = 10; + */ + public com.google.protobuf.Timestamp.Builder getCaseCreateTimeBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getCaseCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time when the case was created, as reported by the external system.
+     * 
+ * + * .google.protobuf.Timestamp case_create_time = 10; + */ + public com.google.protobuf.TimestampOrBuilder getCaseCreateTimeOrBuilder() { + if (caseCreateTimeBuilder_ != null) { + return caseCreateTimeBuilder_.getMessageOrBuilder(); + } else { + return caseCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : caseCreateTime_; + } + } + /** + * + * + *
+     * The time when the case was created, as reported by the external system.
+     * 
+ * + * .google.protobuf.Timestamp case_create_time = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCaseCreateTimeFieldBuilder() { + if (caseCreateTimeBuilder_ == null) { + caseCreateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCaseCreateTime(), getParentForChildren(), isClean()); + caseCreateTime_ = null; + } + return caseCreateTimeBuilder_; + } + + private com.google.protobuf.Timestamp caseCloseTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + caseCloseTimeBuilder_; + /** + * + * + *
+     * The time when the case was closed, as reported by the external system.
+     * 
+ * + * .google.protobuf.Timestamp case_close_time = 11; + * + * @return Whether the caseCloseTime field is set. + */ + public boolean hasCaseCloseTime() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * + * + *
+     * The time when the case was closed, as reported by the external system.
+     * 
+ * + * .google.protobuf.Timestamp case_close_time = 11; + * + * @return The caseCloseTime. + */ + public com.google.protobuf.Timestamp getCaseCloseTime() { + if (caseCloseTimeBuilder_ == null) { + return caseCloseTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : caseCloseTime_; + } else { + return caseCloseTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time when the case was closed, as reported by the external system.
+     * 
+ * + * .google.protobuf.Timestamp case_close_time = 11; + */ + public Builder setCaseCloseTime(com.google.protobuf.Timestamp value) { + if (caseCloseTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + caseCloseTime_ = value; + } else { + caseCloseTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * The time when the case was closed, as reported by the external system.
+     * 
+ * + * .google.protobuf.Timestamp case_close_time = 11; + */ + public Builder setCaseCloseTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (caseCloseTimeBuilder_ == null) { + caseCloseTime_ = builderForValue.build(); + } else { + caseCloseTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * The time when the case was closed, as reported by the external system.
+     * 
+ * + * .google.protobuf.Timestamp case_close_time = 11; + */ + public Builder mergeCaseCloseTime(com.google.protobuf.Timestamp value) { + if (caseCloseTimeBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && caseCloseTime_ != null + && caseCloseTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCaseCloseTimeBuilder().mergeFrom(value); + } else { + caseCloseTime_ = value; + } + } else { + caseCloseTimeBuilder_.mergeFrom(value); + } + if (caseCloseTime_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The time when the case was closed, as reported by the external system.
+     * 
+ * + * .google.protobuf.Timestamp case_close_time = 11; + */ + public Builder clearCaseCloseTime() { + bitField0_ = (bitField0_ & ~0x00000200); + caseCloseTime_ = null; + if (caseCloseTimeBuilder_ != null) { + caseCloseTimeBuilder_.dispose(); + caseCloseTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The time when the case was closed, as reported by the external system.
+     * 
+ * + * .google.protobuf.Timestamp case_close_time = 11; + */ + public com.google.protobuf.Timestamp.Builder getCaseCloseTimeBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getCaseCloseTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time when the case was closed, as reported by the external system.
+     * 
+ * + * .google.protobuf.Timestamp case_close_time = 11; + */ + public com.google.protobuf.TimestampOrBuilder getCaseCloseTimeOrBuilder() { + if (caseCloseTimeBuilder_ != null) { + return caseCloseTimeBuilder_.getMessageOrBuilder(); + } else { + return caseCloseTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : caseCloseTime_; + } + } + /** + * + * + *
+     * The time when the case was closed, as reported by the external system.
+     * 
+ * + * .google.protobuf.Timestamp case_close_time = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCaseCloseTimeFieldBuilder() { + if (caseCloseTimeBuilder_ == null) { + caseCloseTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCaseCloseTime(), getParentForChildren(), isClean()); + caseCloseTime_ = null; + } + return caseCloseTimeBuilder_; + } + + private com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo ticketInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo, + com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo.Builder, + com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfoOrBuilder> + ticketInfoBuilder_; + /** + * + * + *
+     * Information about the ticket, if any, that is being used to track the
+     * resolution of the issue that is identified by this finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.ExternalSystem.TicketInfo ticket_info = 8; + * + * @return Whether the ticketInfo field is set. + */ + public boolean hasTicketInfo() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * + * + *
+     * Information about the ticket, if any, that is being used to track the
+     * resolution of the issue that is identified by this finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.ExternalSystem.TicketInfo ticket_info = 8; + * + * @return The ticketInfo. + */ + public com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo getTicketInfo() { + if (ticketInfoBuilder_ == null) { + return ticketInfo_ == null + ? com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo.getDefaultInstance() + : ticketInfo_; + } else { + return ticketInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Information about the ticket, if any, that is being used to track the
+     * resolution of the issue that is identified by this finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.ExternalSystem.TicketInfo ticket_info = 8; + */ + public Builder setTicketInfo( + com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo value) { + if (ticketInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ticketInfo_ = value; + } else { + ticketInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Information about the ticket, if any, that is being used to track the
+     * resolution of the issue that is identified by this finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.ExternalSystem.TicketInfo ticket_info = 8; + */ + public Builder setTicketInfo( + com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo.Builder builderForValue) { + if (ticketInfoBuilder_ == null) { + ticketInfo_ = builderForValue.build(); + } else { + ticketInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Information about the ticket, if any, that is being used to track the
+     * resolution of the issue that is identified by this finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.ExternalSystem.TicketInfo ticket_info = 8; + */ + public Builder mergeTicketInfo( + com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo value) { + if (ticketInfoBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && ticketInfo_ != null + && ticketInfo_ + != com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo + .getDefaultInstance()) { + getTicketInfoBuilder().mergeFrom(value); + } else { + ticketInfo_ = value; + } + } else { + ticketInfoBuilder_.mergeFrom(value); + } + if (ticketInfo_ != null) { + bitField0_ |= 0x00000400; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Information about the ticket, if any, that is being used to track the
+     * resolution of the issue that is identified by this finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.ExternalSystem.TicketInfo ticket_info = 8; + */ + public Builder clearTicketInfo() { + bitField0_ = (bitField0_ & ~0x00000400); + ticketInfo_ = null; + if (ticketInfoBuilder_ != null) { + ticketInfoBuilder_.dispose(); + ticketInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Information about the ticket, if any, that is being used to track the
+     * resolution of the issue that is identified by this finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.ExternalSystem.TicketInfo ticket_info = 8; + */ + public com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo.Builder + getTicketInfoBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return getTicketInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Information about the ticket, if any, that is being used to track the
+     * resolution of the issue that is identified by this finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.ExternalSystem.TicketInfo ticket_info = 8; + */ + public com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfoOrBuilder + getTicketInfoOrBuilder() { + if (ticketInfoBuilder_ != null) { + return ticketInfoBuilder_.getMessageOrBuilder(); + } else { + return ticketInfo_ == null + ? com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo.getDefaultInstance() + : ticketInfo_; + } + } + /** + * + * + *
+     * Information about the ticket, if any, that is being used to track the
+     * resolution of the issue that is identified by this finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.ExternalSystem.TicketInfo ticket_info = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo, + com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo.Builder, + com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfoOrBuilder> + getTicketInfoFieldBuilder() { + if (ticketInfoBuilder_ == null) { + ticketInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo, + com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo.Builder, + com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfoOrBuilder>( + getTicketInfo(), getParentForChildren(), isClean()); + ticketInfo_ = null; + } + return ticketInfoBuilder_; + } + + @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.v2.ExternalSystem) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.ExternalSystem) + private static final com.google.cloud.securitycenter.v2.ExternalSystem DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.ExternalSystem(); + } + + public static com.google.cloud.securitycenter.v2.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 { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.ExternalSystem getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ExternalSystemOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ExternalSystemOrBuilder.java new file mode 100644 index 000000000000..e16da7efefc1 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ExternalSystemOrBuilder.java @@ -0,0 +1,409 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/external_system.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface ExternalSystemOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.ExternalSystem) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Full resource name of the external system. The following list
+   * shows some examples:
+   *
+   * + `organizations/1234/sources/5678/findings/123456/externalSystems/jira`
+   * +
+   * `organizations/1234/sources/5678/locations/us/findings/123456/externalSystems/jira`
+   * + `folders/1234/sources/5678/findings/123456/externalSystems/jira`
+   * +
+   * `folders/1234/sources/5678/locations/us/findings/123456/externalSystems/jira`
+   * + `projects/1234/sources/5678/findings/123456/externalSystems/jira`
+   * +
+   * `projects/1234/sources/5678/locations/us/findings/123456/externalSystems/jira`
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Full resource name of the external system. The following list
+   * shows some examples:
+   *
+   * + `organizations/1234/sources/5678/findings/123456/externalSystems/jira`
+   * +
+   * `organizations/1234/sources/5678/locations/us/findings/123456/externalSystems/jira`
+   * + `folders/1234/sources/5678/findings/123456/externalSystems/jira`
+   * +
+   * `folders/1234/sources/5678/locations/us/findings/123456/externalSystems/jira`
+   * + `projects/1234/sources/5678/findings/123456/externalSystems/jira`
+   * +
+   * `projects/1234/sources/5678/locations/us/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); + + /** + * + * + *
+   * The identifier that's used to track the finding's corresponding case in the
+   * external system.
+   * 
+ * + * string external_uid = 3; + * + * @return The externalUid. + */ + java.lang.String getExternalUid(); + /** + * + * + *
+   * The identifier that's used to track the finding's corresponding case in the
+   * external system.
+   * 
+ * + * string external_uid = 3; + * + * @return The bytes for externalUid. + */ + com.google.protobuf.ByteString getExternalUidBytes(); + + /** + * + * + *
+   * The most recent status of the finding's corresponding case, as reported by
+   * the external system.
+   * 
+ * + * string status = 4; + * + * @return The status. + */ + java.lang.String getStatus(); + /** + * + * + *
+   * The most recent status of the finding's corresponding case, as reported by
+   * the external system.
+   * 
+ * + * string status = 4; + * + * @return The bytes for status. + */ + com.google.protobuf.ByteString getStatusBytes(); + + /** + * + * + *
+   * The time when the case was last updated, as reported by the external
+   * system.
+   * 
+ * + * .google.protobuf.Timestamp external_system_update_time = 5; + * + * @return Whether the externalSystemUpdateTime field is set. + */ + boolean hasExternalSystemUpdateTime(); + /** + * + * + *
+   * The time when the case was last updated, as reported by the external
+   * system.
+   * 
+ * + * .google.protobuf.Timestamp external_system_update_time = 5; + * + * @return The externalSystemUpdateTime. + */ + com.google.protobuf.Timestamp getExternalSystemUpdateTime(); + /** + * + * + *
+   * The time when the case was last updated, as reported by the external
+   * system.
+   * 
+ * + * .google.protobuf.Timestamp external_system_update_time = 5; + */ + com.google.protobuf.TimestampOrBuilder getExternalSystemUpdateTimeOrBuilder(); + + /** + * + * + *
+   * The link to the finding's corresponding case in the external system.
+   * 
+ * + * string case_uri = 6; + * + * @return The caseUri. + */ + java.lang.String getCaseUri(); + /** + * + * + *
+   * The link to the finding's corresponding case in the external system.
+   * 
+ * + * string case_uri = 6; + * + * @return The bytes for caseUri. + */ + com.google.protobuf.ByteString getCaseUriBytes(); + + /** + * + * + *
+   * The priority of the finding's corresponding case in the external system.
+   * 
+ * + * string case_priority = 7; + * + * @return The casePriority. + */ + java.lang.String getCasePriority(); + /** + * + * + *
+   * The priority of the finding's corresponding case in the external system.
+   * 
+ * + * string case_priority = 7; + * + * @return The bytes for casePriority. + */ + com.google.protobuf.ByteString getCasePriorityBytes(); + + /** + * + * + *
+   * The SLA of the finding's corresponding case in the external system.
+   * 
+ * + * .google.protobuf.Timestamp case_sla = 9; + * + * @return Whether the caseSla field is set. + */ + boolean hasCaseSla(); + /** + * + * + *
+   * The SLA of the finding's corresponding case in the external system.
+   * 
+ * + * .google.protobuf.Timestamp case_sla = 9; + * + * @return The caseSla. + */ + com.google.protobuf.Timestamp getCaseSla(); + /** + * + * + *
+   * The SLA of the finding's corresponding case in the external system.
+   * 
+ * + * .google.protobuf.Timestamp case_sla = 9; + */ + com.google.protobuf.TimestampOrBuilder getCaseSlaOrBuilder(); + + /** + * + * + *
+   * The time when the case was created, as reported by the external system.
+   * 
+ * + * .google.protobuf.Timestamp case_create_time = 10; + * + * @return Whether the caseCreateTime field is set. + */ + boolean hasCaseCreateTime(); + /** + * + * + *
+   * The time when the case was created, as reported by the external system.
+   * 
+ * + * .google.protobuf.Timestamp case_create_time = 10; + * + * @return The caseCreateTime. + */ + com.google.protobuf.Timestamp getCaseCreateTime(); + /** + * + * + *
+   * The time when the case was created, as reported by the external system.
+   * 
+ * + * .google.protobuf.Timestamp case_create_time = 10; + */ + com.google.protobuf.TimestampOrBuilder getCaseCreateTimeOrBuilder(); + + /** + * + * + *
+   * The time when the case was closed, as reported by the external system.
+   * 
+ * + * .google.protobuf.Timestamp case_close_time = 11; + * + * @return Whether the caseCloseTime field is set. + */ + boolean hasCaseCloseTime(); + /** + * + * + *
+   * The time when the case was closed, as reported by the external system.
+   * 
+ * + * .google.protobuf.Timestamp case_close_time = 11; + * + * @return The caseCloseTime. + */ + com.google.protobuf.Timestamp getCaseCloseTime(); + /** + * + * + *
+   * The time when the case was closed, as reported by the external system.
+   * 
+ * + * .google.protobuf.Timestamp case_close_time = 11; + */ + com.google.protobuf.TimestampOrBuilder getCaseCloseTimeOrBuilder(); + + /** + * + * + *
+   * Information about the ticket, if any, that is being used to track the
+   * resolution of the issue that is identified by this finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.ExternalSystem.TicketInfo ticket_info = 8; + * + * @return Whether the ticketInfo field is set. + */ + boolean hasTicketInfo(); + /** + * + * + *
+   * Information about the ticket, if any, that is being used to track the
+   * resolution of the issue that is identified by this finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.ExternalSystem.TicketInfo ticket_info = 8; + * + * @return The ticketInfo. + */ + com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo getTicketInfo(); + /** + * + * + *
+   * Information about the ticket, if any, that is being used to track the
+   * resolution of the issue that is identified by this finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.ExternalSystem.TicketInfo ticket_info = 8; + */ + com.google.cloud.securitycenter.v2.ExternalSystem.TicketInfoOrBuilder getTicketInfoOrBuilder(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ExternalSystemProto.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ExternalSystemProto.java new file mode 100644 index 000000000000..9b5e65d86def --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/ExternalSystemProto.java @@ -0,0 +1,135 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/external_system.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +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_v2_ExternalSystem_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_ExternalSystem_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v2_ExternalSystem_TicketInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_ExternalSystem_TicketInfo_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/v2/externa" + + "l_system.proto\022\036google.cloud.securitycen" + + "ter.v2\032\031google/api/resource.proto\032\037googl" + + "e/protobuf/timestamp.proto\"\324\t\n\016ExternalS" + + "ystem\022\014\n\004name\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\033" + + "external_system_update_time\030\005 \001(\0132\032.goog" + + "le.protobuf.Timestamp\022\020\n\010case_uri\030\006 \001(\t\022" + + "\025\n\rcase_priority\030\007 \001(\t\022,\n\010case_sla\030\t \001(\013" + + "2\032.google.protobuf.Timestamp\0224\n\020case_cre" + + "ate_time\030\n \001(\0132\032.google.protobuf.Timesta" + + "mp\0223\n\017case_close_time\030\013 \001(\0132\032.google.pro" + + "tobuf.Timestamp\022N\n\013ticket_info\030\010 \001(\01329.g" + + "oogle.cloud.securitycenter.v2.ExternalSy" + + "stem.TicketInfo\032\215\001\n\nTicketInfo\022\n\n\002id\030\001 \001" + + "(\t\022\020\n\010assignee\030\002 \001(\t\022\023\n\013description\030\003 \001(" + + "\t\022\013\n\003uri\030\004 \001(\t\022\016\n\006status\030\005 \001(\t\022/\n\013update" + + "_time\030\006 \001(\0132\032.google.protobuf.Timestamp:" + + "\227\005\352A\223\005\n,securitycenter.googleapis.com/Ex" + + "ternalSystem\022aorganizations/{organizatio" + + "n}/sources/{source}/findings/{finding}/e" + + "xternalSystems/{externalsystem}\022vorganiz" + + "ations/{organization}/sources/{source}/l" + + "ocations/{location}/findings/{finding}/e" + + "xternalSystems/{externalsystem}\022Ufolders" + + "/{folder}/sources/{source}/findings/{fin" + + "ding}/externalSystems/{externalsystem}\022j" + + "folders/{folder}/sources/{source}/locati" + + "ons/{location}/findings/{finding}/extern" + + "alSystems/{externalsystem}\022Wprojects/{pr" + + "oject}/sources/{source}/findings/{findin" + + "g}/externalSystems/{externalsystem}\022lpro" + + "jects/{project}/sources/{source}/locatio" + + "ns/{location}/findings/{finding}/externa" + + "lSystems/{externalsystem}B\355\001\n\"com.google" + + ".cloud.securitycenter.v2B\023ExternalSystem" + + "ProtoP\001ZJcloud.google.com/go/securitycen" + + "ter/apiv2/securitycenterpb;securitycente" + + "rpb\252\002\036Google.Cloud.SecurityCenter.V2\312\002\036G" + + "oogle\\Cloud\\SecurityCenter\\V2\352\002!Google::" + + "Cloud::SecurityCenter::V2b\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(), + }); + internal_static_google_cloud_securitycenter_v2_ExternalSystem_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_securitycenter_v2_ExternalSystem_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_ExternalSystem_descriptor, + new java.lang.String[] { + "Name", + "Assignees", + "ExternalUid", + "Status", + "ExternalSystemUpdateTime", + "CaseUri", + "CasePriority", + "CaseSla", + "CaseCreateTime", + "CaseCloseTime", + "TicketInfo", + }); + internal_static_google_cloud_securitycenter_v2_ExternalSystem_TicketInfo_descriptor = + internal_static_google_cloud_securitycenter_v2_ExternalSystem_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_securitycenter_v2_ExternalSystem_TicketInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_ExternalSystem_TicketInfo_descriptor, + new java.lang.String[] { + "Id", "Assignee", "Description", "Uri", "Status", "UpdateTime", + }); + 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(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/File.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/File.java new file mode 100644 index 000000000000..d0d5d731a2d1 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/File.java @@ -0,0 +1,2436 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/file.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * File information about the related binary/library used by an executable, or
+ * the script used by a script interpreter
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.File} + */ +public final class File extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.File) + FileOrBuilder { + private static final long serialVersionUID = 0L; + // Use File.newBuilder() to construct. + private File(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private File() { + path_ = ""; + sha256_ = ""; + contents_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new File(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.FileProto + .internal_static_google_cloud_securitycenter_v2_File_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.FileProto + .internal_static_google_cloud_securitycenter_v2_File_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.File.class, + com.google.cloud.securitycenter.v2.File.Builder.class); + } + + public interface DiskPathOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.File.DiskPath) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * UUID of the partition (format
+     * https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid)
+     * 
+ * + * string partition_uuid = 1; + * + * @return The partitionUuid. + */ + java.lang.String getPartitionUuid(); + /** + * + * + *
+     * UUID of the partition (format
+     * https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid)
+     * 
+ * + * string partition_uuid = 1; + * + * @return The bytes for partitionUuid. + */ + com.google.protobuf.ByteString getPartitionUuidBytes(); + + /** + * + * + *
+     * Relative path of the file in the partition as a JSON encoded string.
+     * Example: /home/user1/executable_file.sh
+     * 
+ * + * string relative_path = 2; + * + * @return The relativePath. + */ + java.lang.String getRelativePath(); + /** + * + * + *
+     * Relative path of the file in the partition as a JSON encoded string.
+     * Example: /home/user1/executable_file.sh
+     * 
+ * + * string relative_path = 2; + * + * @return The bytes for relativePath. + */ + com.google.protobuf.ByteString getRelativePathBytes(); + } + /** + * + * + *
+   * Path of the file in terms of underlying disk/partition identifiers.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.File.DiskPath} + */ + public static final class DiskPath extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.File.DiskPath) + DiskPathOrBuilder { + private static final long serialVersionUID = 0L; + // Use DiskPath.newBuilder() to construct. + private DiskPath(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DiskPath() { + partitionUuid_ = ""; + relativePath_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DiskPath(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.FileProto + .internal_static_google_cloud_securitycenter_v2_File_DiskPath_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.FileProto + .internal_static_google_cloud_securitycenter_v2_File_DiskPath_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.File.DiskPath.class, + com.google.cloud.securitycenter.v2.File.DiskPath.Builder.class); + } + + public static final int PARTITION_UUID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object partitionUuid_ = ""; + /** + * + * + *
+     * UUID of the partition (format
+     * https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid)
+     * 
+ * + * string partition_uuid = 1; + * + * @return The partitionUuid. + */ + @java.lang.Override + public java.lang.String getPartitionUuid() { + java.lang.Object ref = partitionUuid_; + 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(); + partitionUuid_ = s; + return s; + } + } + /** + * + * + *
+     * UUID of the partition (format
+     * https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid)
+     * 
+ * + * string partition_uuid = 1; + * + * @return The bytes for partitionUuid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPartitionUuidBytes() { + java.lang.Object ref = partitionUuid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + partitionUuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RELATIVE_PATH_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object relativePath_ = ""; + /** + * + * + *
+     * Relative path of the file in the partition as a JSON encoded string.
+     * Example: /home/user1/executable_file.sh
+     * 
+ * + * string relative_path = 2; + * + * @return The relativePath. + */ + @java.lang.Override + public java.lang.String getRelativePath() { + java.lang.Object ref = relativePath_; + 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(); + relativePath_ = s; + return s; + } + } + /** + * + * + *
+     * Relative path of the file in the partition as a JSON encoded string.
+     * Example: /home/user1/executable_file.sh
+     * 
+ * + * string relative_path = 2; + * + * @return The bytes for relativePath. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRelativePathBytes() { + java.lang.Object ref = relativePath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + relativePath_ = 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(partitionUuid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, partitionUuid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relativePath_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, relativePath_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(partitionUuid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, partitionUuid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relativePath_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, relativePath_); + } + size += getUnknownFields().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.v2.File.DiskPath)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.File.DiskPath other = + (com.google.cloud.securitycenter.v2.File.DiskPath) obj; + + if (!getPartitionUuid().equals(other.getPartitionUuid())) return false; + if (!getRelativePath().equals(other.getRelativePath())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + PARTITION_UUID_FIELD_NUMBER; + hash = (53 * hash) + getPartitionUuid().hashCode(); + hash = (37 * hash) + RELATIVE_PATH_FIELD_NUMBER; + hash = (53 * hash) + getRelativePath().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.File.DiskPath parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.File.DiskPath 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.v2.File.DiskPath parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.File.DiskPath 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.v2.File.DiskPath parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.File.DiskPath parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.File.DiskPath parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.File.DiskPath 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.v2.File.DiskPath parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.File.DiskPath 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.v2.File.DiskPath parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.File.DiskPath 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.v2.File.DiskPath 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; + } + /** + * + * + *
+     * Path of the file in terms of underlying disk/partition identifiers.
+     * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.File.DiskPath} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.File.DiskPath) + com.google.cloud.securitycenter.v2.File.DiskPathOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.FileProto + .internal_static_google_cloud_securitycenter_v2_File_DiskPath_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.FileProto + .internal_static_google_cloud_securitycenter_v2_File_DiskPath_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.File.DiskPath.class, + com.google.cloud.securitycenter.v2.File.DiskPath.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.File.DiskPath.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + partitionUuid_ = ""; + relativePath_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.FileProto + .internal_static_google_cloud_securitycenter_v2_File_DiskPath_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.File.DiskPath getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.File.DiskPath.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.File.DiskPath build() { + com.google.cloud.securitycenter.v2.File.DiskPath result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.File.DiskPath buildPartial() { + com.google.cloud.securitycenter.v2.File.DiskPath result = + new com.google.cloud.securitycenter.v2.File.DiskPath(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.File.DiskPath result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.partitionUuid_ = partitionUuid_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.relativePath_ = relativePath_; + } + } + + @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.v2.File.DiskPath) { + return mergeFrom((com.google.cloud.securitycenter.v2.File.DiskPath) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.File.DiskPath other) { + if (other == com.google.cloud.securitycenter.v2.File.DiskPath.getDefaultInstance()) + return this; + if (!other.getPartitionUuid().isEmpty()) { + partitionUuid_ = other.partitionUuid_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRelativePath().isEmpty()) { + relativePath_ = other.relativePath_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + partitionUuid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + relativePath_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object partitionUuid_ = ""; + /** + * + * + *
+       * UUID of the partition (format
+       * https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid)
+       * 
+ * + * string partition_uuid = 1; + * + * @return The partitionUuid. + */ + public java.lang.String getPartitionUuid() { + java.lang.Object ref = partitionUuid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partitionUuid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * UUID of the partition (format
+       * https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid)
+       * 
+ * + * string partition_uuid = 1; + * + * @return The bytes for partitionUuid. + */ + public com.google.protobuf.ByteString getPartitionUuidBytes() { + java.lang.Object ref = partitionUuid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + partitionUuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * UUID of the partition (format
+       * https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid)
+       * 
+ * + * string partition_uuid = 1; + * + * @param value The partitionUuid to set. + * @return This builder for chaining. + */ + public Builder setPartitionUuid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + partitionUuid_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * UUID of the partition (format
+       * https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid)
+       * 
+ * + * string partition_uuid = 1; + * + * @return This builder for chaining. + */ + public Builder clearPartitionUuid() { + partitionUuid_ = getDefaultInstance().getPartitionUuid(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * UUID of the partition (format
+       * https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid)
+       * 
+ * + * string partition_uuid = 1; + * + * @param value The bytes for partitionUuid to set. + * @return This builder for chaining. + */ + public Builder setPartitionUuidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + partitionUuid_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object relativePath_ = ""; + /** + * + * + *
+       * Relative path of the file in the partition as a JSON encoded string.
+       * Example: /home/user1/executable_file.sh
+       * 
+ * + * string relative_path = 2; + * + * @return The relativePath. + */ + public java.lang.String getRelativePath() { + java.lang.Object ref = relativePath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + relativePath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Relative path of the file in the partition as a JSON encoded string.
+       * Example: /home/user1/executable_file.sh
+       * 
+ * + * string relative_path = 2; + * + * @return The bytes for relativePath. + */ + public com.google.protobuf.ByteString getRelativePathBytes() { + java.lang.Object ref = relativePath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + relativePath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Relative path of the file in the partition as a JSON encoded string.
+       * Example: /home/user1/executable_file.sh
+       * 
+ * + * string relative_path = 2; + * + * @param value The relativePath to set. + * @return This builder for chaining. + */ + public Builder setRelativePath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + relativePath_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Relative path of the file in the partition as a JSON encoded string.
+       * Example: /home/user1/executable_file.sh
+       * 
+ * + * string relative_path = 2; + * + * @return This builder for chaining. + */ + public Builder clearRelativePath() { + relativePath_ = getDefaultInstance().getRelativePath(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Relative path of the file in the partition as a JSON encoded string.
+       * Example: /home/user1/executable_file.sh
+       * 
+ * + * string relative_path = 2; + * + * @param value The bytes for relativePath to set. + * @return This builder for chaining. + */ + public Builder setRelativePathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + relativePath_ = value; + bitField0_ |= 0x00000002; + 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.v2.File.DiskPath) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.File.DiskPath) + private static final com.google.cloud.securitycenter.v2.File.DiskPath DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.File.DiskPath(); + } + + public static com.google.cloud.securitycenter.v2.File.DiskPath getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DiskPath parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.File.DiskPath getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int PATH_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object path_ = ""; + /** + * + * + *
+   * Absolute path of the file as a JSON encoded string.
+   * 
+ * + * string path = 1; + * + * @return The path. + */ + @java.lang.Override + public java.lang.String getPath() { + java.lang.Object ref = path_; + 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(); + path_ = s; + return s; + } + } + /** + * + * + *
+   * Absolute path of the file as a JSON encoded string.
+   * 
+ * + * string path = 1; + * + * @return The bytes for path. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SIZE_FIELD_NUMBER = 2; + private long size_ = 0L; + /** + * + * + *
+   * Size of the file in bytes.
+   * 
+ * + * int64 size = 2; + * + * @return The size. + */ + @java.lang.Override + public long getSize() { + return size_; + } + + public static final int SHA256_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object sha256_ = ""; + /** + * + * + *
+   * SHA256 hash of the first hashed_size bytes of the file encoded as a
+   * hex string.  If hashed_size == size, sha256 represents the SHA256 hash
+   * of the entire file.
+   * 
+ * + * string sha256 = 3; + * + * @return The sha256. + */ + @java.lang.Override + public java.lang.String getSha256() { + java.lang.Object ref = sha256_; + 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(); + sha256_ = s; + return s; + } + } + /** + * + * + *
+   * SHA256 hash of the first hashed_size bytes of the file encoded as a
+   * hex string.  If hashed_size == size, sha256 represents the SHA256 hash
+   * of the entire file.
+   * 
+ * + * string sha256 = 3; + * + * @return The bytes for sha256. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSha256Bytes() { + java.lang.Object ref = sha256_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sha256_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HASHED_SIZE_FIELD_NUMBER = 4; + private long hashedSize_ = 0L; + /** + * + * + *
+   * The length in bytes of the file prefix that was hashed.  If
+   * hashed_size == size, any hashes reported represent the entire
+   * file.
+   * 
+ * + * int64 hashed_size = 4; + * + * @return The hashedSize. + */ + @java.lang.Override + public long getHashedSize() { + return hashedSize_; + } + + public static final int PARTIALLY_HASHED_FIELD_NUMBER = 5; + private boolean partiallyHashed_ = false; + /** + * + * + *
+   * True when the hash covers only a prefix of the file.
+   * 
+ * + * bool partially_hashed = 5; + * + * @return The partiallyHashed. + */ + @java.lang.Override + public boolean getPartiallyHashed() { + return partiallyHashed_; + } + + public static final int CONTENTS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object contents_ = ""; + /** + * + * + *
+   * Prefix of the file contents as a JSON-encoded string.
+   * 
+ * + * string contents = 6; + * + * @return The contents. + */ + @java.lang.Override + public java.lang.String getContents() { + java.lang.Object ref = contents_; + 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(); + contents_ = s; + return s; + } + } + /** + * + * + *
+   * Prefix of the file contents as a JSON-encoded string.
+   * 
+ * + * string contents = 6; + * + * @return The bytes for contents. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContentsBytes() { + java.lang.Object ref = contents_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + contents_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISK_PATH_FIELD_NUMBER = 7; + private com.google.cloud.securitycenter.v2.File.DiskPath diskPath_; + /** + * + * + *
+   * Path of the file in terms of underlying disk/partition identifiers.
+   * 
+ * + * .google.cloud.securitycenter.v2.File.DiskPath disk_path = 7; + * + * @return Whether the diskPath field is set. + */ + @java.lang.Override + public boolean hasDiskPath() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Path of the file in terms of underlying disk/partition identifiers.
+   * 
+ * + * .google.cloud.securitycenter.v2.File.DiskPath disk_path = 7; + * + * @return The diskPath. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.File.DiskPath getDiskPath() { + return diskPath_ == null + ? com.google.cloud.securitycenter.v2.File.DiskPath.getDefaultInstance() + : diskPath_; + } + /** + * + * + *
+   * Path of the file in terms of underlying disk/partition identifiers.
+   * 
+ * + * .google.cloud.securitycenter.v2.File.DiskPath disk_path = 7; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.File.DiskPathOrBuilder getDiskPathOrBuilder() { + return diskPath_ == null + ? com.google.cloud.securitycenter.v2.File.DiskPath.getDefaultInstance() + : diskPath_; + } + + 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(path_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, path_); + } + if (size_ != 0L) { + output.writeInt64(2, size_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sha256_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sha256_); + } + if (hashedSize_ != 0L) { + output.writeInt64(4, hashedSize_); + } + if (partiallyHashed_ != false) { + output.writeBool(5, partiallyHashed_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contents_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, contents_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(7, getDiskPath()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, path_); + } + if (size_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, size_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sha256_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sha256_); + } + if (hashedSize_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, hashedSize_); + } + if (partiallyHashed_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, partiallyHashed_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contents_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, contents_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getDiskPath()); + } + size += getUnknownFields().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.v2.File)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.File other = (com.google.cloud.securitycenter.v2.File) obj; + + if (!getPath().equals(other.getPath())) return false; + if (getSize() != other.getSize()) return false; + if (!getSha256().equals(other.getSha256())) return false; + if (getHashedSize() != other.getHashedSize()) return false; + if (getPartiallyHashed() != other.getPartiallyHashed()) return false; + if (!getContents().equals(other.getContents())) return false; + if (hasDiskPath() != other.hasDiskPath()) return false; + if (hasDiskPath()) { + if (!getDiskPath().equals(other.getDiskPath())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + PATH_FIELD_NUMBER; + hash = (53 * hash) + getPath().hashCode(); + hash = (37 * hash) + SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSize()); + hash = (37 * hash) + SHA256_FIELD_NUMBER; + hash = (53 * hash) + getSha256().hashCode(); + hash = (37 * hash) + HASHED_SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getHashedSize()); + hash = (37 * hash) + PARTIALLY_HASHED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPartiallyHashed()); + hash = (37 * hash) + CONTENTS_FIELD_NUMBER; + hash = (53 * hash) + getContents().hashCode(); + if (hasDiskPath()) { + hash = (37 * hash) + DISK_PATH_FIELD_NUMBER; + hash = (53 * hash) + getDiskPath().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.File parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.File 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.v2.File parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.File 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.v2.File parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.File parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.File parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.File 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.v2.File parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.File 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.v2.File parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.File 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.v2.File 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; + } + /** + * + * + *
+   * File information about the related binary/library used by an executable, or
+   * the script used by a script interpreter
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.File} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.File) + com.google.cloud.securitycenter.v2.FileOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.FileProto + .internal_static_google_cloud_securitycenter_v2_File_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.FileProto + .internal_static_google_cloud_securitycenter_v2_File_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.File.class, + com.google.cloud.securitycenter.v2.File.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.File.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDiskPathFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + path_ = ""; + size_ = 0L; + sha256_ = ""; + hashedSize_ = 0L; + partiallyHashed_ = false; + contents_ = ""; + diskPath_ = null; + if (diskPathBuilder_ != null) { + diskPathBuilder_.dispose(); + diskPathBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.FileProto + .internal_static_google_cloud_securitycenter_v2_File_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.File getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.File.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.File build() { + com.google.cloud.securitycenter.v2.File result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.File buildPartial() { + com.google.cloud.securitycenter.v2.File result = + new com.google.cloud.securitycenter.v2.File(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.File result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.path_ = path_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.size_ = size_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.sha256_ = sha256_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.hashedSize_ = hashedSize_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.partiallyHashed_ = partiallyHashed_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.contents_ = contents_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000040) != 0)) { + result.diskPath_ = diskPathBuilder_ == null ? diskPath_ : diskPathBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v2.File) { + return mergeFrom((com.google.cloud.securitycenter.v2.File) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.File other) { + if (other == com.google.cloud.securitycenter.v2.File.getDefaultInstance()) return this; + if (!other.getPath().isEmpty()) { + path_ = other.path_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getSize() != 0L) { + setSize(other.getSize()); + } + if (!other.getSha256().isEmpty()) { + sha256_ = other.sha256_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getHashedSize() != 0L) { + setHashedSize(other.getHashedSize()); + } + if (other.getPartiallyHashed() != false) { + setPartiallyHashed(other.getPartiallyHashed()); + } + if (!other.getContents().isEmpty()) { + contents_ = other.contents_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.hasDiskPath()) { + mergeDiskPath(other.getDiskPath()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + path_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + size_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + sha256_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + hashedSize_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + partiallyHashed_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: + { + contents_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage(getDiskPathFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object path_ = ""; + /** + * + * + *
+     * Absolute path of the file as a JSON encoded string.
+     * 
+ * + * string path = 1; + * + * @return The path. + */ + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Absolute path of the file as a JSON encoded string.
+     * 
+ * + * string path = 1; + * + * @return The bytes for path. + */ + public com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Absolute path of the file as a JSON encoded string.
+     * 
+ * + * string path = 1; + * + * @param value The path to set. + * @return This builder for chaining. + */ + public Builder setPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + path_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Absolute path of the file as a JSON encoded string.
+     * 
+ * + * string path = 1; + * + * @return This builder for chaining. + */ + public Builder clearPath() { + path_ = getDefaultInstance().getPath(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Absolute path of the file as a JSON encoded string.
+     * 
+ * + * string path = 1; + * + * @param value The bytes for path to set. + * @return This builder for chaining. + */ + public Builder setPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + path_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private long size_; + /** + * + * + *
+     * Size of the file in bytes.
+     * 
+ * + * int64 size = 2; + * + * @return The size. + */ + @java.lang.Override + public long getSize() { + return size_; + } + /** + * + * + *
+     * Size of the file in bytes.
+     * 
+ * + * int64 size = 2; + * + * @param value The size to set. + * @return This builder for chaining. + */ + public Builder setSize(long value) { + + size_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Size of the file in bytes.
+     * 
+ * + * int64 size = 2; + * + * @return This builder for chaining. + */ + public Builder clearSize() { + bitField0_ = (bitField0_ & ~0x00000002); + size_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object sha256_ = ""; + /** + * + * + *
+     * SHA256 hash of the first hashed_size bytes of the file encoded as a
+     * hex string.  If hashed_size == size, sha256 represents the SHA256 hash
+     * of the entire file.
+     * 
+ * + * string sha256 = 3; + * + * @return The sha256. + */ + public java.lang.String getSha256() { + java.lang.Object ref = sha256_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sha256_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * SHA256 hash of the first hashed_size bytes of the file encoded as a
+     * hex string.  If hashed_size == size, sha256 represents the SHA256 hash
+     * of the entire file.
+     * 
+ * + * string sha256 = 3; + * + * @return The bytes for sha256. + */ + public com.google.protobuf.ByteString getSha256Bytes() { + java.lang.Object ref = sha256_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sha256_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * SHA256 hash of the first hashed_size bytes of the file encoded as a
+     * hex string.  If hashed_size == size, sha256 represents the SHA256 hash
+     * of the entire file.
+     * 
+ * + * string sha256 = 3; + * + * @param value The sha256 to set. + * @return This builder for chaining. + */ + public Builder setSha256(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sha256_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * SHA256 hash of the first hashed_size bytes of the file encoded as a
+     * hex string.  If hashed_size == size, sha256 represents the SHA256 hash
+     * of the entire file.
+     * 
+ * + * string sha256 = 3; + * + * @return This builder for chaining. + */ + public Builder clearSha256() { + sha256_ = getDefaultInstance().getSha256(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * SHA256 hash of the first hashed_size bytes of the file encoded as a
+     * hex string.  If hashed_size == size, sha256 represents the SHA256 hash
+     * of the entire file.
+     * 
+ * + * string sha256 = 3; + * + * @param value The bytes for sha256 to set. + * @return This builder for chaining. + */ + public Builder setSha256Bytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sha256_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private long hashedSize_; + /** + * + * + *
+     * The length in bytes of the file prefix that was hashed.  If
+     * hashed_size == size, any hashes reported represent the entire
+     * file.
+     * 
+ * + * int64 hashed_size = 4; + * + * @return The hashedSize. + */ + @java.lang.Override + public long getHashedSize() { + return hashedSize_; + } + /** + * + * + *
+     * The length in bytes of the file prefix that was hashed.  If
+     * hashed_size == size, any hashes reported represent the entire
+     * file.
+     * 
+ * + * int64 hashed_size = 4; + * + * @param value The hashedSize to set. + * @return This builder for chaining. + */ + public Builder setHashedSize(long value) { + + hashedSize_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The length in bytes of the file prefix that was hashed.  If
+     * hashed_size == size, any hashes reported represent the entire
+     * file.
+     * 
+ * + * int64 hashed_size = 4; + * + * @return This builder for chaining. + */ + public Builder clearHashedSize() { + bitField0_ = (bitField0_ & ~0x00000008); + hashedSize_ = 0L; + onChanged(); + return this; + } + + private boolean partiallyHashed_; + /** + * + * + *
+     * True when the hash covers only a prefix of the file.
+     * 
+ * + * bool partially_hashed = 5; + * + * @return The partiallyHashed. + */ + @java.lang.Override + public boolean getPartiallyHashed() { + return partiallyHashed_; + } + /** + * + * + *
+     * True when the hash covers only a prefix of the file.
+     * 
+ * + * bool partially_hashed = 5; + * + * @param value The partiallyHashed to set. + * @return This builder for chaining. + */ + public Builder setPartiallyHashed(boolean value) { + + partiallyHashed_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * True when the hash covers only a prefix of the file.
+     * 
+ * + * bool partially_hashed = 5; + * + * @return This builder for chaining. + */ + public Builder clearPartiallyHashed() { + bitField0_ = (bitField0_ & ~0x00000010); + partiallyHashed_ = false; + onChanged(); + return this; + } + + private java.lang.Object contents_ = ""; + /** + * + * + *
+     * Prefix of the file contents as a JSON-encoded string.
+     * 
+ * + * string contents = 6; + * + * @return The contents. + */ + public java.lang.String getContents() { + java.lang.Object ref = contents_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + contents_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Prefix of the file contents as a JSON-encoded string.
+     * 
+ * + * string contents = 6; + * + * @return The bytes for contents. + */ + public com.google.protobuf.ByteString getContentsBytes() { + java.lang.Object ref = contents_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + contents_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Prefix of the file contents as a JSON-encoded string.
+     * 
+ * + * string contents = 6; + * + * @param value The contents to set. + * @return This builder for chaining. + */ + public Builder setContents(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + contents_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Prefix of the file contents as a JSON-encoded string.
+     * 
+ * + * string contents = 6; + * + * @return This builder for chaining. + */ + public Builder clearContents() { + contents_ = getDefaultInstance().getContents(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Prefix of the file contents as a JSON-encoded string.
+     * 
+ * + * string contents = 6; + * + * @param value The bytes for contents to set. + * @return This builder for chaining. + */ + public Builder setContentsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + contents_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.cloud.securitycenter.v2.File.DiskPath diskPath_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.File.DiskPath, + com.google.cloud.securitycenter.v2.File.DiskPath.Builder, + com.google.cloud.securitycenter.v2.File.DiskPathOrBuilder> + diskPathBuilder_; + /** + * + * + *
+     * Path of the file in terms of underlying disk/partition identifiers.
+     * 
+ * + * .google.cloud.securitycenter.v2.File.DiskPath disk_path = 7; + * + * @return Whether the diskPath field is set. + */ + public boolean hasDiskPath() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Path of the file in terms of underlying disk/partition identifiers.
+     * 
+ * + * .google.cloud.securitycenter.v2.File.DiskPath disk_path = 7; + * + * @return The diskPath. + */ + public com.google.cloud.securitycenter.v2.File.DiskPath getDiskPath() { + if (diskPathBuilder_ == null) { + return diskPath_ == null + ? com.google.cloud.securitycenter.v2.File.DiskPath.getDefaultInstance() + : diskPath_; + } else { + return diskPathBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Path of the file in terms of underlying disk/partition identifiers.
+     * 
+ * + * .google.cloud.securitycenter.v2.File.DiskPath disk_path = 7; + */ + public Builder setDiskPath(com.google.cloud.securitycenter.v2.File.DiskPath value) { + if (diskPathBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + diskPath_ = value; + } else { + diskPathBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Path of the file in terms of underlying disk/partition identifiers.
+     * 
+ * + * .google.cloud.securitycenter.v2.File.DiskPath disk_path = 7; + */ + public Builder setDiskPath( + com.google.cloud.securitycenter.v2.File.DiskPath.Builder builderForValue) { + if (diskPathBuilder_ == null) { + diskPath_ = builderForValue.build(); + } else { + diskPathBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Path of the file in terms of underlying disk/partition identifiers.
+     * 
+ * + * .google.cloud.securitycenter.v2.File.DiskPath disk_path = 7; + */ + public Builder mergeDiskPath(com.google.cloud.securitycenter.v2.File.DiskPath value) { + if (diskPathBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && diskPath_ != null + && diskPath_ != com.google.cloud.securitycenter.v2.File.DiskPath.getDefaultInstance()) { + getDiskPathBuilder().mergeFrom(value); + } else { + diskPath_ = value; + } + } else { + diskPathBuilder_.mergeFrom(value); + } + if (diskPath_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Path of the file in terms of underlying disk/partition identifiers.
+     * 
+ * + * .google.cloud.securitycenter.v2.File.DiskPath disk_path = 7; + */ + public Builder clearDiskPath() { + bitField0_ = (bitField0_ & ~0x00000040); + diskPath_ = null; + if (diskPathBuilder_ != null) { + diskPathBuilder_.dispose(); + diskPathBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Path of the file in terms of underlying disk/partition identifiers.
+     * 
+ * + * .google.cloud.securitycenter.v2.File.DiskPath disk_path = 7; + */ + public com.google.cloud.securitycenter.v2.File.DiskPath.Builder getDiskPathBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getDiskPathFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Path of the file in terms of underlying disk/partition identifiers.
+     * 
+ * + * .google.cloud.securitycenter.v2.File.DiskPath disk_path = 7; + */ + public com.google.cloud.securitycenter.v2.File.DiskPathOrBuilder getDiskPathOrBuilder() { + if (diskPathBuilder_ != null) { + return diskPathBuilder_.getMessageOrBuilder(); + } else { + return diskPath_ == null + ? com.google.cloud.securitycenter.v2.File.DiskPath.getDefaultInstance() + : diskPath_; + } + } + /** + * + * + *
+     * Path of the file in terms of underlying disk/partition identifiers.
+     * 
+ * + * .google.cloud.securitycenter.v2.File.DiskPath disk_path = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.File.DiskPath, + com.google.cloud.securitycenter.v2.File.DiskPath.Builder, + com.google.cloud.securitycenter.v2.File.DiskPathOrBuilder> + getDiskPathFieldBuilder() { + if (diskPathBuilder_ == null) { + diskPathBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.File.DiskPath, + com.google.cloud.securitycenter.v2.File.DiskPath.Builder, + com.google.cloud.securitycenter.v2.File.DiskPathOrBuilder>( + getDiskPath(), getParentForChildren(), isClean()); + diskPath_ = null; + } + return diskPathBuilder_; + } + + @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.v2.File) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.File) + private static final com.google.cloud.securitycenter.v2.File DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.File(); + } + + public static com.google.cloud.securitycenter.v2.File getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public File parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.File getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/FileOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/FileOrBuilder.java new file mode 100644 index 000000000000..f2b543238551 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/FileOrBuilder.java @@ -0,0 +1,181 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/file.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface FileOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.File) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Absolute path of the file as a JSON encoded string.
+   * 
+ * + * string path = 1; + * + * @return The path. + */ + java.lang.String getPath(); + /** + * + * + *
+   * Absolute path of the file as a JSON encoded string.
+   * 
+ * + * string path = 1; + * + * @return The bytes for path. + */ + com.google.protobuf.ByteString getPathBytes(); + + /** + * + * + *
+   * Size of the file in bytes.
+   * 
+ * + * int64 size = 2; + * + * @return The size. + */ + long getSize(); + + /** + * + * + *
+   * SHA256 hash of the first hashed_size bytes of the file encoded as a
+   * hex string.  If hashed_size == size, sha256 represents the SHA256 hash
+   * of the entire file.
+   * 
+ * + * string sha256 = 3; + * + * @return The sha256. + */ + java.lang.String getSha256(); + /** + * + * + *
+   * SHA256 hash of the first hashed_size bytes of the file encoded as a
+   * hex string.  If hashed_size == size, sha256 represents the SHA256 hash
+   * of the entire file.
+   * 
+ * + * string sha256 = 3; + * + * @return The bytes for sha256. + */ + com.google.protobuf.ByteString getSha256Bytes(); + + /** + * + * + *
+   * The length in bytes of the file prefix that was hashed.  If
+   * hashed_size == size, any hashes reported represent the entire
+   * file.
+   * 
+ * + * int64 hashed_size = 4; + * + * @return The hashedSize. + */ + long getHashedSize(); + + /** + * + * + *
+   * True when the hash covers only a prefix of the file.
+   * 
+ * + * bool partially_hashed = 5; + * + * @return The partiallyHashed. + */ + boolean getPartiallyHashed(); + + /** + * + * + *
+   * Prefix of the file contents as a JSON-encoded string.
+   * 
+ * + * string contents = 6; + * + * @return The contents. + */ + java.lang.String getContents(); + /** + * + * + *
+   * Prefix of the file contents as a JSON-encoded string.
+   * 
+ * + * string contents = 6; + * + * @return The bytes for contents. + */ + com.google.protobuf.ByteString getContentsBytes(); + + /** + * + * + *
+   * Path of the file in terms of underlying disk/partition identifiers.
+   * 
+ * + * .google.cloud.securitycenter.v2.File.DiskPath disk_path = 7; + * + * @return Whether the diskPath field is set. + */ + boolean hasDiskPath(); + /** + * + * + *
+   * Path of the file in terms of underlying disk/partition identifiers.
+   * 
+ * + * .google.cloud.securitycenter.v2.File.DiskPath disk_path = 7; + * + * @return The diskPath. + */ + com.google.cloud.securitycenter.v2.File.DiskPath getDiskPath(); + /** + * + * + *
+   * Path of the file in terms of underlying disk/partition identifiers.
+   * 
+ * + * .google.cloud.securitycenter.v2.File.DiskPath disk_path = 7; + */ + com.google.cloud.securitycenter.v2.File.DiskPathOrBuilder getDiskPathOrBuilder(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/FileProto.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/FileProto.java new file mode 100644 index 000000000000..e0bd9ea35236 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/FileProto.java @@ -0,0 +1,85 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/file.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public final class FileProto { + private FileProto() {} + + 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_v2_File_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_File_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v2_File_DiskPath_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_File_DiskPath_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n)google/cloud/securitycenter/v2/file.pr" + + "oto\022\036google.cloud.securitycenter.v2\"\360\001\n\004" + + "File\022\014\n\004path\030\001 \001(\t\022\014\n\004size\030\002 \001(\003\022\016\n\006sha2" + + "56\030\003 \001(\t\022\023\n\013hashed_size\030\004 \001(\003\022\030\n\020partial" + + "ly_hashed\030\005 \001(\010\022\020\n\010contents\030\006 \001(\t\022@\n\tdis" + + "k_path\030\007 \001(\0132-.google.cloud.securitycent" + + "er.v2.File.DiskPath\0329\n\010DiskPath\022\026\n\016parti" + + "tion_uuid\030\001 \001(\t\022\025\n\rrelative_path\030\002 \001(\tB\343" + + "\001\n\"com.google.cloud.securitycenter.v2B\tF" + + "ileProtoP\001ZJcloud.google.com/go/security" + + "center/apiv2/securitycenterpb;securityce" + + "nterpb\252\002\036Google.Cloud.SecurityCenter.V2\312" + + "\002\036Google\\Cloud\\SecurityCenter\\V2\352\002!Googl" + + "e::Cloud::SecurityCenter::V2b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_cloud_securitycenter_v2_File_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_securitycenter_v2_File_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_File_descriptor, + new java.lang.String[] { + "Path", "Size", "Sha256", "HashedSize", "PartiallyHashed", "Contents", "DiskPath", + }); + internal_static_google_cloud_securitycenter_v2_File_DiskPath_descriptor = + internal_static_google_cloud_securitycenter_v2_File_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_securitycenter_v2_File_DiskPath_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_File_DiskPath_descriptor, + new java.lang.String[] { + "PartitionUuid", "RelativePath", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Finding.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Finding.java new file mode 100644 index 000000000000..b00500352831 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Finding.java @@ -0,0 +1,15512 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/finding.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Security Command Center finding.
+ *
+ * A finding is a record of assessment data like security, risk, health, or
+ * privacy, that is ingested into Security Command Center for presentation,
+ * notification, analysis, policy testing, and enforcement. For example, a
+ * cross-site scripting (XSS) vulnerability in an App Engine application is a
+ * finding.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Finding} + */ +public final class Finding extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.Finding) + FindingOrBuilder { + private static final long serialVersionUID = 0L; + // Use Finding.newBuilder() to construct. + private Finding(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Finding() { + name_ = ""; + canonicalName_ = ""; + parent_ = ""; + resourceName_ = ""; + state_ = 0; + category_ = ""; + externalUri_ = ""; + severity_ = 0; + mute_ = 0; + findingClass_ = 0; + connections_ = java.util.Collections.emptyList(); + muteInitiator_ = ""; + processes_ = java.util.Collections.emptyList(); + compliances_ = java.util.Collections.emptyList(); + parentDisplayName_ = ""; + description_ = ""; + iamBindings_ = java.util.Collections.emptyList(); + nextSteps_ = ""; + moduleName_ = ""; + containers_ = java.util.Collections.emptyList(); + files_ = java.util.Collections.emptyList(); + orgPolicies_ = java.util.Collections.emptyList(); + logEntries_ = java.util.Collections.emptyList(); + loadBalancers_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Finding(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.FindingProto + .internal_static_google_cloud_securitycenter_v2_Finding_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 9: + return internalGetSourceProperties(); + case 20: + return internalGetExternalSystems(); + case 26: + return internalGetContacts(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.FindingProto + .internal_static_google_cloud_securitycenter_v2_Finding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Finding.class, + com.google.cloud.securitycenter.v2.Finding.Builder.class); + } + + /** + * + * + *
+   * The state of the finding.
+   * 
+ * + * Protobuf enum {@code google.cloud.securitycenter.v2.Finding.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified state.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The finding requires attention and has not been addressed yet.
+     * 
+ * + * ACTIVE = 1; + */ + ACTIVE(1), + /** + * + * + *
+     * The finding has been fixed, triaged as a non-issue or otherwise addressed
+     * and is no longer active.
+     * 
+ * + * INACTIVE = 2; + */ + INACTIVE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified state.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The finding requires attention and has not been addressed yet.
+     * 
+ * + * ACTIVE = 1; + */ + public static final int ACTIVE_VALUE = 1; + /** + * + * + *
+     * The finding has been fixed, triaged as a non-issue or otherwise addressed
+     * and is no longer active.
+     * 
+ * + * INACTIVE = 2; + */ + public static final int INACTIVE_VALUE = 2; + + 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 State 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 State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return ACTIVE; + case 2: + return INACTIVE; + 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 State findValueByNumber(int number) { + return State.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.v2.Finding.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State 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 State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v2.Finding.State) + } + + /** + * + * + *
+   * The severity of the finding.
+   * 
+ * + * Protobuf enum {@code google.cloud.securitycenter.v2.Finding.Severity} + */ + public enum Severity implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * This value is used for findings when a source doesn't write a severity
+     * value.
+     * 
+ * + * SEVERITY_UNSPECIFIED = 0; + */ + SEVERITY_UNSPECIFIED(0), + /** + * + * + *
+     * Vulnerability:
+     * A critical vulnerability is easily discoverable by an external actor,
+     * exploitable, and results in the direct ability to execute arbitrary code,
+     * exfiltrate data, and otherwise gain additional access and privileges to
+     * cloud resources and workloads. Examples include publicly accessible
+     * unprotected user data and public SSH access with weak or no
+     * passwords.
+     *
+     * Threat:
+     * Indicates a threat that is able to access, modify, or delete data or
+     * execute unauthorized code within existing resources.
+     * 
+ * + * CRITICAL = 1; + */ + CRITICAL(1), + /** + * + * + *
+     * Vulnerability:
+     * A high risk vulnerability can be easily discovered and exploited in
+     * combination with other vulnerabilities in order to gain direct access and
+     * the ability to execute arbitrary code, exfiltrate data, and otherwise
+     * gain additional access and privileges to cloud resources and workloads.
+     * An example is a database with weak or no passwords that is only
+     * accessible internally. This database could easily be compromised by an
+     * actor that had access to the internal network.
+     *
+     * Threat:
+     * Indicates a threat that is able to create new computational resources in
+     * an environment but not able to access data or execute code in existing
+     * resources.
+     * 
+ * + * HIGH = 2; + */ + HIGH(2), + /** + * + * + *
+     * Vulnerability:
+     * A medium risk vulnerability could be used by an actor to gain access to
+     * resources or privileges that enable them to eventually (through multiple
+     * steps or a complex exploit) gain access and the ability to execute
+     * arbitrary code or exfiltrate data. An example is a service account with
+     * access to more projects than it should have. If an actor gains access to
+     * the service account, they could potentially use that access to manipulate
+     * a project the service account was not intended to.
+     *
+     * Threat:
+     * Indicates a threat that is able to cause operational impact but may not
+     * access data or execute unauthorized code.
+     * 
+ * + * MEDIUM = 3; + */ + MEDIUM(3), + /** + * + * + *
+     * Vulnerability:
+     * A low risk vulnerability hampers a security organization's ability to
+     * detect vulnerabilities or active threats in their deployment, or prevents
+     * the root cause investigation of security issues. An example is monitoring
+     * and logs being disabled for resource configurations and access.
+     *
+     * Threat:
+     * Indicates a threat that has obtained minimal access to an environment but
+     * is not able to access data, execute code, or create resources.
+     * 
+ * + * LOW = 4; + */ + LOW(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * This value is used for findings when a source doesn't write a severity
+     * value.
+     * 
+ * + * SEVERITY_UNSPECIFIED = 0; + */ + public static final int SEVERITY_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Vulnerability:
+     * A critical vulnerability is easily discoverable by an external actor,
+     * exploitable, and results in the direct ability to execute arbitrary code,
+     * exfiltrate data, and otherwise gain additional access and privileges to
+     * cloud resources and workloads. Examples include publicly accessible
+     * unprotected user data and public SSH access with weak or no
+     * passwords.
+     *
+     * Threat:
+     * Indicates a threat that is able to access, modify, or delete data or
+     * execute unauthorized code within existing resources.
+     * 
+ * + * CRITICAL = 1; + */ + public static final int CRITICAL_VALUE = 1; + /** + * + * + *
+     * Vulnerability:
+     * A high risk vulnerability can be easily discovered and exploited in
+     * combination with other vulnerabilities in order to gain direct access and
+     * the ability to execute arbitrary code, exfiltrate data, and otherwise
+     * gain additional access and privileges to cloud resources and workloads.
+     * An example is a database with weak or no passwords that is only
+     * accessible internally. This database could easily be compromised by an
+     * actor that had access to the internal network.
+     *
+     * Threat:
+     * Indicates a threat that is able to create new computational resources in
+     * an environment but not able to access data or execute code in existing
+     * resources.
+     * 
+ * + * HIGH = 2; + */ + public static final int HIGH_VALUE = 2; + /** + * + * + *
+     * Vulnerability:
+     * A medium risk vulnerability could be used by an actor to gain access to
+     * resources or privileges that enable them to eventually (through multiple
+     * steps or a complex exploit) gain access and the ability to execute
+     * arbitrary code or exfiltrate data. An example is a service account with
+     * access to more projects than it should have. If an actor gains access to
+     * the service account, they could potentially use that access to manipulate
+     * a project the service account was not intended to.
+     *
+     * Threat:
+     * Indicates a threat that is able to cause operational impact but may not
+     * access data or execute unauthorized code.
+     * 
+ * + * MEDIUM = 3; + */ + public static final int MEDIUM_VALUE = 3; + /** + * + * + *
+     * Vulnerability:
+     * A low risk vulnerability hampers a security organization's ability to
+     * detect vulnerabilities or active threats in their deployment, or prevents
+     * the root cause investigation of security issues. An example is monitoring
+     * and logs being disabled for resource configurations and access.
+     *
+     * Threat:
+     * Indicates a threat that has obtained minimal access to an environment but
+     * is not able to access data, execute code, or create resources.
+     * 
+ * + * LOW = 4; + */ + public static final int LOW_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 Severity 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 Severity forNumber(int value) { + switch (value) { + case 0: + return SEVERITY_UNSPECIFIED; + case 1: + return CRITICAL; + case 2: + return HIGH; + case 3: + return MEDIUM; + case 4: + return LOW; + 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 Severity findValueByNumber(int number) { + return Severity.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.v2.Finding.getDescriptor().getEnumTypes().get(1); + } + + private static final Severity[] VALUES = values(); + + public static Severity 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 Severity(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v2.Finding.Severity) + } + + /** + * + * + *
+   * Mute state a finding can be in.
+   * 
+ * + * Protobuf enum {@code google.cloud.securitycenter.v2.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 = 3; + */ + UNDEFINED(3), + 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 = 3; + */ + public static final int UNDEFINED_VALUE = 3; + + 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 3: + 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.v2.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.v2.Finding.Mute) + } + + /** + * + * + *
+   * Represents what kind of Finding it is.
+   * 
+ * + * Protobuf enum {@code google.cloud.securitycenter.v2.Finding.FindingClass} + */ + public enum FindingClass implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified finding class.
+     * 
+ * + * FINDING_CLASS_UNSPECIFIED = 0; + */ + FINDING_CLASS_UNSPECIFIED(0), + /** + * + * + *
+     * Describes unwanted or malicious activity.
+     * 
+ * + * THREAT = 1; + */ + THREAT(1), + /** + * + * + *
+     * Describes a potential weakness in software that increases risk to
+     * Confidentiality & Integrity & Availability.
+     * 
+ * + * VULNERABILITY = 2; + */ + VULNERABILITY(2), + /** + * + * + *
+     * Describes a potential weakness in cloud resource/asset configuration that
+     * increases risk.
+     * 
+ * + * MISCONFIGURATION = 3; + */ + MISCONFIGURATION(3), + /** + * + * + *
+     * Describes a security observation that is for informational purposes.
+     * 
+ * + * OBSERVATION = 4; + */ + OBSERVATION(4), + /** + * + * + *
+     * Describes an error that prevents some SCC functionality.
+     * 
+ * + * SCC_ERROR = 5; + */ + SCC_ERROR(5), + /** + * + * + *
+     * Describes a potential security risk due to a change in the security
+     * posture.
+     * 
+ * + * POSTURE_VIOLATION = 6; + */ + POSTURE_VIOLATION(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified finding class.
+     * 
+ * + * FINDING_CLASS_UNSPECIFIED = 0; + */ + public static final int FINDING_CLASS_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Describes unwanted or malicious activity.
+     * 
+ * + * THREAT = 1; + */ + public static final int THREAT_VALUE = 1; + /** + * + * + *
+     * Describes a potential weakness in software that increases risk to
+     * Confidentiality & Integrity & Availability.
+     * 
+ * + * VULNERABILITY = 2; + */ + public static final int VULNERABILITY_VALUE = 2; + /** + * + * + *
+     * Describes a potential weakness in cloud resource/asset configuration that
+     * increases risk.
+     * 
+ * + * MISCONFIGURATION = 3; + */ + public static final int MISCONFIGURATION_VALUE = 3; + /** + * + * + *
+     * Describes a security observation that is for informational purposes.
+     * 
+ * + * OBSERVATION = 4; + */ + public static final int OBSERVATION_VALUE = 4; + /** + * + * + *
+     * Describes an error that prevents some SCC functionality.
+     * 
+ * + * SCC_ERROR = 5; + */ + public static final int SCC_ERROR_VALUE = 5; + /** + * + * + *
+     * Describes a potential security risk due to a change in the security
+     * posture.
+     * 
+ * + * POSTURE_VIOLATION = 6; + */ + public static final int POSTURE_VIOLATION_VALUE = 6; + + 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 FindingClass 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 FindingClass forNumber(int value) { + switch (value) { + case 0: + return FINDING_CLASS_UNSPECIFIED; + case 1: + return THREAT; + case 2: + return VULNERABILITY; + case 3: + return MISCONFIGURATION; + case 4: + return OBSERVATION; + case 5: + return SCC_ERROR; + case 6: + return POSTURE_VIOLATION; + 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 FindingClass findValueByNumber(int number) { + return FindingClass.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.v2.Finding.getDescriptor().getEnumTypes().get(3); + } + + private static final FindingClass[] VALUES = values(); + + public static FindingClass 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 FindingClass(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v2.Finding.FindingClass) + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * The [relative resource
+   * name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
+   * of the finding. The following list shows some examples:
+   *
+   * +
+   * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`
+   * +
+   * `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+   * + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`
+   * +
+   * `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+   * + `projects/{project_id}/sources/{source_id}/findings/{finding_id}`
+   * +
+   * `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * The [relative resource
+   * name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
+   * of the finding. The following list shows some examples:
+   *
+   * +
+   * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`
+   * +
+   * `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+   * + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`
+   * +
+   * `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+   * + `projects/{project_id}/sources/{source_id}/findings/{finding_id}`
+   * +
+   * `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+   * 
+ * + * 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 CANONICAL_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object canonicalName_ = ""; + /** + * + * + *
+   * Output only. The canonical name of the finding. The following list shows
+   * some examples:
+   *
+   * +
+   * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`
+   * +
+   * `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+   * + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`
+   * +
+   * `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+   * + `projects/{project_id}/sources/{source_id}/findings/{finding_id}`
+   * +
+   * `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+   *
+   * The prefix is the closest CRM ancestor of the resource associated with the
+   * finding.
+   * 
+ * + * string canonical_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The canonicalName. + */ + @java.lang.Override + public java.lang.String getCanonicalName() { + java.lang.Object ref = canonicalName_; + 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(); + canonicalName_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The canonical name of the finding. The following list shows
+   * some examples:
+   *
+   * +
+   * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`
+   * +
+   * `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+   * + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`
+   * +
+   * `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+   * + `projects/{project_id}/sources/{source_id}/findings/{finding_id}`
+   * +
+   * `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+   *
+   * The prefix is the closest CRM ancestor of the resource associated with the
+   * finding.
+   * 
+ * + * string canonical_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for canonicalName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCanonicalNameBytes() { + java.lang.Object ref = canonicalName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + canonicalName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARENT_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * The relative resource name of the source and location the finding belongs
+   * to. See:
+   * https://cloud.google.com/apis/design/resource_names#relative_resource_name
+   * This field is immutable after creation time. The following list shows some
+   * examples:
+   *
+   * + `organizations/{organization_id}/sources/{source_id}`
+   * + `folders/{folders_id}/sources/{source_id}`
+   * + `projects/{projects_id}/sources/{source_id}`
+   * +
+   * `organizations/{organization_id}/sources/{source_id}/locations/{location_id}`
+   * + `folders/{folders_id}/sources/{source_id}/locations/{location_id}`
+   * + `projects/{projects_id}/sources/{source_id}/locations/{location_id}`
+   * 
+ * + * string parent = 3; + * + * @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; + } + } + /** + * + * + *
+   * The relative resource name of the source and location the finding belongs
+   * to. See:
+   * https://cloud.google.com/apis/design/resource_names#relative_resource_name
+   * This field is immutable after creation time. The following list shows some
+   * examples:
+   *
+   * + `organizations/{organization_id}/sources/{source_id}`
+   * + `folders/{folders_id}/sources/{source_id}`
+   * + `projects/{projects_id}/sources/{source_id}`
+   * +
+   * `organizations/{organization_id}/sources/{source_id}/locations/{location_id}`
+   * + `folders/{folders_id}/sources/{source_id}/locations/{location_id}`
+   * + `projects/{projects_id}/sources/{source_id}/locations/{location_id}`
+   * 
+ * + * string parent = 3; + * + * @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 RESOURCE_NAME_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object resourceName_ = ""; + /** + * + * + *
+   * Immutable. For findings on Google Cloud resources, the full resource
+   * name of the Google Cloud resource this finding is for. See:
+   * https://cloud.google.com/apis/design/resource_names#full_resource_name
+   * When the finding is for a non-Google Cloud resource, the resourceName can
+   * be a customer or partner defined string.
+   * 
+ * + * string resource_name = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The resourceName. + */ + @java.lang.Override + public java.lang.String getResourceName() { + java.lang.Object ref = resourceName_; + 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(); + resourceName_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. For findings on Google Cloud resources, the full resource
+   * name of the Google Cloud resource this finding is for. See:
+   * https://cloud.google.com/apis/design/resource_names#full_resource_name
+   * When the finding is for a non-Google Cloud resource, the resourceName can
+   * be a customer or partner defined string.
+   * 
+ * + * string resource_name = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for resourceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceNameBytes() { + java.lang.Object ref = resourceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 6; + private int state_ = 0; + /** + * + * + *
+   * Output only. The state of the finding.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.Finding.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The state of the finding.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.Finding.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Finding.State getState() { + com.google.cloud.securitycenter.v2.Finding.State result = + com.google.cloud.securitycenter.v2.Finding.State.forNumber(state_); + return result == null ? com.google.cloud.securitycenter.v2.Finding.State.UNRECOGNIZED : result; + } + + public static final int CATEGORY_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object category_ = ""; + /** + * + * + *
+   * Immutable. The additional taxonomy group within findings from a given
+   * source. Example: "XSS_FLASH_INJECTION"
+   * 
+ * + * string category = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The category. + */ + @java.lang.Override + public java.lang.String getCategory() { + java.lang.Object ref = category_; + 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(); + category_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. The additional taxonomy group within findings from a given
+   * source. Example: "XSS_FLASH_INJECTION"
+   * 
+ * + * string category = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for category. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCategoryBytes() { + java.lang.Object ref = category_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + category_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXTERNAL_URI_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object externalUri_ = ""; + /** + * + * + *
+   * The URI that, if available, points to a web page outside of Security
+   * Command Center where additional information about the finding can be found.
+   * This field is guaranteed to be either empty or a well formed URL.
+   * 
+ * + * string external_uri = 8; + * + * @return The externalUri. + */ + @java.lang.Override + public java.lang.String getExternalUri() { + java.lang.Object ref = externalUri_; + 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(); + externalUri_ = s; + return s; + } + } + /** + * + * + *
+   * The URI that, if available, points to a web page outside of Security
+   * Command Center where additional information about the finding can be found.
+   * This field is guaranteed to be either empty or a well formed URL.
+   * 
+ * + * string external_uri = 8; + * + * @return The bytes for externalUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExternalUriBytes() { + java.lang.Object ref = externalUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_PROPERTIES_FIELD_NUMBER = 9; + + private static final class SourcePropertiesDefaultEntryHolder { + static final com.google.protobuf.MapEntry + defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.securitycenter.v2.FindingProto + .internal_static_google_cloud_securitycenter_v2_Finding_SourcePropertiesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.protobuf.Value.getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField + sourceProperties_; + + private com.google.protobuf.MapField + internalGetSourceProperties() { + if (sourceProperties_ == null) { + return com.google.protobuf.MapField.emptyMapField( + SourcePropertiesDefaultEntryHolder.defaultEntry); + } + return sourceProperties_; + } + + public int getSourcePropertiesCount() { + return internalGetSourceProperties().getMap().size(); + } + /** + * + * + *
+   * Source specific properties. These properties are managed by the source
+   * that writes the finding. The key names in the source_properties map must be
+   * between 1 and 255 characters, and must start with a letter and contain
+   * alphanumeric characters or underscores only.
+   * 
+ * + * map<string, .google.protobuf.Value> source_properties = 9; + */ + @java.lang.Override + public boolean containsSourceProperties(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetSourceProperties().getMap().containsKey(key); + } + /** Use {@link #getSourcePropertiesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getSourceProperties() { + return getSourcePropertiesMap(); + } + /** + * + * + *
+   * Source specific properties. These properties are managed by the source
+   * that writes the finding. The key names in the source_properties map must be
+   * between 1 and 255 characters, and must start with a letter and contain
+   * alphanumeric characters or underscores only.
+   * 
+ * + * map<string, .google.protobuf.Value> source_properties = 9; + */ + @java.lang.Override + public java.util.Map getSourcePropertiesMap() { + return internalGetSourceProperties().getMap(); + } + /** + * + * + *
+   * Source specific properties. These properties are managed by the source
+   * that writes the finding. The key names in the source_properties map must be
+   * between 1 and 255 characters, and must start with a letter and contain
+   * alphanumeric characters or underscores only.
+   * 
+ * + * map<string, .google.protobuf.Value> source_properties = 9; + */ + @java.lang.Override + public /* nullable */ com.google.protobuf.Value getSourcePropertiesOrDefault( + java.lang.String key, + /* nullable */ + com.google.protobuf.Value defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetSourceProperties().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Source specific properties. These properties are managed by the source
+   * that writes the finding. The key names in the source_properties map must be
+   * between 1 and 255 characters, and must start with a letter and contain
+   * alphanumeric characters or underscores only.
+   * 
+ * + * map<string, .google.protobuf.Value> source_properties = 9; + */ + @java.lang.Override + public com.google.protobuf.Value getSourcePropertiesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetSourceProperties().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int SECURITY_MARKS_FIELD_NUMBER = 10; + private com.google.cloud.securitycenter.v2.SecurityMarks securityMarks_; + /** + * + * + *
+   * Output only. User specified security marks. These marks are entirely
+   * managed by the user and come from the SecurityMarks resource that belongs
+   * to the finding.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.SecurityMarks security_marks = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the securityMarks field is set. + */ + @java.lang.Override + public boolean hasSecurityMarks() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. User specified security marks. These marks are entirely
+   * managed by the user and come from the SecurityMarks resource that belongs
+   * to the finding.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.SecurityMarks security_marks = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The securityMarks. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.SecurityMarks getSecurityMarks() { + return securityMarks_ == null + ? com.google.cloud.securitycenter.v2.SecurityMarks.getDefaultInstance() + : securityMarks_; + } + /** + * + * + *
+   * Output only. User specified security marks. These marks are entirely
+   * managed by the user and come from the SecurityMarks resource that belongs
+   * to the finding.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.SecurityMarks security_marks = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.SecurityMarksOrBuilder getSecurityMarksOrBuilder() { + return securityMarks_ == null + ? com.google.cloud.securitycenter.v2.SecurityMarks.getDefaultInstance() + : securityMarks_; + } + + public static final int EVENT_TIME_FIELD_NUMBER = 11; + private com.google.protobuf.Timestamp eventTime_; + /** + * + * + *
+   * The time the finding was first detected. If an existing finding is updated,
+   * then this is the time the update occurred.
+   * For example, if the finding represents an open firewall, this property
+   * captures the time the detector believes the firewall became open. The
+   * accuracy is determined by the detector. If the finding is later resolved,
+   * then this time reflects when the finding was resolved. This must not
+   * be set to a value greater than the current timestamp.
+   * 
+ * + * .google.protobuf.Timestamp event_time = 11; + * + * @return Whether the eventTime field is set. + */ + @java.lang.Override + public boolean hasEventTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * The time the finding was first detected. If an existing finding is updated,
+   * then this is the time the update occurred.
+   * For example, if the finding represents an open firewall, this property
+   * captures the time the detector believes the firewall became open. The
+   * accuracy is determined by the detector. If the finding is later resolved,
+   * then this time reflects when the finding was resolved. This must not
+   * be set to a value greater than the current timestamp.
+   * 
+ * + * .google.protobuf.Timestamp event_time = 11; + * + * @return The eventTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEventTime() { + return eventTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : eventTime_; + } + /** + * + * + *
+   * The time the finding was first detected. If an existing finding is updated,
+   * then this is the time the update occurred.
+   * For example, if the finding represents an open firewall, this property
+   * captures the time the detector believes the firewall became open. The
+   * accuracy is determined by the detector. If the finding is later resolved,
+   * then this time reflects when the finding was resolved. This must not
+   * be set to a value greater than the current timestamp.
+   * 
+ * + * .google.protobuf.Timestamp event_time = 11; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEventTimeOrBuilder() { + return eventTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : eventTime_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 12; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time at which the finding was created in Security Command
+   * Center.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Output only. The time at which the finding was created in Security Command
+   * Center.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 12 [(.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 finding was created in Security Command
+   * Center.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int SEVERITY_FIELD_NUMBER = 14; + private int severity_ = 0; + /** + * + * + *
+   * The severity of the finding. This field is managed by the source that
+   * writes the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.Finding.Severity severity = 14; + * + * @return The enum numeric value on the wire for severity. + */ + @java.lang.Override + public int getSeverityValue() { + return severity_; + } + /** + * + * + *
+   * The severity of the finding. This field is managed by the source that
+   * writes the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.Finding.Severity severity = 14; + * + * @return The severity. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Finding.Severity getSeverity() { + com.google.cloud.securitycenter.v2.Finding.Severity result = + com.google.cloud.securitycenter.v2.Finding.Severity.forNumber(severity_); + return result == null + ? com.google.cloud.securitycenter.v2.Finding.Severity.UNRECOGNIZED + : result; + } + + public static final int MUTE_FIELD_NUMBER = 15; + private int mute_ = 0; + /** + * + * + *
+   * Indicates the mute state of a finding (either muted, unmuted
+   * or undefined). Unlike other attributes of a finding, a finding provider
+   * shouldn't set the value of mute.
+   * 
+ * + * .google.cloud.securitycenter.v2.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 muted, unmuted
+   * or undefined). Unlike other attributes of a finding, a finding provider
+   * shouldn't set the value of mute.
+   * 
+ * + * .google.cloud.securitycenter.v2.Finding.Mute mute = 15; + * + * @return The mute. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Finding.Mute getMute() { + com.google.cloud.securitycenter.v2.Finding.Mute result = + com.google.cloud.securitycenter.v2.Finding.Mute.forNumber(mute_); + return result == null ? com.google.cloud.securitycenter.v2.Finding.Mute.UNRECOGNIZED : result; + } + + public static final int FINDING_CLASS_FIELD_NUMBER = 16; + private int findingClass_ = 0; + /** + * + * + *
+   * The class of the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.Finding.FindingClass finding_class = 16; + * + * @return The enum numeric value on the wire for findingClass. + */ + @java.lang.Override + public int getFindingClassValue() { + return findingClass_; + } + /** + * + * + *
+   * The class of the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.Finding.FindingClass finding_class = 16; + * + * @return The findingClass. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Finding.FindingClass getFindingClass() { + com.google.cloud.securitycenter.v2.Finding.FindingClass result = + com.google.cloud.securitycenter.v2.Finding.FindingClass.forNumber(findingClass_); + return result == null + ? com.google.cloud.securitycenter.v2.Finding.FindingClass.UNRECOGNIZED + : result; + } + + public static final int INDICATOR_FIELD_NUMBER = 17; + private com.google.cloud.securitycenter.v2.Indicator indicator_; + /** + * + * + *
+   * Represents what's commonly known as an *indicator of compromise* (IoC) in
+   * computer forensics. This is an artifact observed on a network or in an
+   * operating system that, with high confidence, indicates a computer
+   * intrusion. For more information, see [Indicator of
+   * compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise).
+   * 
+ * + * .google.cloud.securitycenter.v2.Indicator indicator = 17; + * + * @return Whether the indicator field is set. + */ + @java.lang.Override + public boolean hasIndicator() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * Represents what's commonly known as an *indicator of compromise* (IoC) in
+   * computer forensics. This is an artifact observed on a network or in an
+   * operating system that, with high confidence, indicates a computer
+   * intrusion. For more information, see [Indicator of
+   * compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise).
+   * 
+ * + * .google.cloud.securitycenter.v2.Indicator indicator = 17; + * + * @return The indicator. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Indicator getIndicator() { + return indicator_ == null + ? com.google.cloud.securitycenter.v2.Indicator.getDefaultInstance() + : indicator_; + } + /** + * + * + *
+   * Represents what's commonly known as an *indicator of compromise* (IoC) in
+   * computer forensics. This is an artifact observed on a network or in an
+   * operating system that, with high confidence, indicates a computer
+   * intrusion. For more information, see [Indicator of
+   * compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise).
+   * 
+ * + * .google.cloud.securitycenter.v2.Indicator indicator = 17; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.IndicatorOrBuilder getIndicatorOrBuilder() { + return indicator_ == null + ? com.google.cloud.securitycenter.v2.Indicator.getDefaultInstance() + : indicator_; + } + + public static final int VULNERABILITY_FIELD_NUMBER = 18; + private com.google.cloud.securitycenter.v2.Vulnerability vulnerability_; + /** + * + * + *
+   * Represents vulnerability-specific fields like CVE and CVSS scores.
+   * CVE stands for Common Vulnerabilities and Exposures
+   * (https://cve.mitre.org/about/)
+   * 
+ * + * .google.cloud.securitycenter.v2.Vulnerability vulnerability = 18; + * + * @return Whether the vulnerability field is set. + */ + @java.lang.Override + public boolean hasVulnerability() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+   * Represents vulnerability-specific fields like CVE and CVSS scores.
+   * CVE stands for Common Vulnerabilities and Exposures
+   * (https://cve.mitre.org/about/)
+   * 
+ * + * .google.cloud.securitycenter.v2.Vulnerability vulnerability = 18; + * + * @return The vulnerability. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Vulnerability getVulnerability() { + return vulnerability_ == null + ? com.google.cloud.securitycenter.v2.Vulnerability.getDefaultInstance() + : vulnerability_; + } + /** + * + * + *
+   * Represents vulnerability-specific fields like CVE and CVSS scores.
+   * CVE stands for Common Vulnerabilities and Exposures
+   * (https://cve.mitre.org/about/)
+   * 
+ * + * .google.cloud.securitycenter.v2.Vulnerability vulnerability = 18; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.VulnerabilityOrBuilder getVulnerabilityOrBuilder() { + return vulnerability_ == null + ? com.google.cloud.securitycenter.v2.Vulnerability.getDefaultInstance() + : vulnerability_; + } + + public static final int MUTE_UPDATE_TIME_FIELD_NUMBER = 19; + private com.google.protobuf.Timestamp muteUpdateTime_; + /** + * + * + *
+   * Output only. The most recent time this finding was muted or unmuted.
+   * 
+ * + * + * .google.protobuf.Timestamp mute_update_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the muteUpdateTime field is set. + */ + @java.lang.Override + public boolean hasMuteUpdateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+   * Output only. The most recent time this finding was muted or unmuted.
+   * 
+ * + * + * .google.protobuf.Timestamp mute_update_time = 19 [(.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 = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getMuteUpdateTimeOrBuilder() { + return muteUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : muteUpdateTime_; + } + + public static final int EXTERNAL_SYSTEMS_FIELD_NUMBER = 20; + + private static final class ExternalSystemsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.securitycenter.v2.ExternalSystem> + defaultEntry = + com.google.protobuf.MapEntry + . + newDefaultInstance( + com.google.cloud.securitycenter.v2.FindingProto + .internal_static_google_cloud_securitycenter_v2_Finding_ExternalSystemsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.securitycenter.v2.ExternalSystem.getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.securitycenter.v2.ExternalSystem> + externalSystems_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.securitycenter.v2.ExternalSystem> + internalGetExternalSystems() { + if (externalSystems_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ExternalSystemsDefaultEntryHolder.defaultEntry); + } + 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.v2.ExternalSystem> external_systems = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsExternalSystems(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + 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.v2.ExternalSystem> external_systems = 20 [(.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.v2.ExternalSystem> external_systems = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public /* nullable */ com.google.cloud.securitycenter.v2.ExternalSystem + getExternalSystemsOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.securitycenter.v2.ExternalSystem defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + 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.v2.ExternalSystem> external_systems = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.ExternalSystem getExternalSystemsOrThrow( + java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetExternalSystems().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int MITRE_ATTACK_FIELD_NUMBER = 21; + private com.google.cloud.securitycenter.v2.MitreAttack mitreAttack_; + /** + * + * + *
+   * MITRE ATT&CK tactics and techniques related to this finding.
+   * See: https://attack.mitre.org
+   * 
+ * + * .google.cloud.securitycenter.v2.MitreAttack mitre_attack = 21; + * + * @return Whether the mitreAttack field is set. + */ + @java.lang.Override + public boolean hasMitreAttack() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+   * MITRE ATT&CK tactics and techniques related to this finding.
+   * See: https://attack.mitre.org
+   * 
+ * + * .google.cloud.securitycenter.v2.MitreAttack mitre_attack = 21; + * + * @return The mitreAttack. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.MitreAttack getMitreAttack() { + return mitreAttack_ == null + ? com.google.cloud.securitycenter.v2.MitreAttack.getDefaultInstance() + : mitreAttack_; + } + /** + * + * + *
+   * MITRE ATT&CK tactics and techniques related to this finding.
+   * See: https://attack.mitre.org
+   * 
+ * + * .google.cloud.securitycenter.v2.MitreAttack mitre_attack = 21; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.MitreAttackOrBuilder getMitreAttackOrBuilder() { + return mitreAttack_ == null + ? com.google.cloud.securitycenter.v2.MitreAttack.getDefaultInstance() + : mitreAttack_; + } + + public static final int ACCESS_FIELD_NUMBER = 22; + private com.google.cloud.securitycenter.v2.Access access_; + /** + * + * + *
+   * Access details associated with the finding, such as more information on the
+   * caller, which method was accessed, and from where.
+   * 
+ * + * .google.cloud.securitycenter.v2.Access access = 22; + * + * @return Whether the access field is set. + */ + @java.lang.Override + public boolean hasAccess() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+   * Access details associated with the finding, such as more information on the
+   * caller, which method was accessed, and from where.
+   * 
+ * + * .google.cloud.securitycenter.v2.Access access = 22; + * + * @return The access. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Access getAccess() { + return access_ == null + ? com.google.cloud.securitycenter.v2.Access.getDefaultInstance() + : access_; + } + /** + * + * + *
+   * Access details associated with the finding, such as more information on the
+   * caller, which method was accessed, and from where.
+   * 
+ * + * .google.cloud.securitycenter.v2.Access access = 22; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.AccessOrBuilder getAccessOrBuilder() { + return access_ == null + ? com.google.cloud.securitycenter.v2.Access.getDefaultInstance() + : access_; + } + + public static final int CONNECTIONS_FIELD_NUMBER = 23; + + @SuppressWarnings("serial") + private java.util.List connections_; + /** + * + * + *
+   * Contains information about the IP connection associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Connection connections = 23; + */ + @java.lang.Override + public java.util.List getConnectionsList() { + return connections_; + } + /** + * + * + *
+   * Contains information about the IP connection associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Connection connections = 23; + */ + @java.lang.Override + public java.util.List + getConnectionsOrBuilderList() { + return connections_; + } + /** + * + * + *
+   * Contains information about the IP connection associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Connection connections = 23; + */ + @java.lang.Override + public int getConnectionsCount() { + return connections_.size(); + } + /** + * + * + *
+   * Contains information about the IP connection associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Connection connections = 23; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Connection getConnections(int index) { + return connections_.get(index); + } + /** + * + * + *
+   * Contains information about the IP connection associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Connection connections = 23; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.ConnectionOrBuilder getConnectionsOrBuilder(int index) { + return connections_.get(index); + } + + public static final int MUTE_INITIATOR_FIELD_NUMBER = 24; + + @SuppressWarnings("serial") + private volatile java.lang.Object muteInitiator_ = ""; + /** + * + * + *
+   * Records additional information about the mute operation, for example, the
+   * [mute
+   * configuration](https://cloud.google.com/security-command-center/docs/how-to-mute-findings)
+   * that muted the finding and the user who muted the finding.
+   * 
+ * + * string mute_initiator = 24; + * + * @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; + } + } + /** + * + * + *
+   * Records additional information about the mute operation, for example, the
+   * [mute
+   * configuration](https://cloud.google.com/security-command-center/docs/how-to-mute-findings)
+   * that muted the finding and the user who muted the finding.
+   * 
+ * + * string mute_initiator = 24; + * + * @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; + } + } + + public static final int PROCESSES_FIELD_NUMBER = 25; + + @SuppressWarnings("serial") + private java.util.List processes_; + /** + * + * + *
+   * Represents operating system processes associated with the Finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Process processes = 25; + */ + @java.lang.Override + public java.util.List getProcessesList() { + return processes_; + } + /** + * + * + *
+   * Represents operating system processes associated with the Finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Process processes = 25; + */ + @java.lang.Override + public java.util.List + getProcessesOrBuilderList() { + return processes_; + } + /** + * + * + *
+   * Represents operating system processes associated with the Finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Process processes = 25; + */ + @java.lang.Override + public int getProcessesCount() { + return processes_.size(); + } + /** + * + * + *
+   * Represents operating system processes associated with the Finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Process processes = 25; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Process getProcesses(int index) { + return processes_.get(index); + } + /** + * + * + *
+   * Represents operating system processes associated with the Finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Process processes = 25; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.ProcessOrBuilder getProcessesOrBuilder(int index) { + return processes_.get(index); + } + + public static final int CONTACTS_FIELD_NUMBER = 26; + + private static final class ContactsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.securitycenter.v2.ContactDetails> + defaultEntry = + com.google.protobuf.MapEntry + . + newDefaultInstance( + com.google.cloud.securitycenter.v2.FindingProto + .internal_static_google_cloud_securitycenter_v2_Finding_ContactsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.securitycenter.v2.ContactDetails.getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.securitycenter.v2.ContactDetails> + contacts_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.securitycenter.v2.ContactDetails> + internalGetContacts() { + if (contacts_ == null) { + return com.google.protobuf.MapField.emptyMapField(ContactsDefaultEntryHolder.defaultEntry); + } + return contacts_; + } + + public int getContactsCount() { + return internalGetContacts().getMap().size(); + } + /** + * + * + *
+   * Output only. Map containing the points of contact for the given finding.
+   * The key represents the type of contact, while the value contains a list of
+   * all the contacts that pertain. Please refer to:
+   * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
+   *
+   *     {
+   *       "security": {
+   *         "contacts": [
+   *           {
+   *             "email": "person1@company.com"
+   *           },
+   *           {
+   *             "email": "person2@company.com"
+   *           }
+   *         ]
+   *       }
+   *     }
+   * 
+ * + * + * map<string, .google.cloud.securitycenter.v2.ContactDetails> contacts = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsContacts(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetContacts().getMap().containsKey(key); + } + /** Use {@link #getContactsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getContacts() { + return getContactsMap(); + } + /** + * + * + *
+   * Output only. Map containing the points of contact for the given finding.
+   * The key represents the type of contact, while the value contains a list of
+   * all the contacts that pertain. Please refer to:
+   * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
+   *
+   *     {
+   *       "security": {
+   *         "contacts": [
+   *           {
+   *             "email": "person1@company.com"
+   *           },
+   *           {
+   *             "email": "person2@company.com"
+   *           }
+   *         ]
+   *       }
+   *     }
+   * 
+ * + * + * map<string, .google.cloud.securitycenter.v2.ContactDetails> contacts = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map + getContactsMap() { + return internalGetContacts().getMap(); + } + /** + * + * + *
+   * Output only. Map containing the points of contact for the given finding.
+   * The key represents the type of contact, while the value contains a list of
+   * all the contacts that pertain. Please refer to:
+   * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
+   *
+   *     {
+   *       "security": {
+   *         "contacts": [
+   *           {
+   *             "email": "person1@company.com"
+   *           },
+   *           {
+   *             "email": "person2@company.com"
+   *           }
+   *         ]
+   *       }
+   *     }
+   * 
+ * + * + * map<string, .google.cloud.securitycenter.v2.ContactDetails> contacts = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public /* nullable */ com.google.cloud.securitycenter.v2.ContactDetails getContactsOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.securitycenter.v2.ContactDetails defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetContacts().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Output only. Map containing the points of contact for the given finding.
+   * The key represents the type of contact, while the value contains a list of
+   * all the contacts that pertain. Please refer to:
+   * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
+   *
+   *     {
+   *       "security": {
+   *         "contacts": [
+   *           {
+   *             "email": "person1@company.com"
+   *           },
+   *           {
+   *             "email": "person2@company.com"
+   *           }
+   *         ]
+   *       }
+   *     }
+   * 
+ * + * + * map<string, .google.cloud.securitycenter.v2.ContactDetails> contacts = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.ContactDetails getContactsOrThrow( + java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetContacts().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int COMPLIANCES_FIELD_NUMBER = 27; + + @SuppressWarnings("serial") + private java.util.List compliances_; + /** + * + * + *
+   * Contains compliance information for security standards associated to the
+   * finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Compliance compliances = 27; + */ + @java.lang.Override + public java.util.List getCompliancesList() { + return compliances_; + } + /** + * + * + *
+   * Contains compliance information for security standards associated to the
+   * finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Compliance compliances = 27; + */ + @java.lang.Override + public java.util.List + getCompliancesOrBuilderList() { + return compliances_; + } + /** + * + * + *
+   * Contains compliance information for security standards associated to the
+   * finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Compliance compliances = 27; + */ + @java.lang.Override + public int getCompliancesCount() { + return compliances_.size(); + } + /** + * + * + *
+   * Contains compliance information for security standards associated to the
+   * finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Compliance compliances = 27; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Compliance getCompliances(int index) { + return compliances_.get(index); + } + /** + * + * + *
+   * Contains compliance information for security standards associated to the
+   * finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Compliance compliances = 27; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.ComplianceOrBuilder getCompliancesOrBuilder(int index) { + return compliances_.get(index); + } + + public static final int PARENT_DISPLAY_NAME_FIELD_NUMBER = 29; + + @SuppressWarnings("serial") + private volatile java.lang.Object parentDisplayName_ = ""; + /** + * + * + *
+   * Output only. The human readable display name of the finding source such as
+   * "Event Threat Detection" or "Security Health Analytics".
+   * 
+ * + * string parent_display_name = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The parentDisplayName. + */ + @java.lang.Override + public java.lang.String getParentDisplayName() { + java.lang.Object ref = parentDisplayName_; + 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(); + parentDisplayName_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The human readable display name of the finding source such as
+   * "Event Threat Detection" or "Security Health Analytics".
+   * 
+ * + * string parent_display_name = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for parentDisplayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentDisplayNameBytes() { + java.lang.Object ref = parentDisplayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parentDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 30; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Contains more details about the finding.
+   * 
+ * + * string description = 30; + * + * @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; + } + } + /** + * + * + *
+   * Contains more details about the finding.
+   * 
+ * + * string description = 30; + * + * @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 EXFILTRATION_FIELD_NUMBER = 31; + private com.google.cloud.securitycenter.v2.Exfiltration exfiltration_; + /** + * + * + *
+   * Represents exfiltrations associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.Exfiltration exfiltration = 31; + * + * @return Whether the exfiltration field is set. + */ + @java.lang.Override + public boolean hasExfiltration() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+   * Represents exfiltrations associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.Exfiltration exfiltration = 31; + * + * @return The exfiltration. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Exfiltration getExfiltration() { + return exfiltration_ == null + ? com.google.cloud.securitycenter.v2.Exfiltration.getDefaultInstance() + : exfiltration_; + } + /** + * + * + *
+   * Represents exfiltrations associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.Exfiltration exfiltration = 31; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.ExfiltrationOrBuilder getExfiltrationOrBuilder() { + return exfiltration_ == null + ? com.google.cloud.securitycenter.v2.Exfiltration.getDefaultInstance() + : exfiltration_; + } + + public static final int IAM_BINDINGS_FIELD_NUMBER = 32; + + @SuppressWarnings("serial") + private java.util.List iamBindings_; + /** + * + * + *
+   * Represents IAM bindings associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.IamBinding iam_bindings = 32; + */ + @java.lang.Override + public java.util.List getIamBindingsList() { + return iamBindings_; + } + /** + * + * + *
+   * Represents IAM bindings associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.IamBinding iam_bindings = 32; + */ + @java.lang.Override + public java.util.List + getIamBindingsOrBuilderList() { + return iamBindings_; + } + /** + * + * + *
+   * Represents IAM bindings associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.IamBinding iam_bindings = 32; + */ + @java.lang.Override + public int getIamBindingsCount() { + return iamBindings_.size(); + } + /** + * + * + *
+   * Represents IAM bindings associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.IamBinding iam_bindings = 32; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.IamBinding getIamBindings(int index) { + return iamBindings_.get(index); + } + /** + * + * + *
+   * Represents IAM bindings associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.IamBinding iam_bindings = 32; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.IamBindingOrBuilder getIamBindingsOrBuilder(int index) { + return iamBindings_.get(index); + } + + public static final int NEXT_STEPS_FIELD_NUMBER = 33; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextSteps_ = ""; + /** + * + * + *
+   * Steps to address the finding.
+   * 
+ * + * string next_steps = 33; + * + * @return The nextSteps. + */ + @java.lang.Override + public java.lang.String getNextSteps() { + java.lang.Object ref = nextSteps_; + 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(); + nextSteps_ = s; + return s; + } + } + /** + * + * + *
+   * Steps to address the finding.
+   * 
+ * + * string next_steps = 33; + * + * @return The bytes for nextSteps. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextStepsBytes() { + java.lang.Object ref = nextSteps_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextSteps_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MODULE_NAME_FIELD_NUMBER = 34; + + @SuppressWarnings("serial") + private volatile java.lang.Object moduleName_ = ""; + /** + * + * + *
+   * Unique identifier of the module which generated the finding.
+   * Example:
+   * folders/598186756061/securityHealthAnalyticsSettings/customModules/56799441161885
+   * 
+ * + * string module_name = 34; + * + * @return The moduleName. + */ + @java.lang.Override + public java.lang.String getModuleName() { + java.lang.Object ref = moduleName_; + 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(); + moduleName_ = s; + return s; + } + } + /** + * + * + *
+   * Unique identifier of the module which generated the finding.
+   * Example:
+   * folders/598186756061/securityHealthAnalyticsSettings/customModules/56799441161885
+   * 
+ * + * string module_name = 34; + * + * @return The bytes for moduleName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModuleNameBytes() { + java.lang.Object ref = moduleName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + moduleName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTAINERS_FIELD_NUMBER = 35; + + @SuppressWarnings("serial") + private java.util.List containers_; + /** + * + * + *
+   * Containers associated with the finding. This field provides information for
+   * both Kubernetes and non-Kubernetes containers.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 35; + */ + @java.lang.Override + public java.util.List getContainersList() { + return containers_; + } + /** + * + * + *
+   * Containers associated with the finding. This field provides information for
+   * both Kubernetes and non-Kubernetes containers.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 35; + */ + @java.lang.Override + public java.util.List + getContainersOrBuilderList() { + return containers_; + } + /** + * + * + *
+   * Containers associated with the finding. This field provides information for
+   * both Kubernetes and non-Kubernetes containers.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 35; + */ + @java.lang.Override + public int getContainersCount() { + return containers_.size(); + } + /** + * + * + *
+   * Containers associated with the finding. This field provides information for
+   * both Kubernetes and non-Kubernetes containers.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 35; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Container getContainers(int index) { + return containers_.get(index); + } + /** + * + * + *
+   * Containers associated with the finding. This field provides information for
+   * both Kubernetes and non-Kubernetes containers.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 35; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.ContainerOrBuilder getContainersOrBuilder(int index) { + return containers_.get(index); + } + + public static final int KUBERNETES_FIELD_NUMBER = 36; + private com.google.cloud.securitycenter.v2.Kubernetes kubernetes_; + /** + * + * + *
+   * Kubernetes resources associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes kubernetes = 36; + * + * @return Whether the kubernetes field is set. + */ + @java.lang.Override + public boolean hasKubernetes() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * + * + *
+   * Kubernetes resources associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes kubernetes = 36; + * + * @return The kubernetes. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes getKubernetes() { + return kubernetes_ == null + ? com.google.cloud.securitycenter.v2.Kubernetes.getDefaultInstance() + : kubernetes_; + } + /** + * + * + *
+   * Kubernetes resources associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes kubernetes = 36; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.KubernetesOrBuilder getKubernetesOrBuilder() { + return kubernetes_ == null + ? com.google.cloud.securitycenter.v2.Kubernetes.getDefaultInstance() + : kubernetes_; + } + + public static final int DATABASE_FIELD_NUMBER = 37; + private com.google.cloud.securitycenter.v2.Database database_; + /** + * + * + *
+   * Database associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.Database database = 37; + * + * @return Whether the database field is set. + */ + @java.lang.Override + public boolean hasDatabase() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * + * + *
+   * Database associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.Database database = 37; + * + * @return The database. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Database getDatabase() { + return database_ == null + ? com.google.cloud.securitycenter.v2.Database.getDefaultInstance() + : database_; + } + /** + * + * + *
+   * Database associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.Database database = 37; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.DatabaseOrBuilder getDatabaseOrBuilder() { + return database_ == null + ? com.google.cloud.securitycenter.v2.Database.getDefaultInstance() + : database_; + } + + public static final int ATTACK_EXPOSURE_FIELD_NUMBER = 38; + private com.google.cloud.securitycenter.v2.AttackExposure attackExposure_; + /** + * + * + *
+   * The results of an attack path simulation relevant to this finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.AttackExposure attack_exposure = 38; + * + * @return Whether the attackExposure field is set. + */ + @java.lang.Override + public boolean hasAttackExposure() { + return ((bitField0_ & 0x00000800) != 0); + } + /** + * + * + *
+   * The results of an attack path simulation relevant to this finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.AttackExposure attack_exposure = 38; + * + * @return The attackExposure. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.AttackExposure getAttackExposure() { + return attackExposure_ == null + ? com.google.cloud.securitycenter.v2.AttackExposure.getDefaultInstance() + : attackExposure_; + } + /** + * + * + *
+   * The results of an attack path simulation relevant to this finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.AttackExposure attack_exposure = 38; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.AttackExposureOrBuilder getAttackExposureOrBuilder() { + return attackExposure_ == null + ? com.google.cloud.securitycenter.v2.AttackExposure.getDefaultInstance() + : attackExposure_; + } + + public static final int FILES_FIELD_NUMBER = 39; + + @SuppressWarnings("serial") + private java.util.List files_; + /** + * + * + *
+   * File associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.File files = 39; + */ + @java.lang.Override + public java.util.List getFilesList() { + return files_; + } + /** + * + * + *
+   * File associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.File files = 39; + */ + @java.lang.Override + public java.util.List + getFilesOrBuilderList() { + return files_; + } + /** + * + * + *
+   * File associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.File files = 39; + */ + @java.lang.Override + public int getFilesCount() { + return files_.size(); + } + /** + * + * + *
+   * File associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.File files = 39; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.File getFiles(int index) { + return files_.get(index); + } + /** + * + * + *
+   * File associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.File files = 39; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.FileOrBuilder getFilesOrBuilder(int index) { + return files_.get(index); + } + + public static final int CLOUD_DLP_INSPECTION_FIELD_NUMBER = 40; + private com.google.cloud.securitycenter.v2.CloudDlpInspection cloudDlpInspection_; + /** + * + * + *
+   * Cloud Data Loss Prevention (Cloud DLP) inspection results that are
+   * associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpInspection cloud_dlp_inspection = 40; + * + * @return Whether the cloudDlpInspection field is set. + */ + @java.lang.Override + public boolean hasCloudDlpInspection() { + return ((bitField0_ & 0x00001000) != 0); + } + /** + * + * + *
+   * Cloud Data Loss Prevention (Cloud DLP) inspection results that are
+   * associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpInspection cloud_dlp_inspection = 40; + * + * @return The cloudDlpInspection. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.CloudDlpInspection getCloudDlpInspection() { + return cloudDlpInspection_ == null + ? com.google.cloud.securitycenter.v2.CloudDlpInspection.getDefaultInstance() + : cloudDlpInspection_; + } + /** + * + * + *
+   * Cloud Data Loss Prevention (Cloud DLP) inspection results that are
+   * associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpInspection cloud_dlp_inspection = 40; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.CloudDlpInspectionOrBuilder + getCloudDlpInspectionOrBuilder() { + return cloudDlpInspection_ == null + ? com.google.cloud.securitycenter.v2.CloudDlpInspection.getDefaultInstance() + : cloudDlpInspection_; + } + + public static final int CLOUD_DLP_DATA_PROFILE_FIELD_NUMBER = 41; + private com.google.cloud.securitycenter.v2.CloudDlpDataProfile cloudDlpDataProfile_; + /** + * + * + *
+   * Cloud DLP data profile that is associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpDataProfile cloud_dlp_data_profile = 41; + * + * @return Whether the cloudDlpDataProfile field is set. + */ + @java.lang.Override + public boolean hasCloudDlpDataProfile() { + return ((bitField0_ & 0x00002000) != 0); + } + /** + * + * + *
+   * Cloud DLP data profile that is associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpDataProfile cloud_dlp_data_profile = 41; + * + * @return The cloudDlpDataProfile. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.CloudDlpDataProfile getCloudDlpDataProfile() { + return cloudDlpDataProfile_ == null + ? com.google.cloud.securitycenter.v2.CloudDlpDataProfile.getDefaultInstance() + : cloudDlpDataProfile_; + } + /** + * + * + *
+   * Cloud DLP data profile that is associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpDataProfile cloud_dlp_data_profile = 41; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.CloudDlpDataProfileOrBuilder + getCloudDlpDataProfileOrBuilder() { + return cloudDlpDataProfile_ == null + ? com.google.cloud.securitycenter.v2.CloudDlpDataProfile.getDefaultInstance() + : cloudDlpDataProfile_; + } + + public static final int KERNEL_ROOTKIT_FIELD_NUMBER = 42; + private com.google.cloud.securitycenter.v2.KernelRootkit kernelRootkit_; + /** + * + * + *
+   * Signature of the kernel rootkit.
+   * 
+ * + * .google.cloud.securitycenter.v2.KernelRootkit kernel_rootkit = 42; + * + * @return Whether the kernelRootkit field is set. + */ + @java.lang.Override + public boolean hasKernelRootkit() { + return ((bitField0_ & 0x00004000) != 0); + } + /** + * + * + *
+   * Signature of the kernel rootkit.
+   * 
+ * + * .google.cloud.securitycenter.v2.KernelRootkit kernel_rootkit = 42; + * + * @return The kernelRootkit. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.KernelRootkit getKernelRootkit() { + return kernelRootkit_ == null + ? com.google.cloud.securitycenter.v2.KernelRootkit.getDefaultInstance() + : kernelRootkit_; + } + /** + * + * + *
+   * Signature of the kernel rootkit.
+   * 
+ * + * .google.cloud.securitycenter.v2.KernelRootkit kernel_rootkit = 42; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.KernelRootkitOrBuilder getKernelRootkitOrBuilder() { + return kernelRootkit_ == null + ? com.google.cloud.securitycenter.v2.KernelRootkit.getDefaultInstance() + : kernelRootkit_; + } + + public static final int ORG_POLICIES_FIELD_NUMBER = 43; + + @SuppressWarnings("serial") + private java.util.List orgPolicies_; + /** + * + * + *
+   * Contains information about the org policies associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.OrgPolicy org_policies = 43; + */ + @java.lang.Override + public java.util.List getOrgPoliciesList() { + return orgPolicies_; + } + /** + * + * + *
+   * Contains information about the org policies associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.OrgPolicy org_policies = 43; + */ + @java.lang.Override + public java.util.List + getOrgPoliciesOrBuilderList() { + return orgPolicies_; + } + /** + * + * + *
+   * Contains information about the org policies associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.OrgPolicy org_policies = 43; + */ + @java.lang.Override + public int getOrgPoliciesCount() { + return orgPolicies_.size(); + } + /** + * + * + *
+   * Contains information about the org policies associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.OrgPolicy org_policies = 43; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.OrgPolicy getOrgPolicies(int index) { + return orgPolicies_.get(index); + } + /** + * + * + *
+   * Contains information about the org policies associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.OrgPolicy org_policies = 43; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.OrgPolicyOrBuilder getOrgPoliciesOrBuilder(int index) { + return orgPolicies_.get(index); + } + + public static final int APPLICATION_FIELD_NUMBER = 45; + private com.google.cloud.securitycenter.v2.Application application_; + /** + * + * + *
+   * Represents an application associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.Application application = 45; + * + * @return Whether the application field is set. + */ + @java.lang.Override + public boolean hasApplication() { + return ((bitField0_ & 0x00008000) != 0); + } + /** + * + * + *
+   * Represents an application associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.Application application = 45; + * + * @return The application. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Application getApplication() { + return application_ == null + ? com.google.cloud.securitycenter.v2.Application.getDefaultInstance() + : application_; + } + /** + * + * + *
+   * Represents an application associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.Application application = 45; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.ApplicationOrBuilder getApplicationOrBuilder() { + return application_ == null + ? com.google.cloud.securitycenter.v2.Application.getDefaultInstance() + : application_; + } + + public static final int BACKUP_DISASTER_RECOVERY_FIELD_NUMBER = 47; + private com.google.cloud.securitycenter.v2.BackupDisasterRecovery backupDisasterRecovery_; + /** + * + * + *
+   * Fields related to Backup and DR findings.
+   * 
+ * + * .google.cloud.securitycenter.v2.BackupDisasterRecovery backup_disaster_recovery = 47; + * + * + * @return Whether the backupDisasterRecovery field is set. + */ + @java.lang.Override + public boolean hasBackupDisasterRecovery() { + return ((bitField0_ & 0x00010000) != 0); + } + /** + * + * + *
+   * Fields related to Backup and DR findings.
+   * 
+ * + * .google.cloud.securitycenter.v2.BackupDisasterRecovery backup_disaster_recovery = 47; + * + * + * @return The backupDisasterRecovery. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.BackupDisasterRecovery getBackupDisasterRecovery() { + return backupDisasterRecovery_ == null + ? com.google.cloud.securitycenter.v2.BackupDisasterRecovery.getDefaultInstance() + : backupDisasterRecovery_; + } + /** + * + * + *
+   * Fields related to Backup and DR findings.
+   * 
+ * + * .google.cloud.securitycenter.v2.BackupDisasterRecovery backup_disaster_recovery = 47; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.BackupDisasterRecoveryOrBuilder + getBackupDisasterRecoveryOrBuilder() { + return backupDisasterRecovery_ == null + ? com.google.cloud.securitycenter.v2.BackupDisasterRecovery.getDefaultInstance() + : backupDisasterRecovery_; + } + + public static final int SECURITY_POSTURE_FIELD_NUMBER = 48; + private com.google.cloud.securitycenter.v2.SecurityPosture securityPosture_; + /** + * + * + *
+   * The security posture associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.SecurityPosture security_posture = 48; + * + * @return Whether the securityPosture field is set. + */ + @java.lang.Override + public boolean hasSecurityPosture() { + return ((bitField0_ & 0x00020000) != 0); + } + /** + * + * + *
+   * The security posture associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.SecurityPosture security_posture = 48; + * + * @return The securityPosture. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.SecurityPosture getSecurityPosture() { + return securityPosture_ == null + ? com.google.cloud.securitycenter.v2.SecurityPosture.getDefaultInstance() + : securityPosture_; + } + /** + * + * + *
+   * The security posture associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.SecurityPosture security_posture = 48; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.SecurityPostureOrBuilder getSecurityPostureOrBuilder() { + return securityPosture_ == null + ? com.google.cloud.securitycenter.v2.SecurityPosture.getDefaultInstance() + : securityPosture_; + } + + public static final int LOG_ENTRIES_FIELD_NUMBER = 49; + + @SuppressWarnings("serial") + private java.util.List logEntries_; + /** + * + * + *
+   * Log entries that are relevant to the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.LogEntry log_entries = 49; + */ + @java.lang.Override + public java.util.List getLogEntriesList() { + return logEntries_; + } + /** + * + * + *
+   * Log entries that are relevant to the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.LogEntry log_entries = 49; + */ + @java.lang.Override + public java.util.List + getLogEntriesOrBuilderList() { + return logEntries_; + } + /** + * + * + *
+   * Log entries that are relevant to the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.LogEntry log_entries = 49; + */ + @java.lang.Override + public int getLogEntriesCount() { + return logEntries_.size(); + } + /** + * + * + *
+   * Log entries that are relevant to the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.LogEntry log_entries = 49; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.LogEntry getLogEntries(int index) { + return logEntries_.get(index); + } + /** + * + * + *
+   * Log entries that are relevant to the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.LogEntry log_entries = 49; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.LogEntryOrBuilder getLogEntriesOrBuilder(int index) { + return logEntries_.get(index); + } + + public static final int LOAD_BALANCERS_FIELD_NUMBER = 50; + + @SuppressWarnings("serial") + private java.util.List loadBalancers_; + /** + * + * + *
+   * The load balancers associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.LoadBalancer load_balancers = 50; + */ + @java.lang.Override + public java.util.List getLoadBalancersList() { + return loadBalancers_; + } + /** + * + * + *
+   * The load balancers associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.LoadBalancer load_balancers = 50; + */ + @java.lang.Override + public java.util.List + getLoadBalancersOrBuilderList() { + return loadBalancers_; + } + /** + * + * + *
+   * The load balancers associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.LoadBalancer load_balancers = 50; + */ + @java.lang.Override + public int getLoadBalancersCount() { + return loadBalancers_.size(); + } + /** + * + * + *
+   * The load balancers associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.LoadBalancer load_balancers = 50; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.LoadBalancer getLoadBalancers(int index) { + return loadBalancers_.get(index); + } + /** + * + * + *
+   * The load balancers associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.LoadBalancer load_balancers = 50; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.LoadBalancerOrBuilder getLoadBalancersOrBuilder( + int index) { + return loadBalancers_.get(index); + } + + 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(canonicalName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, canonicalName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, resourceName_); + } + if (state_ != com.google.cloud.securitycenter.v2.Finding.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(6, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(category_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, category_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, externalUri_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetSourceProperties(), SourcePropertiesDefaultEntryHolder.defaultEntry, 9); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(10, getSecurityMarks()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(11, getEventTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(12, getCreateTime()); + } + if (severity_ + != com.google.cloud.securitycenter.v2.Finding.Severity.SEVERITY_UNSPECIFIED.getNumber()) { + output.writeEnum(14, severity_); + } + if (mute_ != com.google.cloud.securitycenter.v2.Finding.Mute.MUTE_UNSPECIFIED.getNumber()) { + output.writeEnum(15, mute_); + } + if (findingClass_ + != com.google.cloud.securitycenter.v2.Finding.FindingClass.FINDING_CLASS_UNSPECIFIED + .getNumber()) { + output.writeEnum(16, findingClass_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(17, getIndicator()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(18, getVulnerability()); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(19, getMuteUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetExternalSystems(), ExternalSystemsDefaultEntryHolder.defaultEntry, 20); + if (((bitField0_ & 0x00000040) != 0)) { + output.writeMessage(21, getMitreAttack()); + } + if (((bitField0_ & 0x00000080) != 0)) { + output.writeMessage(22, getAccess()); + } + for (int i = 0; i < connections_.size(); i++) { + output.writeMessage(23, connections_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(muteInitiator_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 24, muteInitiator_); + } + for (int i = 0; i < processes_.size(); i++) { + output.writeMessage(25, processes_.get(i)); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetContacts(), ContactsDefaultEntryHolder.defaultEntry, 26); + for (int i = 0; i < compliances_.size(); i++) { + output.writeMessage(27, compliances_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parentDisplayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 29, parentDisplayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 30, description_); + } + if (((bitField0_ & 0x00000100) != 0)) { + output.writeMessage(31, getExfiltration()); + } + for (int i = 0; i < iamBindings_.size(); i++) { + output.writeMessage(32, iamBindings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextSteps_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 33, nextSteps_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(moduleName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 34, moduleName_); + } + for (int i = 0; i < containers_.size(); i++) { + output.writeMessage(35, containers_.get(i)); + } + if (((bitField0_ & 0x00000200) != 0)) { + output.writeMessage(36, getKubernetes()); + } + if (((bitField0_ & 0x00000400) != 0)) { + output.writeMessage(37, getDatabase()); + } + if (((bitField0_ & 0x00000800) != 0)) { + output.writeMessage(38, getAttackExposure()); + } + for (int i = 0; i < files_.size(); i++) { + output.writeMessage(39, files_.get(i)); + } + if (((bitField0_ & 0x00001000) != 0)) { + output.writeMessage(40, getCloudDlpInspection()); + } + if (((bitField0_ & 0x00002000) != 0)) { + output.writeMessage(41, getCloudDlpDataProfile()); + } + if (((bitField0_ & 0x00004000) != 0)) { + output.writeMessage(42, getKernelRootkit()); + } + for (int i = 0; i < orgPolicies_.size(); i++) { + output.writeMessage(43, orgPolicies_.get(i)); + } + if (((bitField0_ & 0x00008000) != 0)) { + output.writeMessage(45, getApplication()); + } + if (((bitField0_ & 0x00010000) != 0)) { + output.writeMessage(47, getBackupDisasterRecovery()); + } + if (((bitField0_ & 0x00020000) != 0)) { + output.writeMessage(48, getSecurityPosture()); + } + for (int i = 0; i < logEntries_.size(); i++) { + output.writeMessage(49, logEntries_.get(i)); + } + for (int i = 0; i < loadBalancers_.size(); i++) { + output.writeMessage(50, loadBalancers_.get(i)); + } + getUnknownFields().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(canonicalName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, canonicalName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, resourceName_); + } + if (state_ != com.google.cloud.securitycenter.v2.Finding.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(category_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, category_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, externalUri_); + } + for (java.util.Map.Entry entry : + internalGetSourceProperties().getMap().entrySet()) { + com.google.protobuf.MapEntry sourceProperties__ = + SourcePropertiesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, sourceProperties__); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getSecurityMarks()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getEventTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getCreateTime()); + } + if (severity_ + != com.google.cloud.securitycenter.v2.Finding.Severity.SEVERITY_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(14, severity_); + } + if (mute_ != com.google.cloud.securitycenter.v2.Finding.Mute.MUTE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(15, mute_); + } + if (findingClass_ + != com.google.cloud.securitycenter.v2.Finding.FindingClass.FINDING_CLASS_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(16, findingClass_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, getIndicator()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getVulnerability()); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, getMuteUpdateTime()); + } + for (java.util.Map.Entry + entry : internalGetExternalSystems().getMap().entrySet()) { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.securitycenter.v2.ExternalSystem> + externalSystems__ = + ExternalSystemsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, externalSystems__); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, getMitreAttack()); + } + if (((bitField0_ & 0x00000080) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(22, getAccess()); + } + for (int i = 0; i < connections_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(23, connections_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(muteInitiator_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(24, muteInitiator_); + } + for (int i = 0; i < processes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(25, processes_.get(i)); + } + for (java.util.Map.Entry + entry : internalGetContacts().getMap().entrySet()) { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.securitycenter.v2.ContactDetails> + contacts__ = + ContactsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(26, contacts__); + } + for (int i = 0; i < compliances_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(27, compliances_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parentDisplayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(29, parentDisplayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(30, description_); + } + if (((bitField0_ & 0x00000100) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(31, getExfiltration()); + } + for (int i = 0; i < iamBindings_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(32, iamBindings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextSteps_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(33, nextSteps_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(moduleName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(34, moduleName_); + } + for (int i = 0; i < containers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(35, containers_.get(i)); + } + if (((bitField0_ & 0x00000200) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(36, getKubernetes()); + } + if (((bitField0_ & 0x00000400) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(37, getDatabase()); + } + if (((bitField0_ & 0x00000800) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(38, getAttackExposure()); + } + for (int i = 0; i < files_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(39, files_.get(i)); + } + if (((bitField0_ & 0x00001000) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(40, getCloudDlpInspection()); + } + if (((bitField0_ & 0x00002000) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(41, getCloudDlpDataProfile()); + } + if (((bitField0_ & 0x00004000) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(42, getKernelRootkit()); + } + for (int i = 0; i < orgPolicies_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(43, orgPolicies_.get(i)); + } + if (((bitField0_ & 0x00008000) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(45, getApplication()); + } + if (((bitField0_ & 0x00010000) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(47, getBackupDisasterRecovery()); + } + if (((bitField0_ & 0x00020000) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(48, getSecurityPosture()); + } + for (int i = 0; i < logEntries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(49, logEntries_.get(i)); + } + for (int i = 0; i < loadBalancers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(50, loadBalancers_.get(i)); + } + size += getUnknownFields().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.v2.Finding)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.Finding other = + (com.google.cloud.securitycenter.v2.Finding) obj; + + if (!getName().equals(other.getName())) return false; + if (!getCanonicalName().equals(other.getCanonicalName())) return false; + if (!getParent().equals(other.getParent())) return false; + if (!getResourceName().equals(other.getResourceName())) return false; + if (state_ != other.state_) return false; + if (!getCategory().equals(other.getCategory())) return false; + if (!getExternalUri().equals(other.getExternalUri())) return false; + if (!internalGetSourceProperties().equals(other.internalGetSourceProperties())) return false; + if (hasSecurityMarks() != other.hasSecurityMarks()) return false; + if (hasSecurityMarks()) { + if (!getSecurityMarks().equals(other.getSecurityMarks())) return false; + } + if (hasEventTime() != other.hasEventTime()) return false; + if (hasEventTime()) { + if (!getEventTime().equals(other.getEventTime())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (severity_ != other.severity_) return false; + if (mute_ != other.mute_) return false; + if (findingClass_ != other.findingClass_) return false; + if (hasIndicator() != other.hasIndicator()) return false; + if (hasIndicator()) { + if (!getIndicator().equals(other.getIndicator())) return false; + } + if (hasVulnerability() != other.hasVulnerability()) return false; + 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 (hasMitreAttack() != other.hasMitreAttack()) return false; + if (hasMitreAttack()) { + if (!getMitreAttack().equals(other.getMitreAttack())) return false; + } + if (hasAccess() != other.hasAccess()) return false; + if (hasAccess()) { + if (!getAccess().equals(other.getAccess())) return false; + } + if (!getConnectionsList().equals(other.getConnectionsList())) return false; + if (!getMuteInitiator().equals(other.getMuteInitiator())) return false; + if (!getProcessesList().equals(other.getProcessesList())) return false; + if (!internalGetContacts().equals(other.internalGetContacts())) return false; + if (!getCompliancesList().equals(other.getCompliancesList())) return false; + if (!getParentDisplayName().equals(other.getParentDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasExfiltration() != other.hasExfiltration()) return false; + if (hasExfiltration()) { + if (!getExfiltration().equals(other.getExfiltration())) return false; + } + if (!getIamBindingsList().equals(other.getIamBindingsList())) return false; + if (!getNextSteps().equals(other.getNextSteps())) return false; + if (!getModuleName().equals(other.getModuleName())) return false; + if (!getContainersList().equals(other.getContainersList())) return false; + if (hasKubernetes() != other.hasKubernetes()) return false; + if (hasKubernetes()) { + if (!getKubernetes().equals(other.getKubernetes())) return false; + } + if (hasDatabase() != other.hasDatabase()) return false; + if (hasDatabase()) { + if (!getDatabase().equals(other.getDatabase())) return false; + } + if (hasAttackExposure() != other.hasAttackExposure()) return false; + if (hasAttackExposure()) { + if (!getAttackExposure().equals(other.getAttackExposure())) return false; + } + if (!getFilesList().equals(other.getFilesList())) return false; + if (hasCloudDlpInspection() != other.hasCloudDlpInspection()) return false; + if (hasCloudDlpInspection()) { + if (!getCloudDlpInspection().equals(other.getCloudDlpInspection())) return false; + } + if (hasCloudDlpDataProfile() != other.hasCloudDlpDataProfile()) return false; + if (hasCloudDlpDataProfile()) { + if (!getCloudDlpDataProfile().equals(other.getCloudDlpDataProfile())) return false; + } + if (hasKernelRootkit() != other.hasKernelRootkit()) return false; + if (hasKernelRootkit()) { + if (!getKernelRootkit().equals(other.getKernelRootkit())) return false; + } + if (!getOrgPoliciesList().equals(other.getOrgPoliciesList())) return false; + if (hasApplication() != other.hasApplication()) return false; + if (hasApplication()) { + if (!getApplication().equals(other.getApplication())) return false; + } + if (hasBackupDisasterRecovery() != other.hasBackupDisasterRecovery()) return false; + if (hasBackupDisasterRecovery()) { + if (!getBackupDisasterRecovery().equals(other.getBackupDisasterRecovery())) return false; + } + if (hasSecurityPosture() != other.hasSecurityPosture()) return false; + if (hasSecurityPosture()) { + if (!getSecurityPosture().equals(other.getSecurityPosture())) return false; + } + if (!getLogEntriesList().equals(other.getLogEntriesList())) return false; + if (!getLoadBalancersList().equals(other.getLoadBalancersList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + CANONICAL_NAME_FIELD_NUMBER; + hash = (53 * hash) + getCanonicalName().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + RESOURCE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getResourceName().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + CATEGORY_FIELD_NUMBER; + hash = (53 * hash) + getCategory().hashCode(); + hash = (37 * hash) + EXTERNAL_URI_FIELD_NUMBER; + hash = (53 * hash) + getExternalUri().hashCode(); + if (!internalGetSourceProperties().getMap().isEmpty()) { + hash = (37 * hash) + SOURCE_PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + internalGetSourceProperties().hashCode(); + } + if (hasSecurityMarks()) { + hash = (37 * hash) + SECURITY_MARKS_FIELD_NUMBER; + hash = (53 * hash) + getSecurityMarks().hashCode(); + } + if (hasEventTime()) { + hash = (37 * hash) + EVENT_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEventTime().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (37 * hash) + SEVERITY_FIELD_NUMBER; + hash = (53 * hash) + severity_; + hash = (37 * hash) + MUTE_FIELD_NUMBER; + hash = (53 * hash) + mute_; + hash = (37 * hash) + FINDING_CLASS_FIELD_NUMBER; + hash = (53 * hash) + findingClass_; + if (hasIndicator()) { + hash = (37 * hash) + INDICATOR_FIELD_NUMBER; + hash = (53 * hash) + getIndicator().hashCode(); + } + if (hasVulnerability()) { + 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(); + } + if (hasMitreAttack()) { + hash = (37 * hash) + MITRE_ATTACK_FIELD_NUMBER; + hash = (53 * hash) + getMitreAttack().hashCode(); + } + if (hasAccess()) { + hash = (37 * hash) + ACCESS_FIELD_NUMBER; + hash = (53 * hash) + getAccess().hashCode(); + } + if (getConnectionsCount() > 0) { + hash = (37 * hash) + CONNECTIONS_FIELD_NUMBER; + hash = (53 * hash) + getConnectionsList().hashCode(); + } + hash = (37 * hash) + MUTE_INITIATOR_FIELD_NUMBER; + hash = (53 * hash) + getMuteInitiator().hashCode(); + if (getProcessesCount() > 0) { + hash = (37 * hash) + PROCESSES_FIELD_NUMBER; + hash = (53 * hash) + getProcessesList().hashCode(); + } + if (!internalGetContacts().getMap().isEmpty()) { + hash = (37 * hash) + CONTACTS_FIELD_NUMBER; + hash = (53 * hash) + internalGetContacts().hashCode(); + } + if (getCompliancesCount() > 0) { + hash = (37 * hash) + COMPLIANCES_FIELD_NUMBER; + hash = (53 * hash) + getCompliancesList().hashCode(); + } + hash = (37 * hash) + PARENT_DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getParentDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasExfiltration()) { + hash = (37 * hash) + EXFILTRATION_FIELD_NUMBER; + hash = (53 * hash) + getExfiltration().hashCode(); + } + if (getIamBindingsCount() > 0) { + hash = (37 * hash) + IAM_BINDINGS_FIELD_NUMBER; + hash = (53 * hash) + getIamBindingsList().hashCode(); + } + hash = (37 * hash) + NEXT_STEPS_FIELD_NUMBER; + hash = (53 * hash) + getNextSteps().hashCode(); + hash = (37 * hash) + MODULE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getModuleName().hashCode(); + if (getContainersCount() > 0) { + hash = (37 * hash) + CONTAINERS_FIELD_NUMBER; + hash = (53 * hash) + getContainersList().hashCode(); + } + if (hasKubernetes()) { + hash = (37 * hash) + KUBERNETES_FIELD_NUMBER; + hash = (53 * hash) + getKubernetes().hashCode(); + } + if (hasDatabase()) { + hash = (37 * hash) + DATABASE_FIELD_NUMBER; + hash = (53 * hash) + getDatabase().hashCode(); + } + if (hasAttackExposure()) { + hash = (37 * hash) + ATTACK_EXPOSURE_FIELD_NUMBER; + hash = (53 * hash) + getAttackExposure().hashCode(); + } + if (getFilesCount() > 0) { + hash = (37 * hash) + FILES_FIELD_NUMBER; + hash = (53 * hash) + getFilesList().hashCode(); + } + if (hasCloudDlpInspection()) { + hash = (37 * hash) + CLOUD_DLP_INSPECTION_FIELD_NUMBER; + hash = (53 * hash) + getCloudDlpInspection().hashCode(); + } + if (hasCloudDlpDataProfile()) { + hash = (37 * hash) + CLOUD_DLP_DATA_PROFILE_FIELD_NUMBER; + hash = (53 * hash) + getCloudDlpDataProfile().hashCode(); + } + if (hasKernelRootkit()) { + hash = (37 * hash) + KERNEL_ROOTKIT_FIELD_NUMBER; + hash = (53 * hash) + getKernelRootkit().hashCode(); + } + if (getOrgPoliciesCount() > 0) { + hash = (37 * hash) + ORG_POLICIES_FIELD_NUMBER; + hash = (53 * hash) + getOrgPoliciesList().hashCode(); + } + if (hasApplication()) { + hash = (37 * hash) + APPLICATION_FIELD_NUMBER; + hash = (53 * hash) + getApplication().hashCode(); + } + if (hasBackupDisasterRecovery()) { + hash = (37 * hash) + BACKUP_DISASTER_RECOVERY_FIELD_NUMBER; + hash = (53 * hash) + getBackupDisasterRecovery().hashCode(); + } + if (hasSecurityPosture()) { + hash = (37 * hash) + SECURITY_POSTURE_FIELD_NUMBER; + hash = (53 * hash) + getSecurityPosture().hashCode(); + } + if (getLogEntriesCount() > 0) { + hash = (37 * hash) + LOG_ENTRIES_FIELD_NUMBER; + hash = (53 * hash) + getLogEntriesList().hashCode(); + } + if (getLoadBalancersCount() > 0) { + hash = (37 * hash) + LOAD_BALANCERS_FIELD_NUMBER; + hash = (53 * hash) + getLoadBalancersList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.Finding parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Finding 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.v2.Finding parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Finding 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.v2.Finding parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Finding parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.Finding parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Finding 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.v2.Finding parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Finding 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.v2.Finding parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Finding 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.v2.Finding 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; + } + /** + * + * + *
+   * Security Command Center finding.
+   *
+   * A finding is a record of assessment data like security, risk, health, or
+   * privacy, that is ingested into Security Command Center for presentation,
+   * notification, analysis, policy testing, and enforcement. For example, a
+   * cross-site scripting (XSS) vulnerability in an App Engine application is a
+   * finding.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Finding} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.Finding) + com.google.cloud.securitycenter.v2.FindingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.FindingProto + .internal_static_google_cloud_securitycenter_v2_Finding_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 9: + return internalGetSourceProperties(); + case 20: + return internalGetExternalSystems(); + case 26: + return internalGetContacts(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 9: + return internalGetMutableSourceProperties(); + case 20: + return internalGetMutableExternalSystems(); + case 26: + return internalGetMutableContacts(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.FindingProto + .internal_static_google_cloud_securitycenter_v2_Finding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Finding.class, + com.google.cloud.securitycenter.v2.Finding.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.Finding.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSecurityMarksFieldBuilder(); + getEventTimeFieldBuilder(); + getCreateTimeFieldBuilder(); + getIndicatorFieldBuilder(); + getVulnerabilityFieldBuilder(); + getMuteUpdateTimeFieldBuilder(); + getMitreAttackFieldBuilder(); + getAccessFieldBuilder(); + getConnectionsFieldBuilder(); + getProcessesFieldBuilder(); + getCompliancesFieldBuilder(); + getExfiltrationFieldBuilder(); + getIamBindingsFieldBuilder(); + getContainersFieldBuilder(); + getKubernetesFieldBuilder(); + getDatabaseFieldBuilder(); + getAttackExposureFieldBuilder(); + getFilesFieldBuilder(); + getCloudDlpInspectionFieldBuilder(); + getCloudDlpDataProfileFieldBuilder(); + getKernelRootkitFieldBuilder(); + getOrgPoliciesFieldBuilder(); + getApplicationFieldBuilder(); + getBackupDisasterRecoveryFieldBuilder(); + getSecurityPostureFieldBuilder(); + getLogEntriesFieldBuilder(); + getLoadBalancersFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + bitField1_ = 0; + name_ = ""; + canonicalName_ = ""; + parent_ = ""; + resourceName_ = ""; + state_ = 0; + category_ = ""; + externalUri_ = ""; + internalGetMutableSourceProperties().clear(); + securityMarks_ = null; + if (securityMarksBuilder_ != null) { + securityMarksBuilder_.dispose(); + securityMarksBuilder_ = null; + } + eventTime_ = null; + if (eventTimeBuilder_ != null) { + eventTimeBuilder_.dispose(); + eventTimeBuilder_ = null; + } + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + severity_ = 0; + mute_ = 0; + findingClass_ = 0; + indicator_ = null; + if (indicatorBuilder_ != null) { + indicatorBuilder_.dispose(); + indicatorBuilder_ = null; + } + vulnerability_ = null; + if (vulnerabilityBuilder_ != null) { + vulnerabilityBuilder_.dispose(); + vulnerabilityBuilder_ = null; + } + muteUpdateTime_ = null; + if (muteUpdateTimeBuilder_ != null) { + muteUpdateTimeBuilder_.dispose(); + muteUpdateTimeBuilder_ = null; + } + internalGetMutableExternalSystems().clear(); + mitreAttack_ = null; + if (mitreAttackBuilder_ != null) { + mitreAttackBuilder_.dispose(); + mitreAttackBuilder_ = null; + } + access_ = null; + if (accessBuilder_ != null) { + accessBuilder_.dispose(); + accessBuilder_ = null; + } + if (connectionsBuilder_ == null) { + connections_ = java.util.Collections.emptyList(); + } else { + connections_ = null; + connectionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00100000); + muteInitiator_ = ""; + if (processesBuilder_ == null) { + processes_ = java.util.Collections.emptyList(); + } else { + processes_ = null; + processesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00400000); + internalGetMutableContacts().clear(); + if (compliancesBuilder_ == null) { + compliances_ = java.util.Collections.emptyList(); + } else { + compliances_ = null; + compliancesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x01000000); + parentDisplayName_ = ""; + description_ = ""; + exfiltration_ = null; + if (exfiltrationBuilder_ != null) { + exfiltrationBuilder_.dispose(); + exfiltrationBuilder_ = null; + } + if (iamBindingsBuilder_ == null) { + iamBindings_ = java.util.Collections.emptyList(); + } else { + iamBindings_ = null; + iamBindingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x10000000); + nextSteps_ = ""; + moduleName_ = ""; + if (containersBuilder_ == null) { + containers_ = java.util.Collections.emptyList(); + } else { + containers_ = null; + containersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x80000000); + kubernetes_ = null; + if (kubernetesBuilder_ != null) { + kubernetesBuilder_.dispose(); + kubernetesBuilder_ = null; + } + database_ = null; + if (databaseBuilder_ != null) { + databaseBuilder_.dispose(); + databaseBuilder_ = null; + } + attackExposure_ = null; + if (attackExposureBuilder_ != null) { + attackExposureBuilder_.dispose(); + attackExposureBuilder_ = null; + } + if (filesBuilder_ == null) { + files_ = java.util.Collections.emptyList(); + } else { + files_ = null; + filesBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000008); + cloudDlpInspection_ = null; + if (cloudDlpInspectionBuilder_ != null) { + cloudDlpInspectionBuilder_.dispose(); + cloudDlpInspectionBuilder_ = null; + } + cloudDlpDataProfile_ = null; + if (cloudDlpDataProfileBuilder_ != null) { + cloudDlpDataProfileBuilder_.dispose(); + cloudDlpDataProfileBuilder_ = null; + } + kernelRootkit_ = null; + if (kernelRootkitBuilder_ != null) { + kernelRootkitBuilder_.dispose(); + kernelRootkitBuilder_ = null; + } + if (orgPoliciesBuilder_ == null) { + orgPolicies_ = java.util.Collections.emptyList(); + } else { + orgPolicies_ = null; + orgPoliciesBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000080); + application_ = null; + if (applicationBuilder_ != null) { + applicationBuilder_.dispose(); + applicationBuilder_ = null; + } + backupDisasterRecovery_ = null; + if (backupDisasterRecoveryBuilder_ != null) { + backupDisasterRecoveryBuilder_.dispose(); + backupDisasterRecoveryBuilder_ = null; + } + securityPosture_ = null; + if (securityPostureBuilder_ != null) { + securityPostureBuilder_.dispose(); + securityPostureBuilder_ = null; + } + if (logEntriesBuilder_ == null) { + logEntries_ = java.util.Collections.emptyList(); + } else { + logEntries_ = null; + logEntriesBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000800); + if (loadBalancersBuilder_ == null) { + loadBalancers_ = java.util.Collections.emptyList(); + } else { + loadBalancers_ = null; + loadBalancersBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00001000); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.FindingProto + .internal_static_google_cloud_securitycenter_v2_Finding_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Finding getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.Finding.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Finding build() { + com.google.cloud.securitycenter.v2.Finding result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Finding buildPartial() { + com.google.cloud.securitycenter.v2.Finding result = + new com.google.cloud.securitycenter.v2.Finding(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + if (bitField1_ != 0) { + buildPartial1(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.securitycenter.v2.Finding result) { + if (connectionsBuilder_ == null) { + if (((bitField0_ & 0x00100000) != 0)) { + connections_ = java.util.Collections.unmodifiableList(connections_); + bitField0_ = (bitField0_ & ~0x00100000); + } + result.connections_ = connections_; + } else { + result.connections_ = connectionsBuilder_.build(); + } + if (processesBuilder_ == null) { + if (((bitField0_ & 0x00400000) != 0)) { + processes_ = java.util.Collections.unmodifiableList(processes_); + bitField0_ = (bitField0_ & ~0x00400000); + } + result.processes_ = processes_; + } else { + result.processes_ = processesBuilder_.build(); + } + if (compliancesBuilder_ == null) { + if (((bitField0_ & 0x01000000) != 0)) { + compliances_ = java.util.Collections.unmodifiableList(compliances_); + bitField0_ = (bitField0_ & ~0x01000000); + } + result.compliances_ = compliances_; + } else { + result.compliances_ = compliancesBuilder_.build(); + } + if (iamBindingsBuilder_ == null) { + if (((bitField0_ & 0x10000000) != 0)) { + iamBindings_ = java.util.Collections.unmodifiableList(iamBindings_); + bitField0_ = (bitField0_ & ~0x10000000); + } + result.iamBindings_ = iamBindings_; + } else { + result.iamBindings_ = iamBindingsBuilder_.build(); + } + if (containersBuilder_ == null) { + if (((bitField0_ & 0x80000000) != 0)) { + containers_ = java.util.Collections.unmodifiableList(containers_); + bitField0_ = (bitField0_ & ~0x80000000); + } + result.containers_ = containers_; + } else { + result.containers_ = containersBuilder_.build(); + } + if (filesBuilder_ == null) { + if (((bitField1_ & 0x00000008) != 0)) { + files_ = java.util.Collections.unmodifiableList(files_); + bitField1_ = (bitField1_ & ~0x00000008); + } + result.files_ = files_; + } else { + result.files_ = filesBuilder_.build(); + } + if (orgPoliciesBuilder_ == null) { + if (((bitField1_ & 0x00000080) != 0)) { + orgPolicies_ = java.util.Collections.unmodifiableList(orgPolicies_); + bitField1_ = (bitField1_ & ~0x00000080); + } + result.orgPolicies_ = orgPolicies_; + } else { + result.orgPolicies_ = orgPoliciesBuilder_.build(); + } + if (logEntriesBuilder_ == null) { + if (((bitField1_ & 0x00000800) != 0)) { + logEntries_ = java.util.Collections.unmodifiableList(logEntries_); + bitField1_ = (bitField1_ & ~0x00000800); + } + result.logEntries_ = logEntries_; + } else { + result.logEntries_ = logEntriesBuilder_.build(); + } + if (loadBalancersBuilder_ == null) { + if (((bitField1_ & 0x00001000) != 0)) { + loadBalancers_ = java.util.Collections.unmodifiableList(loadBalancers_); + bitField1_ = (bitField1_ & ~0x00001000); + } + result.loadBalancers_ = loadBalancers_; + } else { + result.loadBalancers_ = loadBalancersBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.Finding result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.canonicalName_ = canonicalName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.resourceName_ = resourceName_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.category_ = category_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.externalUri_ = externalUri_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.sourceProperties_ = + internalGetSourceProperties().build(SourcePropertiesDefaultEntryHolder.defaultEntry); + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000100) != 0)) { + result.securityMarks_ = + securityMarksBuilder_ == null ? securityMarks_ : securityMarksBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.eventTime_ = eventTimeBuilder_ == null ? eventTime_ : eventTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.severity_ = severity_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.mute_ = mute_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.findingClass_ = findingClass_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.indicator_ = indicatorBuilder_ == null ? indicator_ : indicatorBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.vulnerability_ = + vulnerabilityBuilder_ == null ? vulnerability_ : vulnerabilityBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.muteUpdateTime_ = + muteUpdateTimeBuilder_ == null ? muteUpdateTime_ : muteUpdateTimeBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.externalSystems_ = + internalGetExternalSystems().build(ExternalSystemsDefaultEntryHolder.defaultEntry); + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.mitreAttack_ = + mitreAttackBuilder_ == null ? mitreAttack_ : mitreAttackBuilder_.build(); + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x00080000) != 0)) { + result.access_ = accessBuilder_ == null ? access_ : accessBuilder_.build(); + to_bitField0_ |= 0x00000080; + } + if (((from_bitField0_ & 0x00200000) != 0)) { + result.muteInitiator_ = muteInitiator_; + } + if (((from_bitField0_ & 0x00800000) != 0)) { + result.contacts_ = internalGetContacts().build(ContactsDefaultEntryHolder.defaultEntry); + } + if (((from_bitField0_ & 0x02000000) != 0)) { + result.parentDisplayName_ = parentDisplayName_; + } + if (((from_bitField0_ & 0x04000000) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x08000000) != 0)) { + result.exfiltration_ = + exfiltrationBuilder_ == null ? exfiltration_ : exfiltrationBuilder_.build(); + to_bitField0_ |= 0x00000100; + } + if (((from_bitField0_ & 0x20000000) != 0)) { + result.nextSteps_ = nextSteps_; + } + if (((from_bitField0_ & 0x40000000) != 0)) { + result.moduleName_ = moduleName_; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartial1(com.google.cloud.securitycenter.v2.Finding result) { + int from_bitField1_ = bitField1_; + int to_bitField0_ = 0; + if (((from_bitField1_ & 0x00000001) != 0)) { + result.kubernetes_ = kubernetesBuilder_ == null ? kubernetes_ : kubernetesBuilder_.build(); + to_bitField0_ |= 0x00000200; + } + if (((from_bitField1_ & 0x00000002) != 0)) { + result.database_ = databaseBuilder_ == null ? database_ : databaseBuilder_.build(); + to_bitField0_ |= 0x00000400; + } + if (((from_bitField1_ & 0x00000004) != 0)) { + result.attackExposure_ = + attackExposureBuilder_ == null ? attackExposure_ : attackExposureBuilder_.build(); + to_bitField0_ |= 0x00000800; + } + if (((from_bitField1_ & 0x00000010) != 0)) { + result.cloudDlpInspection_ = + cloudDlpInspectionBuilder_ == null + ? cloudDlpInspection_ + : cloudDlpInspectionBuilder_.build(); + to_bitField0_ |= 0x00001000; + } + if (((from_bitField1_ & 0x00000020) != 0)) { + result.cloudDlpDataProfile_ = + cloudDlpDataProfileBuilder_ == null + ? cloudDlpDataProfile_ + : cloudDlpDataProfileBuilder_.build(); + to_bitField0_ |= 0x00002000; + } + if (((from_bitField1_ & 0x00000040) != 0)) { + result.kernelRootkit_ = + kernelRootkitBuilder_ == null ? kernelRootkit_ : kernelRootkitBuilder_.build(); + to_bitField0_ |= 0x00004000; + } + if (((from_bitField1_ & 0x00000100) != 0)) { + result.application_ = + applicationBuilder_ == null ? application_ : applicationBuilder_.build(); + to_bitField0_ |= 0x00008000; + } + if (((from_bitField1_ & 0x00000200) != 0)) { + result.backupDisasterRecovery_ = + backupDisasterRecoveryBuilder_ == null + ? backupDisasterRecovery_ + : backupDisasterRecoveryBuilder_.build(); + to_bitField0_ |= 0x00010000; + } + if (((from_bitField1_ & 0x00000400) != 0)) { + result.securityPosture_ = + securityPostureBuilder_ == null ? securityPosture_ : securityPostureBuilder_.build(); + to_bitField0_ |= 0x00020000; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v2.Finding) { + return mergeFrom((com.google.cloud.securitycenter.v2.Finding) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.Finding other) { + if (other == com.google.cloud.securitycenter.v2.Finding.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getCanonicalName().isEmpty()) { + canonicalName_ = other.canonicalName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getResourceName().isEmpty()) { + resourceName_ = other.resourceName_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getCategory().isEmpty()) { + category_ = other.category_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getExternalUri().isEmpty()) { + externalUri_ = other.externalUri_; + bitField0_ |= 0x00000040; + onChanged(); + } + internalGetMutableSourceProperties().mergeFrom(other.internalGetSourceProperties()); + bitField0_ |= 0x00000080; + if (other.hasSecurityMarks()) { + mergeSecurityMarks(other.getSecurityMarks()); + } + if (other.hasEventTime()) { + mergeEventTime(other.getEventTime()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.severity_ != 0) { + setSeverityValue(other.getSeverityValue()); + } + if (other.mute_ != 0) { + setMuteValue(other.getMuteValue()); + } + if (other.findingClass_ != 0) { + setFindingClassValue(other.getFindingClassValue()); + } + if (other.hasIndicator()) { + mergeIndicator(other.getIndicator()); + } + if (other.hasVulnerability()) { + mergeVulnerability(other.getVulnerability()); + } + if (other.hasMuteUpdateTime()) { + mergeMuteUpdateTime(other.getMuteUpdateTime()); + } + internalGetMutableExternalSystems().mergeFrom(other.internalGetExternalSystems()); + bitField0_ |= 0x00020000; + if (other.hasMitreAttack()) { + mergeMitreAttack(other.getMitreAttack()); + } + if (other.hasAccess()) { + mergeAccess(other.getAccess()); + } + if (connectionsBuilder_ == null) { + if (!other.connections_.isEmpty()) { + if (connections_.isEmpty()) { + connections_ = other.connections_; + bitField0_ = (bitField0_ & ~0x00100000); + } else { + ensureConnectionsIsMutable(); + connections_.addAll(other.connections_); + } + onChanged(); + } + } else { + if (!other.connections_.isEmpty()) { + if (connectionsBuilder_.isEmpty()) { + connectionsBuilder_.dispose(); + connectionsBuilder_ = null; + connections_ = other.connections_; + bitField0_ = (bitField0_ & ~0x00100000); + connectionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getConnectionsFieldBuilder() + : null; + } else { + connectionsBuilder_.addAllMessages(other.connections_); + } + } + } + if (!other.getMuteInitiator().isEmpty()) { + muteInitiator_ = other.muteInitiator_; + bitField0_ |= 0x00200000; + onChanged(); + } + if (processesBuilder_ == null) { + if (!other.processes_.isEmpty()) { + if (processes_.isEmpty()) { + processes_ = other.processes_; + bitField0_ = (bitField0_ & ~0x00400000); + } else { + ensureProcessesIsMutable(); + processes_.addAll(other.processes_); + } + onChanged(); + } + } else { + if (!other.processes_.isEmpty()) { + if (processesBuilder_.isEmpty()) { + processesBuilder_.dispose(); + processesBuilder_ = null; + processes_ = other.processes_; + bitField0_ = (bitField0_ & ~0x00400000); + processesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getProcessesFieldBuilder() + : null; + } else { + processesBuilder_.addAllMessages(other.processes_); + } + } + } + internalGetMutableContacts().mergeFrom(other.internalGetContacts()); + bitField0_ |= 0x00800000; + if (compliancesBuilder_ == null) { + if (!other.compliances_.isEmpty()) { + if (compliances_.isEmpty()) { + compliances_ = other.compliances_; + bitField0_ = (bitField0_ & ~0x01000000); + } else { + ensureCompliancesIsMutable(); + compliances_.addAll(other.compliances_); + } + onChanged(); + } + } else { + if (!other.compliances_.isEmpty()) { + if (compliancesBuilder_.isEmpty()) { + compliancesBuilder_.dispose(); + compliancesBuilder_ = null; + compliances_ = other.compliances_; + bitField0_ = (bitField0_ & ~0x01000000); + compliancesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCompliancesFieldBuilder() + : null; + } else { + compliancesBuilder_.addAllMessages(other.compliances_); + } + } + } + if (!other.getParentDisplayName().isEmpty()) { + parentDisplayName_ = other.parentDisplayName_; + bitField0_ |= 0x02000000; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x04000000; + onChanged(); + } + if (other.hasExfiltration()) { + mergeExfiltration(other.getExfiltration()); + } + if (iamBindingsBuilder_ == null) { + if (!other.iamBindings_.isEmpty()) { + if (iamBindings_.isEmpty()) { + iamBindings_ = other.iamBindings_; + bitField0_ = (bitField0_ & ~0x10000000); + } else { + ensureIamBindingsIsMutable(); + iamBindings_.addAll(other.iamBindings_); + } + onChanged(); + } + } else { + if (!other.iamBindings_.isEmpty()) { + if (iamBindingsBuilder_.isEmpty()) { + iamBindingsBuilder_.dispose(); + iamBindingsBuilder_ = null; + iamBindings_ = other.iamBindings_; + bitField0_ = (bitField0_ & ~0x10000000); + iamBindingsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getIamBindingsFieldBuilder() + : null; + } else { + iamBindingsBuilder_.addAllMessages(other.iamBindings_); + } + } + } + if (!other.getNextSteps().isEmpty()) { + nextSteps_ = other.nextSteps_; + bitField0_ |= 0x20000000; + onChanged(); + } + if (!other.getModuleName().isEmpty()) { + moduleName_ = other.moduleName_; + bitField0_ |= 0x40000000; + onChanged(); + } + if (containersBuilder_ == null) { + if (!other.containers_.isEmpty()) { + if (containers_.isEmpty()) { + containers_ = other.containers_; + bitField0_ = (bitField0_ & ~0x80000000); + } else { + ensureContainersIsMutable(); + containers_.addAll(other.containers_); + } + onChanged(); + } + } else { + if (!other.containers_.isEmpty()) { + if (containersBuilder_.isEmpty()) { + containersBuilder_.dispose(); + containersBuilder_ = null; + containers_ = other.containers_; + bitField0_ = (bitField0_ & ~0x80000000); + containersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getContainersFieldBuilder() + : null; + } else { + containersBuilder_.addAllMessages(other.containers_); + } + } + } + if (other.hasKubernetes()) { + mergeKubernetes(other.getKubernetes()); + } + if (other.hasDatabase()) { + mergeDatabase(other.getDatabase()); + } + if (other.hasAttackExposure()) { + mergeAttackExposure(other.getAttackExposure()); + } + if (filesBuilder_ == null) { + if (!other.files_.isEmpty()) { + if (files_.isEmpty()) { + files_ = other.files_; + bitField1_ = (bitField1_ & ~0x00000008); + } else { + ensureFilesIsMutable(); + files_.addAll(other.files_); + } + onChanged(); + } + } else { + if (!other.files_.isEmpty()) { + if (filesBuilder_.isEmpty()) { + filesBuilder_.dispose(); + filesBuilder_ = null; + files_ = other.files_; + bitField1_ = (bitField1_ & ~0x00000008); + filesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFilesFieldBuilder() + : null; + } else { + filesBuilder_.addAllMessages(other.files_); + } + } + } + if (other.hasCloudDlpInspection()) { + mergeCloudDlpInspection(other.getCloudDlpInspection()); + } + if (other.hasCloudDlpDataProfile()) { + mergeCloudDlpDataProfile(other.getCloudDlpDataProfile()); + } + if (other.hasKernelRootkit()) { + mergeKernelRootkit(other.getKernelRootkit()); + } + if (orgPoliciesBuilder_ == null) { + if (!other.orgPolicies_.isEmpty()) { + if (orgPolicies_.isEmpty()) { + orgPolicies_ = other.orgPolicies_; + bitField1_ = (bitField1_ & ~0x00000080); + } else { + ensureOrgPoliciesIsMutable(); + orgPolicies_.addAll(other.orgPolicies_); + } + onChanged(); + } + } else { + if (!other.orgPolicies_.isEmpty()) { + if (orgPoliciesBuilder_.isEmpty()) { + orgPoliciesBuilder_.dispose(); + orgPoliciesBuilder_ = null; + orgPolicies_ = other.orgPolicies_; + bitField1_ = (bitField1_ & ~0x00000080); + orgPoliciesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getOrgPoliciesFieldBuilder() + : null; + } else { + orgPoliciesBuilder_.addAllMessages(other.orgPolicies_); + } + } + } + if (other.hasApplication()) { + mergeApplication(other.getApplication()); + } + if (other.hasBackupDisasterRecovery()) { + mergeBackupDisasterRecovery(other.getBackupDisasterRecovery()); + } + if (other.hasSecurityPosture()) { + mergeSecurityPosture(other.getSecurityPosture()); + } + if (logEntriesBuilder_ == null) { + if (!other.logEntries_.isEmpty()) { + if (logEntries_.isEmpty()) { + logEntries_ = other.logEntries_; + bitField1_ = (bitField1_ & ~0x00000800); + } else { + ensureLogEntriesIsMutable(); + logEntries_.addAll(other.logEntries_); + } + onChanged(); + } + } else { + if (!other.logEntries_.isEmpty()) { + if (logEntriesBuilder_.isEmpty()) { + logEntriesBuilder_.dispose(); + logEntriesBuilder_ = null; + logEntries_ = other.logEntries_; + bitField1_ = (bitField1_ & ~0x00000800); + logEntriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getLogEntriesFieldBuilder() + : null; + } else { + logEntriesBuilder_.addAllMessages(other.logEntries_); + } + } + } + if (loadBalancersBuilder_ == null) { + if (!other.loadBalancers_.isEmpty()) { + if (loadBalancers_.isEmpty()) { + loadBalancers_ = other.loadBalancers_; + bitField1_ = (bitField1_ & ~0x00001000); + } else { + ensureLoadBalancersIsMutable(); + loadBalancers_.addAll(other.loadBalancers_); + } + onChanged(); + } + } else { + if (!other.loadBalancers_.isEmpty()) { + if (loadBalancersBuilder_.isEmpty()) { + loadBalancersBuilder_.dispose(); + loadBalancersBuilder_ = null; + loadBalancers_ = other.loadBalancers_; + bitField1_ = (bitField1_ & ~0x00001000); + loadBalancersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getLoadBalancersFieldBuilder() + : null; + } else { + loadBalancersBuilder_.addAllMessages(other.loadBalancers_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + canonicalName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + resourceName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 48: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 48 + case 58: + { + category_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 58 + case 66: + { + externalUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 66 + case 74: + { + com.google.protobuf.MapEntry + sourceProperties__ = + input.readMessage( + SourcePropertiesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableSourceProperties() + .ensureBuilderMap() + .put(sourceProperties__.getKey(), sourceProperties__.getValue()); + bitField0_ |= 0x00000080; + break; + } // case 74 + case 82: + { + input.readMessage(getSecurityMarksFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 82 + case 90: + { + input.readMessage(getEventTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 90 + case 98: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 98 + case 112: + { + severity_ = input.readEnum(); + bitField0_ |= 0x00000800; + break; + } // case 112 + case 120: + { + mute_ = input.readEnum(); + bitField0_ |= 0x00001000; + break; + } // case 120 + case 128: + { + findingClass_ = input.readEnum(); + bitField0_ |= 0x00002000; + break; + } // case 128 + case 138: + { + input.readMessage(getIndicatorFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 138 + case 146: + { + input.readMessage(getVulnerabilityFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00008000; + break; + } // case 146 + case 154: + { + input.readMessage(getMuteUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00010000; + break; + } // case 154 + case 162: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.securitycenter.v2.ExternalSystem> + externalSystems__ = + input.readMessage( + ExternalSystemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableExternalSystems() + .ensureBuilderMap() + .put(externalSystems__.getKey(), externalSystems__.getValue()); + bitField0_ |= 0x00020000; + break; + } // case 162 + case 170: + { + input.readMessage(getMitreAttackFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00040000; + break; + } // case 170 + case 178: + { + input.readMessage(getAccessFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00080000; + break; + } // case 178 + case 186: + { + com.google.cloud.securitycenter.v2.Connection m = + input.readMessage( + com.google.cloud.securitycenter.v2.Connection.parser(), extensionRegistry); + if (connectionsBuilder_ == null) { + ensureConnectionsIsMutable(); + connections_.add(m); + } else { + connectionsBuilder_.addMessage(m); + } + break; + } // case 186 + case 194: + { + muteInitiator_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00200000; + break; + } // case 194 + case 202: + { + com.google.cloud.securitycenter.v2.Process m = + input.readMessage( + com.google.cloud.securitycenter.v2.Process.parser(), extensionRegistry); + if (processesBuilder_ == null) { + ensureProcessesIsMutable(); + processes_.add(m); + } else { + processesBuilder_.addMessage(m); + } + break; + } // case 202 + case 210: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.securitycenter.v2.ContactDetails> + contacts__ = + input.readMessage( + ContactsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableContacts() + .ensureBuilderMap() + .put(contacts__.getKey(), contacts__.getValue()); + bitField0_ |= 0x00800000; + break; + } // case 210 + case 218: + { + com.google.cloud.securitycenter.v2.Compliance m = + input.readMessage( + com.google.cloud.securitycenter.v2.Compliance.parser(), extensionRegistry); + if (compliancesBuilder_ == null) { + ensureCompliancesIsMutable(); + compliances_.add(m); + } else { + compliancesBuilder_.addMessage(m); + } + break; + } // case 218 + case 234: + { + parentDisplayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x02000000; + break; + } // case 234 + case 242: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x04000000; + break; + } // case 242 + case 250: + { + input.readMessage(getExfiltrationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x08000000; + break; + } // case 250 + case 258: + { + com.google.cloud.securitycenter.v2.IamBinding m = + input.readMessage( + com.google.cloud.securitycenter.v2.IamBinding.parser(), extensionRegistry); + if (iamBindingsBuilder_ == null) { + ensureIamBindingsIsMutable(); + iamBindings_.add(m); + } else { + iamBindingsBuilder_.addMessage(m); + } + break; + } // case 258 + case 266: + { + nextSteps_ = input.readStringRequireUtf8(); + bitField0_ |= 0x20000000; + break; + } // case 266 + case 274: + { + moduleName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x40000000; + break; + } // case 274 + case 282: + { + com.google.cloud.securitycenter.v2.Container m = + input.readMessage( + com.google.cloud.securitycenter.v2.Container.parser(), extensionRegistry); + if (containersBuilder_ == null) { + ensureContainersIsMutable(); + containers_.add(m); + } else { + containersBuilder_.addMessage(m); + } + break; + } // case 282 + case 290: + { + input.readMessage(getKubernetesFieldBuilder().getBuilder(), extensionRegistry); + bitField1_ |= 0x00000001; + break; + } // case 290 + case 298: + { + input.readMessage(getDatabaseFieldBuilder().getBuilder(), extensionRegistry); + bitField1_ |= 0x00000002; + break; + } // case 298 + case 306: + { + input.readMessage(getAttackExposureFieldBuilder().getBuilder(), extensionRegistry); + bitField1_ |= 0x00000004; + break; + } // case 306 + case 314: + { + com.google.cloud.securitycenter.v2.File m = + input.readMessage( + com.google.cloud.securitycenter.v2.File.parser(), extensionRegistry); + if (filesBuilder_ == null) { + ensureFilesIsMutable(); + files_.add(m); + } else { + filesBuilder_.addMessage(m); + } + break; + } // case 314 + case 322: + { + input.readMessage( + getCloudDlpInspectionFieldBuilder().getBuilder(), extensionRegistry); + bitField1_ |= 0x00000010; + break; + } // case 322 + case 330: + { + input.readMessage( + getCloudDlpDataProfileFieldBuilder().getBuilder(), extensionRegistry); + bitField1_ |= 0x00000020; + break; + } // case 330 + case 338: + { + input.readMessage(getKernelRootkitFieldBuilder().getBuilder(), extensionRegistry); + bitField1_ |= 0x00000040; + break; + } // case 338 + case 346: + { + com.google.cloud.securitycenter.v2.OrgPolicy m = + input.readMessage( + com.google.cloud.securitycenter.v2.OrgPolicy.parser(), extensionRegistry); + if (orgPoliciesBuilder_ == null) { + ensureOrgPoliciesIsMutable(); + orgPolicies_.add(m); + } else { + orgPoliciesBuilder_.addMessage(m); + } + break; + } // case 346 + case 362: + { + input.readMessage(getApplicationFieldBuilder().getBuilder(), extensionRegistry); + bitField1_ |= 0x00000100; + break; + } // case 362 + case 378: + { + input.readMessage( + getBackupDisasterRecoveryFieldBuilder().getBuilder(), extensionRegistry); + bitField1_ |= 0x00000200; + break; + } // case 378 + case 386: + { + input.readMessage(getSecurityPostureFieldBuilder().getBuilder(), extensionRegistry); + bitField1_ |= 0x00000400; + break; + } // case 386 + case 394: + { + com.google.cloud.securitycenter.v2.LogEntry m = + input.readMessage( + com.google.cloud.securitycenter.v2.LogEntry.parser(), extensionRegistry); + if (logEntriesBuilder_ == null) { + ensureLogEntriesIsMutable(); + logEntries_.add(m); + } else { + logEntriesBuilder_.addMessage(m); + } + break; + } // case 394 + case 402: + { + com.google.cloud.securitycenter.v2.LoadBalancer m = + input.readMessage( + com.google.cloud.securitycenter.v2.LoadBalancer.parser(), + extensionRegistry); + if (loadBalancersBuilder_ == null) { + ensureLoadBalancersIsMutable(); + loadBalancers_.add(m); + } else { + loadBalancersBuilder_.addMessage(m); + } + break; + } // case 402 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + private int bitField1_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The [relative resource
+     * name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
+     * of the finding. The following list shows some examples:
+     *
+     * +
+     * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`
+     * +
+     * `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+     * + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`
+     * +
+     * `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+     * + `projects/{project_id}/sources/{source_id}/findings/{finding_id}`
+     * +
+     * `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * The [relative resource
+     * name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
+     * of the finding. The following list shows some examples:
+     *
+     * +
+     * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`
+     * +
+     * `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+     * + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`
+     * +
+     * `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+     * + `projects/{project_id}/sources/{source_id}/findings/{finding_id}`
+     * +
+     * `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * The [relative resource
+     * name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
+     * of the finding. The following list shows some examples:
+     *
+     * +
+     * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`
+     * +
+     * `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+     * + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`
+     * +
+     * `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+     * + `projects/{project_id}/sources/{source_id}/findings/{finding_id}`
+     * +
+     * `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+     * 
+ * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The [relative resource
+     * name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
+     * of the finding. The following list shows some examples:
+     *
+     * +
+     * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`
+     * +
+     * `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+     * + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`
+     * +
+     * `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+     * + `projects/{project_id}/sources/{source_id}/findings/{finding_id}`
+     * +
+     * `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The [relative resource
+     * name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
+     * of the finding. The following list shows some examples:
+     *
+     * +
+     * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`
+     * +
+     * `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+     * + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`
+     * +
+     * `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+     * + `projects/{project_id}/sources/{source_id}/findings/{finding_id}`
+     * +
+     * `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+     * 
+ * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object canonicalName_ = ""; + /** + * + * + *
+     * Output only. The canonical name of the finding. The following list shows
+     * some examples:
+     *
+     * +
+     * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`
+     * +
+     * `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+     * + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`
+     * +
+     * `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+     * + `projects/{project_id}/sources/{source_id}/findings/{finding_id}`
+     * +
+     * `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+     *
+     * The prefix is the closest CRM ancestor of the resource associated with the
+     * finding.
+     * 
+ * + * string canonical_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The canonicalName. + */ + public java.lang.String getCanonicalName() { + java.lang.Object ref = canonicalName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + canonicalName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The canonical name of the finding. The following list shows
+     * some examples:
+     *
+     * +
+     * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`
+     * +
+     * `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+     * + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`
+     * +
+     * `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+     * + `projects/{project_id}/sources/{source_id}/findings/{finding_id}`
+     * +
+     * `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+     *
+     * The prefix is the closest CRM ancestor of the resource associated with the
+     * finding.
+     * 
+ * + * string canonical_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for canonicalName. + */ + public com.google.protobuf.ByteString getCanonicalNameBytes() { + java.lang.Object ref = canonicalName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + canonicalName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The canonical name of the finding. The following list shows
+     * some examples:
+     *
+     * +
+     * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`
+     * +
+     * `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+     * + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`
+     * +
+     * `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+     * + `projects/{project_id}/sources/{source_id}/findings/{finding_id}`
+     * +
+     * `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+     *
+     * The prefix is the closest CRM ancestor of the resource associated with the
+     * finding.
+     * 
+ * + * string canonical_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The canonicalName to set. + * @return This builder for chaining. + */ + public Builder setCanonicalName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + canonicalName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The canonical name of the finding. The following list shows
+     * some examples:
+     *
+     * +
+     * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`
+     * +
+     * `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+     * + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`
+     * +
+     * `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+     * + `projects/{project_id}/sources/{source_id}/findings/{finding_id}`
+     * +
+     * `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+     *
+     * The prefix is the closest CRM ancestor of the resource associated with the
+     * finding.
+     * 
+ * + * string canonical_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearCanonicalName() { + canonicalName_ = getDefaultInstance().getCanonicalName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The canonical name of the finding. The following list shows
+     * some examples:
+     *
+     * +
+     * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`
+     * +
+     * `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+     * + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`
+     * +
+     * `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+     * + `projects/{project_id}/sources/{source_id}/findings/{finding_id}`
+     * +
+     * `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+     *
+     * The prefix is the closest CRM ancestor of the resource associated with the
+     * finding.
+     * 
+ * + * string canonical_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for canonicalName to set. + * @return This builder for chaining. + */ + public Builder setCanonicalNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + canonicalName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * The relative resource name of the source and location the finding belongs
+     * to. See:
+     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
+     * This field is immutable after creation time. The following list shows some
+     * examples:
+     *
+     * + `organizations/{organization_id}/sources/{source_id}`
+     * + `folders/{folders_id}/sources/{source_id}`
+     * + `projects/{projects_id}/sources/{source_id}`
+     * +
+     * `organizations/{organization_id}/sources/{source_id}/locations/{location_id}`
+     * + `folders/{folders_id}/sources/{source_id}/locations/{location_id}`
+     * + `projects/{projects_id}/sources/{source_id}/locations/{location_id}`
+     * 
+ * + * string parent = 3; + * + * @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; + } + } + /** + * + * + *
+     * The relative resource name of the source and location the finding belongs
+     * to. See:
+     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
+     * This field is immutable after creation time. The following list shows some
+     * examples:
+     *
+     * + `organizations/{organization_id}/sources/{source_id}`
+     * + `folders/{folders_id}/sources/{source_id}`
+     * + `projects/{projects_id}/sources/{source_id}`
+     * +
+     * `organizations/{organization_id}/sources/{source_id}/locations/{location_id}`
+     * + `folders/{folders_id}/sources/{source_id}/locations/{location_id}`
+     * + `projects/{projects_id}/sources/{source_id}/locations/{location_id}`
+     * 
+ * + * string parent = 3; + * + * @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; + } + } + /** + * + * + *
+     * The relative resource name of the source and location the finding belongs
+     * to. See:
+     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
+     * This field is immutable after creation time. The following list shows some
+     * examples:
+     *
+     * + `organizations/{organization_id}/sources/{source_id}`
+     * + `folders/{folders_id}/sources/{source_id}`
+     * + `projects/{projects_id}/sources/{source_id}`
+     * +
+     * `organizations/{organization_id}/sources/{source_id}/locations/{location_id}`
+     * + `folders/{folders_id}/sources/{source_id}/locations/{location_id}`
+     * + `projects/{projects_id}/sources/{source_id}/locations/{location_id}`
+     * 
+ * + * string parent = 3; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The relative resource name of the source and location the finding belongs
+     * to. See:
+     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
+     * This field is immutable after creation time. The following list shows some
+     * examples:
+     *
+     * + `organizations/{organization_id}/sources/{source_id}`
+     * + `folders/{folders_id}/sources/{source_id}`
+     * + `projects/{projects_id}/sources/{source_id}`
+     * +
+     * `organizations/{organization_id}/sources/{source_id}/locations/{location_id}`
+     * + `folders/{folders_id}/sources/{source_id}/locations/{location_id}`
+     * + `projects/{projects_id}/sources/{source_id}/locations/{location_id}`
+     * 
+ * + * string parent = 3; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The relative resource name of the source and location the finding belongs
+     * to. See:
+     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
+     * This field is immutable after creation time. The following list shows some
+     * examples:
+     *
+     * + `organizations/{organization_id}/sources/{source_id}`
+     * + `folders/{folders_id}/sources/{source_id}`
+     * + `projects/{projects_id}/sources/{source_id}`
+     * +
+     * `organizations/{organization_id}/sources/{source_id}/locations/{location_id}`
+     * + `folders/{folders_id}/sources/{source_id}/locations/{location_id}`
+     * + `projects/{projects_id}/sources/{source_id}/locations/{location_id}`
+     * 
+ * + * string parent = 3; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object resourceName_ = ""; + /** + * + * + *
+     * Immutable. For findings on Google Cloud resources, the full resource
+     * name of the Google Cloud resource this finding is for. See:
+     * https://cloud.google.com/apis/design/resource_names#full_resource_name
+     * When the finding is for a non-Google Cloud resource, the resourceName can
+     * be a customer or partner defined string.
+     * 
+ * + * string resource_name = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The resourceName. + */ + public java.lang.String getResourceName() { + java.lang.Object ref = resourceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. For findings on Google Cloud resources, the full resource
+     * name of the Google Cloud resource this finding is for. See:
+     * https://cloud.google.com/apis/design/resource_names#full_resource_name
+     * When the finding is for a non-Google Cloud resource, the resourceName can
+     * be a customer or partner defined string.
+     * 
+ * + * string resource_name = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for resourceName. + */ + public com.google.protobuf.ByteString getResourceNameBytes() { + java.lang.Object ref = resourceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. For findings on Google Cloud resources, the full resource
+     * name of the Google Cloud resource this finding is for. See:
+     * https://cloud.google.com/apis/design/resource_names#full_resource_name
+     * When the finding is for a non-Google Cloud resource, the resourceName can
+     * be a customer or partner defined string.
+     * 
+ * + * string resource_name = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The resourceName to set. + * @return This builder for chaining. + */ + public Builder setResourceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resourceName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. For findings on Google Cloud resources, the full resource
+     * name of the Google Cloud resource this finding is for. See:
+     * https://cloud.google.com/apis/design/resource_names#full_resource_name
+     * When the finding is for a non-Google Cloud resource, the resourceName can
+     * be a customer or partner defined string.
+     * 
+ * + * string resource_name = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearResourceName() { + resourceName_ = getDefaultInstance().getResourceName(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. For findings on Google Cloud resources, the full resource
+     * name of the Google Cloud resource this finding is for. See:
+     * https://cloud.google.com/apis/design/resource_names#full_resource_name
+     * When the finding is for a non-Google Cloud resource, the resourceName can
+     * be a customer or partner defined string.
+     * 
+ * + * string resource_name = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for resourceName to set. + * @return This builder for chaining. + */ + public Builder setResourceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resourceName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The state of the finding.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Finding.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The state of the finding.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Finding.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The state of the finding.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Finding.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Finding.State getState() { + com.google.cloud.securitycenter.v2.Finding.State result = + com.google.cloud.securitycenter.v2.Finding.State.forNumber(state_); + return result == null + ? com.google.cloud.securitycenter.v2.Finding.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The state of the finding.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Finding.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.securitycenter.v2.Finding.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The state of the finding.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Finding.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000010); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object category_ = ""; + /** + * + * + *
+     * Immutable. The additional taxonomy group within findings from a given
+     * source. Example: "XSS_FLASH_INJECTION"
+     * 
+ * + * string category = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The category. + */ + public java.lang.String getCategory() { + java.lang.Object ref = category_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + category_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. The additional taxonomy group within findings from a given
+     * source. Example: "XSS_FLASH_INJECTION"
+     * 
+ * + * string category = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for category. + */ + public com.google.protobuf.ByteString getCategoryBytes() { + java.lang.Object ref = category_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + category_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. The additional taxonomy group within findings from a given
+     * source. Example: "XSS_FLASH_INJECTION"
+     * 
+ * + * string category = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The category to set. + * @return This builder for chaining. + */ + public Builder setCategory(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + category_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The additional taxonomy group within findings from a given
+     * source. Example: "XSS_FLASH_INJECTION"
+     * 
+ * + * string category = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearCategory() { + category_ = getDefaultInstance().getCategory(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The additional taxonomy group within findings from a given
+     * source. Example: "XSS_FLASH_INJECTION"
+     * 
+ * + * string category = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for category to set. + * @return This builder for chaining. + */ + public Builder setCategoryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + category_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object externalUri_ = ""; + /** + * + * + *
+     * The URI that, if available, points to a web page outside of Security
+     * Command Center where additional information about the finding can be found.
+     * This field is guaranteed to be either empty or a well formed URL.
+     * 
+ * + * string external_uri = 8; + * + * @return The externalUri. + */ + public java.lang.String getExternalUri() { + java.lang.Object ref = externalUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The URI that, if available, points to a web page outside of Security
+     * Command Center where additional information about the finding can be found.
+     * This field is guaranteed to be either empty or a well formed URL.
+     * 
+ * + * string external_uri = 8; + * + * @return The bytes for externalUri. + */ + public com.google.protobuf.ByteString getExternalUriBytes() { + java.lang.Object ref = externalUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The URI that, if available, points to a web page outside of Security
+     * Command Center where additional information about the finding can be found.
+     * This field is guaranteed to be either empty or a well formed URL.
+     * 
+ * + * string external_uri = 8; + * + * @param value The externalUri to set. + * @return This builder for chaining. + */ + public Builder setExternalUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + externalUri_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * The URI that, if available, points to a web page outside of Security
+     * Command Center where additional information about the finding can be found.
+     * This field is guaranteed to be either empty or a well formed URL.
+     * 
+ * + * string external_uri = 8; + * + * @return This builder for chaining. + */ + public Builder clearExternalUri() { + externalUri_ = getDefaultInstance().getExternalUri(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * The URI that, if available, points to a web page outside of Security
+     * Command Center where additional information about the finding can be found.
+     * This field is guaranteed to be either empty or a well formed URL.
+     * 
+ * + * string external_uri = 8; + * + * @param value The bytes for externalUri to set. + * @return This builder for chaining. + */ + public Builder setExternalUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + externalUri_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private static final class SourcePropertiesConverter + implements com.google.protobuf.MapFieldBuilder.Converter< + java.lang.String, com.google.protobuf.ValueOrBuilder, com.google.protobuf.Value> { + @java.lang.Override + public com.google.protobuf.Value build(com.google.protobuf.ValueOrBuilder val) { + if (val instanceof com.google.protobuf.Value) { + return (com.google.protobuf.Value) val; + } + return ((com.google.protobuf.Value.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry + defaultEntry() { + return SourcePropertiesDefaultEntryHolder.defaultEntry; + } + }; + + private static final SourcePropertiesConverter sourcePropertiesConverter = + new SourcePropertiesConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.protobuf.ValueOrBuilder, + com.google.protobuf.Value, + com.google.protobuf.Value.Builder> + sourceProperties_; + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.protobuf.ValueOrBuilder, + com.google.protobuf.Value, + com.google.protobuf.Value.Builder> + internalGetSourceProperties() { + if (sourceProperties_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(sourcePropertiesConverter); + } + return sourceProperties_; + } + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.protobuf.ValueOrBuilder, + com.google.protobuf.Value, + com.google.protobuf.Value.Builder> + internalGetMutableSourceProperties() { + if (sourceProperties_ == null) { + sourceProperties_ = new com.google.protobuf.MapFieldBuilder<>(sourcePropertiesConverter); + } + bitField0_ |= 0x00000080; + onChanged(); + return sourceProperties_; + } + + public int getSourcePropertiesCount() { + return internalGetSourceProperties().ensureBuilderMap().size(); + } + /** + * + * + *
+     * Source specific properties. These properties are managed by the source
+     * that writes the finding. The key names in the source_properties map must be
+     * between 1 and 255 characters, and must start with a letter and contain
+     * alphanumeric characters or underscores only.
+     * 
+ * + * map<string, .google.protobuf.Value> source_properties = 9; + */ + @java.lang.Override + public boolean containsSourceProperties(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetSourceProperties().ensureBuilderMap().containsKey(key); + } + /** Use {@link #getSourcePropertiesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getSourceProperties() { + return getSourcePropertiesMap(); + } + /** + * + * + *
+     * Source specific properties. These properties are managed by the source
+     * that writes the finding. The key names in the source_properties map must be
+     * between 1 and 255 characters, and must start with a letter and contain
+     * alphanumeric characters or underscores only.
+     * 
+ * + * map<string, .google.protobuf.Value> source_properties = 9; + */ + @java.lang.Override + public java.util.Map getSourcePropertiesMap() { + return internalGetSourceProperties().getImmutableMap(); + } + /** + * + * + *
+     * Source specific properties. These properties are managed by the source
+     * that writes the finding. The key names in the source_properties map must be
+     * between 1 and 255 characters, and must start with a letter and contain
+     * alphanumeric characters or underscores only.
+     * 
+ * + * map<string, .google.protobuf.Value> source_properties = 9; + */ + @java.lang.Override + public /* nullable */ com.google.protobuf.Value getSourcePropertiesOrDefault( + java.lang.String key, + /* nullable */ + com.google.protobuf.Value defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetMutableSourceProperties().ensureBuilderMap(); + return map.containsKey(key) ? sourcePropertiesConverter.build(map.get(key)) : defaultValue; + } + /** + * + * + *
+     * Source specific properties. These properties are managed by the source
+     * that writes the finding. The key names in the source_properties map must be
+     * between 1 and 255 characters, and must start with a letter and contain
+     * alphanumeric characters or underscores only.
+     * 
+ * + * map<string, .google.protobuf.Value> source_properties = 9; + */ + @java.lang.Override + public com.google.protobuf.Value getSourcePropertiesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetMutableSourceProperties().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return sourcePropertiesConverter.build(map.get(key)); + } + + public Builder clearSourceProperties() { + bitField0_ = (bitField0_ & ~0x00000080); + internalGetMutableSourceProperties().clear(); + return this; + } + /** + * + * + *
+     * Source specific properties. These properties are managed by the source
+     * that writes the finding. The key names in the source_properties map must be
+     * between 1 and 255 characters, and must start with a letter and contain
+     * alphanumeric characters or underscores only.
+     * 
+ * + * map<string, .google.protobuf.Value> source_properties = 9; + */ + public Builder removeSourceProperties(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableSourceProperties().ensureBuilderMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableSourceProperties() { + bitField0_ |= 0x00000080; + return internalGetMutableSourceProperties().ensureMessageMap(); + } + /** + * + * + *
+     * Source specific properties. These properties are managed by the source
+     * that writes the finding. The key names in the source_properties map must be
+     * between 1 and 255 characters, and must start with a letter and contain
+     * alphanumeric characters or underscores only.
+     * 
+ * + * map<string, .google.protobuf.Value> source_properties = 9; + */ + public Builder putSourceProperties(java.lang.String key, com.google.protobuf.Value value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableSourceProperties().ensureBuilderMap().put(key, value); + bitField0_ |= 0x00000080; + return this; + } + /** + * + * + *
+     * Source specific properties. These properties are managed by the source
+     * that writes the finding. The key names in the source_properties map must be
+     * between 1 and 255 characters, and must start with a letter and contain
+     * alphanumeric characters or underscores only.
+     * 
+ * + * map<string, .google.protobuf.Value> source_properties = 9; + */ + public Builder putAllSourceProperties( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableSourceProperties().ensureBuilderMap().putAll(values); + bitField0_ |= 0x00000080; + return this; + } + /** + * + * + *
+     * Source specific properties. These properties are managed by the source
+     * that writes the finding. The key names in the source_properties map must be
+     * between 1 and 255 characters, and must start with a letter and contain
+     * alphanumeric characters or underscores only.
+     * 
+ * + * map<string, .google.protobuf.Value> source_properties = 9; + */ + public com.google.protobuf.Value.Builder putSourcePropertiesBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = + internalGetMutableSourceProperties().ensureBuilderMap(); + com.google.protobuf.ValueOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.protobuf.Value.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.protobuf.Value) { + entry = ((com.google.protobuf.Value) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.protobuf.Value.Builder) entry; + } + + private com.google.cloud.securitycenter.v2.SecurityMarks securityMarks_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.SecurityMarks, + com.google.cloud.securitycenter.v2.SecurityMarks.Builder, + com.google.cloud.securitycenter.v2.SecurityMarksOrBuilder> + securityMarksBuilder_; + /** + * + * + *
+     * Output only. User specified security marks. These marks are entirely
+     * managed by the user and come from the SecurityMarks resource that belongs
+     * to the finding.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.SecurityMarks security_marks = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the securityMarks field is set. + */ + public boolean hasSecurityMarks() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+     * Output only. User specified security marks. These marks are entirely
+     * managed by the user and come from the SecurityMarks resource that belongs
+     * to the finding.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.SecurityMarks security_marks = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The securityMarks. + */ + public com.google.cloud.securitycenter.v2.SecurityMarks getSecurityMarks() { + if (securityMarksBuilder_ == null) { + return securityMarks_ == null + ? com.google.cloud.securitycenter.v2.SecurityMarks.getDefaultInstance() + : securityMarks_; + } else { + return securityMarksBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. User specified security marks. These marks are entirely
+     * managed by the user and come from the SecurityMarks resource that belongs
+     * to the finding.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.SecurityMarks security_marks = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSecurityMarks(com.google.cloud.securitycenter.v2.SecurityMarks value) { + if (securityMarksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + securityMarks_ = value; + } else { + securityMarksBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. User specified security marks. These marks are entirely
+     * managed by the user and come from the SecurityMarks resource that belongs
+     * to the finding.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.SecurityMarks security_marks = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSecurityMarks( + com.google.cloud.securitycenter.v2.SecurityMarks.Builder builderForValue) { + if (securityMarksBuilder_ == null) { + securityMarks_ = builderForValue.build(); + } else { + securityMarksBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. User specified security marks. These marks are entirely
+     * managed by the user and come from the SecurityMarks resource that belongs
+     * to the finding.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.SecurityMarks security_marks = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeSecurityMarks(com.google.cloud.securitycenter.v2.SecurityMarks value) { + if (securityMarksBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && securityMarks_ != null + && securityMarks_ + != com.google.cloud.securitycenter.v2.SecurityMarks.getDefaultInstance()) { + getSecurityMarksBuilder().mergeFrom(value); + } else { + securityMarks_ = value; + } + } else { + securityMarksBuilder_.mergeFrom(value); + } + if (securityMarks_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. User specified security marks. These marks are entirely
+     * managed by the user and come from the SecurityMarks resource that belongs
+     * to the finding.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.SecurityMarks security_marks = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearSecurityMarks() { + bitField0_ = (bitField0_ & ~0x00000100); + securityMarks_ = null; + if (securityMarksBuilder_ != null) { + securityMarksBuilder_.dispose(); + securityMarksBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. User specified security marks. These marks are entirely
+     * managed by the user and come from the SecurityMarks resource that belongs
+     * to the finding.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.SecurityMarks security_marks = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.securitycenter.v2.SecurityMarks.Builder getSecurityMarksBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getSecurityMarksFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. User specified security marks. These marks are entirely
+     * managed by the user and come from the SecurityMarks resource that belongs
+     * to the finding.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.SecurityMarks security_marks = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.securitycenter.v2.SecurityMarksOrBuilder getSecurityMarksOrBuilder() { + if (securityMarksBuilder_ != null) { + return securityMarksBuilder_.getMessageOrBuilder(); + } else { + return securityMarks_ == null + ? com.google.cloud.securitycenter.v2.SecurityMarks.getDefaultInstance() + : securityMarks_; + } + } + /** + * + * + *
+     * Output only. User specified security marks. These marks are entirely
+     * managed by the user and come from the SecurityMarks resource that belongs
+     * to the finding.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.SecurityMarks security_marks = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.SecurityMarks, + com.google.cloud.securitycenter.v2.SecurityMarks.Builder, + com.google.cloud.securitycenter.v2.SecurityMarksOrBuilder> + getSecurityMarksFieldBuilder() { + if (securityMarksBuilder_ == null) { + securityMarksBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.SecurityMarks, + com.google.cloud.securitycenter.v2.SecurityMarks.Builder, + com.google.cloud.securitycenter.v2.SecurityMarksOrBuilder>( + getSecurityMarks(), getParentForChildren(), isClean()); + securityMarks_ = null; + } + return securityMarksBuilder_; + } + + private com.google.protobuf.Timestamp eventTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + eventTimeBuilder_; + /** + * + * + *
+     * The time the finding was first detected. If an existing finding is updated,
+     * then this is the time the update occurred.
+     * For example, if the finding represents an open firewall, this property
+     * captures the time the detector believes the firewall became open. The
+     * accuracy is determined by the detector. If the finding is later resolved,
+     * then this time reflects when the finding was resolved. This must not
+     * be set to a value greater than the current timestamp.
+     * 
+ * + * .google.protobuf.Timestamp event_time = 11; + * + * @return Whether the eventTime field is set. + */ + public boolean hasEventTime() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * + * + *
+     * The time the finding was first detected. If an existing finding is updated,
+     * then this is the time the update occurred.
+     * For example, if the finding represents an open firewall, this property
+     * captures the time the detector believes the firewall became open. The
+     * accuracy is determined by the detector. If the finding is later resolved,
+     * then this time reflects when the finding was resolved. This must not
+     * be set to a value greater than the current timestamp.
+     * 
+ * + * .google.protobuf.Timestamp event_time = 11; + * + * @return The eventTime. + */ + public com.google.protobuf.Timestamp getEventTime() { + if (eventTimeBuilder_ == null) { + return eventTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : eventTime_; + } else { + return eventTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time the finding was first detected. If an existing finding is updated,
+     * then this is the time the update occurred.
+     * For example, if the finding represents an open firewall, this property
+     * captures the time the detector believes the firewall became open. The
+     * accuracy is determined by the detector. If the finding is later resolved,
+     * then this time reflects when the finding was resolved. This must not
+     * be set to a value greater than the current timestamp.
+     * 
+ * + * .google.protobuf.Timestamp event_time = 11; + */ + public Builder setEventTime(com.google.protobuf.Timestamp value) { + if (eventTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + eventTime_ = value; + } else { + eventTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * The time the finding was first detected. If an existing finding is updated,
+     * then this is the time the update occurred.
+     * For example, if the finding represents an open firewall, this property
+     * captures the time the detector believes the firewall became open. The
+     * accuracy is determined by the detector. If the finding is later resolved,
+     * then this time reflects when the finding was resolved. This must not
+     * be set to a value greater than the current timestamp.
+     * 
+ * + * .google.protobuf.Timestamp event_time = 11; + */ + public Builder setEventTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (eventTimeBuilder_ == null) { + eventTime_ = builderForValue.build(); + } else { + eventTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * The time the finding was first detected. If an existing finding is updated,
+     * then this is the time the update occurred.
+     * For example, if the finding represents an open firewall, this property
+     * captures the time the detector believes the firewall became open. The
+     * accuracy is determined by the detector. If the finding is later resolved,
+     * then this time reflects when the finding was resolved. This must not
+     * be set to a value greater than the current timestamp.
+     * 
+ * + * .google.protobuf.Timestamp event_time = 11; + */ + public Builder mergeEventTime(com.google.protobuf.Timestamp value) { + if (eventTimeBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && eventTime_ != null + && eventTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEventTimeBuilder().mergeFrom(value); + } else { + eventTime_ = value; + } + } else { + eventTimeBuilder_.mergeFrom(value); + } + if (eventTime_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The time the finding was first detected. If an existing finding is updated,
+     * then this is the time the update occurred.
+     * For example, if the finding represents an open firewall, this property
+     * captures the time the detector believes the firewall became open. The
+     * accuracy is determined by the detector. If the finding is later resolved,
+     * then this time reflects when the finding was resolved. This must not
+     * be set to a value greater than the current timestamp.
+     * 
+ * + * .google.protobuf.Timestamp event_time = 11; + */ + public Builder clearEventTime() { + bitField0_ = (bitField0_ & ~0x00000200); + eventTime_ = null; + if (eventTimeBuilder_ != null) { + eventTimeBuilder_.dispose(); + eventTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The time the finding was first detected. If an existing finding is updated,
+     * then this is the time the update occurred.
+     * For example, if the finding represents an open firewall, this property
+     * captures the time the detector believes the firewall became open. The
+     * accuracy is determined by the detector. If the finding is later resolved,
+     * then this time reflects when the finding was resolved. This must not
+     * be set to a value greater than the current timestamp.
+     * 
+ * + * .google.protobuf.Timestamp event_time = 11; + */ + public com.google.protobuf.Timestamp.Builder getEventTimeBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getEventTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time the finding was first detected. If an existing finding is updated,
+     * then this is the time the update occurred.
+     * For example, if the finding represents an open firewall, this property
+     * captures the time the detector believes the firewall became open. The
+     * accuracy is determined by the detector. If the finding is later resolved,
+     * then this time reflects when the finding was resolved. This must not
+     * be set to a value greater than the current timestamp.
+     * 
+ * + * .google.protobuf.Timestamp event_time = 11; + */ + public com.google.protobuf.TimestampOrBuilder getEventTimeOrBuilder() { + if (eventTimeBuilder_ != null) { + return eventTimeBuilder_.getMessageOrBuilder(); + } else { + return eventTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : eventTime_; + } + } + /** + * + * + *
+     * The time the finding was first detected. If an existing finding is updated,
+     * then this is the time the update occurred.
+     * For example, if the finding represents an open firewall, this property
+     * captures the time the detector believes the firewall became open. The
+     * accuracy is determined by the detector. If the finding is later resolved,
+     * then this time reflects when the finding was resolved. This must not
+     * be set to a value greater than the current timestamp.
+     * 
+ * + * .google.protobuf.Timestamp event_time = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEventTimeFieldBuilder() { + if (eventTimeBuilder_ == null) { + eventTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEventTime(), getParentForChildren(), isClean()); + eventTime_ = null; + } + return eventTimeBuilder_; + } + + 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 finding was created in Security Command
+     * Center.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * + * + *
+     * Output only. The time at which the finding was created in Security Command
+     * Center.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 12 [(.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 finding was created in Security Command
+     * Center.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 12 [(.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; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time at which the finding was created in Security Command
+     * Center.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time at which the finding was created in Security Command
+     * Center.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000400; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The time at which the finding was created in Security Command
+     * Center.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000400); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time at which the finding was created in Security Command
+     * Center.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time at which the finding was created in Security Command
+     * Center.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 12 [(.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 finding was created in Security Command
+     * Center.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 12 [(.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 int severity_ = 0; + /** + * + * + *
+     * The severity of the finding. This field is managed by the source that
+     * writes the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Finding.Severity severity = 14; + * + * @return The enum numeric value on the wire for severity. + */ + @java.lang.Override + public int getSeverityValue() { + return severity_; + } + /** + * + * + *
+     * The severity of the finding. This field is managed by the source that
+     * writes the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Finding.Severity severity = 14; + * + * @param value The enum numeric value on the wire for severity to set. + * @return This builder for chaining. + */ + public Builder setSeverityValue(int value) { + severity_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * The severity of the finding. This field is managed by the source that
+     * writes the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Finding.Severity severity = 14; + * + * @return The severity. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Finding.Severity getSeverity() { + com.google.cloud.securitycenter.v2.Finding.Severity result = + com.google.cloud.securitycenter.v2.Finding.Severity.forNumber(severity_); + return result == null + ? com.google.cloud.securitycenter.v2.Finding.Severity.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The severity of the finding. This field is managed by the source that
+     * writes the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Finding.Severity severity = 14; + * + * @param value The severity to set. + * @return This builder for chaining. + */ + public Builder setSeverity(com.google.cloud.securitycenter.v2.Finding.Severity value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000800; + severity_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The severity of the finding. This field is managed by the source that
+     * writes the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Finding.Severity severity = 14; + * + * @return This builder for chaining. + */ + public Builder clearSeverity() { + bitField0_ = (bitField0_ & ~0x00000800); + severity_ = 0; + onChanged(); + return this; + } + + private int mute_ = 0; + /** + * + * + *
+     * Indicates the mute state of a finding (either muted, unmuted
+     * or undefined). Unlike other attributes of a finding, a finding provider
+     * shouldn't set the value of mute.
+     * 
+ * + * .google.cloud.securitycenter.v2.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 muted, unmuted
+     * or undefined). Unlike other attributes of a finding, a finding provider
+     * shouldn't set the value of mute.
+     * 
+ * + * .google.cloud.securitycenter.v2.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; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates the mute state of a finding (either muted, unmuted
+     * or undefined). Unlike other attributes of a finding, a finding provider
+     * shouldn't set the value of mute.
+     * 
+ * + * .google.cloud.securitycenter.v2.Finding.Mute mute = 15; + * + * @return The mute. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Finding.Mute getMute() { + com.google.cloud.securitycenter.v2.Finding.Mute result = + com.google.cloud.securitycenter.v2.Finding.Mute.forNumber(mute_); + return result == null ? com.google.cloud.securitycenter.v2.Finding.Mute.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Indicates the mute state of a finding (either muted, unmuted
+     * or undefined). Unlike other attributes of a finding, a finding provider
+     * shouldn't set the value of mute.
+     * 
+ * + * .google.cloud.securitycenter.v2.Finding.Mute mute = 15; + * + * @param value The mute to set. + * @return This builder for chaining. + */ + public Builder setMute(com.google.cloud.securitycenter.v2.Finding.Mute value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00001000; + mute_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates the mute state of a finding (either muted, unmuted
+     * or undefined). Unlike other attributes of a finding, a finding provider
+     * shouldn't set the value of mute.
+     * 
+ * + * .google.cloud.securitycenter.v2.Finding.Mute mute = 15; + * + * @return This builder for chaining. + */ + public Builder clearMute() { + bitField0_ = (bitField0_ & ~0x00001000); + mute_ = 0; + onChanged(); + return this; + } + + private int findingClass_ = 0; + /** + * + * + *
+     * The class of the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Finding.FindingClass finding_class = 16; + * + * @return The enum numeric value on the wire for findingClass. + */ + @java.lang.Override + public int getFindingClassValue() { + return findingClass_; + } + /** + * + * + *
+     * The class of the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Finding.FindingClass finding_class = 16; + * + * @param value The enum numeric value on the wire for findingClass to set. + * @return This builder for chaining. + */ + public Builder setFindingClassValue(int value) { + findingClass_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * The class of the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Finding.FindingClass finding_class = 16; + * + * @return The findingClass. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Finding.FindingClass getFindingClass() { + com.google.cloud.securitycenter.v2.Finding.FindingClass result = + com.google.cloud.securitycenter.v2.Finding.FindingClass.forNumber(findingClass_); + return result == null + ? com.google.cloud.securitycenter.v2.Finding.FindingClass.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The class of the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Finding.FindingClass finding_class = 16; + * + * @param value The findingClass to set. + * @return This builder for chaining. + */ + public Builder setFindingClass(com.google.cloud.securitycenter.v2.Finding.FindingClass value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00002000; + findingClass_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The class of the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Finding.FindingClass finding_class = 16; + * + * @return This builder for chaining. + */ + public Builder clearFindingClass() { + bitField0_ = (bitField0_ & ~0x00002000); + findingClass_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.securitycenter.v2.Indicator indicator_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Indicator, + com.google.cloud.securitycenter.v2.Indicator.Builder, + com.google.cloud.securitycenter.v2.IndicatorOrBuilder> + indicatorBuilder_; + /** + * + * + *
+     * Represents what's commonly known as an *indicator of compromise* (IoC) in
+     * computer forensics. This is an artifact observed on a network or in an
+     * operating system that, with high confidence, indicates a computer
+     * intrusion. For more information, see [Indicator of
+     * compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise).
+     * 
+ * + * .google.cloud.securitycenter.v2.Indicator indicator = 17; + * + * @return Whether the indicator field is set. + */ + public boolean hasIndicator() { + return ((bitField0_ & 0x00004000) != 0); + } + /** + * + * + *
+     * Represents what's commonly known as an *indicator of compromise* (IoC) in
+     * computer forensics. This is an artifact observed on a network or in an
+     * operating system that, with high confidence, indicates a computer
+     * intrusion. For more information, see [Indicator of
+     * compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise).
+     * 
+ * + * .google.cloud.securitycenter.v2.Indicator indicator = 17; + * + * @return The indicator. + */ + public com.google.cloud.securitycenter.v2.Indicator getIndicator() { + if (indicatorBuilder_ == null) { + return indicator_ == null + ? com.google.cloud.securitycenter.v2.Indicator.getDefaultInstance() + : indicator_; + } else { + return indicatorBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Represents what's commonly known as an *indicator of compromise* (IoC) in
+     * computer forensics. This is an artifact observed on a network or in an
+     * operating system that, with high confidence, indicates a computer
+     * intrusion. For more information, see [Indicator of
+     * compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise).
+     * 
+ * + * .google.cloud.securitycenter.v2.Indicator indicator = 17; + */ + public Builder setIndicator(com.google.cloud.securitycenter.v2.Indicator value) { + if (indicatorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + indicator_ = value; + } else { + indicatorBuilder_.setMessage(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Represents what's commonly known as an *indicator of compromise* (IoC) in
+     * computer forensics. This is an artifact observed on a network or in an
+     * operating system that, with high confidence, indicates a computer
+     * intrusion. For more information, see [Indicator of
+     * compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise).
+     * 
+ * + * .google.cloud.securitycenter.v2.Indicator indicator = 17; + */ + public Builder setIndicator( + com.google.cloud.securitycenter.v2.Indicator.Builder builderForValue) { + if (indicatorBuilder_ == null) { + indicator_ = builderForValue.build(); + } else { + indicatorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Represents what's commonly known as an *indicator of compromise* (IoC) in
+     * computer forensics. This is an artifact observed on a network or in an
+     * operating system that, with high confidence, indicates a computer
+     * intrusion. For more information, see [Indicator of
+     * compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise).
+     * 
+ * + * .google.cloud.securitycenter.v2.Indicator indicator = 17; + */ + public Builder mergeIndicator(com.google.cloud.securitycenter.v2.Indicator value) { + if (indicatorBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0) + && indicator_ != null + && indicator_ != com.google.cloud.securitycenter.v2.Indicator.getDefaultInstance()) { + getIndicatorBuilder().mergeFrom(value); + } else { + indicator_ = value; + } + } else { + indicatorBuilder_.mergeFrom(value); + } + if (indicator_ != null) { + bitField0_ |= 0x00004000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Represents what's commonly known as an *indicator of compromise* (IoC) in
+     * computer forensics. This is an artifact observed on a network or in an
+     * operating system that, with high confidence, indicates a computer
+     * intrusion. For more information, see [Indicator of
+     * compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise).
+     * 
+ * + * .google.cloud.securitycenter.v2.Indicator indicator = 17; + */ + public Builder clearIndicator() { + bitField0_ = (bitField0_ & ~0x00004000); + indicator_ = null; + if (indicatorBuilder_ != null) { + indicatorBuilder_.dispose(); + indicatorBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Represents what's commonly known as an *indicator of compromise* (IoC) in
+     * computer forensics. This is an artifact observed on a network or in an
+     * operating system that, with high confidence, indicates a computer
+     * intrusion. For more information, see [Indicator of
+     * compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise).
+     * 
+ * + * .google.cloud.securitycenter.v2.Indicator indicator = 17; + */ + public com.google.cloud.securitycenter.v2.Indicator.Builder getIndicatorBuilder() { + bitField0_ |= 0x00004000; + onChanged(); + return getIndicatorFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Represents what's commonly known as an *indicator of compromise* (IoC) in
+     * computer forensics. This is an artifact observed on a network or in an
+     * operating system that, with high confidence, indicates a computer
+     * intrusion. For more information, see [Indicator of
+     * compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise).
+     * 
+ * + * .google.cloud.securitycenter.v2.Indicator indicator = 17; + */ + public com.google.cloud.securitycenter.v2.IndicatorOrBuilder getIndicatorOrBuilder() { + if (indicatorBuilder_ != null) { + return indicatorBuilder_.getMessageOrBuilder(); + } else { + return indicator_ == null + ? com.google.cloud.securitycenter.v2.Indicator.getDefaultInstance() + : indicator_; + } + } + /** + * + * + *
+     * Represents what's commonly known as an *indicator of compromise* (IoC) in
+     * computer forensics. This is an artifact observed on a network or in an
+     * operating system that, with high confidence, indicates a computer
+     * intrusion. For more information, see [Indicator of
+     * compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise).
+     * 
+ * + * .google.cloud.securitycenter.v2.Indicator indicator = 17; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Indicator, + com.google.cloud.securitycenter.v2.Indicator.Builder, + com.google.cloud.securitycenter.v2.IndicatorOrBuilder> + getIndicatorFieldBuilder() { + if (indicatorBuilder_ == null) { + indicatorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Indicator, + com.google.cloud.securitycenter.v2.Indicator.Builder, + com.google.cloud.securitycenter.v2.IndicatorOrBuilder>( + getIndicator(), getParentForChildren(), isClean()); + indicator_ = null; + } + return indicatorBuilder_; + } + + private com.google.cloud.securitycenter.v2.Vulnerability vulnerability_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Vulnerability, + com.google.cloud.securitycenter.v2.Vulnerability.Builder, + com.google.cloud.securitycenter.v2.VulnerabilityOrBuilder> + vulnerabilityBuilder_; + /** + * + * + *
+     * Represents vulnerability-specific fields like CVE and CVSS scores.
+     * CVE stands for Common Vulnerabilities and Exposures
+     * (https://cve.mitre.org/about/)
+     * 
+ * + * .google.cloud.securitycenter.v2.Vulnerability vulnerability = 18; + * + * @return Whether the vulnerability field is set. + */ + public boolean hasVulnerability() { + return ((bitField0_ & 0x00008000) != 0); + } + /** + * + * + *
+     * Represents vulnerability-specific fields like CVE and CVSS scores.
+     * CVE stands for Common Vulnerabilities and Exposures
+     * (https://cve.mitre.org/about/)
+     * 
+ * + * .google.cloud.securitycenter.v2.Vulnerability vulnerability = 18; + * + * @return The vulnerability. + */ + public com.google.cloud.securitycenter.v2.Vulnerability getVulnerability() { + if (vulnerabilityBuilder_ == null) { + return vulnerability_ == null + ? com.google.cloud.securitycenter.v2.Vulnerability.getDefaultInstance() + : vulnerability_; + } else { + return vulnerabilityBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Represents vulnerability-specific fields like CVE and CVSS scores.
+     * CVE stands for Common Vulnerabilities and Exposures
+     * (https://cve.mitre.org/about/)
+     * 
+ * + * .google.cloud.securitycenter.v2.Vulnerability vulnerability = 18; + */ + public Builder setVulnerability(com.google.cloud.securitycenter.v2.Vulnerability value) { + if (vulnerabilityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + vulnerability_ = value; + } else { + vulnerabilityBuilder_.setMessage(value); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+     * Represents vulnerability-specific fields like CVE and CVSS scores.
+     * CVE stands for Common Vulnerabilities and Exposures
+     * (https://cve.mitre.org/about/)
+     * 
+ * + * .google.cloud.securitycenter.v2.Vulnerability vulnerability = 18; + */ + public Builder setVulnerability( + com.google.cloud.securitycenter.v2.Vulnerability.Builder builderForValue) { + if (vulnerabilityBuilder_ == null) { + vulnerability_ = builderForValue.build(); + } else { + vulnerabilityBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+     * Represents vulnerability-specific fields like CVE and CVSS scores.
+     * CVE stands for Common Vulnerabilities and Exposures
+     * (https://cve.mitre.org/about/)
+     * 
+ * + * .google.cloud.securitycenter.v2.Vulnerability vulnerability = 18; + */ + public Builder mergeVulnerability(com.google.cloud.securitycenter.v2.Vulnerability value) { + if (vulnerabilityBuilder_ == null) { + if (((bitField0_ & 0x00008000) != 0) + && vulnerability_ != null + && vulnerability_ + != com.google.cloud.securitycenter.v2.Vulnerability.getDefaultInstance()) { + getVulnerabilityBuilder().mergeFrom(value); + } else { + vulnerability_ = value; + } + } else { + vulnerabilityBuilder_.mergeFrom(value); + } + if (vulnerability_ != null) { + bitField0_ |= 0x00008000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Represents vulnerability-specific fields like CVE and CVSS scores.
+     * CVE stands for Common Vulnerabilities and Exposures
+     * (https://cve.mitre.org/about/)
+     * 
+ * + * .google.cloud.securitycenter.v2.Vulnerability vulnerability = 18; + */ + public Builder clearVulnerability() { + bitField0_ = (bitField0_ & ~0x00008000); + vulnerability_ = null; + if (vulnerabilityBuilder_ != null) { + vulnerabilityBuilder_.dispose(); + vulnerabilityBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Represents vulnerability-specific fields like CVE and CVSS scores.
+     * CVE stands for Common Vulnerabilities and Exposures
+     * (https://cve.mitre.org/about/)
+     * 
+ * + * .google.cloud.securitycenter.v2.Vulnerability vulnerability = 18; + */ + public com.google.cloud.securitycenter.v2.Vulnerability.Builder getVulnerabilityBuilder() { + bitField0_ |= 0x00008000; + onChanged(); + return getVulnerabilityFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Represents vulnerability-specific fields like CVE and CVSS scores.
+     * CVE stands for Common Vulnerabilities and Exposures
+     * (https://cve.mitre.org/about/)
+     * 
+ * + * .google.cloud.securitycenter.v2.Vulnerability vulnerability = 18; + */ + public com.google.cloud.securitycenter.v2.VulnerabilityOrBuilder getVulnerabilityOrBuilder() { + if (vulnerabilityBuilder_ != null) { + return vulnerabilityBuilder_.getMessageOrBuilder(); + } else { + return vulnerability_ == null + ? com.google.cloud.securitycenter.v2.Vulnerability.getDefaultInstance() + : vulnerability_; + } + } + /** + * + * + *
+     * Represents vulnerability-specific fields like CVE and CVSS scores.
+     * CVE stands for Common Vulnerabilities and Exposures
+     * (https://cve.mitre.org/about/)
+     * 
+ * + * .google.cloud.securitycenter.v2.Vulnerability vulnerability = 18; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Vulnerability, + com.google.cloud.securitycenter.v2.Vulnerability.Builder, + com.google.cloud.securitycenter.v2.VulnerabilityOrBuilder> + getVulnerabilityFieldBuilder() { + if (vulnerabilityBuilder_ == null) { + vulnerabilityBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Vulnerability, + com.google.cloud.securitycenter.v2.Vulnerability.Builder, + com.google.cloud.securitycenter.v2.VulnerabilityOrBuilder>( + getVulnerability(), getParentForChildren(), isClean()); + vulnerability_ = null; + } + 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 = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the muteUpdateTime field is set. + */ + public boolean hasMuteUpdateTime() { + return ((bitField0_ & 0x00010000) != 0); + } + /** + * + * + *
+     * Output only. The most recent time this finding was muted or unmuted.
+     * 
+ * + * + * .google.protobuf.Timestamp mute_update_time = 19 [(.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 = 19 [(.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; + } else { + muteUpdateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The most recent time this finding was muted or unmuted.
+     * 
+ * + * + * .google.protobuf.Timestamp mute_update_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setMuteUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (muteUpdateTimeBuilder_ == null) { + muteUpdateTime_ = builderForValue.build(); + } else { + muteUpdateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The most recent time this finding was muted or unmuted.
+     * 
+ * + * + * .google.protobuf.Timestamp mute_update_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeMuteUpdateTime(com.google.protobuf.Timestamp value) { + if (muteUpdateTimeBuilder_ == null) { + if (((bitField0_ & 0x00010000) != 0) + && muteUpdateTime_ != null + && muteUpdateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getMuteUpdateTimeBuilder().mergeFrom(value); + } else { + muteUpdateTime_ = value; + } + } else { + muteUpdateTimeBuilder_.mergeFrom(value); + } + if (muteUpdateTime_ != null) { + bitField0_ |= 0x00010000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The most recent time this finding was muted or unmuted.
+     * 
+ * + * + * .google.protobuf.Timestamp mute_update_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearMuteUpdateTime() { + bitField0_ = (bitField0_ & ~0x00010000); + muteUpdateTime_ = null; + if (muteUpdateTimeBuilder_ != null) { + muteUpdateTimeBuilder_.dispose(); + muteUpdateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The most recent time this finding was muted or unmuted.
+     * 
+ * + * + * .google.protobuf.Timestamp mute_update_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getMuteUpdateTimeBuilder() { + bitField0_ |= 0x00010000; + onChanged(); + return getMuteUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The most recent time this finding was muted or unmuted.
+     * 
+ * + * + * .google.protobuf.Timestamp mute_update_time = 19 [(.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 = 19 [(.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 static final class ExternalSystemsConverter + implements com.google.protobuf.MapFieldBuilder.Converter< + java.lang.String, + com.google.cloud.securitycenter.v2.ExternalSystemOrBuilder, + com.google.cloud.securitycenter.v2.ExternalSystem> { + @java.lang.Override + public com.google.cloud.securitycenter.v2.ExternalSystem build( + com.google.cloud.securitycenter.v2.ExternalSystemOrBuilder val) { + if (val instanceof com.google.cloud.securitycenter.v2.ExternalSystem) { + return (com.google.cloud.securitycenter.v2.ExternalSystem) val; + } + return ((com.google.cloud.securitycenter.v2.ExternalSystem.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.securitycenter.v2.ExternalSystem> + defaultEntry() { + return ExternalSystemsDefaultEntryHolder.defaultEntry; + } + }; + + private static final ExternalSystemsConverter externalSystemsConverter = + new ExternalSystemsConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.securitycenter.v2.ExternalSystemOrBuilder, + com.google.cloud.securitycenter.v2.ExternalSystem, + com.google.cloud.securitycenter.v2.ExternalSystem.Builder> + externalSystems_; + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.securitycenter.v2.ExternalSystemOrBuilder, + com.google.cloud.securitycenter.v2.ExternalSystem, + com.google.cloud.securitycenter.v2.ExternalSystem.Builder> + internalGetExternalSystems() { + if (externalSystems_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(externalSystemsConverter); + } + return externalSystems_; + } + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.securitycenter.v2.ExternalSystemOrBuilder, + com.google.cloud.securitycenter.v2.ExternalSystem, + com.google.cloud.securitycenter.v2.ExternalSystem.Builder> + internalGetMutableExternalSystems() { + if (externalSystems_ == null) { + externalSystems_ = new com.google.protobuf.MapFieldBuilder<>(externalSystemsConverter); + } + bitField0_ |= 0x00020000; + onChanged(); + return externalSystems_; + } + + public int getExternalSystemsCount() { + return internalGetExternalSystems().ensureBuilderMap().size(); + } + /** + * + * + *
+     * Output only. Third party SIEM/SOAR fields within SCC, contains external
+     * system information and external system finding fields.
+     * 
+ * + * + * map<string, .google.cloud.securitycenter.v2.ExternalSystem> external_systems = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsExternalSystems(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetExternalSystems().ensureBuilderMap().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.v2.ExternalSystem> external_systems = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map + getExternalSystemsMap() { + return internalGetExternalSystems().getImmutableMap(); + } + /** + * + * + *
+     * Output only. Third party SIEM/SOAR fields within SCC, contains external
+     * system information and external system finding fields.
+     * 
+ * + * + * map<string, .google.cloud.securitycenter.v2.ExternalSystem> external_systems = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public /* nullable */ com.google.cloud.securitycenter.v2.ExternalSystem + getExternalSystemsOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.securitycenter.v2.ExternalSystem defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map + map = internalGetMutableExternalSystems().ensureBuilderMap(); + return map.containsKey(key) ? externalSystemsConverter.build(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.v2.ExternalSystem> external_systems = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.ExternalSystem getExternalSystemsOrThrow( + java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map + map = internalGetMutableExternalSystems().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return externalSystemsConverter.build(map.get(key)); + } + + public Builder clearExternalSystems() { + bitField0_ = (bitField0_ & ~0x00020000); + internalGetMutableExternalSystems().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.v2.ExternalSystem> external_systems = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeExternalSystems(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableExternalSystems().ensureBuilderMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map + getMutableExternalSystems() { + bitField0_ |= 0x00020000; + return internalGetMutableExternalSystems().ensureMessageMap(); + } + /** + * + * + *
+     * Output only. Third party SIEM/SOAR fields within SCC, contains external
+     * system information and external system finding fields.
+     * 
+ * + * + * map<string, .google.cloud.securitycenter.v2.ExternalSystem> external_systems = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putExternalSystems( + java.lang.String key, com.google.cloud.securitycenter.v2.ExternalSystem value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableExternalSystems().ensureBuilderMap().put(key, value); + bitField0_ |= 0x00020000; + 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.v2.ExternalSystem> external_systems = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putAllExternalSystems( + java.util.Map values) { + for (java.util.Map.Entry + e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableExternalSystems().ensureBuilderMap().putAll(values); + bitField0_ |= 0x00020000; + 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.v2.ExternalSystem> external_systems = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.securitycenter.v2.ExternalSystem.Builder + putExternalSystemsBuilderIfAbsent(java.lang.String key) { + java.util.Map + builderMap = internalGetMutableExternalSystems().ensureBuilderMap(); + com.google.cloud.securitycenter.v2.ExternalSystemOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.cloud.securitycenter.v2.ExternalSystem.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.cloud.securitycenter.v2.ExternalSystem) { + entry = ((com.google.cloud.securitycenter.v2.ExternalSystem) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.cloud.securitycenter.v2.ExternalSystem.Builder) entry; + } + + private com.google.cloud.securitycenter.v2.MitreAttack mitreAttack_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.MitreAttack, + com.google.cloud.securitycenter.v2.MitreAttack.Builder, + com.google.cloud.securitycenter.v2.MitreAttackOrBuilder> + mitreAttackBuilder_; + /** + * + * + *
+     * MITRE ATT&CK tactics and techniques related to this finding.
+     * See: https://attack.mitre.org
+     * 
+ * + * .google.cloud.securitycenter.v2.MitreAttack mitre_attack = 21; + * + * @return Whether the mitreAttack field is set. + */ + public boolean hasMitreAttack() { + return ((bitField0_ & 0x00040000) != 0); + } + /** + * + * + *
+     * MITRE ATT&CK tactics and techniques related to this finding.
+     * See: https://attack.mitre.org
+     * 
+ * + * .google.cloud.securitycenter.v2.MitreAttack mitre_attack = 21; + * + * @return The mitreAttack. + */ + public com.google.cloud.securitycenter.v2.MitreAttack getMitreAttack() { + if (mitreAttackBuilder_ == null) { + return mitreAttack_ == null + ? com.google.cloud.securitycenter.v2.MitreAttack.getDefaultInstance() + : mitreAttack_; + } else { + return mitreAttackBuilder_.getMessage(); + } + } + /** + * + * + *
+     * MITRE ATT&CK tactics and techniques related to this finding.
+     * See: https://attack.mitre.org
+     * 
+ * + * .google.cloud.securitycenter.v2.MitreAttack mitre_attack = 21; + */ + public Builder setMitreAttack(com.google.cloud.securitycenter.v2.MitreAttack value) { + if (mitreAttackBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + mitreAttack_ = value; + } else { + mitreAttackBuilder_.setMessage(value); + } + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + * + * + *
+     * MITRE ATT&CK tactics and techniques related to this finding.
+     * See: https://attack.mitre.org
+     * 
+ * + * .google.cloud.securitycenter.v2.MitreAttack mitre_attack = 21; + */ + public Builder setMitreAttack( + com.google.cloud.securitycenter.v2.MitreAttack.Builder builderForValue) { + if (mitreAttackBuilder_ == null) { + mitreAttack_ = builderForValue.build(); + } else { + mitreAttackBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + * + * + *
+     * MITRE ATT&CK tactics and techniques related to this finding.
+     * See: https://attack.mitre.org
+     * 
+ * + * .google.cloud.securitycenter.v2.MitreAttack mitre_attack = 21; + */ + public Builder mergeMitreAttack(com.google.cloud.securitycenter.v2.MitreAttack value) { + if (mitreAttackBuilder_ == null) { + if (((bitField0_ & 0x00040000) != 0) + && mitreAttack_ != null + && mitreAttack_ + != com.google.cloud.securitycenter.v2.MitreAttack.getDefaultInstance()) { + getMitreAttackBuilder().mergeFrom(value); + } else { + mitreAttack_ = value; + } + } else { + mitreAttackBuilder_.mergeFrom(value); + } + if (mitreAttack_ != null) { + bitField0_ |= 0x00040000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * MITRE ATT&CK tactics and techniques related to this finding.
+     * See: https://attack.mitre.org
+     * 
+ * + * .google.cloud.securitycenter.v2.MitreAttack mitre_attack = 21; + */ + public Builder clearMitreAttack() { + bitField0_ = (bitField0_ & ~0x00040000); + mitreAttack_ = null; + if (mitreAttackBuilder_ != null) { + mitreAttackBuilder_.dispose(); + mitreAttackBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * MITRE ATT&CK tactics and techniques related to this finding.
+     * See: https://attack.mitre.org
+     * 
+ * + * .google.cloud.securitycenter.v2.MitreAttack mitre_attack = 21; + */ + public com.google.cloud.securitycenter.v2.MitreAttack.Builder getMitreAttackBuilder() { + bitField0_ |= 0x00040000; + onChanged(); + return getMitreAttackFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * MITRE ATT&CK tactics and techniques related to this finding.
+     * See: https://attack.mitre.org
+     * 
+ * + * .google.cloud.securitycenter.v2.MitreAttack mitre_attack = 21; + */ + public com.google.cloud.securitycenter.v2.MitreAttackOrBuilder getMitreAttackOrBuilder() { + if (mitreAttackBuilder_ != null) { + return mitreAttackBuilder_.getMessageOrBuilder(); + } else { + return mitreAttack_ == null + ? com.google.cloud.securitycenter.v2.MitreAttack.getDefaultInstance() + : mitreAttack_; + } + } + /** + * + * + *
+     * MITRE ATT&CK tactics and techniques related to this finding.
+     * See: https://attack.mitre.org
+     * 
+ * + * .google.cloud.securitycenter.v2.MitreAttack mitre_attack = 21; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.MitreAttack, + com.google.cloud.securitycenter.v2.MitreAttack.Builder, + com.google.cloud.securitycenter.v2.MitreAttackOrBuilder> + getMitreAttackFieldBuilder() { + if (mitreAttackBuilder_ == null) { + mitreAttackBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.MitreAttack, + com.google.cloud.securitycenter.v2.MitreAttack.Builder, + com.google.cloud.securitycenter.v2.MitreAttackOrBuilder>( + getMitreAttack(), getParentForChildren(), isClean()); + mitreAttack_ = null; + } + return mitreAttackBuilder_; + } + + private com.google.cloud.securitycenter.v2.Access access_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Access, + com.google.cloud.securitycenter.v2.Access.Builder, + com.google.cloud.securitycenter.v2.AccessOrBuilder> + accessBuilder_; + /** + * + * + *
+     * Access details associated with the finding, such as more information on the
+     * caller, which method was accessed, and from where.
+     * 
+ * + * .google.cloud.securitycenter.v2.Access access = 22; + * + * @return Whether the access field is set. + */ + public boolean hasAccess() { + return ((bitField0_ & 0x00080000) != 0); + } + /** + * + * + *
+     * Access details associated with the finding, such as more information on the
+     * caller, which method was accessed, and from where.
+     * 
+ * + * .google.cloud.securitycenter.v2.Access access = 22; + * + * @return The access. + */ + public com.google.cloud.securitycenter.v2.Access getAccess() { + if (accessBuilder_ == null) { + return access_ == null + ? com.google.cloud.securitycenter.v2.Access.getDefaultInstance() + : access_; + } else { + return accessBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Access details associated with the finding, such as more information on the
+     * caller, which method was accessed, and from where.
+     * 
+ * + * .google.cloud.securitycenter.v2.Access access = 22; + */ + public Builder setAccess(com.google.cloud.securitycenter.v2.Access value) { + if (accessBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + access_ = value; + } else { + accessBuilder_.setMessage(value); + } + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * + * + *
+     * Access details associated with the finding, such as more information on the
+     * caller, which method was accessed, and from where.
+     * 
+ * + * .google.cloud.securitycenter.v2.Access access = 22; + */ + public Builder setAccess(com.google.cloud.securitycenter.v2.Access.Builder builderForValue) { + if (accessBuilder_ == null) { + access_ = builderForValue.build(); + } else { + accessBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * + * + *
+     * Access details associated with the finding, such as more information on the
+     * caller, which method was accessed, and from where.
+     * 
+ * + * .google.cloud.securitycenter.v2.Access access = 22; + */ + public Builder mergeAccess(com.google.cloud.securitycenter.v2.Access value) { + if (accessBuilder_ == null) { + if (((bitField0_ & 0x00080000) != 0) + && access_ != null + && access_ != com.google.cloud.securitycenter.v2.Access.getDefaultInstance()) { + getAccessBuilder().mergeFrom(value); + } else { + access_ = value; + } + } else { + accessBuilder_.mergeFrom(value); + } + if (access_ != null) { + bitField0_ |= 0x00080000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Access details associated with the finding, such as more information on the
+     * caller, which method was accessed, and from where.
+     * 
+ * + * .google.cloud.securitycenter.v2.Access access = 22; + */ + public Builder clearAccess() { + bitField0_ = (bitField0_ & ~0x00080000); + access_ = null; + if (accessBuilder_ != null) { + accessBuilder_.dispose(); + accessBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Access details associated with the finding, such as more information on the
+     * caller, which method was accessed, and from where.
+     * 
+ * + * .google.cloud.securitycenter.v2.Access access = 22; + */ + public com.google.cloud.securitycenter.v2.Access.Builder getAccessBuilder() { + bitField0_ |= 0x00080000; + onChanged(); + return getAccessFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Access details associated with the finding, such as more information on the
+     * caller, which method was accessed, and from where.
+     * 
+ * + * .google.cloud.securitycenter.v2.Access access = 22; + */ + public com.google.cloud.securitycenter.v2.AccessOrBuilder getAccessOrBuilder() { + if (accessBuilder_ != null) { + return accessBuilder_.getMessageOrBuilder(); + } else { + return access_ == null + ? com.google.cloud.securitycenter.v2.Access.getDefaultInstance() + : access_; + } + } + /** + * + * + *
+     * Access details associated with the finding, such as more information on the
+     * caller, which method was accessed, and from where.
+     * 
+ * + * .google.cloud.securitycenter.v2.Access access = 22; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Access, + com.google.cloud.securitycenter.v2.Access.Builder, + com.google.cloud.securitycenter.v2.AccessOrBuilder> + getAccessFieldBuilder() { + if (accessBuilder_ == null) { + accessBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Access, + com.google.cloud.securitycenter.v2.Access.Builder, + com.google.cloud.securitycenter.v2.AccessOrBuilder>( + getAccess(), getParentForChildren(), isClean()); + access_ = null; + } + return accessBuilder_; + } + + private java.util.List connections_ = + java.util.Collections.emptyList(); + + private void ensureConnectionsIsMutable() { + if (!((bitField0_ & 0x00100000) != 0)) { + connections_ = + new java.util.ArrayList(connections_); + bitField0_ |= 0x00100000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Connection, + com.google.cloud.securitycenter.v2.Connection.Builder, + com.google.cloud.securitycenter.v2.ConnectionOrBuilder> + connectionsBuilder_; + + /** + * + * + *
+     * Contains information about the IP connection associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Connection connections = 23; + */ + public java.util.List getConnectionsList() { + if (connectionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(connections_); + } else { + return connectionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Contains information about the IP connection associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Connection connections = 23; + */ + public int getConnectionsCount() { + if (connectionsBuilder_ == null) { + return connections_.size(); + } else { + return connectionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Contains information about the IP connection associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Connection connections = 23; + */ + public com.google.cloud.securitycenter.v2.Connection getConnections(int index) { + if (connectionsBuilder_ == null) { + return connections_.get(index); + } else { + return connectionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Contains information about the IP connection associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Connection connections = 23; + */ + public Builder setConnections(int index, com.google.cloud.securitycenter.v2.Connection value) { + if (connectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConnectionsIsMutable(); + connections_.set(index, value); + onChanged(); + } else { + connectionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Contains information about the IP connection associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Connection connections = 23; + */ + public Builder setConnections( + int index, com.google.cloud.securitycenter.v2.Connection.Builder builderForValue) { + if (connectionsBuilder_ == null) { + ensureConnectionsIsMutable(); + connections_.set(index, builderForValue.build()); + onChanged(); + } else { + connectionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Contains information about the IP connection associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Connection connections = 23; + */ + public Builder addConnections(com.google.cloud.securitycenter.v2.Connection value) { + if (connectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConnectionsIsMutable(); + connections_.add(value); + onChanged(); + } else { + connectionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Contains information about the IP connection associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Connection connections = 23; + */ + public Builder addConnections(int index, com.google.cloud.securitycenter.v2.Connection value) { + if (connectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConnectionsIsMutable(); + connections_.add(index, value); + onChanged(); + } else { + connectionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Contains information about the IP connection associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Connection connections = 23; + */ + public Builder addConnections( + com.google.cloud.securitycenter.v2.Connection.Builder builderForValue) { + if (connectionsBuilder_ == null) { + ensureConnectionsIsMutable(); + connections_.add(builderForValue.build()); + onChanged(); + } else { + connectionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Contains information about the IP connection associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Connection connections = 23; + */ + public Builder addConnections( + int index, com.google.cloud.securitycenter.v2.Connection.Builder builderForValue) { + if (connectionsBuilder_ == null) { + ensureConnectionsIsMutable(); + connections_.add(index, builderForValue.build()); + onChanged(); + } else { + connectionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Contains information about the IP connection associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Connection connections = 23; + */ + public Builder addAllConnections( + java.lang.Iterable values) { + if (connectionsBuilder_ == null) { + ensureConnectionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, connections_); + onChanged(); + } else { + connectionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Contains information about the IP connection associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Connection connections = 23; + */ + public Builder clearConnections() { + if (connectionsBuilder_ == null) { + connections_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00100000); + onChanged(); + } else { + connectionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Contains information about the IP connection associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Connection connections = 23; + */ + public Builder removeConnections(int index) { + if (connectionsBuilder_ == null) { + ensureConnectionsIsMutable(); + connections_.remove(index); + onChanged(); + } else { + connectionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Contains information about the IP connection associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Connection connections = 23; + */ + public com.google.cloud.securitycenter.v2.Connection.Builder getConnectionsBuilder(int index) { + return getConnectionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Contains information about the IP connection associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Connection connections = 23; + */ + public com.google.cloud.securitycenter.v2.ConnectionOrBuilder getConnectionsOrBuilder( + int index) { + if (connectionsBuilder_ == null) { + return connections_.get(index); + } else { + return connectionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Contains information about the IP connection associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Connection connections = 23; + */ + public java.util.List + getConnectionsOrBuilderList() { + if (connectionsBuilder_ != null) { + return connectionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(connections_); + } + } + /** + * + * + *
+     * Contains information about the IP connection associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Connection connections = 23; + */ + public com.google.cloud.securitycenter.v2.Connection.Builder addConnectionsBuilder() { + return getConnectionsFieldBuilder() + .addBuilder(com.google.cloud.securitycenter.v2.Connection.getDefaultInstance()); + } + /** + * + * + *
+     * Contains information about the IP connection associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Connection connections = 23; + */ + public com.google.cloud.securitycenter.v2.Connection.Builder addConnectionsBuilder(int index) { + return getConnectionsFieldBuilder() + .addBuilder(index, com.google.cloud.securitycenter.v2.Connection.getDefaultInstance()); + } + /** + * + * + *
+     * Contains information about the IP connection associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Connection connections = 23; + */ + public java.util.List + getConnectionsBuilderList() { + return getConnectionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Connection, + com.google.cloud.securitycenter.v2.Connection.Builder, + com.google.cloud.securitycenter.v2.ConnectionOrBuilder> + getConnectionsFieldBuilder() { + if (connectionsBuilder_ == null) { + connectionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Connection, + com.google.cloud.securitycenter.v2.Connection.Builder, + com.google.cloud.securitycenter.v2.ConnectionOrBuilder>( + connections_, ((bitField0_ & 0x00100000) != 0), getParentForChildren(), isClean()); + connections_ = null; + } + return connectionsBuilder_; + } + + private java.lang.Object muteInitiator_ = ""; + /** + * + * + *
+     * Records additional information about the mute operation, for example, the
+     * [mute
+     * configuration](https://cloud.google.com/security-command-center/docs/how-to-mute-findings)
+     * that muted the finding and the user who muted the finding.
+     * 
+ * + * string mute_initiator = 24; + * + * @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; + } + } + /** + * + * + *
+     * Records additional information about the mute operation, for example, the
+     * [mute
+     * configuration](https://cloud.google.com/security-command-center/docs/how-to-mute-findings)
+     * that muted the finding and the user who muted the finding.
+     * 
+ * + * string mute_initiator = 24; + * + * @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; + } + } + /** + * + * + *
+     * Records additional information about the mute operation, for example, the
+     * [mute
+     * configuration](https://cloud.google.com/security-command-center/docs/how-to-mute-findings)
+     * that muted the finding and the user who muted the finding.
+     * 
+ * + * string mute_initiator = 24; + * + * @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; + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + /** + * + * + *
+     * Records additional information about the mute operation, for example, the
+     * [mute
+     * configuration](https://cloud.google.com/security-command-center/docs/how-to-mute-findings)
+     * that muted the finding and the user who muted the finding.
+     * 
+ * + * string mute_initiator = 24; + * + * @return This builder for chaining. + */ + public Builder clearMuteInitiator() { + muteInitiator_ = getDefaultInstance().getMuteInitiator(); + bitField0_ = (bitField0_ & ~0x00200000); + onChanged(); + return this; + } + /** + * + * + *
+     * Records additional information about the mute operation, for example, the
+     * [mute
+     * configuration](https://cloud.google.com/security-command-center/docs/how-to-mute-findings)
+     * that muted the finding and the user who muted the finding.
+     * 
+ * + * string mute_initiator = 24; + * + * @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; + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + + private java.util.List processes_ = + java.util.Collections.emptyList(); + + private void ensureProcessesIsMutable() { + if (!((bitField0_ & 0x00400000) != 0)) { + processes_ = + new java.util.ArrayList(processes_); + bitField0_ |= 0x00400000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Process, + com.google.cloud.securitycenter.v2.Process.Builder, + com.google.cloud.securitycenter.v2.ProcessOrBuilder> + processesBuilder_; + + /** + * + * + *
+     * Represents operating system processes associated with the Finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Process processes = 25; + */ + public java.util.List getProcessesList() { + if (processesBuilder_ == null) { + return java.util.Collections.unmodifiableList(processes_); + } else { + return processesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Represents operating system processes associated with the Finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Process processes = 25; + */ + public int getProcessesCount() { + if (processesBuilder_ == null) { + return processes_.size(); + } else { + return processesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Represents operating system processes associated with the Finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Process processes = 25; + */ + public com.google.cloud.securitycenter.v2.Process getProcesses(int index) { + if (processesBuilder_ == null) { + return processes_.get(index); + } else { + return processesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Represents operating system processes associated with the Finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Process processes = 25; + */ + public Builder setProcesses(int index, com.google.cloud.securitycenter.v2.Process value) { + if (processesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProcessesIsMutable(); + processes_.set(index, value); + onChanged(); + } else { + processesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Represents operating system processes associated with the Finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Process processes = 25; + */ + public Builder setProcesses( + int index, com.google.cloud.securitycenter.v2.Process.Builder builderForValue) { + if (processesBuilder_ == null) { + ensureProcessesIsMutable(); + processes_.set(index, builderForValue.build()); + onChanged(); + } else { + processesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Represents operating system processes associated with the Finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Process processes = 25; + */ + public Builder addProcesses(com.google.cloud.securitycenter.v2.Process value) { + if (processesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProcessesIsMutable(); + processes_.add(value); + onChanged(); + } else { + processesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Represents operating system processes associated with the Finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Process processes = 25; + */ + public Builder addProcesses(int index, com.google.cloud.securitycenter.v2.Process value) { + if (processesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProcessesIsMutable(); + processes_.add(index, value); + onChanged(); + } else { + processesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Represents operating system processes associated with the Finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Process processes = 25; + */ + public Builder addProcesses( + com.google.cloud.securitycenter.v2.Process.Builder builderForValue) { + if (processesBuilder_ == null) { + ensureProcessesIsMutable(); + processes_.add(builderForValue.build()); + onChanged(); + } else { + processesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Represents operating system processes associated with the Finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Process processes = 25; + */ + public Builder addProcesses( + int index, com.google.cloud.securitycenter.v2.Process.Builder builderForValue) { + if (processesBuilder_ == null) { + ensureProcessesIsMutable(); + processes_.add(index, builderForValue.build()); + onChanged(); + } else { + processesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Represents operating system processes associated with the Finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Process processes = 25; + */ + public Builder addAllProcesses( + java.lang.Iterable values) { + if (processesBuilder_ == null) { + ensureProcessesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, processes_); + onChanged(); + } else { + processesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Represents operating system processes associated with the Finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Process processes = 25; + */ + public Builder clearProcesses() { + if (processesBuilder_ == null) { + processes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00400000); + onChanged(); + } else { + processesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Represents operating system processes associated with the Finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Process processes = 25; + */ + public Builder removeProcesses(int index) { + if (processesBuilder_ == null) { + ensureProcessesIsMutable(); + processes_.remove(index); + onChanged(); + } else { + processesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Represents operating system processes associated with the Finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Process processes = 25; + */ + public com.google.cloud.securitycenter.v2.Process.Builder getProcessesBuilder(int index) { + return getProcessesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Represents operating system processes associated with the Finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Process processes = 25; + */ + public com.google.cloud.securitycenter.v2.ProcessOrBuilder getProcessesOrBuilder(int index) { + if (processesBuilder_ == null) { + return processes_.get(index); + } else { + return processesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Represents operating system processes associated with the Finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Process processes = 25; + */ + public java.util.List + getProcessesOrBuilderList() { + if (processesBuilder_ != null) { + return processesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(processes_); + } + } + /** + * + * + *
+     * Represents operating system processes associated with the Finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Process processes = 25; + */ + public com.google.cloud.securitycenter.v2.Process.Builder addProcessesBuilder() { + return getProcessesFieldBuilder() + .addBuilder(com.google.cloud.securitycenter.v2.Process.getDefaultInstance()); + } + /** + * + * + *
+     * Represents operating system processes associated with the Finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Process processes = 25; + */ + public com.google.cloud.securitycenter.v2.Process.Builder addProcessesBuilder(int index) { + return getProcessesFieldBuilder() + .addBuilder(index, com.google.cloud.securitycenter.v2.Process.getDefaultInstance()); + } + /** + * + * + *
+     * Represents operating system processes associated with the Finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Process processes = 25; + */ + public java.util.List + getProcessesBuilderList() { + return getProcessesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Process, + com.google.cloud.securitycenter.v2.Process.Builder, + com.google.cloud.securitycenter.v2.ProcessOrBuilder> + getProcessesFieldBuilder() { + if (processesBuilder_ == null) { + processesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Process, + com.google.cloud.securitycenter.v2.Process.Builder, + com.google.cloud.securitycenter.v2.ProcessOrBuilder>( + processes_, ((bitField0_ & 0x00400000) != 0), getParentForChildren(), isClean()); + processes_ = null; + } + return processesBuilder_; + } + + private static final class ContactsConverter + implements com.google.protobuf.MapFieldBuilder.Converter< + java.lang.String, + com.google.cloud.securitycenter.v2.ContactDetailsOrBuilder, + com.google.cloud.securitycenter.v2.ContactDetails> { + @java.lang.Override + public com.google.cloud.securitycenter.v2.ContactDetails build( + com.google.cloud.securitycenter.v2.ContactDetailsOrBuilder val) { + if (val instanceof com.google.cloud.securitycenter.v2.ContactDetails) { + return (com.google.cloud.securitycenter.v2.ContactDetails) val; + } + return ((com.google.cloud.securitycenter.v2.ContactDetails.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.securitycenter.v2.ContactDetails> + defaultEntry() { + return ContactsDefaultEntryHolder.defaultEntry; + } + }; + + private static final ContactsConverter contactsConverter = new ContactsConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.securitycenter.v2.ContactDetailsOrBuilder, + com.google.cloud.securitycenter.v2.ContactDetails, + com.google.cloud.securitycenter.v2.ContactDetails.Builder> + contacts_; + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.securitycenter.v2.ContactDetailsOrBuilder, + com.google.cloud.securitycenter.v2.ContactDetails, + com.google.cloud.securitycenter.v2.ContactDetails.Builder> + internalGetContacts() { + if (contacts_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(contactsConverter); + } + return contacts_; + } + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.securitycenter.v2.ContactDetailsOrBuilder, + com.google.cloud.securitycenter.v2.ContactDetails, + com.google.cloud.securitycenter.v2.ContactDetails.Builder> + internalGetMutableContacts() { + if (contacts_ == null) { + contacts_ = new com.google.protobuf.MapFieldBuilder<>(contactsConverter); + } + bitField0_ |= 0x00800000; + onChanged(); + return contacts_; + } + + public int getContactsCount() { + return internalGetContacts().ensureBuilderMap().size(); + } + /** + * + * + *
+     * Output only. Map containing the points of contact for the given finding.
+     * The key represents the type of contact, while the value contains a list of
+     * all the contacts that pertain. Please refer to:
+     * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
+     *
+     *     {
+     *       "security": {
+     *         "contacts": [
+     *           {
+     *             "email": "person1@company.com"
+     *           },
+     *           {
+     *             "email": "person2@company.com"
+     *           }
+     *         ]
+     *       }
+     *     }
+     * 
+ * + * + * map<string, .google.cloud.securitycenter.v2.ContactDetails> contacts = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsContacts(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetContacts().ensureBuilderMap().containsKey(key); + } + /** Use {@link #getContactsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getContacts() { + return getContactsMap(); + } + /** + * + * + *
+     * Output only. Map containing the points of contact for the given finding.
+     * The key represents the type of contact, while the value contains a list of
+     * all the contacts that pertain. Please refer to:
+     * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
+     *
+     *     {
+     *       "security": {
+     *         "contacts": [
+     *           {
+     *             "email": "person1@company.com"
+     *           },
+     *           {
+     *             "email": "person2@company.com"
+     *           }
+     *         ]
+     *       }
+     *     }
+     * 
+ * + * + * map<string, .google.cloud.securitycenter.v2.ContactDetails> contacts = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map + getContactsMap() { + return internalGetContacts().getImmutableMap(); + } + /** + * + * + *
+     * Output only. Map containing the points of contact for the given finding.
+     * The key represents the type of contact, while the value contains a list of
+     * all the contacts that pertain. Please refer to:
+     * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
+     *
+     *     {
+     *       "security": {
+     *         "contacts": [
+     *           {
+     *             "email": "person1@company.com"
+     *           },
+     *           {
+     *             "email": "person2@company.com"
+     *           }
+     *         ]
+     *       }
+     *     }
+     * 
+ * + * + * map<string, .google.cloud.securitycenter.v2.ContactDetails> contacts = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public /* nullable */ com.google.cloud.securitycenter.v2.ContactDetails getContactsOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.securitycenter.v2.ContactDetails defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map + map = internalGetMutableContacts().ensureBuilderMap(); + return map.containsKey(key) ? contactsConverter.build(map.get(key)) : defaultValue; + } + /** + * + * + *
+     * Output only. Map containing the points of contact for the given finding.
+     * The key represents the type of contact, while the value contains a list of
+     * all the contacts that pertain. Please refer to:
+     * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
+     *
+     *     {
+     *       "security": {
+     *         "contacts": [
+     *           {
+     *             "email": "person1@company.com"
+     *           },
+     *           {
+     *             "email": "person2@company.com"
+     *           }
+     *         ]
+     *       }
+     *     }
+     * 
+ * + * + * map<string, .google.cloud.securitycenter.v2.ContactDetails> contacts = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.ContactDetails getContactsOrThrow( + java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map + map = internalGetMutableContacts().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return contactsConverter.build(map.get(key)); + } + + public Builder clearContacts() { + bitField0_ = (bitField0_ & ~0x00800000); + internalGetMutableContacts().clear(); + return this; + } + /** + * + * + *
+     * Output only. Map containing the points of contact for the given finding.
+     * The key represents the type of contact, while the value contains a list of
+     * all the contacts that pertain. Please refer to:
+     * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
+     *
+     *     {
+     *       "security": {
+     *         "contacts": [
+     *           {
+     *             "email": "person1@company.com"
+     *           },
+     *           {
+     *             "email": "person2@company.com"
+     *           }
+     *         ]
+     *       }
+     *     }
+     * 
+ * + * + * map<string, .google.cloud.securitycenter.v2.ContactDetails> contacts = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeContacts(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableContacts().ensureBuilderMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map + getMutableContacts() { + bitField0_ |= 0x00800000; + return internalGetMutableContacts().ensureMessageMap(); + } + /** + * + * + *
+     * Output only. Map containing the points of contact for the given finding.
+     * The key represents the type of contact, while the value contains a list of
+     * all the contacts that pertain. Please refer to:
+     * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
+     *
+     *     {
+     *       "security": {
+     *         "contacts": [
+     *           {
+     *             "email": "person1@company.com"
+     *           },
+     *           {
+     *             "email": "person2@company.com"
+     *           }
+     *         ]
+     *       }
+     *     }
+     * 
+ * + * + * map<string, .google.cloud.securitycenter.v2.ContactDetails> contacts = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putContacts( + java.lang.String key, com.google.cloud.securitycenter.v2.ContactDetails value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableContacts().ensureBuilderMap().put(key, value); + bitField0_ |= 0x00800000; + return this; + } + /** + * + * + *
+     * Output only. Map containing the points of contact for the given finding.
+     * The key represents the type of contact, while the value contains a list of
+     * all the contacts that pertain. Please refer to:
+     * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
+     *
+     *     {
+     *       "security": {
+     *         "contacts": [
+     *           {
+     *             "email": "person1@company.com"
+     *           },
+     *           {
+     *             "email": "person2@company.com"
+     *           }
+     *         ]
+     *       }
+     *     }
+     * 
+ * + * + * map<string, .google.cloud.securitycenter.v2.ContactDetails> contacts = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putAllContacts( + java.util.Map values) { + for (java.util.Map.Entry + e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableContacts().ensureBuilderMap().putAll(values); + bitField0_ |= 0x00800000; + return this; + } + /** + * + * + *
+     * Output only. Map containing the points of contact for the given finding.
+     * The key represents the type of contact, while the value contains a list of
+     * all the contacts that pertain. Please refer to:
+     * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
+     *
+     *     {
+     *       "security": {
+     *         "contacts": [
+     *           {
+     *             "email": "person1@company.com"
+     *           },
+     *           {
+     *             "email": "person2@company.com"
+     *           }
+     *         ]
+     *       }
+     *     }
+     * 
+ * + * + * map<string, .google.cloud.securitycenter.v2.ContactDetails> contacts = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.securitycenter.v2.ContactDetails.Builder putContactsBuilderIfAbsent( + java.lang.String key) { + java.util.Map + builderMap = internalGetMutableContacts().ensureBuilderMap(); + com.google.cloud.securitycenter.v2.ContactDetailsOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.cloud.securitycenter.v2.ContactDetails.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.cloud.securitycenter.v2.ContactDetails) { + entry = ((com.google.cloud.securitycenter.v2.ContactDetails) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.cloud.securitycenter.v2.ContactDetails.Builder) entry; + } + + private java.util.List compliances_ = + java.util.Collections.emptyList(); + + private void ensureCompliancesIsMutable() { + if (!((bitField0_ & 0x01000000) != 0)) { + compliances_ = + new java.util.ArrayList(compliances_); + bitField0_ |= 0x01000000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Compliance, + com.google.cloud.securitycenter.v2.Compliance.Builder, + com.google.cloud.securitycenter.v2.ComplianceOrBuilder> + compliancesBuilder_; + + /** + * + * + *
+     * Contains compliance information for security standards associated to the
+     * finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Compliance compliances = 27; + */ + public java.util.List getCompliancesList() { + if (compliancesBuilder_ == null) { + return java.util.Collections.unmodifiableList(compliances_); + } else { + return compliancesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Contains compliance information for security standards associated to the
+     * finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Compliance compliances = 27; + */ + public int getCompliancesCount() { + if (compliancesBuilder_ == null) { + return compliances_.size(); + } else { + return compliancesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Contains compliance information for security standards associated to the
+     * finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Compliance compliances = 27; + */ + public com.google.cloud.securitycenter.v2.Compliance getCompliances(int index) { + if (compliancesBuilder_ == null) { + return compliances_.get(index); + } else { + return compliancesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Contains compliance information for security standards associated to the
+     * finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Compliance compliances = 27; + */ + public Builder setCompliances(int index, com.google.cloud.securitycenter.v2.Compliance value) { + if (compliancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCompliancesIsMutable(); + compliances_.set(index, value); + onChanged(); + } else { + compliancesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Contains compliance information for security standards associated to the
+     * finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Compliance compliances = 27; + */ + public Builder setCompliances( + int index, com.google.cloud.securitycenter.v2.Compliance.Builder builderForValue) { + if (compliancesBuilder_ == null) { + ensureCompliancesIsMutable(); + compliances_.set(index, builderForValue.build()); + onChanged(); + } else { + compliancesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Contains compliance information for security standards associated to the
+     * finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Compliance compliances = 27; + */ + public Builder addCompliances(com.google.cloud.securitycenter.v2.Compliance value) { + if (compliancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCompliancesIsMutable(); + compliances_.add(value); + onChanged(); + } else { + compliancesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Contains compliance information for security standards associated to the
+     * finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Compliance compliances = 27; + */ + public Builder addCompliances(int index, com.google.cloud.securitycenter.v2.Compliance value) { + if (compliancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCompliancesIsMutable(); + compliances_.add(index, value); + onChanged(); + } else { + compliancesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Contains compliance information for security standards associated to the
+     * finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Compliance compliances = 27; + */ + public Builder addCompliances( + com.google.cloud.securitycenter.v2.Compliance.Builder builderForValue) { + if (compliancesBuilder_ == null) { + ensureCompliancesIsMutable(); + compliances_.add(builderForValue.build()); + onChanged(); + } else { + compliancesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Contains compliance information for security standards associated to the
+     * finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Compliance compliances = 27; + */ + public Builder addCompliances( + int index, com.google.cloud.securitycenter.v2.Compliance.Builder builderForValue) { + if (compliancesBuilder_ == null) { + ensureCompliancesIsMutable(); + compliances_.add(index, builderForValue.build()); + onChanged(); + } else { + compliancesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Contains compliance information for security standards associated to the
+     * finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Compliance compliances = 27; + */ + public Builder addAllCompliances( + java.lang.Iterable values) { + if (compliancesBuilder_ == null) { + ensureCompliancesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, compliances_); + onChanged(); + } else { + compliancesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Contains compliance information for security standards associated to the
+     * finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Compliance compliances = 27; + */ + public Builder clearCompliances() { + if (compliancesBuilder_ == null) { + compliances_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x01000000); + onChanged(); + } else { + compliancesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Contains compliance information for security standards associated to the
+     * finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Compliance compliances = 27; + */ + public Builder removeCompliances(int index) { + if (compliancesBuilder_ == null) { + ensureCompliancesIsMutable(); + compliances_.remove(index); + onChanged(); + } else { + compliancesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Contains compliance information for security standards associated to the
+     * finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Compliance compliances = 27; + */ + public com.google.cloud.securitycenter.v2.Compliance.Builder getCompliancesBuilder(int index) { + return getCompliancesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Contains compliance information for security standards associated to the
+     * finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Compliance compliances = 27; + */ + public com.google.cloud.securitycenter.v2.ComplianceOrBuilder getCompliancesOrBuilder( + int index) { + if (compliancesBuilder_ == null) { + return compliances_.get(index); + } else { + return compliancesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Contains compliance information for security standards associated to the
+     * finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Compliance compliances = 27; + */ + public java.util.List + getCompliancesOrBuilderList() { + if (compliancesBuilder_ != null) { + return compliancesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(compliances_); + } + } + /** + * + * + *
+     * Contains compliance information for security standards associated to the
+     * finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Compliance compliances = 27; + */ + public com.google.cloud.securitycenter.v2.Compliance.Builder addCompliancesBuilder() { + return getCompliancesFieldBuilder() + .addBuilder(com.google.cloud.securitycenter.v2.Compliance.getDefaultInstance()); + } + /** + * + * + *
+     * Contains compliance information for security standards associated to the
+     * finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Compliance compliances = 27; + */ + public com.google.cloud.securitycenter.v2.Compliance.Builder addCompliancesBuilder(int index) { + return getCompliancesFieldBuilder() + .addBuilder(index, com.google.cloud.securitycenter.v2.Compliance.getDefaultInstance()); + } + /** + * + * + *
+     * Contains compliance information for security standards associated to the
+     * finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Compliance compliances = 27; + */ + public java.util.List + getCompliancesBuilderList() { + return getCompliancesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Compliance, + com.google.cloud.securitycenter.v2.Compliance.Builder, + com.google.cloud.securitycenter.v2.ComplianceOrBuilder> + getCompliancesFieldBuilder() { + if (compliancesBuilder_ == null) { + compliancesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Compliance, + com.google.cloud.securitycenter.v2.Compliance.Builder, + com.google.cloud.securitycenter.v2.ComplianceOrBuilder>( + compliances_, ((bitField0_ & 0x01000000) != 0), getParentForChildren(), isClean()); + compliances_ = null; + } + return compliancesBuilder_; + } + + private java.lang.Object parentDisplayName_ = ""; + /** + * + * + *
+     * Output only. The human readable display name of the finding source such as
+     * "Event Threat Detection" or "Security Health Analytics".
+     * 
+ * + * string parent_display_name = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The parentDisplayName. + */ + public java.lang.String getParentDisplayName() { + java.lang.Object ref = parentDisplayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parentDisplayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The human readable display name of the finding source such as
+     * "Event Threat Detection" or "Security Health Analytics".
+     * 
+ * + * string parent_display_name = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for parentDisplayName. + */ + public com.google.protobuf.ByteString getParentDisplayNameBytes() { + java.lang.Object ref = parentDisplayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parentDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The human readable display name of the finding source such as
+     * "Event Threat Detection" or "Security Health Analytics".
+     * 
+ * + * string parent_display_name = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The parentDisplayName to set. + * @return This builder for chaining. + */ + public Builder setParentDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parentDisplayName_ = value; + bitField0_ |= 0x02000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The human readable display name of the finding source such as
+     * "Event Threat Detection" or "Security Health Analytics".
+     * 
+ * + * string parent_display_name = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearParentDisplayName() { + parentDisplayName_ = getDefaultInstance().getParentDisplayName(); + bitField0_ = (bitField0_ & ~0x02000000); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The human readable display name of the finding source such as
+     * "Event Threat Detection" or "Security Health Analytics".
+     * 
+ * + * string parent_display_name = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for parentDisplayName to set. + * @return This builder for chaining. + */ + public Builder setParentDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parentDisplayName_ = value; + bitField0_ |= 0x02000000; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Contains more details about the finding.
+     * 
+ * + * string description = 30; + * + * @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; + } + } + /** + * + * + *
+     * Contains more details about the finding.
+     * 
+ * + * string description = 30; + * + * @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; + } + } + /** + * + * + *
+     * Contains more details about the finding.
+     * 
+ * + * string description = 30; + * + * @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; + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Contains more details about the finding.
+     * 
+ * + * string description = 30; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x04000000); + onChanged(); + return this; + } + /** + * + * + *
+     * Contains more details about the finding.
+     * 
+ * + * string description = 30; + * + * @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; + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + + private com.google.cloud.securitycenter.v2.Exfiltration exfiltration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Exfiltration, + com.google.cloud.securitycenter.v2.Exfiltration.Builder, + com.google.cloud.securitycenter.v2.ExfiltrationOrBuilder> + exfiltrationBuilder_; + /** + * + * + *
+     * Represents exfiltrations associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Exfiltration exfiltration = 31; + * + * @return Whether the exfiltration field is set. + */ + public boolean hasExfiltration() { + return ((bitField0_ & 0x08000000) != 0); + } + /** + * + * + *
+     * Represents exfiltrations associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Exfiltration exfiltration = 31; + * + * @return The exfiltration. + */ + public com.google.cloud.securitycenter.v2.Exfiltration getExfiltration() { + if (exfiltrationBuilder_ == null) { + return exfiltration_ == null + ? com.google.cloud.securitycenter.v2.Exfiltration.getDefaultInstance() + : exfiltration_; + } else { + return exfiltrationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Represents exfiltrations associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Exfiltration exfiltration = 31; + */ + public Builder setExfiltration(com.google.cloud.securitycenter.v2.Exfiltration value) { + if (exfiltrationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + exfiltration_ = value; + } else { + exfiltrationBuilder_.setMessage(value); + } + bitField0_ |= 0x08000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Represents exfiltrations associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Exfiltration exfiltration = 31; + */ + public Builder setExfiltration( + com.google.cloud.securitycenter.v2.Exfiltration.Builder builderForValue) { + if (exfiltrationBuilder_ == null) { + exfiltration_ = builderForValue.build(); + } else { + exfiltrationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x08000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Represents exfiltrations associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Exfiltration exfiltration = 31; + */ + public Builder mergeExfiltration(com.google.cloud.securitycenter.v2.Exfiltration value) { + if (exfiltrationBuilder_ == null) { + if (((bitField0_ & 0x08000000) != 0) + && exfiltration_ != null + && exfiltration_ + != com.google.cloud.securitycenter.v2.Exfiltration.getDefaultInstance()) { + getExfiltrationBuilder().mergeFrom(value); + } else { + exfiltration_ = value; + } + } else { + exfiltrationBuilder_.mergeFrom(value); + } + if (exfiltration_ != null) { + bitField0_ |= 0x08000000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Represents exfiltrations associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Exfiltration exfiltration = 31; + */ + public Builder clearExfiltration() { + bitField0_ = (bitField0_ & ~0x08000000); + exfiltration_ = null; + if (exfiltrationBuilder_ != null) { + exfiltrationBuilder_.dispose(); + exfiltrationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Represents exfiltrations associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Exfiltration exfiltration = 31; + */ + public com.google.cloud.securitycenter.v2.Exfiltration.Builder getExfiltrationBuilder() { + bitField0_ |= 0x08000000; + onChanged(); + return getExfiltrationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Represents exfiltrations associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Exfiltration exfiltration = 31; + */ + public com.google.cloud.securitycenter.v2.ExfiltrationOrBuilder getExfiltrationOrBuilder() { + if (exfiltrationBuilder_ != null) { + return exfiltrationBuilder_.getMessageOrBuilder(); + } else { + return exfiltration_ == null + ? com.google.cloud.securitycenter.v2.Exfiltration.getDefaultInstance() + : exfiltration_; + } + } + /** + * + * + *
+     * Represents exfiltrations associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Exfiltration exfiltration = 31; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Exfiltration, + com.google.cloud.securitycenter.v2.Exfiltration.Builder, + com.google.cloud.securitycenter.v2.ExfiltrationOrBuilder> + getExfiltrationFieldBuilder() { + if (exfiltrationBuilder_ == null) { + exfiltrationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Exfiltration, + com.google.cloud.securitycenter.v2.Exfiltration.Builder, + com.google.cloud.securitycenter.v2.ExfiltrationOrBuilder>( + getExfiltration(), getParentForChildren(), isClean()); + exfiltration_ = null; + } + return exfiltrationBuilder_; + } + + private java.util.List iamBindings_ = + java.util.Collections.emptyList(); + + private void ensureIamBindingsIsMutable() { + if (!((bitField0_ & 0x10000000) != 0)) { + iamBindings_ = + new java.util.ArrayList(iamBindings_); + bitField0_ |= 0x10000000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.IamBinding, + com.google.cloud.securitycenter.v2.IamBinding.Builder, + com.google.cloud.securitycenter.v2.IamBindingOrBuilder> + iamBindingsBuilder_; + + /** + * + * + *
+     * Represents IAM bindings associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.IamBinding iam_bindings = 32; + */ + public java.util.List getIamBindingsList() { + if (iamBindingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(iamBindings_); + } else { + return iamBindingsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Represents IAM bindings associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.IamBinding iam_bindings = 32; + */ + public int getIamBindingsCount() { + if (iamBindingsBuilder_ == null) { + return iamBindings_.size(); + } else { + return iamBindingsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Represents IAM bindings associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.IamBinding iam_bindings = 32; + */ + public com.google.cloud.securitycenter.v2.IamBinding getIamBindings(int index) { + if (iamBindingsBuilder_ == null) { + return iamBindings_.get(index); + } else { + return iamBindingsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Represents IAM bindings associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.IamBinding iam_bindings = 32; + */ + public Builder setIamBindings(int index, com.google.cloud.securitycenter.v2.IamBinding value) { + if (iamBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIamBindingsIsMutable(); + iamBindings_.set(index, value); + onChanged(); + } else { + iamBindingsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Represents IAM bindings associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.IamBinding iam_bindings = 32; + */ + public Builder setIamBindings( + int index, com.google.cloud.securitycenter.v2.IamBinding.Builder builderForValue) { + if (iamBindingsBuilder_ == null) { + ensureIamBindingsIsMutable(); + iamBindings_.set(index, builderForValue.build()); + onChanged(); + } else { + iamBindingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Represents IAM bindings associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.IamBinding iam_bindings = 32; + */ + public Builder addIamBindings(com.google.cloud.securitycenter.v2.IamBinding value) { + if (iamBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIamBindingsIsMutable(); + iamBindings_.add(value); + onChanged(); + } else { + iamBindingsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Represents IAM bindings associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.IamBinding iam_bindings = 32; + */ + public Builder addIamBindings(int index, com.google.cloud.securitycenter.v2.IamBinding value) { + if (iamBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIamBindingsIsMutable(); + iamBindings_.add(index, value); + onChanged(); + } else { + iamBindingsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Represents IAM bindings associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.IamBinding iam_bindings = 32; + */ + public Builder addIamBindings( + com.google.cloud.securitycenter.v2.IamBinding.Builder builderForValue) { + if (iamBindingsBuilder_ == null) { + ensureIamBindingsIsMutable(); + iamBindings_.add(builderForValue.build()); + onChanged(); + } else { + iamBindingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Represents IAM bindings associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.IamBinding iam_bindings = 32; + */ + public Builder addIamBindings( + int index, com.google.cloud.securitycenter.v2.IamBinding.Builder builderForValue) { + if (iamBindingsBuilder_ == null) { + ensureIamBindingsIsMutable(); + iamBindings_.add(index, builderForValue.build()); + onChanged(); + } else { + iamBindingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Represents IAM bindings associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.IamBinding iam_bindings = 32; + */ + public Builder addAllIamBindings( + java.lang.Iterable values) { + if (iamBindingsBuilder_ == null) { + ensureIamBindingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, iamBindings_); + onChanged(); + } else { + iamBindingsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Represents IAM bindings associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.IamBinding iam_bindings = 32; + */ + public Builder clearIamBindings() { + if (iamBindingsBuilder_ == null) { + iamBindings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x10000000); + onChanged(); + } else { + iamBindingsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Represents IAM bindings associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.IamBinding iam_bindings = 32; + */ + public Builder removeIamBindings(int index) { + if (iamBindingsBuilder_ == null) { + ensureIamBindingsIsMutable(); + iamBindings_.remove(index); + onChanged(); + } else { + iamBindingsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Represents IAM bindings associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.IamBinding iam_bindings = 32; + */ + public com.google.cloud.securitycenter.v2.IamBinding.Builder getIamBindingsBuilder(int index) { + return getIamBindingsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Represents IAM bindings associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.IamBinding iam_bindings = 32; + */ + public com.google.cloud.securitycenter.v2.IamBindingOrBuilder getIamBindingsOrBuilder( + int index) { + if (iamBindingsBuilder_ == null) { + return iamBindings_.get(index); + } else { + return iamBindingsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Represents IAM bindings associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.IamBinding iam_bindings = 32; + */ + public java.util.List + getIamBindingsOrBuilderList() { + if (iamBindingsBuilder_ != null) { + return iamBindingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(iamBindings_); + } + } + /** + * + * + *
+     * Represents IAM bindings associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.IamBinding iam_bindings = 32; + */ + public com.google.cloud.securitycenter.v2.IamBinding.Builder addIamBindingsBuilder() { + return getIamBindingsFieldBuilder() + .addBuilder(com.google.cloud.securitycenter.v2.IamBinding.getDefaultInstance()); + } + /** + * + * + *
+     * Represents IAM bindings associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.IamBinding iam_bindings = 32; + */ + public com.google.cloud.securitycenter.v2.IamBinding.Builder addIamBindingsBuilder(int index) { + return getIamBindingsFieldBuilder() + .addBuilder(index, com.google.cloud.securitycenter.v2.IamBinding.getDefaultInstance()); + } + /** + * + * + *
+     * Represents IAM bindings associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.IamBinding iam_bindings = 32; + */ + public java.util.List + getIamBindingsBuilderList() { + return getIamBindingsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.IamBinding, + com.google.cloud.securitycenter.v2.IamBinding.Builder, + com.google.cloud.securitycenter.v2.IamBindingOrBuilder> + getIamBindingsFieldBuilder() { + if (iamBindingsBuilder_ == null) { + iamBindingsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.IamBinding, + com.google.cloud.securitycenter.v2.IamBinding.Builder, + com.google.cloud.securitycenter.v2.IamBindingOrBuilder>( + iamBindings_, ((bitField0_ & 0x10000000) != 0), getParentForChildren(), isClean()); + iamBindings_ = null; + } + return iamBindingsBuilder_; + } + + private java.lang.Object nextSteps_ = ""; + /** + * + * + *
+     * Steps to address the finding.
+     * 
+ * + * string next_steps = 33; + * + * @return The nextSteps. + */ + public java.lang.String getNextSteps() { + java.lang.Object ref = nextSteps_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextSteps_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Steps to address the finding.
+     * 
+ * + * string next_steps = 33; + * + * @return The bytes for nextSteps. + */ + public com.google.protobuf.ByteString getNextStepsBytes() { + java.lang.Object ref = nextSteps_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextSteps_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Steps to address the finding.
+     * 
+ * + * string next_steps = 33; + * + * @param value The nextSteps to set. + * @return This builder for chaining. + */ + public Builder setNextSteps(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextSteps_ = value; + bitField0_ |= 0x20000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Steps to address the finding.
+     * 
+ * + * string next_steps = 33; + * + * @return This builder for chaining. + */ + public Builder clearNextSteps() { + nextSteps_ = getDefaultInstance().getNextSteps(); + bitField0_ = (bitField0_ & ~0x20000000); + onChanged(); + return this; + } + /** + * + * + *
+     * Steps to address the finding.
+     * 
+ * + * string next_steps = 33; + * + * @param value The bytes for nextSteps to set. + * @return This builder for chaining. + */ + public Builder setNextStepsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextSteps_ = value; + bitField0_ |= 0x20000000; + onChanged(); + return this; + } + + private java.lang.Object moduleName_ = ""; + /** + * + * + *
+     * Unique identifier of the module which generated the finding.
+     * Example:
+     * folders/598186756061/securityHealthAnalyticsSettings/customModules/56799441161885
+     * 
+ * + * string module_name = 34; + * + * @return The moduleName. + */ + public java.lang.String getModuleName() { + java.lang.Object ref = moduleName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + moduleName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Unique identifier of the module which generated the finding.
+     * Example:
+     * folders/598186756061/securityHealthAnalyticsSettings/customModules/56799441161885
+     * 
+ * + * string module_name = 34; + * + * @return The bytes for moduleName. + */ + public com.google.protobuf.ByteString getModuleNameBytes() { + java.lang.Object ref = moduleName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + moduleName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Unique identifier of the module which generated the finding.
+     * Example:
+     * folders/598186756061/securityHealthAnalyticsSettings/customModules/56799441161885
+     * 
+ * + * string module_name = 34; + * + * @param value The moduleName to set. + * @return This builder for chaining. + */ + public Builder setModuleName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + moduleName_ = value; + bitField0_ |= 0x40000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Unique identifier of the module which generated the finding.
+     * Example:
+     * folders/598186756061/securityHealthAnalyticsSettings/customModules/56799441161885
+     * 
+ * + * string module_name = 34; + * + * @return This builder for chaining. + */ + public Builder clearModuleName() { + moduleName_ = getDefaultInstance().getModuleName(); + bitField0_ = (bitField0_ & ~0x40000000); + onChanged(); + return this; + } + /** + * + * + *
+     * Unique identifier of the module which generated the finding.
+     * Example:
+     * folders/598186756061/securityHealthAnalyticsSettings/customModules/56799441161885
+     * 
+ * + * string module_name = 34; + * + * @param value The bytes for moduleName to set. + * @return This builder for chaining. + */ + public Builder setModuleNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + moduleName_ = value; + bitField0_ |= 0x40000000; + onChanged(); + return this; + } + + private java.util.List containers_ = + java.util.Collections.emptyList(); + + private void ensureContainersIsMutable() { + if (!((bitField0_ & 0x80000000) != 0)) { + containers_ = + new java.util.ArrayList(containers_); + bitField0_ |= 0x80000000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Container, + com.google.cloud.securitycenter.v2.Container.Builder, + com.google.cloud.securitycenter.v2.ContainerOrBuilder> + containersBuilder_; + + /** + * + * + *
+     * Containers associated with the finding. This field provides information for
+     * both Kubernetes and non-Kubernetes containers.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 35; + */ + public java.util.List getContainersList() { + if (containersBuilder_ == null) { + return java.util.Collections.unmodifiableList(containers_); + } else { + return containersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Containers associated with the finding. This field provides information for
+     * both Kubernetes and non-Kubernetes containers.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 35; + */ + public int getContainersCount() { + if (containersBuilder_ == null) { + return containers_.size(); + } else { + return containersBuilder_.getCount(); + } + } + /** + * + * + *
+     * Containers associated with the finding. This field provides information for
+     * both Kubernetes and non-Kubernetes containers.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 35; + */ + public com.google.cloud.securitycenter.v2.Container getContainers(int index) { + if (containersBuilder_ == null) { + return containers_.get(index); + } else { + return containersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Containers associated with the finding. This field provides information for
+     * both Kubernetes and non-Kubernetes containers.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 35; + */ + public Builder setContainers(int index, com.google.cloud.securitycenter.v2.Container value) { + if (containersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContainersIsMutable(); + containers_.set(index, value); + onChanged(); + } else { + containersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Containers associated with the finding. This field provides information for
+     * both Kubernetes and non-Kubernetes containers.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 35; + */ + public Builder setContainers( + int index, com.google.cloud.securitycenter.v2.Container.Builder builderForValue) { + if (containersBuilder_ == null) { + ensureContainersIsMutable(); + containers_.set(index, builderForValue.build()); + onChanged(); + } else { + containersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Containers associated with the finding. This field provides information for
+     * both Kubernetes and non-Kubernetes containers.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 35; + */ + public Builder addContainers(com.google.cloud.securitycenter.v2.Container value) { + if (containersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContainersIsMutable(); + containers_.add(value); + onChanged(); + } else { + containersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Containers associated with the finding. This field provides information for
+     * both Kubernetes and non-Kubernetes containers.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 35; + */ + public Builder addContainers(int index, com.google.cloud.securitycenter.v2.Container value) { + if (containersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContainersIsMutable(); + containers_.add(index, value); + onChanged(); + } else { + containersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Containers associated with the finding. This field provides information for
+     * both Kubernetes and non-Kubernetes containers.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 35; + */ + public Builder addContainers( + com.google.cloud.securitycenter.v2.Container.Builder builderForValue) { + if (containersBuilder_ == null) { + ensureContainersIsMutable(); + containers_.add(builderForValue.build()); + onChanged(); + } else { + containersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Containers associated with the finding. This field provides information for
+     * both Kubernetes and non-Kubernetes containers.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 35; + */ + public Builder addContainers( + int index, com.google.cloud.securitycenter.v2.Container.Builder builderForValue) { + if (containersBuilder_ == null) { + ensureContainersIsMutable(); + containers_.add(index, builderForValue.build()); + onChanged(); + } else { + containersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Containers associated with the finding. This field provides information for
+     * both Kubernetes and non-Kubernetes containers.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 35; + */ + public Builder addAllContainers( + java.lang.Iterable values) { + if (containersBuilder_ == null) { + ensureContainersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, containers_); + onChanged(); + } else { + containersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Containers associated with the finding. This field provides information for
+     * both Kubernetes and non-Kubernetes containers.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 35; + */ + public Builder clearContainers() { + if (containersBuilder_ == null) { + containers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x80000000); + onChanged(); + } else { + containersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Containers associated with the finding. This field provides information for
+     * both Kubernetes and non-Kubernetes containers.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 35; + */ + public Builder removeContainers(int index) { + if (containersBuilder_ == null) { + ensureContainersIsMutable(); + containers_.remove(index); + onChanged(); + } else { + containersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Containers associated with the finding. This field provides information for
+     * both Kubernetes and non-Kubernetes containers.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 35; + */ + public com.google.cloud.securitycenter.v2.Container.Builder getContainersBuilder(int index) { + return getContainersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Containers associated with the finding. This field provides information for
+     * both Kubernetes and non-Kubernetes containers.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 35; + */ + public com.google.cloud.securitycenter.v2.ContainerOrBuilder getContainersOrBuilder(int index) { + if (containersBuilder_ == null) { + return containers_.get(index); + } else { + return containersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Containers associated with the finding. This field provides information for
+     * both Kubernetes and non-Kubernetes containers.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 35; + */ + public java.util.List + getContainersOrBuilderList() { + if (containersBuilder_ != null) { + return containersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(containers_); + } + } + /** + * + * + *
+     * Containers associated with the finding. This field provides information for
+     * both Kubernetes and non-Kubernetes containers.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 35; + */ + public com.google.cloud.securitycenter.v2.Container.Builder addContainersBuilder() { + return getContainersFieldBuilder() + .addBuilder(com.google.cloud.securitycenter.v2.Container.getDefaultInstance()); + } + /** + * + * + *
+     * Containers associated with the finding. This field provides information for
+     * both Kubernetes and non-Kubernetes containers.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 35; + */ + public com.google.cloud.securitycenter.v2.Container.Builder addContainersBuilder(int index) { + return getContainersFieldBuilder() + .addBuilder(index, com.google.cloud.securitycenter.v2.Container.getDefaultInstance()); + } + /** + * + * + *
+     * Containers associated with the finding. This field provides information for
+     * both Kubernetes and non-Kubernetes containers.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 35; + */ + public java.util.List + getContainersBuilderList() { + return getContainersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Container, + com.google.cloud.securitycenter.v2.Container.Builder, + com.google.cloud.securitycenter.v2.ContainerOrBuilder> + getContainersFieldBuilder() { + if (containersBuilder_ == null) { + containersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Container, + com.google.cloud.securitycenter.v2.Container.Builder, + com.google.cloud.securitycenter.v2.ContainerOrBuilder>( + containers_, ((bitField0_ & 0x80000000) != 0), getParentForChildren(), isClean()); + containers_ = null; + } + return containersBuilder_; + } + + private com.google.cloud.securitycenter.v2.Kubernetes kubernetes_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Kubernetes, + com.google.cloud.securitycenter.v2.Kubernetes.Builder, + com.google.cloud.securitycenter.v2.KubernetesOrBuilder> + kubernetesBuilder_; + /** + * + * + *
+     * Kubernetes resources associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes kubernetes = 36; + * + * @return Whether the kubernetes field is set. + */ + public boolean hasKubernetes() { + return ((bitField1_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Kubernetes resources associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes kubernetes = 36; + * + * @return The kubernetes. + */ + public com.google.cloud.securitycenter.v2.Kubernetes getKubernetes() { + if (kubernetesBuilder_ == null) { + return kubernetes_ == null + ? com.google.cloud.securitycenter.v2.Kubernetes.getDefaultInstance() + : kubernetes_; + } else { + return kubernetesBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Kubernetes resources associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes kubernetes = 36; + */ + public Builder setKubernetes(com.google.cloud.securitycenter.v2.Kubernetes value) { + if (kubernetesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kubernetes_ = value; + } else { + kubernetesBuilder_.setMessage(value); + } + bitField1_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Kubernetes resources associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes kubernetes = 36; + */ + public Builder setKubernetes( + com.google.cloud.securitycenter.v2.Kubernetes.Builder builderForValue) { + if (kubernetesBuilder_ == null) { + kubernetes_ = builderForValue.build(); + } else { + kubernetesBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Kubernetes resources associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes kubernetes = 36; + */ + public Builder mergeKubernetes(com.google.cloud.securitycenter.v2.Kubernetes value) { + if (kubernetesBuilder_ == null) { + if (((bitField1_ & 0x00000001) != 0) + && kubernetes_ != null + && kubernetes_ != com.google.cloud.securitycenter.v2.Kubernetes.getDefaultInstance()) { + getKubernetesBuilder().mergeFrom(value); + } else { + kubernetes_ = value; + } + } else { + kubernetesBuilder_.mergeFrom(value); + } + if (kubernetes_ != null) { + bitField1_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Kubernetes resources associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes kubernetes = 36; + */ + public Builder clearKubernetes() { + bitField1_ = (bitField1_ & ~0x00000001); + kubernetes_ = null; + if (kubernetesBuilder_ != null) { + kubernetesBuilder_.dispose(); + kubernetesBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Kubernetes resources associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes kubernetes = 36; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.Builder getKubernetesBuilder() { + bitField1_ |= 0x00000001; + onChanged(); + return getKubernetesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Kubernetes resources associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes kubernetes = 36; + */ + public com.google.cloud.securitycenter.v2.KubernetesOrBuilder getKubernetesOrBuilder() { + if (kubernetesBuilder_ != null) { + return kubernetesBuilder_.getMessageOrBuilder(); + } else { + return kubernetes_ == null + ? com.google.cloud.securitycenter.v2.Kubernetes.getDefaultInstance() + : kubernetes_; + } + } + /** + * + * + *
+     * Kubernetes resources associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes kubernetes = 36; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Kubernetes, + com.google.cloud.securitycenter.v2.Kubernetes.Builder, + com.google.cloud.securitycenter.v2.KubernetesOrBuilder> + getKubernetesFieldBuilder() { + if (kubernetesBuilder_ == null) { + kubernetesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Kubernetes, + com.google.cloud.securitycenter.v2.Kubernetes.Builder, + com.google.cloud.securitycenter.v2.KubernetesOrBuilder>( + getKubernetes(), getParentForChildren(), isClean()); + kubernetes_ = null; + } + return kubernetesBuilder_; + } + + private com.google.cloud.securitycenter.v2.Database database_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Database, + com.google.cloud.securitycenter.v2.Database.Builder, + com.google.cloud.securitycenter.v2.DatabaseOrBuilder> + databaseBuilder_; + /** + * + * + *
+     * Database associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Database database = 37; + * + * @return Whether the database field is set. + */ + public boolean hasDatabase() { + return ((bitField1_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Database associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Database database = 37; + * + * @return The database. + */ + public com.google.cloud.securitycenter.v2.Database getDatabase() { + if (databaseBuilder_ == null) { + return database_ == null + ? com.google.cloud.securitycenter.v2.Database.getDefaultInstance() + : database_; + } else { + return databaseBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Database associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Database database = 37; + */ + public Builder setDatabase(com.google.cloud.securitycenter.v2.Database value) { + if (databaseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + database_ = value; + } else { + databaseBuilder_.setMessage(value); + } + bitField1_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Database associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Database database = 37; + */ + public Builder setDatabase( + com.google.cloud.securitycenter.v2.Database.Builder builderForValue) { + if (databaseBuilder_ == null) { + database_ = builderForValue.build(); + } else { + databaseBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Database associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Database database = 37; + */ + public Builder mergeDatabase(com.google.cloud.securitycenter.v2.Database value) { + if (databaseBuilder_ == null) { + if (((bitField1_ & 0x00000002) != 0) + && database_ != null + && database_ != com.google.cloud.securitycenter.v2.Database.getDefaultInstance()) { + getDatabaseBuilder().mergeFrom(value); + } else { + database_ = value; + } + } else { + databaseBuilder_.mergeFrom(value); + } + if (database_ != null) { + bitField1_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Database associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Database database = 37; + */ + public Builder clearDatabase() { + bitField1_ = (bitField1_ & ~0x00000002); + database_ = null; + if (databaseBuilder_ != null) { + databaseBuilder_.dispose(); + databaseBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Database associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Database database = 37; + */ + public com.google.cloud.securitycenter.v2.Database.Builder getDatabaseBuilder() { + bitField1_ |= 0x00000002; + onChanged(); + return getDatabaseFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Database associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Database database = 37; + */ + public com.google.cloud.securitycenter.v2.DatabaseOrBuilder getDatabaseOrBuilder() { + if (databaseBuilder_ != null) { + return databaseBuilder_.getMessageOrBuilder(); + } else { + return database_ == null + ? com.google.cloud.securitycenter.v2.Database.getDefaultInstance() + : database_; + } + } + /** + * + * + *
+     * Database associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Database database = 37; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Database, + com.google.cloud.securitycenter.v2.Database.Builder, + com.google.cloud.securitycenter.v2.DatabaseOrBuilder> + getDatabaseFieldBuilder() { + if (databaseBuilder_ == null) { + databaseBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Database, + com.google.cloud.securitycenter.v2.Database.Builder, + com.google.cloud.securitycenter.v2.DatabaseOrBuilder>( + getDatabase(), getParentForChildren(), isClean()); + database_ = null; + } + return databaseBuilder_; + } + + private com.google.cloud.securitycenter.v2.AttackExposure attackExposure_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.AttackExposure, + com.google.cloud.securitycenter.v2.AttackExposure.Builder, + com.google.cloud.securitycenter.v2.AttackExposureOrBuilder> + attackExposureBuilder_; + /** + * + * + *
+     * The results of an attack path simulation relevant to this finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.AttackExposure attack_exposure = 38; + * + * @return Whether the attackExposure field is set. + */ + public boolean hasAttackExposure() { + return ((bitField1_ & 0x00000004) != 0); + } + /** + * + * + *
+     * The results of an attack path simulation relevant to this finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.AttackExposure attack_exposure = 38; + * + * @return The attackExposure. + */ + public com.google.cloud.securitycenter.v2.AttackExposure getAttackExposure() { + if (attackExposureBuilder_ == null) { + return attackExposure_ == null + ? com.google.cloud.securitycenter.v2.AttackExposure.getDefaultInstance() + : attackExposure_; + } else { + return attackExposureBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The results of an attack path simulation relevant to this finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.AttackExposure attack_exposure = 38; + */ + public Builder setAttackExposure(com.google.cloud.securitycenter.v2.AttackExposure value) { + if (attackExposureBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + attackExposure_ = value; + } else { + attackExposureBuilder_.setMessage(value); + } + bitField1_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The results of an attack path simulation relevant to this finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.AttackExposure attack_exposure = 38; + */ + public Builder setAttackExposure( + com.google.cloud.securitycenter.v2.AttackExposure.Builder builderForValue) { + if (attackExposureBuilder_ == null) { + attackExposure_ = builderForValue.build(); + } else { + attackExposureBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The results of an attack path simulation relevant to this finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.AttackExposure attack_exposure = 38; + */ + public Builder mergeAttackExposure(com.google.cloud.securitycenter.v2.AttackExposure value) { + if (attackExposureBuilder_ == null) { + if (((bitField1_ & 0x00000004) != 0) + && attackExposure_ != null + && attackExposure_ + != com.google.cloud.securitycenter.v2.AttackExposure.getDefaultInstance()) { + getAttackExposureBuilder().mergeFrom(value); + } else { + attackExposure_ = value; + } + } else { + attackExposureBuilder_.mergeFrom(value); + } + if (attackExposure_ != null) { + bitField1_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The results of an attack path simulation relevant to this finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.AttackExposure attack_exposure = 38; + */ + public Builder clearAttackExposure() { + bitField1_ = (bitField1_ & ~0x00000004); + attackExposure_ = null; + if (attackExposureBuilder_ != null) { + attackExposureBuilder_.dispose(); + attackExposureBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The results of an attack path simulation relevant to this finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.AttackExposure attack_exposure = 38; + */ + public com.google.cloud.securitycenter.v2.AttackExposure.Builder getAttackExposureBuilder() { + bitField1_ |= 0x00000004; + onChanged(); + return getAttackExposureFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The results of an attack path simulation relevant to this finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.AttackExposure attack_exposure = 38; + */ + public com.google.cloud.securitycenter.v2.AttackExposureOrBuilder getAttackExposureOrBuilder() { + if (attackExposureBuilder_ != null) { + return attackExposureBuilder_.getMessageOrBuilder(); + } else { + return attackExposure_ == null + ? com.google.cloud.securitycenter.v2.AttackExposure.getDefaultInstance() + : attackExposure_; + } + } + /** + * + * + *
+     * The results of an attack path simulation relevant to this finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.AttackExposure attack_exposure = 38; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.AttackExposure, + com.google.cloud.securitycenter.v2.AttackExposure.Builder, + com.google.cloud.securitycenter.v2.AttackExposureOrBuilder> + getAttackExposureFieldBuilder() { + if (attackExposureBuilder_ == null) { + attackExposureBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.AttackExposure, + com.google.cloud.securitycenter.v2.AttackExposure.Builder, + com.google.cloud.securitycenter.v2.AttackExposureOrBuilder>( + getAttackExposure(), getParentForChildren(), isClean()); + attackExposure_ = null; + } + return attackExposureBuilder_; + } + + private java.util.List files_ = + java.util.Collections.emptyList(); + + private void ensureFilesIsMutable() { + if (!((bitField1_ & 0x00000008) != 0)) { + files_ = new java.util.ArrayList(files_); + bitField1_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.File, + com.google.cloud.securitycenter.v2.File.Builder, + com.google.cloud.securitycenter.v2.FileOrBuilder> + filesBuilder_; + + /** + * + * + *
+     * File associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.File files = 39; + */ + public java.util.List getFilesList() { + if (filesBuilder_ == null) { + return java.util.Collections.unmodifiableList(files_); + } else { + return filesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * File associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.File files = 39; + */ + public int getFilesCount() { + if (filesBuilder_ == null) { + return files_.size(); + } else { + return filesBuilder_.getCount(); + } + } + /** + * + * + *
+     * File associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.File files = 39; + */ + public com.google.cloud.securitycenter.v2.File getFiles(int index) { + if (filesBuilder_ == null) { + return files_.get(index); + } else { + return filesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * File associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.File files = 39; + */ + public Builder setFiles(int index, com.google.cloud.securitycenter.v2.File value) { + if (filesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFilesIsMutable(); + files_.set(index, value); + onChanged(); + } else { + filesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * File associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.File files = 39; + */ + public Builder setFiles( + int index, com.google.cloud.securitycenter.v2.File.Builder builderForValue) { + if (filesBuilder_ == null) { + ensureFilesIsMutable(); + files_.set(index, builderForValue.build()); + onChanged(); + } else { + filesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * File associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.File files = 39; + */ + public Builder addFiles(com.google.cloud.securitycenter.v2.File value) { + if (filesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFilesIsMutable(); + files_.add(value); + onChanged(); + } else { + filesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * File associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.File files = 39; + */ + public Builder addFiles(int index, com.google.cloud.securitycenter.v2.File value) { + if (filesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFilesIsMutable(); + files_.add(index, value); + onChanged(); + } else { + filesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * File associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.File files = 39; + */ + public Builder addFiles(com.google.cloud.securitycenter.v2.File.Builder builderForValue) { + if (filesBuilder_ == null) { + ensureFilesIsMutable(); + files_.add(builderForValue.build()); + onChanged(); + } else { + filesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * File associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.File files = 39; + */ + public Builder addFiles( + int index, com.google.cloud.securitycenter.v2.File.Builder builderForValue) { + if (filesBuilder_ == null) { + ensureFilesIsMutable(); + files_.add(index, builderForValue.build()); + onChanged(); + } else { + filesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * File associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.File files = 39; + */ + public Builder addAllFiles( + java.lang.Iterable values) { + if (filesBuilder_ == null) { + ensureFilesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, files_); + onChanged(); + } else { + filesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * File associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.File files = 39; + */ + public Builder clearFiles() { + if (filesBuilder_ == null) { + files_ = java.util.Collections.emptyList(); + bitField1_ = (bitField1_ & ~0x00000008); + onChanged(); + } else { + filesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * File associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.File files = 39; + */ + public Builder removeFiles(int index) { + if (filesBuilder_ == null) { + ensureFilesIsMutable(); + files_.remove(index); + onChanged(); + } else { + filesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * File associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.File files = 39; + */ + public com.google.cloud.securitycenter.v2.File.Builder getFilesBuilder(int index) { + return getFilesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * File associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.File files = 39; + */ + public com.google.cloud.securitycenter.v2.FileOrBuilder getFilesOrBuilder(int index) { + if (filesBuilder_ == null) { + return files_.get(index); + } else { + return filesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * File associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.File files = 39; + */ + public java.util.List + getFilesOrBuilderList() { + if (filesBuilder_ != null) { + return filesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(files_); + } + } + /** + * + * + *
+     * File associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.File files = 39; + */ + public com.google.cloud.securitycenter.v2.File.Builder addFilesBuilder() { + return getFilesFieldBuilder() + .addBuilder(com.google.cloud.securitycenter.v2.File.getDefaultInstance()); + } + /** + * + * + *
+     * File associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.File files = 39; + */ + public com.google.cloud.securitycenter.v2.File.Builder addFilesBuilder(int index) { + return getFilesFieldBuilder() + .addBuilder(index, com.google.cloud.securitycenter.v2.File.getDefaultInstance()); + } + /** + * + * + *
+     * File associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.File files = 39; + */ + public java.util.List getFilesBuilderList() { + return getFilesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.File, + com.google.cloud.securitycenter.v2.File.Builder, + com.google.cloud.securitycenter.v2.FileOrBuilder> + getFilesFieldBuilder() { + if (filesBuilder_ == null) { + filesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.File, + com.google.cloud.securitycenter.v2.File.Builder, + com.google.cloud.securitycenter.v2.FileOrBuilder>( + files_, ((bitField1_ & 0x00000008) != 0), getParentForChildren(), isClean()); + files_ = null; + } + return filesBuilder_; + } + + private com.google.cloud.securitycenter.v2.CloudDlpInspection cloudDlpInspection_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.CloudDlpInspection, + com.google.cloud.securitycenter.v2.CloudDlpInspection.Builder, + com.google.cloud.securitycenter.v2.CloudDlpInspectionOrBuilder> + cloudDlpInspectionBuilder_; + /** + * + * + *
+     * Cloud Data Loss Prevention (Cloud DLP) inspection results that are
+     * associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpInspection cloud_dlp_inspection = 40; + * + * @return Whether the cloudDlpInspection field is set. + */ + public boolean hasCloudDlpInspection() { + return ((bitField1_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Cloud Data Loss Prevention (Cloud DLP) inspection results that are
+     * associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpInspection cloud_dlp_inspection = 40; + * + * @return The cloudDlpInspection. + */ + public com.google.cloud.securitycenter.v2.CloudDlpInspection getCloudDlpInspection() { + if (cloudDlpInspectionBuilder_ == null) { + return cloudDlpInspection_ == null + ? com.google.cloud.securitycenter.v2.CloudDlpInspection.getDefaultInstance() + : cloudDlpInspection_; + } else { + return cloudDlpInspectionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Cloud Data Loss Prevention (Cloud DLP) inspection results that are
+     * associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpInspection cloud_dlp_inspection = 40; + */ + public Builder setCloudDlpInspection( + com.google.cloud.securitycenter.v2.CloudDlpInspection value) { + if (cloudDlpInspectionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cloudDlpInspection_ = value; + } else { + cloudDlpInspectionBuilder_.setMessage(value); + } + bitField1_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud Data Loss Prevention (Cloud DLP) inspection results that are
+     * associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpInspection cloud_dlp_inspection = 40; + */ + public Builder setCloudDlpInspection( + com.google.cloud.securitycenter.v2.CloudDlpInspection.Builder builderForValue) { + if (cloudDlpInspectionBuilder_ == null) { + cloudDlpInspection_ = builderForValue.build(); + } else { + cloudDlpInspectionBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud Data Loss Prevention (Cloud DLP) inspection results that are
+     * associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpInspection cloud_dlp_inspection = 40; + */ + public Builder mergeCloudDlpInspection( + com.google.cloud.securitycenter.v2.CloudDlpInspection value) { + if (cloudDlpInspectionBuilder_ == null) { + if (((bitField1_ & 0x00000010) != 0) + && cloudDlpInspection_ != null + && cloudDlpInspection_ + != com.google.cloud.securitycenter.v2.CloudDlpInspection.getDefaultInstance()) { + getCloudDlpInspectionBuilder().mergeFrom(value); + } else { + cloudDlpInspection_ = value; + } + } else { + cloudDlpInspectionBuilder_.mergeFrom(value); + } + if (cloudDlpInspection_ != null) { + bitField1_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Cloud Data Loss Prevention (Cloud DLP) inspection results that are
+     * associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpInspection cloud_dlp_inspection = 40; + */ + public Builder clearCloudDlpInspection() { + bitField1_ = (bitField1_ & ~0x00000010); + cloudDlpInspection_ = null; + if (cloudDlpInspectionBuilder_ != null) { + cloudDlpInspectionBuilder_.dispose(); + cloudDlpInspectionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud Data Loss Prevention (Cloud DLP) inspection results that are
+     * associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpInspection cloud_dlp_inspection = 40; + */ + public com.google.cloud.securitycenter.v2.CloudDlpInspection.Builder + getCloudDlpInspectionBuilder() { + bitField1_ |= 0x00000010; + onChanged(); + return getCloudDlpInspectionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Cloud Data Loss Prevention (Cloud DLP) inspection results that are
+     * associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpInspection cloud_dlp_inspection = 40; + */ + public com.google.cloud.securitycenter.v2.CloudDlpInspectionOrBuilder + getCloudDlpInspectionOrBuilder() { + if (cloudDlpInspectionBuilder_ != null) { + return cloudDlpInspectionBuilder_.getMessageOrBuilder(); + } else { + return cloudDlpInspection_ == null + ? com.google.cloud.securitycenter.v2.CloudDlpInspection.getDefaultInstance() + : cloudDlpInspection_; + } + } + /** + * + * + *
+     * Cloud Data Loss Prevention (Cloud DLP) inspection results that are
+     * associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpInspection cloud_dlp_inspection = 40; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.CloudDlpInspection, + com.google.cloud.securitycenter.v2.CloudDlpInspection.Builder, + com.google.cloud.securitycenter.v2.CloudDlpInspectionOrBuilder> + getCloudDlpInspectionFieldBuilder() { + if (cloudDlpInspectionBuilder_ == null) { + cloudDlpInspectionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.CloudDlpInspection, + com.google.cloud.securitycenter.v2.CloudDlpInspection.Builder, + com.google.cloud.securitycenter.v2.CloudDlpInspectionOrBuilder>( + getCloudDlpInspection(), getParentForChildren(), isClean()); + cloudDlpInspection_ = null; + } + return cloudDlpInspectionBuilder_; + } + + private com.google.cloud.securitycenter.v2.CloudDlpDataProfile cloudDlpDataProfile_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.CloudDlpDataProfile, + com.google.cloud.securitycenter.v2.CloudDlpDataProfile.Builder, + com.google.cloud.securitycenter.v2.CloudDlpDataProfileOrBuilder> + cloudDlpDataProfileBuilder_; + /** + * + * + *
+     * Cloud DLP data profile that is associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpDataProfile cloud_dlp_data_profile = 41; + * + * @return Whether the cloudDlpDataProfile field is set. + */ + public boolean hasCloudDlpDataProfile() { + return ((bitField1_ & 0x00000020) != 0); + } + /** + * + * + *
+     * Cloud DLP data profile that is associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpDataProfile cloud_dlp_data_profile = 41; + * + * @return The cloudDlpDataProfile. + */ + public com.google.cloud.securitycenter.v2.CloudDlpDataProfile getCloudDlpDataProfile() { + if (cloudDlpDataProfileBuilder_ == null) { + return cloudDlpDataProfile_ == null + ? com.google.cloud.securitycenter.v2.CloudDlpDataProfile.getDefaultInstance() + : cloudDlpDataProfile_; + } else { + return cloudDlpDataProfileBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Cloud DLP data profile that is associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpDataProfile cloud_dlp_data_profile = 41; + */ + public Builder setCloudDlpDataProfile( + com.google.cloud.securitycenter.v2.CloudDlpDataProfile value) { + if (cloudDlpDataProfileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cloudDlpDataProfile_ = value; + } else { + cloudDlpDataProfileBuilder_.setMessage(value); + } + bitField1_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud DLP data profile that is associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpDataProfile cloud_dlp_data_profile = 41; + */ + public Builder setCloudDlpDataProfile( + com.google.cloud.securitycenter.v2.CloudDlpDataProfile.Builder builderForValue) { + if (cloudDlpDataProfileBuilder_ == null) { + cloudDlpDataProfile_ = builderForValue.build(); + } else { + cloudDlpDataProfileBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud DLP data profile that is associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpDataProfile cloud_dlp_data_profile = 41; + */ + public Builder mergeCloudDlpDataProfile( + com.google.cloud.securitycenter.v2.CloudDlpDataProfile value) { + if (cloudDlpDataProfileBuilder_ == null) { + if (((bitField1_ & 0x00000020) != 0) + && cloudDlpDataProfile_ != null + && cloudDlpDataProfile_ + != com.google.cloud.securitycenter.v2.CloudDlpDataProfile.getDefaultInstance()) { + getCloudDlpDataProfileBuilder().mergeFrom(value); + } else { + cloudDlpDataProfile_ = value; + } + } else { + cloudDlpDataProfileBuilder_.mergeFrom(value); + } + if (cloudDlpDataProfile_ != null) { + bitField1_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Cloud DLP data profile that is associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpDataProfile cloud_dlp_data_profile = 41; + */ + public Builder clearCloudDlpDataProfile() { + bitField1_ = (bitField1_ & ~0x00000020); + cloudDlpDataProfile_ = null; + if (cloudDlpDataProfileBuilder_ != null) { + cloudDlpDataProfileBuilder_.dispose(); + cloudDlpDataProfileBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud DLP data profile that is associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpDataProfile cloud_dlp_data_profile = 41; + */ + public com.google.cloud.securitycenter.v2.CloudDlpDataProfile.Builder + getCloudDlpDataProfileBuilder() { + bitField1_ |= 0x00000020; + onChanged(); + return getCloudDlpDataProfileFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Cloud DLP data profile that is associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpDataProfile cloud_dlp_data_profile = 41; + */ + public com.google.cloud.securitycenter.v2.CloudDlpDataProfileOrBuilder + getCloudDlpDataProfileOrBuilder() { + if (cloudDlpDataProfileBuilder_ != null) { + return cloudDlpDataProfileBuilder_.getMessageOrBuilder(); + } else { + return cloudDlpDataProfile_ == null + ? com.google.cloud.securitycenter.v2.CloudDlpDataProfile.getDefaultInstance() + : cloudDlpDataProfile_; + } + } + /** + * + * + *
+     * Cloud DLP data profile that is associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpDataProfile cloud_dlp_data_profile = 41; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.CloudDlpDataProfile, + com.google.cloud.securitycenter.v2.CloudDlpDataProfile.Builder, + com.google.cloud.securitycenter.v2.CloudDlpDataProfileOrBuilder> + getCloudDlpDataProfileFieldBuilder() { + if (cloudDlpDataProfileBuilder_ == null) { + cloudDlpDataProfileBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.CloudDlpDataProfile, + com.google.cloud.securitycenter.v2.CloudDlpDataProfile.Builder, + com.google.cloud.securitycenter.v2.CloudDlpDataProfileOrBuilder>( + getCloudDlpDataProfile(), getParentForChildren(), isClean()); + cloudDlpDataProfile_ = null; + } + return cloudDlpDataProfileBuilder_; + } + + private com.google.cloud.securitycenter.v2.KernelRootkit kernelRootkit_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.KernelRootkit, + com.google.cloud.securitycenter.v2.KernelRootkit.Builder, + com.google.cloud.securitycenter.v2.KernelRootkitOrBuilder> + kernelRootkitBuilder_; + /** + * + * + *
+     * Signature of the kernel rootkit.
+     * 
+ * + * .google.cloud.securitycenter.v2.KernelRootkit kernel_rootkit = 42; + * + * @return Whether the kernelRootkit field is set. + */ + public boolean hasKernelRootkit() { + return ((bitField1_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Signature of the kernel rootkit.
+     * 
+ * + * .google.cloud.securitycenter.v2.KernelRootkit kernel_rootkit = 42; + * + * @return The kernelRootkit. + */ + public com.google.cloud.securitycenter.v2.KernelRootkit getKernelRootkit() { + if (kernelRootkitBuilder_ == null) { + return kernelRootkit_ == null + ? com.google.cloud.securitycenter.v2.KernelRootkit.getDefaultInstance() + : kernelRootkit_; + } else { + return kernelRootkitBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Signature of the kernel rootkit.
+     * 
+ * + * .google.cloud.securitycenter.v2.KernelRootkit kernel_rootkit = 42; + */ + public Builder setKernelRootkit(com.google.cloud.securitycenter.v2.KernelRootkit value) { + if (kernelRootkitBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kernelRootkit_ = value; + } else { + kernelRootkitBuilder_.setMessage(value); + } + bitField1_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Signature of the kernel rootkit.
+     * 
+ * + * .google.cloud.securitycenter.v2.KernelRootkit kernel_rootkit = 42; + */ + public Builder setKernelRootkit( + com.google.cloud.securitycenter.v2.KernelRootkit.Builder builderForValue) { + if (kernelRootkitBuilder_ == null) { + kernelRootkit_ = builderForValue.build(); + } else { + kernelRootkitBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Signature of the kernel rootkit.
+     * 
+ * + * .google.cloud.securitycenter.v2.KernelRootkit kernel_rootkit = 42; + */ + public Builder mergeKernelRootkit(com.google.cloud.securitycenter.v2.KernelRootkit value) { + if (kernelRootkitBuilder_ == null) { + if (((bitField1_ & 0x00000040) != 0) + && kernelRootkit_ != null + && kernelRootkit_ + != com.google.cloud.securitycenter.v2.KernelRootkit.getDefaultInstance()) { + getKernelRootkitBuilder().mergeFrom(value); + } else { + kernelRootkit_ = value; + } + } else { + kernelRootkitBuilder_.mergeFrom(value); + } + if (kernelRootkit_ != null) { + bitField1_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Signature of the kernel rootkit.
+     * 
+ * + * .google.cloud.securitycenter.v2.KernelRootkit kernel_rootkit = 42; + */ + public Builder clearKernelRootkit() { + bitField1_ = (bitField1_ & ~0x00000040); + kernelRootkit_ = null; + if (kernelRootkitBuilder_ != null) { + kernelRootkitBuilder_.dispose(); + kernelRootkitBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Signature of the kernel rootkit.
+     * 
+ * + * .google.cloud.securitycenter.v2.KernelRootkit kernel_rootkit = 42; + */ + public com.google.cloud.securitycenter.v2.KernelRootkit.Builder getKernelRootkitBuilder() { + bitField1_ |= 0x00000040; + onChanged(); + return getKernelRootkitFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Signature of the kernel rootkit.
+     * 
+ * + * .google.cloud.securitycenter.v2.KernelRootkit kernel_rootkit = 42; + */ + public com.google.cloud.securitycenter.v2.KernelRootkitOrBuilder getKernelRootkitOrBuilder() { + if (kernelRootkitBuilder_ != null) { + return kernelRootkitBuilder_.getMessageOrBuilder(); + } else { + return kernelRootkit_ == null + ? com.google.cloud.securitycenter.v2.KernelRootkit.getDefaultInstance() + : kernelRootkit_; + } + } + /** + * + * + *
+     * Signature of the kernel rootkit.
+     * 
+ * + * .google.cloud.securitycenter.v2.KernelRootkit kernel_rootkit = 42; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.KernelRootkit, + com.google.cloud.securitycenter.v2.KernelRootkit.Builder, + com.google.cloud.securitycenter.v2.KernelRootkitOrBuilder> + getKernelRootkitFieldBuilder() { + if (kernelRootkitBuilder_ == null) { + kernelRootkitBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.KernelRootkit, + com.google.cloud.securitycenter.v2.KernelRootkit.Builder, + com.google.cloud.securitycenter.v2.KernelRootkitOrBuilder>( + getKernelRootkit(), getParentForChildren(), isClean()); + kernelRootkit_ = null; + } + return kernelRootkitBuilder_; + } + + private java.util.List orgPolicies_ = + java.util.Collections.emptyList(); + + private void ensureOrgPoliciesIsMutable() { + if (!((bitField1_ & 0x00000080) != 0)) { + orgPolicies_ = + new java.util.ArrayList(orgPolicies_); + bitField1_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.OrgPolicy, + com.google.cloud.securitycenter.v2.OrgPolicy.Builder, + com.google.cloud.securitycenter.v2.OrgPolicyOrBuilder> + orgPoliciesBuilder_; + + /** + * + * + *
+     * Contains information about the org policies associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.OrgPolicy org_policies = 43; + */ + public java.util.List getOrgPoliciesList() { + if (orgPoliciesBuilder_ == null) { + return java.util.Collections.unmodifiableList(orgPolicies_); + } else { + return orgPoliciesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Contains information about the org policies associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.OrgPolicy org_policies = 43; + */ + public int getOrgPoliciesCount() { + if (orgPoliciesBuilder_ == null) { + return orgPolicies_.size(); + } else { + return orgPoliciesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Contains information about the org policies associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.OrgPolicy org_policies = 43; + */ + public com.google.cloud.securitycenter.v2.OrgPolicy getOrgPolicies(int index) { + if (orgPoliciesBuilder_ == null) { + return orgPolicies_.get(index); + } else { + return orgPoliciesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Contains information about the org policies associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.OrgPolicy org_policies = 43; + */ + public Builder setOrgPolicies(int index, com.google.cloud.securitycenter.v2.OrgPolicy value) { + if (orgPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOrgPoliciesIsMutable(); + orgPolicies_.set(index, value); + onChanged(); + } else { + orgPoliciesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Contains information about the org policies associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.OrgPolicy org_policies = 43; + */ + public Builder setOrgPolicies( + int index, com.google.cloud.securitycenter.v2.OrgPolicy.Builder builderForValue) { + if (orgPoliciesBuilder_ == null) { + ensureOrgPoliciesIsMutable(); + orgPolicies_.set(index, builderForValue.build()); + onChanged(); + } else { + orgPoliciesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Contains information about the org policies associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.OrgPolicy org_policies = 43; + */ + public Builder addOrgPolicies(com.google.cloud.securitycenter.v2.OrgPolicy value) { + if (orgPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOrgPoliciesIsMutable(); + orgPolicies_.add(value); + onChanged(); + } else { + orgPoliciesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Contains information about the org policies associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.OrgPolicy org_policies = 43; + */ + public Builder addOrgPolicies(int index, com.google.cloud.securitycenter.v2.OrgPolicy value) { + if (orgPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOrgPoliciesIsMutable(); + orgPolicies_.add(index, value); + onChanged(); + } else { + orgPoliciesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Contains information about the org policies associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.OrgPolicy org_policies = 43; + */ + public Builder addOrgPolicies( + com.google.cloud.securitycenter.v2.OrgPolicy.Builder builderForValue) { + if (orgPoliciesBuilder_ == null) { + ensureOrgPoliciesIsMutable(); + orgPolicies_.add(builderForValue.build()); + onChanged(); + } else { + orgPoliciesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Contains information about the org policies associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.OrgPolicy org_policies = 43; + */ + public Builder addOrgPolicies( + int index, com.google.cloud.securitycenter.v2.OrgPolicy.Builder builderForValue) { + if (orgPoliciesBuilder_ == null) { + ensureOrgPoliciesIsMutable(); + orgPolicies_.add(index, builderForValue.build()); + onChanged(); + } else { + orgPoliciesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Contains information about the org policies associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.OrgPolicy org_policies = 43; + */ + public Builder addAllOrgPolicies( + java.lang.Iterable values) { + if (orgPoliciesBuilder_ == null) { + ensureOrgPoliciesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, orgPolicies_); + onChanged(); + } else { + orgPoliciesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Contains information about the org policies associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.OrgPolicy org_policies = 43; + */ + public Builder clearOrgPolicies() { + if (orgPoliciesBuilder_ == null) { + orgPolicies_ = java.util.Collections.emptyList(); + bitField1_ = (bitField1_ & ~0x00000080); + onChanged(); + } else { + orgPoliciesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Contains information about the org policies associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.OrgPolicy org_policies = 43; + */ + public Builder removeOrgPolicies(int index) { + if (orgPoliciesBuilder_ == null) { + ensureOrgPoliciesIsMutable(); + orgPolicies_.remove(index); + onChanged(); + } else { + orgPoliciesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Contains information about the org policies associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.OrgPolicy org_policies = 43; + */ + public com.google.cloud.securitycenter.v2.OrgPolicy.Builder getOrgPoliciesBuilder(int index) { + return getOrgPoliciesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Contains information about the org policies associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.OrgPolicy org_policies = 43; + */ + public com.google.cloud.securitycenter.v2.OrgPolicyOrBuilder getOrgPoliciesOrBuilder( + int index) { + if (orgPoliciesBuilder_ == null) { + return orgPolicies_.get(index); + } else { + return orgPoliciesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Contains information about the org policies associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.OrgPolicy org_policies = 43; + */ + public java.util.List + getOrgPoliciesOrBuilderList() { + if (orgPoliciesBuilder_ != null) { + return orgPoliciesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(orgPolicies_); + } + } + /** + * + * + *
+     * Contains information about the org policies associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.OrgPolicy org_policies = 43; + */ + public com.google.cloud.securitycenter.v2.OrgPolicy.Builder addOrgPoliciesBuilder() { + return getOrgPoliciesFieldBuilder() + .addBuilder(com.google.cloud.securitycenter.v2.OrgPolicy.getDefaultInstance()); + } + /** + * + * + *
+     * Contains information about the org policies associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.OrgPolicy org_policies = 43; + */ + public com.google.cloud.securitycenter.v2.OrgPolicy.Builder addOrgPoliciesBuilder(int index) { + return getOrgPoliciesFieldBuilder() + .addBuilder(index, com.google.cloud.securitycenter.v2.OrgPolicy.getDefaultInstance()); + } + /** + * + * + *
+     * Contains information about the org policies associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.OrgPolicy org_policies = 43; + */ + public java.util.List + getOrgPoliciesBuilderList() { + return getOrgPoliciesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.OrgPolicy, + com.google.cloud.securitycenter.v2.OrgPolicy.Builder, + com.google.cloud.securitycenter.v2.OrgPolicyOrBuilder> + getOrgPoliciesFieldBuilder() { + if (orgPoliciesBuilder_ == null) { + orgPoliciesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.OrgPolicy, + com.google.cloud.securitycenter.v2.OrgPolicy.Builder, + com.google.cloud.securitycenter.v2.OrgPolicyOrBuilder>( + orgPolicies_, ((bitField1_ & 0x00000080) != 0), getParentForChildren(), isClean()); + orgPolicies_ = null; + } + return orgPoliciesBuilder_; + } + + private com.google.cloud.securitycenter.v2.Application application_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Application, + com.google.cloud.securitycenter.v2.Application.Builder, + com.google.cloud.securitycenter.v2.ApplicationOrBuilder> + applicationBuilder_; + /** + * + * + *
+     * Represents an application associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Application application = 45; + * + * @return Whether the application field is set. + */ + public boolean hasApplication() { + return ((bitField1_ & 0x00000100) != 0); + } + /** + * + * + *
+     * Represents an application associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Application application = 45; + * + * @return The application. + */ + public com.google.cloud.securitycenter.v2.Application getApplication() { + if (applicationBuilder_ == null) { + return application_ == null + ? com.google.cloud.securitycenter.v2.Application.getDefaultInstance() + : application_; + } else { + return applicationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Represents an application associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Application application = 45; + */ + public Builder setApplication(com.google.cloud.securitycenter.v2.Application value) { + if (applicationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + application_ = value; + } else { + applicationBuilder_.setMessage(value); + } + bitField1_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Represents an application associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Application application = 45; + */ + public Builder setApplication( + com.google.cloud.securitycenter.v2.Application.Builder builderForValue) { + if (applicationBuilder_ == null) { + application_ = builderForValue.build(); + } else { + applicationBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Represents an application associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Application application = 45; + */ + public Builder mergeApplication(com.google.cloud.securitycenter.v2.Application value) { + if (applicationBuilder_ == null) { + if (((bitField1_ & 0x00000100) != 0) + && application_ != null + && application_ + != com.google.cloud.securitycenter.v2.Application.getDefaultInstance()) { + getApplicationBuilder().mergeFrom(value); + } else { + application_ = value; + } + } else { + applicationBuilder_.mergeFrom(value); + } + if (application_ != null) { + bitField1_ |= 0x00000100; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Represents an application associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Application application = 45; + */ + public Builder clearApplication() { + bitField1_ = (bitField1_ & ~0x00000100); + application_ = null; + if (applicationBuilder_ != null) { + applicationBuilder_.dispose(); + applicationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Represents an application associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Application application = 45; + */ + public com.google.cloud.securitycenter.v2.Application.Builder getApplicationBuilder() { + bitField1_ |= 0x00000100; + onChanged(); + return getApplicationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Represents an application associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Application application = 45; + */ + public com.google.cloud.securitycenter.v2.ApplicationOrBuilder getApplicationOrBuilder() { + if (applicationBuilder_ != null) { + return applicationBuilder_.getMessageOrBuilder(); + } else { + return application_ == null + ? com.google.cloud.securitycenter.v2.Application.getDefaultInstance() + : application_; + } + } + /** + * + * + *
+     * Represents an application associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Application application = 45; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Application, + com.google.cloud.securitycenter.v2.Application.Builder, + com.google.cloud.securitycenter.v2.ApplicationOrBuilder> + getApplicationFieldBuilder() { + if (applicationBuilder_ == null) { + applicationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Application, + com.google.cloud.securitycenter.v2.Application.Builder, + com.google.cloud.securitycenter.v2.ApplicationOrBuilder>( + getApplication(), getParentForChildren(), isClean()); + application_ = null; + } + return applicationBuilder_; + } + + private com.google.cloud.securitycenter.v2.BackupDisasterRecovery backupDisasterRecovery_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.BackupDisasterRecovery, + com.google.cloud.securitycenter.v2.BackupDisasterRecovery.Builder, + com.google.cloud.securitycenter.v2.BackupDisasterRecoveryOrBuilder> + backupDisasterRecoveryBuilder_; + /** + * + * + *
+     * Fields related to Backup and DR findings.
+     * 
+ * + * .google.cloud.securitycenter.v2.BackupDisasterRecovery backup_disaster_recovery = 47; + * + * + * @return Whether the backupDisasterRecovery field is set. + */ + public boolean hasBackupDisasterRecovery() { + return ((bitField1_ & 0x00000200) != 0); + } + /** + * + * + *
+     * Fields related to Backup and DR findings.
+     * 
+ * + * .google.cloud.securitycenter.v2.BackupDisasterRecovery backup_disaster_recovery = 47; + * + * + * @return The backupDisasterRecovery. + */ + public com.google.cloud.securitycenter.v2.BackupDisasterRecovery getBackupDisasterRecovery() { + if (backupDisasterRecoveryBuilder_ == null) { + return backupDisasterRecovery_ == null + ? com.google.cloud.securitycenter.v2.BackupDisasterRecovery.getDefaultInstance() + : backupDisasterRecovery_; + } else { + return backupDisasterRecoveryBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Fields related to Backup and DR findings.
+     * 
+ * + * .google.cloud.securitycenter.v2.BackupDisasterRecovery backup_disaster_recovery = 47; + * + */ + public Builder setBackupDisasterRecovery( + com.google.cloud.securitycenter.v2.BackupDisasterRecovery value) { + if (backupDisasterRecoveryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backupDisasterRecovery_ = value; + } else { + backupDisasterRecoveryBuilder_.setMessage(value); + } + bitField1_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Fields related to Backup and DR findings.
+     * 
+ * + * .google.cloud.securitycenter.v2.BackupDisasterRecovery backup_disaster_recovery = 47; + * + */ + public Builder setBackupDisasterRecovery( + com.google.cloud.securitycenter.v2.BackupDisasterRecovery.Builder builderForValue) { + if (backupDisasterRecoveryBuilder_ == null) { + backupDisasterRecovery_ = builderForValue.build(); + } else { + backupDisasterRecoveryBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Fields related to Backup and DR findings.
+     * 
+ * + * .google.cloud.securitycenter.v2.BackupDisasterRecovery backup_disaster_recovery = 47; + * + */ + public Builder mergeBackupDisasterRecovery( + com.google.cloud.securitycenter.v2.BackupDisasterRecovery value) { + if (backupDisasterRecoveryBuilder_ == null) { + if (((bitField1_ & 0x00000200) != 0) + && backupDisasterRecovery_ != null + && backupDisasterRecovery_ + != com.google.cloud.securitycenter.v2.BackupDisasterRecovery.getDefaultInstance()) { + getBackupDisasterRecoveryBuilder().mergeFrom(value); + } else { + backupDisasterRecovery_ = value; + } + } else { + backupDisasterRecoveryBuilder_.mergeFrom(value); + } + if (backupDisasterRecovery_ != null) { + bitField1_ |= 0x00000200; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Fields related to Backup and DR findings.
+     * 
+ * + * .google.cloud.securitycenter.v2.BackupDisasterRecovery backup_disaster_recovery = 47; + * + */ + public Builder clearBackupDisasterRecovery() { + bitField1_ = (bitField1_ & ~0x00000200); + backupDisasterRecovery_ = null; + if (backupDisasterRecoveryBuilder_ != null) { + backupDisasterRecoveryBuilder_.dispose(); + backupDisasterRecoveryBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Fields related to Backup and DR findings.
+     * 
+ * + * .google.cloud.securitycenter.v2.BackupDisasterRecovery backup_disaster_recovery = 47; + * + */ + public com.google.cloud.securitycenter.v2.BackupDisasterRecovery.Builder + getBackupDisasterRecoveryBuilder() { + bitField1_ |= 0x00000200; + onChanged(); + return getBackupDisasterRecoveryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Fields related to Backup and DR findings.
+     * 
+ * + * .google.cloud.securitycenter.v2.BackupDisasterRecovery backup_disaster_recovery = 47; + * + */ + public com.google.cloud.securitycenter.v2.BackupDisasterRecoveryOrBuilder + getBackupDisasterRecoveryOrBuilder() { + if (backupDisasterRecoveryBuilder_ != null) { + return backupDisasterRecoveryBuilder_.getMessageOrBuilder(); + } else { + return backupDisasterRecovery_ == null + ? com.google.cloud.securitycenter.v2.BackupDisasterRecovery.getDefaultInstance() + : backupDisasterRecovery_; + } + } + /** + * + * + *
+     * Fields related to Backup and DR findings.
+     * 
+ * + * .google.cloud.securitycenter.v2.BackupDisasterRecovery backup_disaster_recovery = 47; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.BackupDisasterRecovery, + com.google.cloud.securitycenter.v2.BackupDisasterRecovery.Builder, + com.google.cloud.securitycenter.v2.BackupDisasterRecoveryOrBuilder> + getBackupDisasterRecoveryFieldBuilder() { + if (backupDisasterRecoveryBuilder_ == null) { + backupDisasterRecoveryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.BackupDisasterRecovery, + com.google.cloud.securitycenter.v2.BackupDisasterRecovery.Builder, + com.google.cloud.securitycenter.v2.BackupDisasterRecoveryOrBuilder>( + getBackupDisasterRecovery(), getParentForChildren(), isClean()); + backupDisasterRecovery_ = null; + } + return backupDisasterRecoveryBuilder_; + } + + private com.google.cloud.securitycenter.v2.SecurityPosture securityPosture_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.SecurityPosture, + com.google.cloud.securitycenter.v2.SecurityPosture.Builder, + com.google.cloud.securitycenter.v2.SecurityPostureOrBuilder> + securityPostureBuilder_; + /** + * + * + *
+     * The security posture associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.SecurityPosture security_posture = 48; + * + * @return Whether the securityPosture field is set. + */ + public boolean hasSecurityPosture() { + return ((bitField1_ & 0x00000400) != 0); + } + /** + * + * + *
+     * The security posture associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.SecurityPosture security_posture = 48; + * + * @return The securityPosture. + */ + public com.google.cloud.securitycenter.v2.SecurityPosture getSecurityPosture() { + if (securityPostureBuilder_ == null) { + return securityPosture_ == null + ? com.google.cloud.securitycenter.v2.SecurityPosture.getDefaultInstance() + : securityPosture_; + } else { + return securityPostureBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The security posture associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.SecurityPosture security_posture = 48; + */ + public Builder setSecurityPosture(com.google.cloud.securitycenter.v2.SecurityPosture value) { + if (securityPostureBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + securityPosture_ = value; + } else { + securityPostureBuilder_.setMessage(value); + } + bitField1_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * The security posture associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.SecurityPosture security_posture = 48; + */ + public Builder setSecurityPosture( + com.google.cloud.securitycenter.v2.SecurityPosture.Builder builderForValue) { + if (securityPostureBuilder_ == null) { + securityPosture_ = builderForValue.build(); + } else { + securityPostureBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * The security posture associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.SecurityPosture security_posture = 48; + */ + public Builder mergeSecurityPosture(com.google.cloud.securitycenter.v2.SecurityPosture value) { + if (securityPostureBuilder_ == null) { + if (((bitField1_ & 0x00000400) != 0) + && securityPosture_ != null + && securityPosture_ + != com.google.cloud.securitycenter.v2.SecurityPosture.getDefaultInstance()) { + getSecurityPostureBuilder().mergeFrom(value); + } else { + securityPosture_ = value; + } + } else { + securityPostureBuilder_.mergeFrom(value); + } + if (securityPosture_ != null) { + bitField1_ |= 0x00000400; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The security posture associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.SecurityPosture security_posture = 48; + */ + public Builder clearSecurityPosture() { + bitField1_ = (bitField1_ & ~0x00000400); + securityPosture_ = null; + if (securityPostureBuilder_ != null) { + securityPostureBuilder_.dispose(); + securityPostureBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The security posture associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.SecurityPosture security_posture = 48; + */ + public com.google.cloud.securitycenter.v2.SecurityPosture.Builder getSecurityPostureBuilder() { + bitField1_ |= 0x00000400; + onChanged(); + return getSecurityPostureFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The security posture associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.SecurityPosture security_posture = 48; + */ + public com.google.cloud.securitycenter.v2.SecurityPostureOrBuilder + getSecurityPostureOrBuilder() { + if (securityPostureBuilder_ != null) { + return securityPostureBuilder_.getMessageOrBuilder(); + } else { + return securityPosture_ == null + ? com.google.cloud.securitycenter.v2.SecurityPosture.getDefaultInstance() + : securityPosture_; + } + } + /** + * + * + *
+     * The security posture associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v2.SecurityPosture security_posture = 48; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.SecurityPosture, + com.google.cloud.securitycenter.v2.SecurityPosture.Builder, + com.google.cloud.securitycenter.v2.SecurityPostureOrBuilder> + getSecurityPostureFieldBuilder() { + if (securityPostureBuilder_ == null) { + securityPostureBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.SecurityPosture, + com.google.cloud.securitycenter.v2.SecurityPosture.Builder, + com.google.cloud.securitycenter.v2.SecurityPostureOrBuilder>( + getSecurityPosture(), getParentForChildren(), isClean()); + securityPosture_ = null; + } + return securityPostureBuilder_; + } + + private java.util.List logEntries_ = + java.util.Collections.emptyList(); + + private void ensureLogEntriesIsMutable() { + if (!((bitField1_ & 0x00000800) != 0)) { + logEntries_ = + new java.util.ArrayList(logEntries_); + bitField1_ |= 0x00000800; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.LogEntry, + com.google.cloud.securitycenter.v2.LogEntry.Builder, + com.google.cloud.securitycenter.v2.LogEntryOrBuilder> + logEntriesBuilder_; + + /** + * + * + *
+     * Log entries that are relevant to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.LogEntry log_entries = 49; + */ + public java.util.List getLogEntriesList() { + if (logEntriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(logEntries_); + } else { + return logEntriesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Log entries that are relevant to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.LogEntry log_entries = 49; + */ + public int getLogEntriesCount() { + if (logEntriesBuilder_ == null) { + return logEntries_.size(); + } else { + return logEntriesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Log entries that are relevant to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.LogEntry log_entries = 49; + */ + public com.google.cloud.securitycenter.v2.LogEntry getLogEntries(int index) { + if (logEntriesBuilder_ == null) { + return logEntries_.get(index); + } else { + return logEntriesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Log entries that are relevant to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.LogEntry log_entries = 49; + */ + public Builder setLogEntries(int index, com.google.cloud.securitycenter.v2.LogEntry value) { + if (logEntriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogEntriesIsMutable(); + logEntries_.set(index, value); + onChanged(); + } else { + logEntriesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Log entries that are relevant to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.LogEntry log_entries = 49; + */ + public Builder setLogEntries( + int index, com.google.cloud.securitycenter.v2.LogEntry.Builder builderForValue) { + if (logEntriesBuilder_ == null) { + ensureLogEntriesIsMutable(); + logEntries_.set(index, builderForValue.build()); + onChanged(); + } else { + logEntriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Log entries that are relevant to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.LogEntry log_entries = 49; + */ + public Builder addLogEntries(com.google.cloud.securitycenter.v2.LogEntry value) { + if (logEntriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogEntriesIsMutable(); + logEntries_.add(value); + onChanged(); + } else { + logEntriesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Log entries that are relevant to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.LogEntry log_entries = 49; + */ + public Builder addLogEntries(int index, com.google.cloud.securitycenter.v2.LogEntry value) { + if (logEntriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogEntriesIsMutable(); + logEntries_.add(index, value); + onChanged(); + } else { + logEntriesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Log entries that are relevant to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.LogEntry log_entries = 49; + */ + public Builder addLogEntries( + com.google.cloud.securitycenter.v2.LogEntry.Builder builderForValue) { + if (logEntriesBuilder_ == null) { + ensureLogEntriesIsMutable(); + logEntries_.add(builderForValue.build()); + onChanged(); + } else { + logEntriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Log entries that are relevant to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.LogEntry log_entries = 49; + */ + public Builder addLogEntries( + int index, com.google.cloud.securitycenter.v2.LogEntry.Builder builderForValue) { + if (logEntriesBuilder_ == null) { + ensureLogEntriesIsMutable(); + logEntries_.add(index, builderForValue.build()); + onChanged(); + } else { + logEntriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Log entries that are relevant to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.LogEntry log_entries = 49; + */ + public Builder addAllLogEntries( + java.lang.Iterable values) { + if (logEntriesBuilder_ == null) { + ensureLogEntriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, logEntries_); + onChanged(); + } else { + logEntriesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Log entries that are relevant to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.LogEntry log_entries = 49; + */ + public Builder clearLogEntries() { + if (logEntriesBuilder_ == null) { + logEntries_ = java.util.Collections.emptyList(); + bitField1_ = (bitField1_ & ~0x00000800); + onChanged(); + } else { + logEntriesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Log entries that are relevant to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.LogEntry log_entries = 49; + */ + public Builder removeLogEntries(int index) { + if (logEntriesBuilder_ == null) { + ensureLogEntriesIsMutable(); + logEntries_.remove(index); + onChanged(); + } else { + logEntriesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Log entries that are relevant to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.LogEntry log_entries = 49; + */ + public com.google.cloud.securitycenter.v2.LogEntry.Builder getLogEntriesBuilder(int index) { + return getLogEntriesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Log entries that are relevant to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.LogEntry log_entries = 49; + */ + public com.google.cloud.securitycenter.v2.LogEntryOrBuilder getLogEntriesOrBuilder(int index) { + if (logEntriesBuilder_ == null) { + return logEntries_.get(index); + } else { + return logEntriesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Log entries that are relevant to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.LogEntry log_entries = 49; + */ + public java.util.List + getLogEntriesOrBuilderList() { + if (logEntriesBuilder_ != null) { + return logEntriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(logEntries_); + } + } + /** + * + * + *
+     * Log entries that are relevant to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.LogEntry log_entries = 49; + */ + public com.google.cloud.securitycenter.v2.LogEntry.Builder addLogEntriesBuilder() { + return getLogEntriesFieldBuilder() + .addBuilder(com.google.cloud.securitycenter.v2.LogEntry.getDefaultInstance()); + } + /** + * + * + *
+     * Log entries that are relevant to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.LogEntry log_entries = 49; + */ + public com.google.cloud.securitycenter.v2.LogEntry.Builder addLogEntriesBuilder(int index) { + return getLogEntriesFieldBuilder() + .addBuilder(index, com.google.cloud.securitycenter.v2.LogEntry.getDefaultInstance()); + } + /** + * + * + *
+     * Log entries that are relevant to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.LogEntry log_entries = 49; + */ + public java.util.List + getLogEntriesBuilderList() { + return getLogEntriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.LogEntry, + com.google.cloud.securitycenter.v2.LogEntry.Builder, + com.google.cloud.securitycenter.v2.LogEntryOrBuilder> + getLogEntriesFieldBuilder() { + if (logEntriesBuilder_ == null) { + logEntriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.LogEntry, + com.google.cloud.securitycenter.v2.LogEntry.Builder, + com.google.cloud.securitycenter.v2.LogEntryOrBuilder>( + logEntries_, ((bitField1_ & 0x00000800) != 0), getParentForChildren(), isClean()); + logEntries_ = null; + } + return logEntriesBuilder_; + } + + private java.util.List loadBalancers_ = + java.util.Collections.emptyList(); + + private void ensureLoadBalancersIsMutable() { + if (!((bitField1_ & 0x00001000) != 0)) { + loadBalancers_ = + new java.util.ArrayList( + loadBalancers_); + bitField1_ |= 0x00001000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.LoadBalancer, + com.google.cloud.securitycenter.v2.LoadBalancer.Builder, + com.google.cloud.securitycenter.v2.LoadBalancerOrBuilder> + loadBalancersBuilder_; + + /** + * + * + *
+     * The load balancers associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.LoadBalancer load_balancers = 50; + */ + public java.util.List getLoadBalancersList() { + if (loadBalancersBuilder_ == null) { + return java.util.Collections.unmodifiableList(loadBalancers_); + } else { + return loadBalancersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The load balancers associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.LoadBalancer load_balancers = 50; + */ + public int getLoadBalancersCount() { + if (loadBalancersBuilder_ == null) { + return loadBalancers_.size(); + } else { + return loadBalancersBuilder_.getCount(); + } + } + /** + * + * + *
+     * The load balancers associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.LoadBalancer load_balancers = 50; + */ + public com.google.cloud.securitycenter.v2.LoadBalancer getLoadBalancers(int index) { + if (loadBalancersBuilder_ == null) { + return loadBalancers_.get(index); + } else { + return loadBalancersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The load balancers associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.LoadBalancer load_balancers = 50; + */ + public Builder setLoadBalancers( + int index, com.google.cloud.securitycenter.v2.LoadBalancer value) { + if (loadBalancersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLoadBalancersIsMutable(); + loadBalancers_.set(index, value); + onChanged(); + } else { + loadBalancersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The load balancers associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.LoadBalancer load_balancers = 50; + */ + public Builder setLoadBalancers( + int index, com.google.cloud.securitycenter.v2.LoadBalancer.Builder builderForValue) { + if (loadBalancersBuilder_ == null) { + ensureLoadBalancersIsMutable(); + loadBalancers_.set(index, builderForValue.build()); + onChanged(); + } else { + loadBalancersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The load balancers associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.LoadBalancer load_balancers = 50; + */ + public Builder addLoadBalancers(com.google.cloud.securitycenter.v2.LoadBalancer value) { + if (loadBalancersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLoadBalancersIsMutable(); + loadBalancers_.add(value); + onChanged(); + } else { + loadBalancersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The load balancers associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.LoadBalancer load_balancers = 50; + */ + public Builder addLoadBalancers( + int index, com.google.cloud.securitycenter.v2.LoadBalancer value) { + if (loadBalancersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLoadBalancersIsMutable(); + loadBalancers_.add(index, value); + onChanged(); + } else { + loadBalancersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The load balancers associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.LoadBalancer load_balancers = 50; + */ + public Builder addLoadBalancers( + com.google.cloud.securitycenter.v2.LoadBalancer.Builder builderForValue) { + if (loadBalancersBuilder_ == null) { + ensureLoadBalancersIsMutable(); + loadBalancers_.add(builderForValue.build()); + onChanged(); + } else { + loadBalancersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The load balancers associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.LoadBalancer load_balancers = 50; + */ + public Builder addLoadBalancers( + int index, com.google.cloud.securitycenter.v2.LoadBalancer.Builder builderForValue) { + if (loadBalancersBuilder_ == null) { + ensureLoadBalancersIsMutable(); + loadBalancers_.add(index, builderForValue.build()); + onChanged(); + } else { + loadBalancersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The load balancers associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.LoadBalancer load_balancers = 50; + */ + public Builder addAllLoadBalancers( + java.lang.Iterable values) { + if (loadBalancersBuilder_ == null) { + ensureLoadBalancersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, loadBalancers_); + onChanged(); + } else { + loadBalancersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The load balancers associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.LoadBalancer load_balancers = 50; + */ + public Builder clearLoadBalancers() { + if (loadBalancersBuilder_ == null) { + loadBalancers_ = java.util.Collections.emptyList(); + bitField1_ = (bitField1_ & ~0x00001000); + onChanged(); + } else { + loadBalancersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The load balancers associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.LoadBalancer load_balancers = 50; + */ + public Builder removeLoadBalancers(int index) { + if (loadBalancersBuilder_ == null) { + ensureLoadBalancersIsMutable(); + loadBalancers_.remove(index); + onChanged(); + } else { + loadBalancersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The load balancers associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.LoadBalancer load_balancers = 50; + */ + public com.google.cloud.securitycenter.v2.LoadBalancer.Builder getLoadBalancersBuilder( + int index) { + return getLoadBalancersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The load balancers associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.LoadBalancer load_balancers = 50; + */ + public com.google.cloud.securitycenter.v2.LoadBalancerOrBuilder getLoadBalancersOrBuilder( + int index) { + if (loadBalancersBuilder_ == null) { + return loadBalancers_.get(index); + } else { + return loadBalancersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The load balancers associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.LoadBalancer load_balancers = 50; + */ + public java.util.List + getLoadBalancersOrBuilderList() { + if (loadBalancersBuilder_ != null) { + return loadBalancersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(loadBalancers_); + } + } + /** + * + * + *
+     * The load balancers associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.LoadBalancer load_balancers = 50; + */ + public com.google.cloud.securitycenter.v2.LoadBalancer.Builder addLoadBalancersBuilder() { + return getLoadBalancersFieldBuilder() + .addBuilder(com.google.cloud.securitycenter.v2.LoadBalancer.getDefaultInstance()); + } + /** + * + * + *
+     * The load balancers associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.LoadBalancer load_balancers = 50; + */ + public com.google.cloud.securitycenter.v2.LoadBalancer.Builder addLoadBalancersBuilder( + int index) { + return getLoadBalancersFieldBuilder() + .addBuilder(index, com.google.cloud.securitycenter.v2.LoadBalancer.getDefaultInstance()); + } + /** + * + * + *
+     * The load balancers associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.LoadBalancer load_balancers = 50; + */ + public java.util.List + getLoadBalancersBuilderList() { + return getLoadBalancersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.LoadBalancer, + com.google.cloud.securitycenter.v2.LoadBalancer.Builder, + com.google.cloud.securitycenter.v2.LoadBalancerOrBuilder> + getLoadBalancersFieldBuilder() { + if (loadBalancersBuilder_ == null) { + loadBalancersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.LoadBalancer, + com.google.cloud.securitycenter.v2.LoadBalancer.Builder, + com.google.cloud.securitycenter.v2.LoadBalancerOrBuilder>( + loadBalancers_, + ((bitField1_ & 0x00001000) != 0), + getParentForChildren(), + isClean()); + loadBalancers_ = null; + } + return loadBalancersBuilder_; + } + + @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.v2.Finding) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.Finding) + private static final com.google.cloud.securitycenter.v2.Finding DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.Finding(); + } + + public static com.google.cloud.securitycenter.v2.Finding getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Finding parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.Finding getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/FindingName.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/FindingName.java new file mode 100644 index 000000000000..20e21f8e28f9 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/FindingName.java @@ -0,0 +1,743 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.securitycenter.v2; + +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 FindingName implements ResourceName { + private static final PathTemplate ORGANIZATION_SOURCE_FINDING = + PathTemplate.createWithoutUrlEncoding( + "organizations/{organization}/sources/{source}/findings/{finding}"); + private static final PathTemplate ORGANIZATION_SOURCE_LOCATION_FINDING = + PathTemplate.createWithoutUrlEncoding( + "organizations/{organization}/sources/{source}/locations/{location}/findings/{finding}"); + private static final PathTemplate FOLDER_SOURCE_FINDING = + PathTemplate.createWithoutUrlEncoding("folders/{folder}/sources/{source}/findings/{finding}"); + private static final PathTemplate FOLDER_SOURCE_LOCATION_FINDING = + PathTemplate.createWithoutUrlEncoding( + "folders/{folder}/sources/{source}/locations/{location}/findings/{finding}"); + private static final PathTemplate PROJECT_SOURCE_FINDING = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/sources/{source}/findings/{finding}"); + private static final PathTemplate PROJECT_SOURCE_LOCATION_FINDING = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/sources/{source}/locations/{location}/findings/{finding}"); + private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; + private final String organization; + private final String source; + private final String finding; + private final String location; + private final String folder; + private final String project; + + @Deprecated + protected FindingName() { + organization = null; + source = null; + finding = null; + location = null; + folder = null; + project = null; + } + + private FindingName(Builder builder) { + organization = Preconditions.checkNotNull(builder.getOrganization()); + source = Preconditions.checkNotNull(builder.getSource()); + finding = Preconditions.checkNotNull(builder.getFinding()); + location = null; + folder = null; + project = null; + pathTemplate = ORGANIZATION_SOURCE_FINDING; + } + + private FindingName(OrganizationSourceLocationFindingBuilder builder) { + organization = Preconditions.checkNotNull(builder.getOrganization()); + source = Preconditions.checkNotNull(builder.getSource()); + location = Preconditions.checkNotNull(builder.getLocation()); + finding = Preconditions.checkNotNull(builder.getFinding()); + folder = null; + project = null; + pathTemplate = ORGANIZATION_SOURCE_LOCATION_FINDING; + } + + private FindingName(FolderSourceFindingBuilder builder) { + folder = Preconditions.checkNotNull(builder.getFolder()); + source = Preconditions.checkNotNull(builder.getSource()); + finding = Preconditions.checkNotNull(builder.getFinding()); + organization = null; + location = null; + project = null; + pathTemplate = FOLDER_SOURCE_FINDING; + } + + private FindingName(FolderSourceLocationFindingBuilder builder) { + folder = Preconditions.checkNotNull(builder.getFolder()); + source = Preconditions.checkNotNull(builder.getSource()); + location = Preconditions.checkNotNull(builder.getLocation()); + finding = Preconditions.checkNotNull(builder.getFinding()); + organization = null; + project = null; + pathTemplate = FOLDER_SOURCE_LOCATION_FINDING; + } + + private FindingName(ProjectSourceFindingBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + source = Preconditions.checkNotNull(builder.getSource()); + finding = Preconditions.checkNotNull(builder.getFinding()); + organization = null; + location = null; + folder = null; + pathTemplate = PROJECT_SOURCE_FINDING; + } + + private FindingName(ProjectSourceLocationFindingBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + source = Preconditions.checkNotNull(builder.getSource()); + location = Preconditions.checkNotNull(builder.getLocation()); + finding = Preconditions.checkNotNull(builder.getFinding()); + organization = null; + folder = null; + pathTemplate = PROJECT_SOURCE_LOCATION_FINDING; + } + + public String getOrganization() { + return organization; + } + + public String getSource() { + return source; + } + + public String getFinding() { + return finding; + } + + public String getLocation() { + return location; + } + + public String getFolder() { + return folder; + } + + public String getProject() { + return project; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public static Builder newOrganizationSourceFindingBuilder() { + return new Builder(); + } + + public static OrganizationSourceLocationFindingBuilder + newOrganizationSourceLocationFindingBuilder() { + return new OrganizationSourceLocationFindingBuilder(); + } + + public static FolderSourceFindingBuilder newFolderSourceFindingBuilder() { + return new FolderSourceFindingBuilder(); + } + + public static FolderSourceLocationFindingBuilder newFolderSourceLocationFindingBuilder() { + return new FolderSourceLocationFindingBuilder(); + } + + public static ProjectSourceFindingBuilder newProjectSourceFindingBuilder() { + return new ProjectSourceFindingBuilder(); + } + + public static ProjectSourceLocationFindingBuilder newProjectSourceLocationFindingBuilder() { + return new ProjectSourceLocationFindingBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static FindingName of(String organization, String source, String finding) { + return newBuilder().setOrganization(organization).setSource(source).setFinding(finding).build(); + } + + public static FindingName ofOrganizationSourceFindingName( + String organization, String source, String finding) { + return newBuilder().setOrganization(organization).setSource(source).setFinding(finding).build(); + } + + public static FindingName ofOrganizationSourceLocationFindingName( + String organization, String source, String location, String finding) { + return newOrganizationSourceLocationFindingBuilder() + .setOrganization(organization) + .setSource(source) + .setLocation(location) + .setFinding(finding) + .build(); + } + + public static FindingName ofFolderSourceFindingName( + String folder, String source, String finding) { + return newFolderSourceFindingBuilder() + .setFolder(folder) + .setSource(source) + .setFinding(finding) + .build(); + } + + public static FindingName ofFolderSourceLocationFindingName( + String folder, String source, String location, String finding) { + return newFolderSourceLocationFindingBuilder() + .setFolder(folder) + .setSource(source) + .setLocation(location) + .setFinding(finding) + .build(); + } + + public static FindingName ofProjectSourceFindingName( + String project, String source, String finding) { + return newProjectSourceFindingBuilder() + .setProject(project) + .setSource(source) + .setFinding(finding) + .build(); + } + + public static FindingName ofProjectSourceLocationFindingName( + String project, String source, String location, String finding) { + return newProjectSourceLocationFindingBuilder() + .setProject(project) + .setSource(source) + .setLocation(location) + .setFinding(finding) + .build(); + } + + public static String format(String organization, String source, String finding) { + return newBuilder() + .setOrganization(organization) + .setSource(source) + .setFinding(finding) + .build() + .toString(); + } + + public static String formatOrganizationSourceFindingName( + String organization, String source, String finding) { + return newBuilder() + .setOrganization(organization) + .setSource(source) + .setFinding(finding) + .build() + .toString(); + } + + public static String formatOrganizationSourceLocationFindingName( + String organization, String source, String location, String finding) { + return newOrganizationSourceLocationFindingBuilder() + .setOrganization(organization) + .setSource(source) + .setLocation(location) + .setFinding(finding) + .build() + .toString(); + } + + public static String formatFolderSourceFindingName(String folder, String source, String finding) { + return newFolderSourceFindingBuilder() + .setFolder(folder) + .setSource(source) + .setFinding(finding) + .build() + .toString(); + } + + public static String formatFolderSourceLocationFindingName( + String folder, String source, String location, String finding) { + return newFolderSourceLocationFindingBuilder() + .setFolder(folder) + .setSource(source) + .setLocation(location) + .setFinding(finding) + .build() + .toString(); + } + + public static String formatProjectSourceFindingName( + String project, String source, String finding) { + return newProjectSourceFindingBuilder() + .setProject(project) + .setSource(source) + .setFinding(finding) + .build() + .toString(); + } + + public static String formatProjectSourceLocationFindingName( + String project, String source, String location, String finding) { + return newProjectSourceLocationFindingBuilder() + .setProject(project) + .setSource(source) + .setLocation(location) + .setFinding(finding) + .build() + .toString(); + } + + public static FindingName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + if (ORGANIZATION_SOURCE_FINDING.matches(formattedString)) { + Map matchMap = ORGANIZATION_SOURCE_FINDING.match(formattedString); + return ofOrganizationSourceFindingName( + matchMap.get("organization"), matchMap.get("source"), matchMap.get("finding")); + } else if (ORGANIZATION_SOURCE_LOCATION_FINDING.matches(formattedString)) { + Map matchMap = ORGANIZATION_SOURCE_LOCATION_FINDING.match(formattedString); + return ofOrganizationSourceLocationFindingName( + matchMap.get("organization"), + matchMap.get("source"), + matchMap.get("location"), + matchMap.get("finding")); + } else if (FOLDER_SOURCE_FINDING.matches(formattedString)) { + Map matchMap = FOLDER_SOURCE_FINDING.match(formattedString); + return ofFolderSourceFindingName( + matchMap.get("folder"), matchMap.get("source"), matchMap.get("finding")); + } else if (FOLDER_SOURCE_LOCATION_FINDING.matches(formattedString)) { + Map matchMap = FOLDER_SOURCE_LOCATION_FINDING.match(formattedString); + return ofFolderSourceLocationFindingName( + matchMap.get("folder"), + matchMap.get("source"), + matchMap.get("location"), + matchMap.get("finding")); + } else if (PROJECT_SOURCE_FINDING.matches(formattedString)) { + Map matchMap = PROJECT_SOURCE_FINDING.match(formattedString); + return ofProjectSourceFindingName( + matchMap.get("project"), matchMap.get("source"), matchMap.get("finding")); + } else if (PROJECT_SOURCE_LOCATION_FINDING.matches(formattedString)) { + Map matchMap = PROJECT_SOURCE_LOCATION_FINDING.match(formattedString); + return ofProjectSourceLocationFindingName( + matchMap.get("project"), + matchMap.get("source"), + matchMap.get("location"), + matchMap.get("finding")); + } + throw new ValidationException("FindingName.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 (FindingName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return ORGANIZATION_SOURCE_FINDING.matches(formattedString) + || ORGANIZATION_SOURCE_LOCATION_FINDING.matches(formattedString) + || FOLDER_SOURCE_FINDING.matches(formattedString) + || FOLDER_SOURCE_LOCATION_FINDING.matches(formattedString) + || PROJECT_SOURCE_FINDING.matches(formattedString) + || PROJECT_SOURCE_LOCATION_FINDING.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 (source != null) { + fieldMapBuilder.put("source", source); + } + if (finding != null) { + fieldMapBuilder.put("finding", finding); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + 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(java.lang.Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + FindingName that = ((FindingName) o); + return Objects.equals(this.organization, that.organization) + && Objects.equals(this.source, that.source) + && Objects.equals(this.finding, that.finding) + && Objects.equals(this.location, that.location) + && 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(source); + h *= 1000003; + h ^= Objects.hashCode(finding); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(folder); + h *= 1000003; + h ^= Objects.hashCode(project); + return h; + } + + /** Builder for organizations/{organization}/sources/{source}/findings/{finding}. */ + public static class Builder { + private String organization; + private String source; + private String finding; + + protected Builder() {} + + public String getOrganization() { + return organization; + } + + public String getSource() { + return source; + } + + public String getFinding() { + return finding; + } + + public Builder setOrganization(String organization) { + this.organization = organization; + return this; + } + + public Builder setSource(String source) { + this.source = source; + return this; + } + + public Builder setFinding(String finding) { + this.finding = finding; + return this; + } + + private Builder(FindingName findingName) { + Preconditions.checkArgument( + Objects.equals(findingName.pathTemplate, ORGANIZATION_SOURCE_FINDING), + "toBuilder is only supported when FindingName has the pattern of organizations/{organization}/sources/{source}/findings/{finding}"); + this.organization = findingName.organization; + this.source = findingName.source; + this.finding = findingName.finding; + } + + public FindingName build() { + return new FindingName(this); + } + } + + /** + * Builder for + * organizations/{organization}/sources/{source}/locations/{location}/findings/{finding}. + */ + public static class OrganizationSourceLocationFindingBuilder { + private String organization; + private String source; + private String location; + private String finding; + + protected OrganizationSourceLocationFindingBuilder() {} + + public String getOrganization() { + return organization; + } + + public String getSource() { + return source; + } + + public String getLocation() { + return location; + } + + public String getFinding() { + return finding; + } + + public OrganizationSourceLocationFindingBuilder setOrganization(String organization) { + this.organization = organization; + return this; + } + + public OrganizationSourceLocationFindingBuilder setSource(String source) { + this.source = source; + return this; + } + + public OrganizationSourceLocationFindingBuilder setLocation(String location) { + this.location = location; + return this; + } + + public OrganizationSourceLocationFindingBuilder setFinding(String finding) { + this.finding = finding; + return this; + } + + public FindingName build() { + return new FindingName(this); + } + } + + /** Builder for folders/{folder}/sources/{source}/findings/{finding}. */ + public static class FolderSourceFindingBuilder { + private String folder; + private String source; + private String finding; + + protected FolderSourceFindingBuilder() {} + + public String getFolder() { + return folder; + } + + public String getSource() { + return source; + } + + public String getFinding() { + return finding; + } + + public FolderSourceFindingBuilder setFolder(String folder) { + this.folder = folder; + return this; + } + + public FolderSourceFindingBuilder setSource(String source) { + this.source = source; + return this; + } + + public FolderSourceFindingBuilder setFinding(String finding) { + this.finding = finding; + return this; + } + + public FindingName build() { + return new FindingName(this); + } + } + + /** Builder for folders/{folder}/sources/{source}/locations/{location}/findings/{finding}. */ + public static class FolderSourceLocationFindingBuilder { + private String folder; + private String source; + private String location; + private String finding; + + protected FolderSourceLocationFindingBuilder() {} + + public String getFolder() { + return folder; + } + + public String getSource() { + return source; + } + + public String getLocation() { + return location; + } + + public String getFinding() { + return finding; + } + + public FolderSourceLocationFindingBuilder setFolder(String folder) { + this.folder = folder; + return this; + } + + public FolderSourceLocationFindingBuilder setSource(String source) { + this.source = source; + return this; + } + + public FolderSourceLocationFindingBuilder setLocation(String location) { + this.location = location; + return this; + } + + public FolderSourceLocationFindingBuilder setFinding(String finding) { + this.finding = finding; + return this; + } + + public FindingName build() { + return new FindingName(this); + } + } + + /** Builder for projects/{project}/sources/{source}/findings/{finding}. */ + public static class ProjectSourceFindingBuilder { + private String project; + private String source; + private String finding; + + protected ProjectSourceFindingBuilder() {} + + public String getProject() { + return project; + } + + public String getSource() { + return source; + } + + public String getFinding() { + return finding; + } + + public ProjectSourceFindingBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectSourceFindingBuilder setSource(String source) { + this.source = source; + return this; + } + + public ProjectSourceFindingBuilder setFinding(String finding) { + this.finding = finding; + return this; + } + + public FindingName build() { + return new FindingName(this); + } + } + + /** Builder for projects/{project}/sources/{source}/locations/{location}/findings/{finding}. */ + public static class ProjectSourceLocationFindingBuilder { + private String project; + private String source; + private String location; + private String finding; + + protected ProjectSourceLocationFindingBuilder() {} + + public String getProject() { + return project; + } + + public String getSource() { + return source; + } + + public String getLocation() { + return location; + } + + public String getFinding() { + return finding; + } + + public ProjectSourceLocationFindingBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectSourceLocationFindingBuilder setSource(String source) { + this.source = source; + return this; + } + + public ProjectSourceLocationFindingBuilder setLocation(String location) { + this.location = location; + return this; + } + + public ProjectSourceLocationFindingBuilder setFinding(String finding) { + this.finding = finding; + return this; + } + + public FindingName build() { + return new FindingName(this); + } + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/FindingOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/FindingOrBuilder.java new file mode 100644 index 000000000000..3d410ec1d62f --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/FindingOrBuilder.java @@ -0,0 +1,1995 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/finding.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface FindingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.Finding) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The [relative resource
+   * name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
+   * of the finding. The following list shows some examples:
+   *
+   * +
+   * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`
+   * +
+   * `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+   * + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`
+   * +
+   * `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+   * + `projects/{project_id}/sources/{source_id}/findings/{finding_id}`
+   * +
+   * `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The [relative resource
+   * name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
+   * of the finding. The following list shows some examples:
+   *
+   * +
+   * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`
+   * +
+   * `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+   * + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`
+   * +
+   * `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+   * + `projects/{project_id}/sources/{source_id}/findings/{finding_id}`
+   * +
+   * `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The canonical name of the finding. The following list shows
+   * some examples:
+   *
+   * +
+   * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`
+   * +
+   * `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+   * + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`
+   * +
+   * `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+   * + `projects/{project_id}/sources/{source_id}/findings/{finding_id}`
+   * +
+   * `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+   *
+   * The prefix is the closest CRM ancestor of the resource associated with the
+   * finding.
+   * 
+ * + * string canonical_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The canonicalName. + */ + java.lang.String getCanonicalName(); + /** + * + * + *
+   * Output only. The canonical name of the finding. The following list shows
+   * some examples:
+   *
+   * +
+   * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`
+   * +
+   * `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+   * + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`
+   * +
+   * `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+   * + `projects/{project_id}/sources/{source_id}/findings/{finding_id}`
+   * +
+   * `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
+   *
+   * The prefix is the closest CRM ancestor of the resource associated with the
+   * finding.
+   * 
+ * + * string canonical_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for canonicalName. + */ + com.google.protobuf.ByteString getCanonicalNameBytes(); + + /** + * + * + *
+   * The relative resource name of the source and location the finding belongs
+   * to. See:
+   * https://cloud.google.com/apis/design/resource_names#relative_resource_name
+   * This field is immutable after creation time. The following list shows some
+   * examples:
+   *
+   * + `organizations/{organization_id}/sources/{source_id}`
+   * + `folders/{folders_id}/sources/{source_id}`
+   * + `projects/{projects_id}/sources/{source_id}`
+   * +
+   * `organizations/{organization_id}/sources/{source_id}/locations/{location_id}`
+   * + `folders/{folders_id}/sources/{source_id}/locations/{location_id}`
+   * + `projects/{projects_id}/sources/{source_id}/locations/{location_id}`
+   * 
+ * + * string parent = 3; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * The relative resource name of the source and location the finding belongs
+   * to. See:
+   * https://cloud.google.com/apis/design/resource_names#relative_resource_name
+   * This field is immutable after creation time. The following list shows some
+   * examples:
+   *
+   * + `organizations/{organization_id}/sources/{source_id}`
+   * + `folders/{folders_id}/sources/{source_id}`
+   * + `projects/{projects_id}/sources/{source_id}`
+   * +
+   * `organizations/{organization_id}/sources/{source_id}/locations/{location_id}`
+   * + `folders/{folders_id}/sources/{source_id}/locations/{location_id}`
+   * + `projects/{projects_id}/sources/{source_id}/locations/{location_id}`
+   * 
+ * + * string parent = 3; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Immutable. For findings on Google Cloud resources, the full resource
+   * name of the Google Cloud resource this finding is for. See:
+   * https://cloud.google.com/apis/design/resource_names#full_resource_name
+   * When the finding is for a non-Google Cloud resource, the resourceName can
+   * be a customer or partner defined string.
+   * 
+ * + * string resource_name = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The resourceName. + */ + java.lang.String getResourceName(); + /** + * + * + *
+   * Immutable. For findings on Google Cloud resources, the full resource
+   * name of the Google Cloud resource this finding is for. See:
+   * https://cloud.google.com/apis/design/resource_names#full_resource_name
+   * When the finding is for a non-Google Cloud resource, the resourceName can
+   * be a customer or partner defined string.
+   * 
+ * + * string resource_name = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for resourceName. + */ + com.google.protobuf.ByteString getResourceNameBytes(); + + /** + * + * + *
+   * Output only. The state of the finding.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.Finding.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The state of the finding.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.Finding.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.securitycenter.v2.Finding.State getState(); + + /** + * + * + *
+   * Immutable. The additional taxonomy group within findings from a given
+   * source. Example: "XSS_FLASH_INJECTION"
+   * 
+ * + * string category = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The category. + */ + java.lang.String getCategory(); + /** + * + * + *
+   * Immutable. The additional taxonomy group within findings from a given
+   * source. Example: "XSS_FLASH_INJECTION"
+   * 
+ * + * string category = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for category. + */ + com.google.protobuf.ByteString getCategoryBytes(); + + /** + * + * + *
+   * The URI that, if available, points to a web page outside of Security
+   * Command Center where additional information about the finding can be found.
+   * This field is guaranteed to be either empty or a well formed URL.
+   * 
+ * + * string external_uri = 8; + * + * @return The externalUri. + */ + java.lang.String getExternalUri(); + /** + * + * + *
+   * The URI that, if available, points to a web page outside of Security
+   * Command Center where additional information about the finding can be found.
+   * This field is guaranteed to be either empty or a well formed URL.
+   * 
+ * + * string external_uri = 8; + * + * @return The bytes for externalUri. + */ + com.google.protobuf.ByteString getExternalUriBytes(); + + /** + * + * + *
+   * Source specific properties. These properties are managed by the source
+   * that writes the finding. The key names in the source_properties map must be
+   * between 1 and 255 characters, and must start with a letter and contain
+   * alphanumeric characters or underscores only.
+   * 
+ * + * map<string, .google.protobuf.Value> source_properties = 9; + */ + int getSourcePropertiesCount(); + /** + * + * + *
+   * Source specific properties. These properties are managed by the source
+   * that writes the finding. The key names in the source_properties map must be
+   * between 1 and 255 characters, and must start with a letter and contain
+   * alphanumeric characters or underscores only.
+   * 
+ * + * map<string, .google.protobuf.Value> source_properties = 9; + */ + boolean containsSourceProperties(java.lang.String key); + /** Use {@link #getSourcePropertiesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getSourceProperties(); + /** + * + * + *
+   * Source specific properties. These properties are managed by the source
+   * that writes the finding. The key names in the source_properties map must be
+   * between 1 and 255 characters, and must start with a letter and contain
+   * alphanumeric characters or underscores only.
+   * 
+ * + * map<string, .google.protobuf.Value> source_properties = 9; + */ + java.util.Map getSourcePropertiesMap(); + /** + * + * + *
+   * Source specific properties. These properties are managed by the source
+   * that writes the finding. The key names in the source_properties map must be
+   * between 1 and 255 characters, and must start with a letter and contain
+   * alphanumeric characters or underscores only.
+   * 
+ * + * map<string, .google.protobuf.Value> source_properties = 9; + */ + /* nullable */ + com.google.protobuf.Value getSourcePropertiesOrDefault( + java.lang.String key, + /* nullable */ + com.google.protobuf.Value defaultValue); + /** + * + * + *
+   * Source specific properties. These properties are managed by the source
+   * that writes the finding. The key names in the source_properties map must be
+   * between 1 and 255 characters, and must start with a letter and contain
+   * alphanumeric characters or underscores only.
+   * 
+ * + * map<string, .google.protobuf.Value> source_properties = 9; + */ + com.google.protobuf.Value getSourcePropertiesOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. User specified security marks. These marks are entirely
+   * managed by the user and come from the SecurityMarks resource that belongs
+   * to the finding.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.SecurityMarks security_marks = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the securityMarks field is set. + */ + boolean hasSecurityMarks(); + /** + * + * + *
+   * Output only. User specified security marks. These marks are entirely
+   * managed by the user and come from the SecurityMarks resource that belongs
+   * to the finding.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.SecurityMarks security_marks = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The securityMarks. + */ + com.google.cloud.securitycenter.v2.SecurityMarks getSecurityMarks(); + /** + * + * + *
+   * Output only. User specified security marks. These marks are entirely
+   * managed by the user and come from the SecurityMarks resource that belongs
+   * to the finding.
+   * 
+ * + * + * .google.cloud.securitycenter.v2.SecurityMarks security_marks = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.securitycenter.v2.SecurityMarksOrBuilder getSecurityMarksOrBuilder(); + + /** + * + * + *
+   * The time the finding was first detected. If an existing finding is updated,
+   * then this is the time the update occurred.
+   * For example, if the finding represents an open firewall, this property
+   * captures the time the detector believes the firewall became open. The
+   * accuracy is determined by the detector. If the finding is later resolved,
+   * then this time reflects when the finding was resolved. This must not
+   * be set to a value greater than the current timestamp.
+   * 
+ * + * .google.protobuf.Timestamp event_time = 11; + * + * @return Whether the eventTime field is set. + */ + boolean hasEventTime(); + /** + * + * + *
+   * The time the finding was first detected. If an existing finding is updated,
+   * then this is the time the update occurred.
+   * For example, if the finding represents an open firewall, this property
+   * captures the time the detector believes the firewall became open. The
+   * accuracy is determined by the detector. If the finding is later resolved,
+   * then this time reflects when the finding was resolved. This must not
+   * be set to a value greater than the current timestamp.
+   * 
+ * + * .google.protobuf.Timestamp event_time = 11; + * + * @return The eventTime. + */ + com.google.protobuf.Timestamp getEventTime(); + /** + * + * + *
+   * The time the finding was first detected. If an existing finding is updated,
+   * then this is the time the update occurred.
+   * For example, if the finding represents an open firewall, this property
+   * captures the time the detector believes the firewall became open. The
+   * accuracy is determined by the detector. If the finding is later resolved,
+   * then this time reflects when the finding was resolved. This must not
+   * be set to a value greater than the current timestamp.
+   * 
+ * + * .google.protobuf.Timestamp event_time = 11; + */ + com.google.protobuf.TimestampOrBuilder getEventTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time at which the finding was created in Security Command
+   * Center.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time at which the finding was created in Security Command
+   * Center.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time at which the finding was created in Security Command
+   * Center.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * The severity of the finding. This field is managed by the source that
+   * writes the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.Finding.Severity severity = 14; + * + * @return The enum numeric value on the wire for severity. + */ + int getSeverityValue(); + /** + * + * + *
+   * The severity of the finding. This field is managed by the source that
+   * writes the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.Finding.Severity severity = 14; + * + * @return The severity. + */ + com.google.cloud.securitycenter.v2.Finding.Severity getSeverity(); + + /** + * + * + *
+   * Indicates the mute state of a finding (either muted, unmuted
+   * or undefined). Unlike other attributes of a finding, a finding provider
+   * shouldn't set the value of mute.
+   * 
+ * + * .google.cloud.securitycenter.v2.Finding.Mute mute = 15; + * + * @return The enum numeric value on the wire for mute. + */ + int getMuteValue(); + /** + * + * + *
+   * Indicates the mute state of a finding (either muted, unmuted
+   * or undefined). Unlike other attributes of a finding, a finding provider
+   * shouldn't set the value of mute.
+   * 
+ * + * .google.cloud.securitycenter.v2.Finding.Mute mute = 15; + * + * @return The mute. + */ + com.google.cloud.securitycenter.v2.Finding.Mute getMute(); + + /** + * + * + *
+   * The class of the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.Finding.FindingClass finding_class = 16; + * + * @return The enum numeric value on the wire for findingClass. + */ + int getFindingClassValue(); + /** + * + * + *
+   * The class of the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.Finding.FindingClass finding_class = 16; + * + * @return The findingClass. + */ + com.google.cloud.securitycenter.v2.Finding.FindingClass getFindingClass(); + + /** + * + * + *
+   * Represents what's commonly known as an *indicator of compromise* (IoC) in
+   * computer forensics. This is an artifact observed on a network or in an
+   * operating system that, with high confidence, indicates a computer
+   * intrusion. For more information, see [Indicator of
+   * compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise).
+   * 
+ * + * .google.cloud.securitycenter.v2.Indicator indicator = 17; + * + * @return Whether the indicator field is set. + */ + boolean hasIndicator(); + /** + * + * + *
+   * Represents what's commonly known as an *indicator of compromise* (IoC) in
+   * computer forensics. This is an artifact observed on a network or in an
+   * operating system that, with high confidence, indicates a computer
+   * intrusion. For more information, see [Indicator of
+   * compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise).
+   * 
+ * + * .google.cloud.securitycenter.v2.Indicator indicator = 17; + * + * @return The indicator. + */ + com.google.cloud.securitycenter.v2.Indicator getIndicator(); + /** + * + * + *
+   * Represents what's commonly known as an *indicator of compromise* (IoC) in
+   * computer forensics. This is an artifact observed on a network or in an
+   * operating system that, with high confidence, indicates a computer
+   * intrusion. For more information, see [Indicator of
+   * compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise).
+   * 
+ * + * .google.cloud.securitycenter.v2.Indicator indicator = 17; + */ + com.google.cloud.securitycenter.v2.IndicatorOrBuilder getIndicatorOrBuilder(); + + /** + * + * + *
+   * Represents vulnerability-specific fields like CVE and CVSS scores.
+   * CVE stands for Common Vulnerabilities and Exposures
+   * (https://cve.mitre.org/about/)
+   * 
+ * + * .google.cloud.securitycenter.v2.Vulnerability vulnerability = 18; + * + * @return Whether the vulnerability field is set. + */ + boolean hasVulnerability(); + /** + * + * + *
+   * Represents vulnerability-specific fields like CVE and CVSS scores.
+   * CVE stands for Common Vulnerabilities and Exposures
+   * (https://cve.mitre.org/about/)
+   * 
+ * + * .google.cloud.securitycenter.v2.Vulnerability vulnerability = 18; + * + * @return The vulnerability. + */ + com.google.cloud.securitycenter.v2.Vulnerability getVulnerability(); + /** + * + * + *
+   * Represents vulnerability-specific fields like CVE and CVSS scores.
+   * CVE stands for Common Vulnerabilities and Exposures
+   * (https://cve.mitre.org/about/)
+   * 
+ * + * .google.cloud.securitycenter.v2.Vulnerability vulnerability = 18; + */ + com.google.cloud.securitycenter.v2.VulnerabilityOrBuilder getVulnerabilityOrBuilder(); + + /** + * + * + *
+   * Output only. The most recent time this finding was muted or unmuted.
+   * 
+ * + * + * .google.protobuf.Timestamp mute_update_time = 19 [(.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 = 19 [(.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 = 19 [(.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.v2.ExternalSystem> external_systems = 20 [(.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.v2.ExternalSystem> external_systems = 20 [(.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.v2.ExternalSystem> external_systems = 20 [(.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.v2.ExternalSystem> external_systems = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + /* nullable */ + com.google.cloud.securitycenter.v2.ExternalSystem getExternalSystemsOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.securitycenter.v2.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.v2.ExternalSystem> external_systems = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.securitycenter.v2.ExternalSystem getExternalSystemsOrThrow(java.lang.String key); + + /** + * + * + *
+   * MITRE ATT&CK tactics and techniques related to this finding.
+   * See: https://attack.mitre.org
+   * 
+ * + * .google.cloud.securitycenter.v2.MitreAttack mitre_attack = 21; + * + * @return Whether the mitreAttack field is set. + */ + boolean hasMitreAttack(); + /** + * + * + *
+   * MITRE ATT&CK tactics and techniques related to this finding.
+   * See: https://attack.mitre.org
+   * 
+ * + * .google.cloud.securitycenter.v2.MitreAttack mitre_attack = 21; + * + * @return The mitreAttack. + */ + com.google.cloud.securitycenter.v2.MitreAttack getMitreAttack(); + /** + * + * + *
+   * MITRE ATT&CK tactics and techniques related to this finding.
+   * See: https://attack.mitre.org
+   * 
+ * + * .google.cloud.securitycenter.v2.MitreAttack mitre_attack = 21; + */ + com.google.cloud.securitycenter.v2.MitreAttackOrBuilder getMitreAttackOrBuilder(); + + /** + * + * + *
+   * Access details associated with the finding, such as more information on the
+   * caller, which method was accessed, and from where.
+   * 
+ * + * .google.cloud.securitycenter.v2.Access access = 22; + * + * @return Whether the access field is set. + */ + boolean hasAccess(); + /** + * + * + *
+   * Access details associated with the finding, such as more information on the
+   * caller, which method was accessed, and from where.
+   * 
+ * + * .google.cloud.securitycenter.v2.Access access = 22; + * + * @return The access. + */ + com.google.cloud.securitycenter.v2.Access getAccess(); + /** + * + * + *
+   * Access details associated with the finding, such as more information on the
+   * caller, which method was accessed, and from where.
+   * 
+ * + * .google.cloud.securitycenter.v2.Access access = 22; + */ + com.google.cloud.securitycenter.v2.AccessOrBuilder getAccessOrBuilder(); + + /** + * + * + *
+   * Contains information about the IP connection associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Connection connections = 23; + */ + java.util.List getConnectionsList(); + /** + * + * + *
+   * Contains information about the IP connection associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Connection connections = 23; + */ + com.google.cloud.securitycenter.v2.Connection getConnections(int index); + /** + * + * + *
+   * Contains information about the IP connection associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Connection connections = 23; + */ + int getConnectionsCount(); + /** + * + * + *
+   * Contains information about the IP connection associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Connection connections = 23; + */ + java.util.List + getConnectionsOrBuilderList(); + /** + * + * + *
+   * Contains information about the IP connection associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Connection connections = 23; + */ + com.google.cloud.securitycenter.v2.ConnectionOrBuilder getConnectionsOrBuilder(int index); + + /** + * + * + *
+   * Records additional information about the mute operation, for example, the
+   * [mute
+   * configuration](https://cloud.google.com/security-command-center/docs/how-to-mute-findings)
+   * that muted the finding and the user who muted the finding.
+   * 
+ * + * string mute_initiator = 24; + * + * @return The muteInitiator. + */ + java.lang.String getMuteInitiator(); + /** + * + * + *
+   * Records additional information about the mute operation, for example, the
+   * [mute
+   * configuration](https://cloud.google.com/security-command-center/docs/how-to-mute-findings)
+   * that muted the finding and the user who muted the finding.
+   * 
+ * + * string mute_initiator = 24; + * + * @return The bytes for muteInitiator. + */ + com.google.protobuf.ByteString getMuteInitiatorBytes(); + + /** + * + * + *
+   * Represents operating system processes associated with the Finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Process processes = 25; + */ + java.util.List getProcessesList(); + /** + * + * + *
+   * Represents operating system processes associated with the Finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Process processes = 25; + */ + com.google.cloud.securitycenter.v2.Process getProcesses(int index); + /** + * + * + *
+   * Represents operating system processes associated with the Finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Process processes = 25; + */ + int getProcessesCount(); + /** + * + * + *
+   * Represents operating system processes associated with the Finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Process processes = 25; + */ + java.util.List + getProcessesOrBuilderList(); + /** + * + * + *
+   * Represents operating system processes associated with the Finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Process processes = 25; + */ + com.google.cloud.securitycenter.v2.ProcessOrBuilder getProcessesOrBuilder(int index); + + /** + * + * + *
+   * Output only. Map containing the points of contact for the given finding.
+   * The key represents the type of contact, while the value contains a list of
+   * all the contacts that pertain. Please refer to:
+   * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
+   *
+   *     {
+   *       "security": {
+   *         "contacts": [
+   *           {
+   *             "email": "person1@company.com"
+   *           },
+   *           {
+   *             "email": "person2@company.com"
+   *           }
+   *         ]
+   *       }
+   *     }
+   * 
+ * + * + * map<string, .google.cloud.securitycenter.v2.ContactDetails> contacts = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getContactsCount(); + /** + * + * + *
+   * Output only. Map containing the points of contact for the given finding.
+   * The key represents the type of contact, while the value contains a list of
+   * all the contacts that pertain. Please refer to:
+   * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
+   *
+   *     {
+   *       "security": {
+   *         "contacts": [
+   *           {
+   *             "email": "person1@company.com"
+   *           },
+   *           {
+   *             "email": "person2@company.com"
+   *           }
+   *         ]
+   *       }
+   *     }
+   * 
+ * + * + * map<string, .google.cloud.securitycenter.v2.ContactDetails> contacts = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + boolean containsContacts(java.lang.String key); + /** Use {@link #getContactsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getContacts(); + /** + * + * + *
+   * Output only. Map containing the points of contact for the given finding.
+   * The key represents the type of contact, while the value contains a list of
+   * all the contacts that pertain. Please refer to:
+   * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
+   *
+   *     {
+   *       "security": {
+   *         "contacts": [
+   *           {
+   *             "email": "person1@company.com"
+   *           },
+   *           {
+   *             "email": "person2@company.com"
+   *           }
+   *         ]
+   *       }
+   *     }
+   * 
+ * + * + * map<string, .google.cloud.securitycenter.v2.ContactDetails> contacts = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.Map + getContactsMap(); + /** + * + * + *
+   * Output only. Map containing the points of contact for the given finding.
+   * The key represents the type of contact, while the value contains a list of
+   * all the contacts that pertain. Please refer to:
+   * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
+   *
+   *     {
+   *       "security": {
+   *         "contacts": [
+   *           {
+   *             "email": "person1@company.com"
+   *           },
+   *           {
+   *             "email": "person2@company.com"
+   *           }
+   *         ]
+   *       }
+   *     }
+   * 
+ * + * + * map<string, .google.cloud.securitycenter.v2.ContactDetails> contacts = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + /* nullable */ + com.google.cloud.securitycenter.v2.ContactDetails getContactsOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.securitycenter.v2.ContactDetails defaultValue); + /** + * + * + *
+   * Output only. Map containing the points of contact for the given finding.
+   * The key represents the type of contact, while the value contains a list of
+   * all the contacts that pertain. Please refer to:
+   * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
+   *
+   *     {
+   *       "security": {
+   *         "contacts": [
+   *           {
+   *             "email": "person1@company.com"
+   *           },
+   *           {
+   *             "email": "person2@company.com"
+   *           }
+   *         ]
+   *       }
+   *     }
+   * 
+ * + * + * map<string, .google.cloud.securitycenter.v2.ContactDetails> contacts = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.securitycenter.v2.ContactDetails getContactsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Contains compliance information for security standards associated to the
+   * finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Compliance compliances = 27; + */ + java.util.List getCompliancesList(); + /** + * + * + *
+   * Contains compliance information for security standards associated to the
+   * finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Compliance compliances = 27; + */ + com.google.cloud.securitycenter.v2.Compliance getCompliances(int index); + /** + * + * + *
+   * Contains compliance information for security standards associated to the
+   * finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Compliance compliances = 27; + */ + int getCompliancesCount(); + /** + * + * + *
+   * Contains compliance information for security standards associated to the
+   * finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Compliance compliances = 27; + */ + java.util.List + getCompliancesOrBuilderList(); + /** + * + * + *
+   * Contains compliance information for security standards associated to the
+   * finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Compliance compliances = 27; + */ + com.google.cloud.securitycenter.v2.ComplianceOrBuilder getCompliancesOrBuilder(int index); + + /** + * + * + *
+   * Output only. The human readable display name of the finding source such as
+   * "Event Threat Detection" or "Security Health Analytics".
+   * 
+ * + * string parent_display_name = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The parentDisplayName. + */ + java.lang.String getParentDisplayName(); + /** + * + * + *
+   * Output only. The human readable display name of the finding source such as
+   * "Event Threat Detection" or "Security Health Analytics".
+   * 
+ * + * string parent_display_name = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for parentDisplayName. + */ + com.google.protobuf.ByteString getParentDisplayNameBytes(); + + /** + * + * + *
+   * Contains more details about the finding.
+   * 
+ * + * string description = 30; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Contains more details about the finding.
+   * 
+ * + * string description = 30; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Represents exfiltrations associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.Exfiltration exfiltration = 31; + * + * @return Whether the exfiltration field is set. + */ + boolean hasExfiltration(); + /** + * + * + *
+   * Represents exfiltrations associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.Exfiltration exfiltration = 31; + * + * @return The exfiltration. + */ + com.google.cloud.securitycenter.v2.Exfiltration getExfiltration(); + /** + * + * + *
+   * Represents exfiltrations associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.Exfiltration exfiltration = 31; + */ + com.google.cloud.securitycenter.v2.ExfiltrationOrBuilder getExfiltrationOrBuilder(); + + /** + * + * + *
+   * Represents IAM bindings associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.IamBinding iam_bindings = 32; + */ + java.util.List getIamBindingsList(); + /** + * + * + *
+   * Represents IAM bindings associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.IamBinding iam_bindings = 32; + */ + com.google.cloud.securitycenter.v2.IamBinding getIamBindings(int index); + /** + * + * + *
+   * Represents IAM bindings associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.IamBinding iam_bindings = 32; + */ + int getIamBindingsCount(); + /** + * + * + *
+   * Represents IAM bindings associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.IamBinding iam_bindings = 32; + */ + java.util.List + getIamBindingsOrBuilderList(); + /** + * + * + *
+   * Represents IAM bindings associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.IamBinding iam_bindings = 32; + */ + com.google.cloud.securitycenter.v2.IamBindingOrBuilder getIamBindingsOrBuilder(int index); + + /** + * + * + *
+   * Steps to address the finding.
+   * 
+ * + * string next_steps = 33; + * + * @return The nextSteps. + */ + java.lang.String getNextSteps(); + /** + * + * + *
+   * Steps to address the finding.
+   * 
+ * + * string next_steps = 33; + * + * @return The bytes for nextSteps. + */ + com.google.protobuf.ByteString getNextStepsBytes(); + + /** + * + * + *
+   * Unique identifier of the module which generated the finding.
+   * Example:
+   * folders/598186756061/securityHealthAnalyticsSettings/customModules/56799441161885
+   * 
+ * + * string module_name = 34; + * + * @return The moduleName. + */ + java.lang.String getModuleName(); + /** + * + * + *
+   * Unique identifier of the module which generated the finding.
+   * Example:
+   * folders/598186756061/securityHealthAnalyticsSettings/customModules/56799441161885
+   * 
+ * + * string module_name = 34; + * + * @return The bytes for moduleName. + */ + com.google.protobuf.ByteString getModuleNameBytes(); + + /** + * + * + *
+   * Containers associated with the finding. This field provides information for
+   * both Kubernetes and non-Kubernetes containers.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 35; + */ + java.util.List getContainersList(); + /** + * + * + *
+   * Containers associated with the finding. This field provides information for
+   * both Kubernetes and non-Kubernetes containers.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 35; + */ + com.google.cloud.securitycenter.v2.Container getContainers(int index); + /** + * + * + *
+   * Containers associated with the finding. This field provides information for
+   * both Kubernetes and non-Kubernetes containers.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 35; + */ + int getContainersCount(); + /** + * + * + *
+   * Containers associated with the finding. This field provides information for
+   * both Kubernetes and non-Kubernetes containers.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 35; + */ + java.util.List + getContainersOrBuilderList(); + /** + * + * + *
+   * Containers associated with the finding. This field provides information for
+   * both Kubernetes and non-Kubernetes containers.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 35; + */ + com.google.cloud.securitycenter.v2.ContainerOrBuilder getContainersOrBuilder(int index); + + /** + * + * + *
+   * Kubernetes resources associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes kubernetes = 36; + * + * @return Whether the kubernetes field is set. + */ + boolean hasKubernetes(); + /** + * + * + *
+   * Kubernetes resources associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes kubernetes = 36; + * + * @return The kubernetes. + */ + com.google.cloud.securitycenter.v2.Kubernetes getKubernetes(); + /** + * + * + *
+   * Kubernetes resources associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes kubernetes = 36; + */ + com.google.cloud.securitycenter.v2.KubernetesOrBuilder getKubernetesOrBuilder(); + + /** + * + * + *
+   * Database associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.Database database = 37; + * + * @return Whether the database field is set. + */ + boolean hasDatabase(); + /** + * + * + *
+   * Database associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.Database database = 37; + * + * @return The database. + */ + com.google.cloud.securitycenter.v2.Database getDatabase(); + /** + * + * + *
+   * Database associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.Database database = 37; + */ + com.google.cloud.securitycenter.v2.DatabaseOrBuilder getDatabaseOrBuilder(); + + /** + * + * + *
+   * The results of an attack path simulation relevant to this finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.AttackExposure attack_exposure = 38; + * + * @return Whether the attackExposure field is set. + */ + boolean hasAttackExposure(); + /** + * + * + *
+   * The results of an attack path simulation relevant to this finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.AttackExposure attack_exposure = 38; + * + * @return The attackExposure. + */ + com.google.cloud.securitycenter.v2.AttackExposure getAttackExposure(); + /** + * + * + *
+   * The results of an attack path simulation relevant to this finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.AttackExposure attack_exposure = 38; + */ + com.google.cloud.securitycenter.v2.AttackExposureOrBuilder getAttackExposureOrBuilder(); + + /** + * + * + *
+   * File associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.File files = 39; + */ + java.util.List getFilesList(); + /** + * + * + *
+   * File associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.File files = 39; + */ + com.google.cloud.securitycenter.v2.File getFiles(int index); + /** + * + * + *
+   * File associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.File files = 39; + */ + int getFilesCount(); + /** + * + * + *
+   * File associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.File files = 39; + */ + java.util.List + getFilesOrBuilderList(); + /** + * + * + *
+   * File associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.File files = 39; + */ + com.google.cloud.securitycenter.v2.FileOrBuilder getFilesOrBuilder(int index); + + /** + * + * + *
+   * Cloud Data Loss Prevention (Cloud DLP) inspection results that are
+   * associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpInspection cloud_dlp_inspection = 40; + * + * @return Whether the cloudDlpInspection field is set. + */ + boolean hasCloudDlpInspection(); + /** + * + * + *
+   * Cloud Data Loss Prevention (Cloud DLP) inspection results that are
+   * associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpInspection cloud_dlp_inspection = 40; + * + * @return The cloudDlpInspection. + */ + com.google.cloud.securitycenter.v2.CloudDlpInspection getCloudDlpInspection(); + /** + * + * + *
+   * Cloud Data Loss Prevention (Cloud DLP) inspection results that are
+   * associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpInspection cloud_dlp_inspection = 40; + */ + com.google.cloud.securitycenter.v2.CloudDlpInspectionOrBuilder getCloudDlpInspectionOrBuilder(); + + /** + * + * + *
+   * Cloud DLP data profile that is associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpDataProfile cloud_dlp_data_profile = 41; + * + * @return Whether the cloudDlpDataProfile field is set. + */ + boolean hasCloudDlpDataProfile(); + /** + * + * + *
+   * Cloud DLP data profile that is associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpDataProfile cloud_dlp_data_profile = 41; + * + * @return The cloudDlpDataProfile. + */ + com.google.cloud.securitycenter.v2.CloudDlpDataProfile getCloudDlpDataProfile(); + /** + * + * + *
+   * Cloud DLP data profile that is associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.CloudDlpDataProfile cloud_dlp_data_profile = 41; + */ + com.google.cloud.securitycenter.v2.CloudDlpDataProfileOrBuilder getCloudDlpDataProfileOrBuilder(); + + /** + * + * + *
+   * Signature of the kernel rootkit.
+   * 
+ * + * .google.cloud.securitycenter.v2.KernelRootkit kernel_rootkit = 42; + * + * @return Whether the kernelRootkit field is set. + */ + boolean hasKernelRootkit(); + /** + * + * + *
+   * Signature of the kernel rootkit.
+   * 
+ * + * .google.cloud.securitycenter.v2.KernelRootkit kernel_rootkit = 42; + * + * @return The kernelRootkit. + */ + com.google.cloud.securitycenter.v2.KernelRootkit getKernelRootkit(); + /** + * + * + *
+   * Signature of the kernel rootkit.
+   * 
+ * + * .google.cloud.securitycenter.v2.KernelRootkit kernel_rootkit = 42; + */ + com.google.cloud.securitycenter.v2.KernelRootkitOrBuilder getKernelRootkitOrBuilder(); + + /** + * + * + *
+   * Contains information about the org policies associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.OrgPolicy org_policies = 43; + */ + java.util.List getOrgPoliciesList(); + /** + * + * + *
+   * Contains information about the org policies associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.OrgPolicy org_policies = 43; + */ + com.google.cloud.securitycenter.v2.OrgPolicy getOrgPolicies(int index); + /** + * + * + *
+   * Contains information about the org policies associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.OrgPolicy org_policies = 43; + */ + int getOrgPoliciesCount(); + /** + * + * + *
+   * Contains information about the org policies associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.OrgPolicy org_policies = 43; + */ + java.util.List + getOrgPoliciesOrBuilderList(); + /** + * + * + *
+   * Contains information about the org policies associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.OrgPolicy org_policies = 43; + */ + com.google.cloud.securitycenter.v2.OrgPolicyOrBuilder getOrgPoliciesOrBuilder(int index); + + /** + * + * + *
+   * Represents an application associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.Application application = 45; + * + * @return Whether the application field is set. + */ + boolean hasApplication(); + /** + * + * + *
+   * Represents an application associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.Application application = 45; + * + * @return The application. + */ + com.google.cloud.securitycenter.v2.Application getApplication(); + /** + * + * + *
+   * Represents an application associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.Application application = 45; + */ + com.google.cloud.securitycenter.v2.ApplicationOrBuilder getApplicationOrBuilder(); + + /** + * + * + *
+   * Fields related to Backup and DR findings.
+   * 
+ * + * .google.cloud.securitycenter.v2.BackupDisasterRecovery backup_disaster_recovery = 47; + * + * + * @return Whether the backupDisasterRecovery field is set. + */ + boolean hasBackupDisasterRecovery(); + /** + * + * + *
+   * Fields related to Backup and DR findings.
+   * 
+ * + * .google.cloud.securitycenter.v2.BackupDisasterRecovery backup_disaster_recovery = 47; + * + * + * @return The backupDisasterRecovery. + */ + com.google.cloud.securitycenter.v2.BackupDisasterRecovery getBackupDisasterRecovery(); + /** + * + * + *
+   * Fields related to Backup and DR findings.
+   * 
+ * + * .google.cloud.securitycenter.v2.BackupDisasterRecovery backup_disaster_recovery = 47; + * + */ + com.google.cloud.securitycenter.v2.BackupDisasterRecoveryOrBuilder + getBackupDisasterRecoveryOrBuilder(); + + /** + * + * + *
+   * The security posture associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.SecurityPosture security_posture = 48; + * + * @return Whether the securityPosture field is set. + */ + boolean hasSecurityPosture(); + /** + * + * + *
+   * The security posture associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.SecurityPosture security_posture = 48; + * + * @return The securityPosture. + */ + com.google.cloud.securitycenter.v2.SecurityPosture getSecurityPosture(); + /** + * + * + *
+   * The security posture associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v2.SecurityPosture security_posture = 48; + */ + com.google.cloud.securitycenter.v2.SecurityPostureOrBuilder getSecurityPostureOrBuilder(); + + /** + * + * + *
+   * Log entries that are relevant to the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.LogEntry log_entries = 49; + */ + java.util.List getLogEntriesList(); + /** + * + * + *
+   * Log entries that are relevant to the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.LogEntry log_entries = 49; + */ + com.google.cloud.securitycenter.v2.LogEntry getLogEntries(int index); + /** + * + * + *
+   * Log entries that are relevant to the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.LogEntry log_entries = 49; + */ + int getLogEntriesCount(); + /** + * + * + *
+   * Log entries that are relevant to the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.LogEntry log_entries = 49; + */ + java.util.List + getLogEntriesOrBuilderList(); + /** + * + * + *
+   * Log entries that are relevant to the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.LogEntry log_entries = 49; + */ + com.google.cloud.securitycenter.v2.LogEntryOrBuilder getLogEntriesOrBuilder(int index); + + /** + * + * + *
+   * The load balancers associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.LoadBalancer load_balancers = 50; + */ + java.util.List getLoadBalancersList(); + /** + * + * + *
+   * The load balancers associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.LoadBalancer load_balancers = 50; + */ + com.google.cloud.securitycenter.v2.LoadBalancer getLoadBalancers(int index); + /** + * + * + *
+   * The load balancers associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.LoadBalancer load_balancers = 50; + */ + int getLoadBalancersCount(); + /** + * + * + *
+   * The load balancers associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.LoadBalancer load_balancers = 50; + */ + java.util.List + getLoadBalancersOrBuilderList(); + /** + * + * + *
+   * The load balancers associated with the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.LoadBalancer load_balancers = 50; + */ + com.google.cloud.securitycenter.v2.LoadBalancerOrBuilder getLoadBalancersOrBuilder(int index); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/FindingProto.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/FindingProto.java new file mode 100644 index 000000000000..a4a37e5015d9 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/FindingProto.java @@ -0,0 +1,345 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/finding.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public final class FindingProto { + private FindingProto() {} + + 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_v2_Finding_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_Finding_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v2_Finding_SourcePropertiesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_Finding_SourcePropertiesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v2_Finding_ExternalSystemsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_Finding_ExternalSystemsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v2_Finding_ContactsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_Finding_ContactsEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n,google/cloud/securitycenter/v2/finding" + + ".proto\022\036google.cloud.securitycenter.v2\032\037" + + "google/api/field_behavior.proto\032\031google/" + + "api/resource.proto\032+google/cloud/securit" + + "ycenter/v2/access.proto\0320google/cloud/se" + + "curitycenter/v2/application.proto\0324googl" + + "e/cloud/securitycenter/v2/attack_exposur" + + "e.proto\032=google/cloud/securitycenter/v2/" + + "backup_disaster_recovery.proto\032;google/c" + + "loud/securitycenter/v2/cloud_dlp_data_pr" + + "ofile.proto\0329google/cloud/securitycenter" + + "/v2/cloud_dlp_inspection.proto\032/google/c" + + "loud/securitycenter/v2/compliance.proto\032" + + "/google/cloud/securitycenter/v2/connecti" + + "on.proto\0324google/cloud/securitycenter/v2" + + "/contact_details.proto\032.google/cloud/sec" + + "uritycenter/v2/container.proto\032-google/c" + + "loud/securitycenter/v2/database.proto\0321g" + + "oogle/cloud/securitycenter/v2/exfiltrati" + + "on.proto\0324google/cloud/securitycenter/v2" + + "/external_system.proto\032)google/cloud/sec" + + "uritycenter/v2/file.proto\0320google/cloud/" + + "securitycenter/v2/iam_binding.proto\032.goo" + + "gle/cloud/securitycenter/v2/indicator.pr" + + "oto\0323google/cloud/securitycenter/v2/kern" + + "el_rootkit.proto\032/google/cloud/securityc" + + "enter/v2/kubernetes.proto\0322google/cloud/" + + "securitycenter/v2/load_balancer.proto\032.g" + + "oogle/cloud/securitycenter/v2/log_entry." + + "proto\0321google/cloud/securitycenter/v2/mi" + + "tre_attack.proto\032/google/cloud/securityc" + + "enter/v2/org_policy.proto\032,google/cloud/" + + "securitycenter/v2/process.proto\0323google/" + + "cloud/securitycenter/v2/security_marks.p" + + "roto\0325google/cloud/securitycenter/v2/sec" + + "urity_posture.proto\0322google/cloud/securi" + + "tycenter/v2/vulnerability.proto\032\034google/" + + "protobuf/struct.proto\032\037google/protobuf/t" + + "imestamp.proto\"\206\035\n\007Finding\022\014\n\004name\030\001 \001(\t" + + "\022\033\n\016canonical_name\030\002 \001(\tB\003\340A\003\022\016\n\006parent\030" + + "\003 \001(\t\022\032\n\rresource_name\030\004 \001(\tB\003\340A\005\022A\n\005sta" + + "te\030\006 \001(\0162-.google.cloud.securitycenter.v" + + "2.Finding.StateB\003\340A\003\022\025\n\010category\030\007 \001(\tB\003" + + "\340A\005\022\024\n\014external_uri\030\010 \001(\t\022X\n\021source_prop" + + "erties\030\t \003(\0132=.google.cloud.securitycent" + + "er.v2.Finding.SourcePropertiesEntry\022J\n\016s" + + "ecurity_marks\030\n \001(\0132-.google.cloud.secur" + + "itycenter.v2.SecurityMarksB\003\340A\003\022.\n\nevent" + + "_time\030\013 \001(\0132\032.google.protobuf.Timestamp\022" + + "4\n\013create_time\030\014 \001(\0132\032.google.protobuf.T" + + "imestampB\003\340A\003\022B\n\010severity\030\016 \001(\01620.google" + + ".cloud.securitycenter.v2.Finding.Severit" + + "y\022:\n\004mute\030\017 \001(\0162,.google.cloud.securityc" + + "enter.v2.Finding.Mute\022K\n\rfinding_class\030\020" + + " \001(\01624.google.cloud.securitycenter.v2.Fi" + + "nding.FindingClass\022<\n\tindicator\030\021 \001(\0132)." + + "google.cloud.securitycenter.v2.Indicator" + + "\022D\n\rvulnerability\030\022 \001(\0132-.google.cloud.s" + + "ecuritycenter.v2.Vulnerability\0229\n\020mute_u" + + "pdate_time\030\023 \001(\0132\032.google.protobuf.Times" + + "tampB\003\340A\003\022[\n\020external_systems\030\024 \003(\0132<.go" + + "ogle.cloud.securitycenter.v2.Finding.Ext" + + "ernalSystemsEntryB\003\340A\003\022A\n\014mitre_attack\030\025" + + " \001(\0132+.google.cloud.securitycenter.v2.Mi" + + "treAttack\0226\n\006access\030\026 \001(\0132&.google.cloud" + + ".securitycenter.v2.Access\022?\n\013connections" + + "\030\027 \003(\0132*.google.cloud.securitycenter.v2." + + "Connection\022\026\n\016mute_initiator\030\030 \001(\t\022:\n\tpr" + + "ocesses\030\031 \003(\0132\'.google.cloud.securitycen" + + "ter.v2.Process\022L\n\010contacts\030\032 \003(\01325.googl" + + "e.cloud.securitycenter.v2.Finding.Contac" + + "tsEntryB\003\340A\003\022?\n\013compliances\030\033 \003(\0132*.goog" + + "le.cloud.securitycenter.v2.Compliance\022 \n" + + "\023parent_display_name\030\035 \001(\tB\003\340A\003\022\023\n\013descr" + + "iption\030\036 \001(\t\022B\n\014exfiltration\030\037 \001(\0132,.goo" + + "gle.cloud.securitycenter.v2.Exfiltration" + + "\022@\n\014iam_bindings\030 \003(\0132*.google.cloud.se" + + "curitycenter.v2.IamBinding\022\022\n\nnext_steps" + + "\030! \001(\t\022\023\n\013module_name\030\" \001(\t\022=\n\ncontainer" + + "s\030# \003(\0132).google.cloud.securitycenter.v2" + + ".Container\022>\n\nkubernetes\030$ \001(\0132*.google." + + "cloud.securitycenter.v2.Kubernetes\022:\n\010da" + + "tabase\030% \001(\0132(.google.cloud.securitycent" + + "er.v2.Database\022G\n\017attack_exposure\030& \001(\0132" + + "..google.cloud.securitycenter.v2.AttackE" + + "xposure\0223\n\005files\030\' \003(\0132$.google.cloud.se" + + "curitycenter.v2.File\022P\n\024cloud_dlp_inspec" + + "tion\030( \001(\01322.google.cloud.securitycenter" + + ".v2.CloudDlpInspection\022S\n\026cloud_dlp_data" + + "_profile\030) \001(\01323.google.cloud.securityce" + + "nter.v2.CloudDlpDataProfile\022E\n\016kernel_ro" + + "otkit\030* \001(\0132-.google.cloud.securitycente" + + "r.v2.KernelRootkit\022?\n\014org_policies\030+ \003(\013" + + "2).google.cloud.securitycenter.v2.OrgPol" + + "icy\022@\n\013application\030- \001(\0132+.google.cloud." + + "securitycenter.v2.Application\022X\n\030backup_" + + "disaster_recovery\030/ \001(\01326.google.cloud.s" + + "ecuritycenter.v2.BackupDisasterRecovery\022" + + "I\n\020security_posture\0300 \001(\0132/.google.cloud" + + ".securitycenter.v2.SecurityPosture\022=\n\013lo" + + "g_entries\0301 \003(\0132(.google.cloud.securityc" + + "enter.v2.LogEntry\022D\n\016load_balancers\0302 \003(" + + "\0132,.google.cloud.securitycenter.v2.LoadB" + + "alancer\032O\n\025SourcePropertiesEntry\022\013\n\003key\030" + + "\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.google.protobuf.V" + + "alue:\0028\001\032f\n\024ExternalSystemsEntry\022\013\n\003key\030" + + "\001 \001(\t\022=\n\005value\030\002 \001(\0132..google.cloud.secu" + + "ritycenter.v2.ExternalSystem:\0028\001\032_\n\rCont" + + "actsEntry\022\013\n\003key\030\001 \001(\t\022=\n\005value\030\002 \001(\0132.." + + "google.cloud.securitycenter.v2.ContactDe" + + "tails:\0028\001\"8\n\005State\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_UNSPECIFIED\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\007UNMUT" + + "ED\020\002\022\r\n\tUNDEFINED\020\003\"\231\001\n\014FindingClass\022\035\n\031" + + "FINDING_CLASS_UNSPECIFIED\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\022\r\n\tSCC_ERROR\020\005\022\025\n\021POST" + + "URE_VIOLATION\020\006:\335\003\352A\331\003\n%securitycenter.g" + + "oogleapis.com/Finding\022@organizations/{or" + + "ganization}/sources/{source}/findings/{f" + + "inding}\022Uorganizations/{organization}/so" + + "urces/{source}/locations/{location}/find" + + "ings/{finding}\0224folders/{folder}/sources" + + "/{source}/findings/{finding}\022Ifolders/{f" + + "older}/sources/{source}/locations/{locat" + + "ion}/findings/{finding}\0226projects/{proje" + + "ct}/sources/{source}/findings/{finding}\022" + + "Kprojects/{project}/sources/{source}/loc" + + "ations/{location}/findings/{finding}*\010fi" + + "ndings2\007findingB\346\001\n\"com.google.cloud.sec" + + "uritycenter.v2B\014FindingProtoP\001ZJcloud.go" + + "ogle.com/go/securitycenter/apiv2/securit" + + "ycenterpb;securitycenterpb\252\002\036Google.Clou" + + "d.SecurityCenter.V2\312\002\036Google\\Cloud\\Secur" + + "ityCenter\\V2\352\002!Google::Cloud::SecurityCe" + + "nter::V2b\006proto3" + }; + 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.cloud.securitycenter.v2.AccessProto.getDescriptor(), + com.google.cloud.securitycenter.v2.ApplicationProto.getDescriptor(), + com.google.cloud.securitycenter.v2.AttackExposureProto.getDescriptor(), + com.google.cloud.securitycenter.v2.BackupDisasterRecoveryProto.getDescriptor(), + com.google.cloud.securitycenter.v2.CloudDlpDataProfileProto.getDescriptor(), + com.google.cloud.securitycenter.v2.CloudDlpInspectionProto.getDescriptor(), + com.google.cloud.securitycenter.v2.ComplianceProto.getDescriptor(), + com.google.cloud.securitycenter.v2.ConnectionProto.getDescriptor(), + com.google.cloud.securitycenter.v2.ContactDetailsProto.getDescriptor(), + com.google.cloud.securitycenter.v2.ContainerProto.getDescriptor(), + com.google.cloud.securitycenter.v2.DatabaseProto.getDescriptor(), + com.google.cloud.securitycenter.v2.ExfiltrationProto.getDescriptor(), + com.google.cloud.securitycenter.v2.ExternalSystemProto.getDescriptor(), + com.google.cloud.securitycenter.v2.FileProto.getDescriptor(), + com.google.cloud.securitycenter.v2.IamBindingProto.getDescriptor(), + com.google.cloud.securitycenter.v2.IndicatorProto.getDescriptor(), + com.google.cloud.securitycenter.v2.KernelRootkitProto.getDescriptor(), + com.google.cloud.securitycenter.v2.KubernetesProto.getDescriptor(), + com.google.cloud.securitycenter.v2.LoadBalancerProto.getDescriptor(), + com.google.cloud.securitycenter.v2.LogEntryProto.getDescriptor(), + com.google.cloud.securitycenter.v2.MitreAttackProto.getDescriptor(), + com.google.cloud.securitycenter.v2.OrgPolicyProto.getDescriptor(), + com.google.cloud.securitycenter.v2.ProcessProto.getDescriptor(), + com.google.cloud.securitycenter.v2.SecurityMarksProto.getDescriptor(), + com.google.cloud.securitycenter.v2.SecurityPostureProto.getDescriptor(), + com.google.cloud.securitycenter.v2.VulnerabilityProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_securitycenter_v2_Finding_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_securitycenter_v2_Finding_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_Finding_descriptor, + new java.lang.String[] { + "Name", + "CanonicalName", + "Parent", + "ResourceName", + "State", + "Category", + "ExternalUri", + "SourceProperties", + "SecurityMarks", + "EventTime", + "CreateTime", + "Severity", + "Mute", + "FindingClass", + "Indicator", + "Vulnerability", + "MuteUpdateTime", + "ExternalSystems", + "MitreAttack", + "Access", + "Connections", + "MuteInitiator", + "Processes", + "Contacts", + "Compliances", + "ParentDisplayName", + "Description", + "Exfiltration", + "IamBindings", + "NextSteps", + "ModuleName", + "Containers", + "Kubernetes", + "Database", + "AttackExposure", + "Files", + "CloudDlpInspection", + "CloudDlpDataProfile", + "KernelRootkit", + "OrgPolicies", + "Application", + "BackupDisasterRecovery", + "SecurityPosture", + "LogEntries", + "LoadBalancers", + }); + internal_static_google_cloud_securitycenter_v2_Finding_SourcePropertiesEntry_descriptor = + internal_static_google_cloud_securitycenter_v2_Finding_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_securitycenter_v2_Finding_SourcePropertiesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_Finding_SourcePropertiesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_securitycenter_v2_Finding_ExternalSystemsEntry_descriptor = + internal_static_google_cloud_securitycenter_v2_Finding_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_securitycenter_v2_Finding_ExternalSystemsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_Finding_ExternalSystemsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_securitycenter_v2_Finding_ContactsEntry_descriptor = + internal_static_google_cloud_securitycenter_v2_Finding_descriptor.getNestedTypes().get(2); + internal_static_google_cloud_securitycenter_v2_Finding_ContactsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_Finding_ContactsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + 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.cloud.securitycenter.v2.AccessProto.getDescriptor(); + com.google.cloud.securitycenter.v2.ApplicationProto.getDescriptor(); + com.google.cloud.securitycenter.v2.AttackExposureProto.getDescriptor(); + com.google.cloud.securitycenter.v2.BackupDisasterRecoveryProto.getDescriptor(); + com.google.cloud.securitycenter.v2.CloudDlpDataProfileProto.getDescriptor(); + com.google.cloud.securitycenter.v2.CloudDlpInspectionProto.getDescriptor(); + com.google.cloud.securitycenter.v2.ComplianceProto.getDescriptor(); + com.google.cloud.securitycenter.v2.ConnectionProto.getDescriptor(); + com.google.cloud.securitycenter.v2.ContactDetailsProto.getDescriptor(); + com.google.cloud.securitycenter.v2.ContainerProto.getDescriptor(); + com.google.cloud.securitycenter.v2.DatabaseProto.getDescriptor(); + com.google.cloud.securitycenter.v2.ExfiltrationProto.getDescriptor(); + com.google.cloud.securitycenter.v2.ExternalSystemProto.getDescriptor(); + com.google.cloud.securitycenter.v2.FileProto.getDescriptor(); + com.google.cloud.securitycenter.v2.IamBindingProto.getDescriptor(); + com.google.cloud.securitycenter.v2.IndicatorProto.getDescriptor(); + com.google.cloud.securitycenter.v2.KernelRootkitProto.getDescriptor(); + com.google.cloud.securitycenter.v2.KubernetesProto.getDescriptor(); + com.google.cloud.securitycenter.v2.LoadBalancerProto.getDescriptor(); + com.google.cloud.securitycenter.v2.LogEntryProto.getDescriptor(); + com.google.cloud.securitycenter.v2.MitreAttackProto.getDescriptor(); + com.google.cloud.securitycenter.v2.OrgPolicyProto.getDescriptor(); + com.google.cloud.securitycenter.v2.ProcessProto.getDescriptor(); + com.google.cloud.securitycenter.v2.SecurityMarksProto.getDescriptor(); + com.google.cloud.securitycenter.v2.SecurityPostureProto.getDescriptor(); + com.google.cloud.securitycenter.v2.VulnerabilityProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/FolderLocationName.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/FolderLocationName.java new file mode 100644 index 000000000000..6cc4410a749f --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/FolderLocationName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.securitycenter.v2; + +import com.google.api.pathtemplate.PathTemplate; +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 FolderLocationName implements ResourceName { + private static final PathTemplate FOLDER_LOCATION = + PathTemplate.createWithoutUrlEncoding("folders/{folder}/locations/{location}"); + private volatile Map fieldValuesMap; + private final String folder; + private final String location; + + @Deprecated + protected FolderLocationName() { + folder = null; + location = null; + } + + private FolderLocationName(Builder builder) { + folder = Preconditions.checkNotNull(builder.getFolder()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getFolder() { + return folder; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static FolderLocationName of(String folder, String location) { + return newBuilder().setFolder(folder).setLocation(location).build(); + } + + public static String format(String folder, String location) { + return newBuilder().setFolder(folder).setLocation(location).build().toString(); + } + + public static FolderLocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + FOLDER_LOCATION.validatedMatch( + formattedString, "FolderLocationName.parse: formattedString not in valid format"); + return of(matchMap.get("folder"), matchMap.get("location")); + } + + 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 (FolderLocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return FOLDER_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (folder != null) { + fieldMapBuilder.put("folder", folder); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return FOLDER_LOCATION.instantiate("folder", folder, "location", location); + } + + @Override + public boolean equals(java.lang.Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + FolderLocationName that = ((FolderLocationName) o); + return Objects.equals(this.folder, that.folder) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(folder); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for folders/{folder}/locations/{location}. */ + public static class Builder { + private String folder; + private String location; + + protected Builder() {} + + public String getFolder() { + return folder; + } + + public String getLocation() { + return location; + } + + public Builder setFolder(String folder) { + this.folder = folder; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(FolderLocationName folderLocationName) { + this.folder = folderLocationName.folder; + this.location = folderLocationName.location; + } + + public FolderLocationName build() { + return new FolderLocationName(this); + } + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/FolderName.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/FolderName.java new file mode 100644 index 000000000000..5c99ef856f50 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/FolderName.java @@ -0,0 +1,168 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.securitycenter.v2; + +import com.google.api.pathtemplate.PathTemplate; +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 FolderName implements ResourceName { + private static final PathTemplate FOLDER = + PathTemplate.createWithoutUrlEncoding("folders/{folder}"); + private volatile Map fieldValuesMap; + private final String folder; + + @Deprecated + protected FolderName() { + folder = null; + } + + private FolderName(Builder builder) { + folder = Preconditions.checkNotNull(builder.getFolder()); + } + + public String getFolder() { + return folder; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static FolderName of(String folder) { + return newBuilder().setFolder(folder).build(); + } + + public static String format(String folder) { + return newBuilder().setFolder(folder).build().toString(); + } + + public static FolderName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + FOLDER.validatedMatch( + formattedString, "FolderName.parse: formattedString not in valid format"); + return of(matchMap.get("folder")); + } + + 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 (FolderName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return FOLDER.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (folder != null) { + fieldMapBuilder.put("folder", folder); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return FOLDER.instantiate("folder", folder); + } + + @Override + public boolean equals(java.lang.Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + FolderName that = ((FolderName) o); + return Objects.equals(this.folder, that.folder); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(folder); + return h; + } + + /** Builder for folders/{folder}. */ + public static class Builder { + private String folder; + + protected Builder() {} + + public String getFolder() { + return folder; + } + + public Builder setFolder(String folder) { + this.folder = folder; + return this; + } + + private Builder(FolderName folderName) { + this.folder = folderName.folder; + } + + public FolderName build() { + return new FolderName(this); + } + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Geolocation.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Geolocation.java new file mode 100644 index 000000000000..87591ceb35d3 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Geolocation.java @@ -0,0 +1,624 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/access.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Represents a geographical location for a given access.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Geolocation} + */ +public final class Geolocation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.Geolocation) + GeolocationOrBuilder { + private static final long serialVersionUID = 0L; + // Use Geolocation.newBuilder() to construct. + private Geolocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Geolocation() { + regionCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Geolocation(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.AccessProto + .internal_static_google_cloud_securitycenter_v2_Geolocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.AccessProto + .internal_static_google_cloud_securitycenter_v2_Geolocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Geolocation.class, + com.google.cloud.securitycenter.v2.Geolocation.Builder.class); + } + + public static final int REGION_CODE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object regionCode_ = ""; + /** + * + * + *
+   * A CLDR.
+   * 
+ * + * string region_code = 1; + * + * @return The regionCode. + */ + @java.lang.Override + public java.lang.String getRegionCode() { + java.lang.Object ref = regionCode_; + 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(); + regionCode_ = s; + return s; + } + } + /** + * + * + *
+   * A CLDR.
+   * 
+ * + * string region_code = 1; + * + * @return The bytes for regionCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRegionCodeBytes() { + java.lang.Object ref = regionCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + regionCode_ = 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(regionCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, regionCode_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(regionCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, regionCode_); + } + size += getUnknownFields().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.v2.Geolocation)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.Geolocation other = + (com.google.cloud.securitycenter.v2.Geolocation) obj; + + if (!getRegionCode().equals(other.getRegionCode())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + REGION_CODE_FIELD_NUMBER; + hash = (53 * hash) + getRegionCode().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.Geolocation parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Geolocation 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.v2.Geolocation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Geolocation 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.v2.Geolocation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Geolocation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.Geolocation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Geolocation 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.v2.Geolocation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Geolocation 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.v2.Geolocation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Geolocation 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.v2.Geolocation 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; + } + /** + * + * + *
+   * Represents a geographical location for a given access.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Geolocation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.Geolocation) + com.google.cloud.securitycenter.v2.GeolocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.AccessProto + .internal_static_google_cloud_securitycenter_v2_Geolocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.AccessProto + .internal_static_google_cloud_securitycenter_v2_Geolocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Geolocation.class, + com.google.cloud.securitycenter.v2.Geolocation.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.Geolocation.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + regionCode_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.AccessProto + .internal_static_google_cloud_securitycenter_v2_Geolocation_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Geolocation getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.Geolocation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Geolocation build() { + com.google.cloud.securitycenter.v2.Geolocation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Geolocation buildPartial() { + com.google.cloud.securitycenter.v2.Geolocation result = + new com.google.cloud.securitycenter.v2.Geolocation(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.Geolocation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.regionCode_ = regionCode_; + } + } + + @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.v2.Geolocation) { + return mergeFrom((com.google.cloud.securitycenter.v2.Geolocation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.Geolocation other) { + if (other == com.google.cloud.securitycenter.v2.Geolocation.getDefaultInstance()) return this; + if (!other.getRegionCode().isEmpty()) { + regionCode_ = other.regionCode_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + regionCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object regionCode_ = ""; + /** + * + * + *
+     * A CLDR.
+     * 
+ * + * string region_code = 1; + * + * @return The regionCode. + */ + public java.lang.String getRegionCode() { + java.lang.Object ref = regionCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + regionCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A CLDR.
+     * 
+ * + * string region_code = 1; + * + * @return The bytes for regionCode. + */ + public com.google.protobuf.ByteString getRegionCodeBytes() { + java.lang.Object ref = regionCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + regionCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A CLDR.
+     * 
+ * + * string region_code = 1; + * + * @param value The regionCode to set. + * @return This builder for chaining. + */ + public Builder setRegionCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + regionCode_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * A CLDR.
+     * 
+ * + * string region_code = 1; + * + * @return This builder for chaining. + */ + public Builder clearRegionCode() { + regionCode_ = getDefaultInstance().getRegionCode(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * A CLDR.
+     * 
+ * + * string region_code = 1; + * + * @param value The bytes for regionCode to set. + * @return This builder for chaining. + */ + public Builder setRegionCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + regionCode_ = value; + bitField0_ |= 0x00000001; + 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.v2.Geolocation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.Geolocation) + private static final com.google.cloud.securitycenter.v2.Geolocation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.Geolocation(); + } + + public static com.google.cloud.securitycenter.v2.Geolocation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Geolocation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.Geolocation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GeolocationOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GeolocationOrBuilder.java new file mode 100644 index 000000000000..d775e8b1940b --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GeolocationOrBuilder.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/access.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface GeolocationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.Geolocation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A CLDR.
+   * 
+ * + * string region_code = 1; + * + * @return The regionCode. + */ + java.lang.String getRegionCode(); + /** + * + * + *
+   * A CLDR.
+   * 
+ * + * string region_code = 1; + * + * @return The bytes for regionCode. + */ + com.google.protobuf.ByteString getRegionCodeBytes(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetBigQueryExportRequest.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetBigQueryExportRequest.java new file mode 100644 index 000000000000..525324924d1a --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetBigQueryExportRequest.java @@ -0,0 +1,682 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Request message for retrieving a BigQuery export.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.GetBigQueryExportRequest} + */ +public final class GetBigQueryExportRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.GetBigQueryExportRequest) + GetBigQueryExportRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetBigQueryExportRequest.newBuilder() to construct. + private GetBigQueryExportRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetBigQueryExportRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetBigQueryExportRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GetBigQueryExportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GetBigQueryExportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.GetBigQueryExportRequest.class, + com.google.cloud.securitycenter.v2.GetBigQueryExportRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the BigQuery export to retrieve. The following list shows
+   * some examples of the format:
+   *
+   * +
+   * `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}`
+   * + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}`
+   * + `projects/{project}locations/{location}//bigQueryExports/{export_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 BigQuery export to retrieve. The following list shows
+   * some examples of the format:
+   *
+   * +
+   * `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}`
+   * + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}`
+   * + `projects/{project}locations/{location}//bigQueryExports/{export_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_); + } + getUnknownFields().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 += getUnknownFields().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.v2.GetBigQueryExportRequest)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.GetBigQueryExportRequest other = + (com.google.cloud.securitycenter.v2.GetBigQueryExportRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.GetBigQueryExportRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.GetBigQueryExportRequest 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.v2.GetBigQueryExportRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.GetBigQueryExportRequest 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.v2.GetBigQueryExportRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.GetBigQueryExportRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.GetBigQueryExportRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.GetBigQueryExportRequest 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.v2.GetBigQueryExportRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.GetBigQueryExportRequest 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.v2.GetBigQueryExportRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.GetBigQueryExportRequest 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.v2.GetBigQueryExportRequest 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 BigQuery export.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.GetBigQueryExportRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.GetBigQueryExportRequest) + com.google.cloud.securitycenter.v2.GetBigQueryExportRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GetBigQueryExportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GetBigQueryExportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.GetBigQueryExportRequest.class, + com.google.cloud.securitycenter.v2.GetBigQueryExportRequest.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.GetBigQueryExportRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GetBigQueryExportRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.GetBigQueryExportRequest getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.GetBigQueryExportRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.GetBigQueryExportRequest build() { + com.google.cloud.securitycenter.v2.GetBigQueryExportRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.GetBigQueryExportRequest buildPartial() { + com.google.cloud.securitycenter.v2.GetBigQueryExportRequest result = + new com.google.cloud.securitycenter.v2.GetBigQueryExportRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.GetBigQueryExportRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.v2.GetBigQueryExportRequest) { + return mergeFrom((com.google.cloud.securitycenter.v2.GetBigQueryExportRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.GetBigQueryExportRequest other) { + if (other == com.google.cloud.securitycenter.v2.GetBigQueryExportRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the BigQuery export to retrieve. The following list shows
+     * some examples of the format:
+     *
+     * +
+     * `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}`
+     * + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}`
+     * + `projects/{project}locations/{location}//bigQueryExports/{export_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 BigQuery export to retrieve. The following list shows
+     * some examples of the format:
+     *
+     * +
+     * `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}`
+     * + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}`
+     * + `projects/{project}locations/{location}//bigQueryExports/{export_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 BigQuery export to retrieve. The following list shows
+     * some examples of the format:
+     *
+     * +
+     * `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}`
+     * + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}`
+     * + `projects/{project}locations/{location}//bigQueryExports/{export_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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the BigQuery export to retrieve. The following list shows
+     * some examples of the format:
+     *
+     * +
+     * `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}`
+     * + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}`
+     * + `projects/{project}locations/{location}//bigQueryExports/{export_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the BigQuery export to retrieve. The following list shows
+     * some examples of the format:
+     *
+     * +
+     * `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}`
+     * + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}`
+     * + `projects/{project}locations/{location}//bigQueryExports/{export_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; + bitField0_ |= 0x00000001; + 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.v2.GetBigQueryExportRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.GetBigQueryExportRequest) + private static final com.google.cloud.securitycenter.v2.GetBigQueryExportRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.GetBigQueryExportRequest(); + } + + public static com.google.cloud.securitycenter.v2.GetBigQueryExportRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetBigQueryExportRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.GetBigQueryExportRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetBigQueryExportRequestOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetBigQueryExportRequestOrBuilder.java new file mode 100644 index 000000000000..0d4d96a75afb --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetBigQueryExportRequestOrBuilder.java @@ -0,0 +1,67 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface GetBigQueryExportRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.GetBigQueryExportRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the BigQuery export to retrieve. The following list shows
+   * some examples of the format:
+   *
+   * +
+   * `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}`
+   * + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}`
+   * + `projects/{project}locations/{location}//bigQueryExports/{export_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the BigQuery export to retrieve. The following list shows
+   * some examples of the format:
+   *
+   * +
+   * `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}`
+   * + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}`
+   * + `projects/{project}locations/{location}//bigQueryExports/{export_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/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetMuteConfigRequest.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetMuteConfigRequest.java new file mode 100644 index 000000000000..bf16db8e2851 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetMuteConfigRequest.java @@ -0,0 +1,705 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Request message for retrieving a mute config. If no location is specified,
+ * default is global.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.GetMuteConfigRequest} + */ +public final class GetMuteConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.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(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GetMuteConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GetMuteConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.GetMuteConfigRequest.class, + com.google.cloud.securitycenter.v2.GetMuteConfigRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the mute config to retrieve. The following list shows
+   * some examples of the format:
+   *
+   * + `organizations/{organization}/muteConfigs/{config_id}`
+   * +
+   * `organizations/{organization}/locations/{location}/muteConfigs/{config_id}`
+   * + `folders/{folder}/muteConfigs/{config_id}`
+   * + `folders/{folder}/locations/{location}/muteConfigs/{config_id}`
+   * + `projects/{project}/muteConfigs/{config_id}`
+   * + `projects/{project}/locations/{location}/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. The following list shows
+   * some examples of the format:
+   *
+   * + `organizations/{organization}/muteConfigs/{config_id}`
+   * +
+   * `organizations/{organization}/locations/{location}/muteConfigs/{config_id}`
+   * + `folders/{folder}/muteConfigs/{config_id}`
+   * + `folders/{folder}/locations/{location}/muteConfigs/{config_id}`
+   * + `projects/{project}/muteConfigs/{config_id}`
+   * + `projects/{project}/locations/{location}/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_); + } + getUnknownFields().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 += getUnknownFields().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.v2.GetMuteConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.GetMuteConfigRequest other = + (com.google.cloud.securitycenter.v2.GetMuteConfigRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.GetMuteConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.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.v2.GetMuteConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.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.v2.GetMuteConfigRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.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.v2.GetMuteConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.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.v2.GetMuteConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.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.v2.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.v2.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.v2.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. If no location is specified,
+   * default is global.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.GetMuteConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.GetMuteConfigRequest) + com.google.cloud.securitycenter.v2.GetMuteConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GetMuteConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GetMuteConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.GetMuteConfigRequest.class, + com.google.cloud.securitycenter.v2.GetMuteConfigRequest.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.GetMuteConfigRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GetMuteConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.GetMuteConfigRequest getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.GetMuteConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.GetMuteConfigRequest build() { + com.google.cloud.securitycenter.v2.GetMuteConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.GetMuteConfigRequest buildPartial() { + com.google.cloud.securitycenter.v2.GetMuteConfigRequest result = + new com.google.cloud.securitycenter.v2.GetMuteConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.GetMuteConfigRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.v2.GetMuteConfigRequest) { + return mergeFrom((com.google.cloud.securitycenter.v2.GetMuteConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.GetMuteConfigRequest other) { + if (other == com.google.cloud.securitycenter.v2.GetMuteConfigRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the mute config to retrieve. The following list shows
+     * some examples of the format:
+     *
+     * + `organizations/{organization}/muteConfigs/{config_id}`
+     * +
+     * `organizations/{organization}/locations/{location}/muteConfigs/{config_id}`
+     * + `folders/{folder}/muteConfigs/{config_id}`
+     * + `folders/{folder}/locations/{location}/muteConfigs/{config_id}`
+     * + `projects/{project}/muteConfigs/{config_id}`
+     * + `projects/{project}/locations/{location}/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. The following list shows
+     * some examples of the format:
+     *
+     * + `organizations/{organization}/muteConfigs/{config_id}`
+     * +
+     * `organizations/{organization}/locations/{location}/muteConfigs/{config_id}`
+     * + `folders/{folder}/muteConfigs/{config_id}`
+     * + `folders/{folder}/locations/{location}/muteConfigs/{config_id}`
+     * + `projects/{project}/muteConfigs/{config_id}`
+     * + `projects/{project}/locations/{location}/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. The following list shows
+     * some examples of the format:
+     *
+     * + `organizations/{organization}/muteConfigs/{config_id}`
+     * +
+     * `organizations/{organization}/locations/{location}/muteConfigs/{config_id}`
+     * + `folders/{folder}/muteConfigs/{config_id}`
+     * + `folders/{folder}/locations/{location}/muteConfigs/{config_id}`
+     * + `projects/{project}/muteConfigs/{config_id}`
+     * + `projects/{project}/locations/{location}/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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the mute config to retrieve. The following list shows
+     * some examples of the format:
+     *
+     * + `organizations/{organization}/muteConfigs/{config_id}`
+     * +
+     * `organizations/{organization}/locations/{location}/muteConfigs/{config_id}`
+     * + `folders/{folder}/muteConfigs/{config_id}`
+     * + `folders/{folder}/locations/{location}/muteConfigs/{config_id}`
+     * + `projects/{project}/muteConfigs/{config_id}`
+     * + `projects/{project}/locations/{location}/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(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the mute config to retrieve. The following list shows
+     * some examples of the format:
+     *
+     * + `organizations/{organization}/muteConfigs/{config_id}`
+     * +
+     * `organizations/{organization}/locations/{location}/muteConfigs/{config_id}`
+     * + `folders/{folder}/muteConfigs/{config_id}`
+     * + `folders/{folder}/locations/{location}/muteConfigs/{config_id}`
+     * + `projects/{project}/muteConfigs/{config_id}`
+     * + `projects/{project}/locations/{location}/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; + bitField0_ |= 0x00000001; + 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.v2.GetMuteConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.GetMuteConfigRequest) + private static final com.google.cloud.securitycenter.v2.GetMuteConfigRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.GetMuteConfigRequest(); + } + + public static com.google.cloud.securitycenter.v2.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 { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.GetMuteConfigRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetMuteConfigRequestOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetMuteConfigRequestOrBuilder.java new file mode 100644 index 000000000000..39ce45f785be --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetMuteConfigRequestOrBuilder.java @@ -0,0 +1,73 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface GetMuteConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.GetMuteConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the mute config to retrieve. The following list shows
+   * some examples of the format:
+   *
+   * + `organizations/{organization}/muteConfigs/{config_id}`
+   * +
+   * `organizations/{organization}/locations/{location}/muteConfigs/{config_id}`
+   * + `folders/{folder}/muteConfigs/{config_id}`
+   * + `folders/{folder}/locations/{location}/muteConfigs/{config_id}`
+   * + `projects/{project}/muteConfigs/{config_id}`
+   * + `projects/{project}/locations/{location}/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. The following list shows
+   * some examples of the format:
+   *
+   * + `organizations/{organization}/muteConfigs/{config_id}`
+   * +
+   * `organizations/{organization}/locations/{location}/muteConfigs/{config_id}`
+   * + `folders/{folder}/muteConfigs/{config_id}`
+   * + `folders/{folder}/locations/{location}/muteConfigs/{config_id}`
+   * + `projects/{project}/muteConfigs/{config_id}`
+   * + `projects/{project}/locations/{location}/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/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetNotificationConfigRequest.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetNotificationConfigRequest.java new file mode 100644 index 000000000000..af8600c5447f --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetNotificationConfigRequest.java @@ -0,0 +1,703 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Request message for getting a notification config.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.GetNotificationConfigRequest} + */ +public final class GetNotificationConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.GetNotificationConfigRequest) + GetNotificationConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetNotificationConfigRequest.newBuilder() to construct. + private GetNotificationConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetNotificationConfigRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetNotificationConfigRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GetNotificationConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GetNotificationConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.GetNotificationConfigRequest.class, + com.google.cloud.securitycenter.v2.GetNotificationConfigRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the notification config to get. The following list shows
+   * some examples of the format:
+   *
+   * +
+   * `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]`
+   * +
+   * `folders/[folder_id]/locations/[location_id]/notificationConfigs/[config_id]`
+   * +
+   * `projects/[project_id]/locations/[location_id]/notificationConfigs/[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 notification config to get. The following list shows
+   * some examples of the format:
+   *
+   * +
+   * `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]`
+   * +
+   * `folders/[folder_id]/locations/[location_id]/notificationConfigs/[config_id]`
+   * +
+   * `projects/[project_id]/locations/[location_id]/notificationConfigs/[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_); + } + getUnknownFields().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 += getUnknownFields().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.v2.GetNotificationConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.GetNotificationConfigRequest other = + (com.google.cloud.securitycenter.v2.GetNotificationConfigRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.GetNotificationConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.GetNotificationConfigRequest 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.v2.GetNotificationConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.GetNotificationConfigRequest 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.v2.GetNotificationConfigRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.GetNotificationConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.GetNotificationConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.GetNotificationConfigRequest 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.v2.GetNotificationConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.GetNotificationConfigRequest 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.v2.GetNotificationConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.GetNotificationConfigRequest 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.v2.GetNotificationConfigRequest 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 getting a notification config.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.GetNotificationConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.GetNotificationConfigRequest) + com.google.cloud.securitycenter.v2.GetNotificationConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GetNotificationConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GetNotificationConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.GetNotificationConfigRequest.class, + com.google.cloud.securitycenter.v2.GetNotificationConfigRequest.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.GetNotificationConfigRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GetNotificationConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.GetNotificationConfigRequest + getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.GetNotificationConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.GetNotificationConfigRequest build() { + com.google.cloud.securitycenter.v2.GetNotificationConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.GetNotificationConfigRequest buildPartial() { + com.google.cloud.securitycenter.v2.GetNotificationConfigRequest result = + new com.google.cloud.securitycenter.v2.GetNotificationConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.securitycenter.v2.GetNotificationConfigRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.v2.GetNotificationConfigRequest) { + return mergeFrom((com.google.cloud.securitycenter.v2.GetNotificationConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.securitycenter.v2.GetNotificationConfigRequest other) { + if (other + == com.google.cloud.securitycenter.v2.GetNotificationConfigRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the notification config to get. The following list shows
+     * some examples of the format:
+     *
+     * +
+     * `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]`
+     * +
+     * `folders/[folder_id]/locations/[location_id]/notificationConfigs/[config_id]`
+     * +
+     * `projects/[project_id]/locations/[location_id]/notificationConfigs/[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 notification config to get. The following list shows
+     * some examples of the format:
+     *
+     * +
+     * `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]`
+     * +
+     * `folders/[folder_id]/locations/[location_id]/notificationConfigs/[config_id]`
+     * +
+     * `projects/[project_id]/locations/[location_id]/notificationConfigs/[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 notification config to get. The following list shows
+     * some examples of the format:
+     *
+     * +
+     * `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]`
+     * +
+     * `folders/[folder_id]/locations/[location_id]/notificationConfigs/[config_id]`
+     * +
+     * `projects/[project_id]/locations/[location_id]/notificationConfigs/[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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the notification config to get. The following list shows
+     * some examples of the format:
+     *
+     * +
+     * `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]`
+     * +
+     * `folders/[folder_id]/locations/[location_id]/notificationConfigs/[config_id]`
+     * +
+     * `projects/[project_id]/locations/[location_id]/notificationConfigs/[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(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the notification config to get. The following list shows
+     * some examples of the format:
+     *
+     * +
+     * `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]`
+     * +
+     * `folders/[folder_id]/locations/[location_id]/notificationConfigs/[config_id]`
+     * +
+     * `projects/[project_id]/locations/[location_id]/notificationConfigs/[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; + bitField0_ |= 0x00000001; + 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.v2.GetNotificationConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.GetNotificationConfigRequest) + private static final com.google.cloud.securitycenter.v2.GetNotificationConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.GetNotificationConfigRequest(); + } + + public static com.google.cloud.securitycenter.v2.GetNotificationConfigRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetNotificationConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.GetNotificationConfigRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetNotificationConfigRequestOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetNotificationConfigRequestOrBuilder.java new file mode 100644 index 000000000000..0a7eea1f426d --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetNotificationConfigRequestOrBuilder.java @@ -0,0 +1,71 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface GetNotificationConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.GetNotificationConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the notification config to get. The following list shows
+   * some examples of the format:
+   *
+   * +
+   * `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]`
+   * +
+   * `folders/[folder_id]/locations/[location_id]/notificationConfigs/[config_id]`
+   * +
+   * `projects/[project_id]/locations/[location_id]/notificationConfigs/[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 notification config to get. The following list shows
+   * some examples of the format:
+   *
+   * +
+   * `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]`
+   * +
+   * `folders/[folder_id]/locations/[location_id]/notificationConfigs/[config_id]`
+   * +
+   * `projects/[project_id]/locations/[location_id]/notificationConfigs/[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/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetResourceValueConfigRequest.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetResourceValueConfigRequest.java new file mode 100644 index 000000000000..eac3504f3c2a --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetResourceValueConfigRequest.java @@ -0,0 +1,654 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Request message to get resource value config
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.GetResourceValueConfigRequest} + */ +public final class GetResourceValueConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.GetResourceValueConfigRequest) + GetResourceValueConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetResourceValueConfigRequest.newBuilder() to construct. + private GetResourceValueConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetResourceValueConfigRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetResourceValueConfigRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GetResourceValueConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GetResourceValueConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest.class, + com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the resource value config to retrieve. Its format is
+   * organizations/{organization}/resourceValueConfigs/{config_id}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 resource value config to retrieve. Its format is
+   * organizations/{organization}/resourceValueConfigs/{config_id}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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_); + } + getUnknownFields().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 += getUnknownFields().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.v2.GetResourceValueConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest other = + (com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest 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.v2.GetResourceValueConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest 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.v2.GetResourceValueConfigRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest 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.v2.GetResourceValueConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest 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.v2.GetResourceValueConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest 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.v2.GetResourceValueConfigRequest 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 to get resource value config
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.GetResourceValueConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.GetResourceValueConfigRequest) + com.google.cloud.securitycenter.v2.GetResourceValueConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GetResourceValueConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GetResourceValueConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest.class, + com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GetResourceValueConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest + getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest build() { + com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest buildPartial() { + com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest result = + new com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.v2.GetResourceValueConfigRequest) { + return mergeFrom((com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest other) { + if (other + == com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource value config to retrieve. Its format is
+     * organizations/{organization}/resourceValueConfigs/{config_id}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 resource value config to retrieve. Its format is
+     * organizations/{organization}/resourceValueConfigs/{config_id}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 resource value config to retrieve. Its format is
+     * organizations/{organization}/resourceValueConfigs/{config_id}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource value config to retrieve. Its format is
+     * organizations/{organization}/resourceValueConfigs/{config_id}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource value config to retrieve. Its format is
+     * organizations/{organization}/resourceValueConfigs/{config_id}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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; + bitField0_ |= 0x00000001; + 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.v2.GetResourceValueConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.GetResourceValueConfigRequest) + private static final com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest(); + } + + public static com.google.cloud.securitycenter.v2.GetResourceValueConfigRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetResourceValueConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.GetResourceValueConfigRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetResourceValueConfigRequestOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetResourceValueConfigRequestOrBuilder.java new file mode 100644 index 000000000000..0036ba87757c --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetResourceValueConfigRequestOrBuilder.java @@ -0,0 +1,57 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface GetResourceValueConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.GetResourceValueConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource value config to retrieve. Its format is
+   * organizations/{organization}/resourceValueConfigs/{config_id}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource value config to retrieve. Its format is
+   * organizations/{organization}/resourceValueConfigs/{config_id}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetSimulationRequest.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetSimulationRequest.java new file mode 100644 index 000000000000..fe58925aed12 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetSimulationRequest.java @@ -0,0 +1,672 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Request message for getting simulation.
+ * Simulation name can include "latest" to retrieve the latest simulation
+ * For example, "organizations/123/simulations/latest"
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.GetSimulationRequest} + */ +public final class GetSimulationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.GetSimulationRequest) + GetSimulationRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetSimulationRequest.newBuilder() to construct. + private GetSimulationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetSimulationRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetSimulationRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GetSimulationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GetSimulationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.GetSimulationRequest.class, + com.google.cloud.securitycenter.v2.GetSimulationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The organization name or simulation name of this simulation
+   *
+   * Valid format:
+   * "organizations/{organization}/simulations/latest"
+   * "organizations/{organization}/simulations/{simulation}"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 organization name or simulation name of this simulation
+   *
+   * Valid format:
+   * "organizations/{organization}/simulations/latest"
+   * "organizations/{organization}/simulations/{simulation}"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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_); + } + getUnknownFields().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 += getUnknownFields().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.v2.GetSimulationRequest)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.GetSimulationRequest other = + (com.google.cloud.securitycenter.v2.GetSimulationRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.GetSimulationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.GetSimulationRequest 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.v2.GetSimulationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.GetSimulationRequest 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.v2.GetSimulationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.GetSimulationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.GetSimulationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.GetSimulationRequest 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.v2.GetSimulationRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.GetSimulationRequest 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.v2.GetSimulationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.GetSimulationRequest 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.v2.GetSimulationRequest 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 getting simulation.
+   * Simulation name can include "latest" to retrieve the latest simulation
+   * For example, "organizations/123/simulations/latest"
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.GetSimulationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.GetSimulationRequest) + com.google.cloud.securitycenter.v2.GetSimulationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GetSimulationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GetSimulationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.GetSimulationRequest.class, + com.google.cloud.securitycenter.v2.GetSimulationRequest.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.GetSimulationRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GetSimulationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.GetSimulationRequest getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.GetSimulationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.GetSimulationRequest build() { + com.google.cloud.securitycenter.v2.GetSimulationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.GetSimulationRequest buildPartial() { + com.google.cloud.securitycenter.v2.GetSimulationRequest result = + new com.google.cloud.securitycenter.v2.GetSimulationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.GetSimulationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.v2.GetSimulationRequest) { + return mergeFrom((com.google.cloud.securitycenter.v2.GetSimulationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.GetSimulationRequest other) { + if (other == com.google.cloud.securitycenter.v2.GetSimulationRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The organization name or simulation name of this simulation
+     *
+     * Valid format:
+     * "organizations/{organization}/simulations/latest"
+     * "organizations/{organization}/simulations/{simulation}"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 organization name or simulation name of this simulation
+     *
+     * Valid format:
+     * "organizations/{organization}/simulations/latest"
+     * "organizations/{organization}/simulations/{simulation}"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 organization name or simulation name of this simulation
+     *
+     * Valid format:
+     * "organizations/{organization}/simulations/latest"
+     * "organizations/{organization}/simulations/{simulation}"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The organization name or simulation name of this simulation
+     *
+     * Valid format:
+     * "organizations/{organization}/simulations/latest"
+     * "organizations/{organization}/simulations/{simulation}"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The organization name or simulation name of this simulation
+     *
+     * Valid format:
+     * "organizations/{organization}/simulations/latest"
+     * "organizations/{organization}/simulations/{simulation}"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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; + bitField0_ |= 0x00000001; + 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.v2.GetSimulationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.GetSimulationRequest) + private static final com.google.cloud.securitycenter.v2.GetSimulationRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.GetSimulationRequest(); + } + + public static com.google.cloud.securitycenter.v2.GetSimulationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetSimulationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.GetSimulationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetSimulationRequestOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetSimulationRequestOrBuilder.java new file mode 100644 index 000000000000..ed7929fcb7a5 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetSimulationRequestOrBuilder.java @@ -0,0 +1,63 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface GetSimulationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.GetSimulationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The organization name or simulation name of this simulation
+   *
+   * Valid format:
+   * "organizations/{organization}/simulations/latest"
+   * "organizations/{organization}/simulations/{simulation}"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The organization name or simulation name of this simulation
+   *
+   * Valid format:
+   * "organizations/{organization}/simulations/latest"
+   * "organizations/{organization}/simulations/{simulation}"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetSourceRequest.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetSourceRequest.java new file mode 100644 index 000000000000..b0c4ba07c476 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetSourceRequest.java @@ -0,0 +1,646 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Request message for getting a source.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.GetSourceRequest} + */ +public final class GetSourceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.GetSourceRequest) + GetSourceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetSourceRequest.newBuilder() to construct. + private GetSourceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetSourceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetSourceRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GetSourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GetSourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.GetSourceRequest.class, + com.google.cloud.securitycenter.v2.GetSourceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Relative resource name of the source. Its format is
+   * "organizations/[organization_id]/source/[source_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. Relative resource name of the source. Its format is
+   * "organizations/[organization_id]/source/[source_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_); + } + getUnknownFields().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 += getUnknownFields().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.v2.GetSourceRequest)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.GetSourceRequest other = + (com.google.cloud.securitycenter.v2.GetSourceRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.GetSourceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.GetSourceRequest 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.v2.GetSourceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.GetSourceRequest 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.v2.GetSourceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.GetSourceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.GetSourceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.GetSourceRequest 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.v2.GetSourceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.GetSourceRequest 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.v2.GetSourceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.GetSourceRequest 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.v2.GetSourceRequest 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 getting a source.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.GetSourceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.GetSourceRequest) + com.google.cloud.securitycenter.v2.GetSourceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GetSourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GetSourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.GetSourceRequest.class, + com.google.cloud.securitycenter.v2.GetSourceRequest.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.GetSourceRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GetSourceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.GetSourceRequest getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.GetSourceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.GetSourceRequest build() { + com.google.cloud.securitycenter.v2.GetSourceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.GetSourceRequest buildPartial() { + com.google.cloud.securitycenter.v2.GetSourceRequest result = + new com.google.cloud.securitycenter.v2.GetSourceRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.GetSourceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.v2.GetSourceRequest) { + return mergeFrom((com.google.cloud.securitycenter.v2.GetSourceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.GetSourceRequest other) { + if (other == com.google.cloud.securitycenter.v2.GetSourceRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Relative resource name of the source. Its format is
+     * "organizations/[organization_id]/source/[source_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. Relative resource name of the source. Its format is
+     * "organizations/[organization_id]/source/[source_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. Relative resource name of the source. Its format is
+     * "organizations/[organization_id]/source/[source_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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Relative resource name of the source. Its format is
+     * "organizations/[organization_id]/source/[source_id]".
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Relative resource name of the source. Its format is
+     * "organizations/[organization_id]/source/[source_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; + bitField0_ |= 0x00000001; + 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.v2.GetSourceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.GetSourceRequest) + private static final com.google.cloud.securitycenter.v2.GetSourceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.GetSourceRequest(); + } + + public static com.google.cloud.securitycenter.v2.GetSourceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetSourceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.GetSourceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetSourceRequestOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetSourceRequestOrBuilder.java new file mode 100644 index 000000000000..5fccfb18deff --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetSourceRequestOrBuilder.java @@ -0,0 +1,57 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface GetSourceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.GetSourceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Relative resource name of the source. Its format is
+   * "organizations/[organization_id]/source/[source_id]".
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Relative resource name of the source. Its format is
+   * "organizations/[organization_id]/source/[source_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/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetValuedResourceRequest.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetValuedResourceRequest.java new file mode 100644 index 000000000000..f27e15d06dea --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetValuedResourceRequest.java @@ -0,0 +1,661 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Request message for getting a valued resource.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.GetValuedResourceRequest} + */ +public final class GetValuedResourceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.GetValuedResourceRequest) + GetValuedResourceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetValuedResourceRequest.newBuilder() to construct. + private GetValuedResourceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetValuedResourceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetValuedResourceRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GetValuedResourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GetValuedResourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.GetValuedResourceRequest.class, + com.google.cloud.securitycenter.v2.GetValuedResourceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of this valued resource
+   *
+   * Valid format:
+   * "organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 name of this valued resource
+   *
+   * Valid format:
+   * "organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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_); + } + getUnknownFields().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 += getUnknownFields().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.v2.GetValuedResourceRequest)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.GetValuedResourceRequest other = + (com.google.cloud.securitycenter.v2.GetValuedResourceRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.GetValuedResourceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.GetValuedResourceRequest 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.v2.GetValuedResourceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.GetValuedResourceRequest 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.v2.GetValuedResourceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.GetValuedResourceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.GetValuedResourceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.GetValuedResourceRequest 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.v2.GetValuedResourceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.GetValuedResourceRequest 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.v2.GetValuedResourceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.GetValuedResourceRequest 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.v2.GetValuedResourceRequest 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 getting a valued resource.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.GetValuedResourceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.GetValuedResourceRequest) + com.google.cloud.securitycenter.v2.GetValuedResourceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GetValuedResourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GetValuedResourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.GetValuedResourceRequest.class, + com.google.cloud.securitycenter.v2.GetValuedResourceRequest.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.GetValuedResourceRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GetValuedResourceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.GetValuedResourceRequest getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.GetValuedResourceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.GetValuedResourceRequest build() { + com.google.cloud.securitycenter.v2.GetValuedResourceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.GetValuedResourceRequest buildPartial() { + com.google.cloud.securitycenter.v2.GetValuedResourceRequest result = + new com.google.cloud.securitycenter.v2.GetValuedResourceRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.GetValuedResourceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.v2.GetValuedResourceRequest) { + return mergeFrom((com.google.cloud.securitycenter.v2.GetValuedResourceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.GetValuedResourceRequest other) { + if (other == com.google.cloud.securitycenter.v2.GetValuedResourceRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of this valued resource
+     *
+     * Valid format:
+     * "organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 name of this valued resource
+     *
+     * Valid format:
+     * "organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 name of this valued resource
+     *
+     * Valid format:
+     * "organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of this valued resource
+     *
+     * Valid format:
+     * "organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of this valued resource
+     *
+     * Valid format:
+     * "organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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; + bitField0_ |= 0x00000001; + 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.v2.GetValuedResourceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.GetValuedResourceRequest) + private static final com.google.cloud.securitycenter.v2.GetValuedResourceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.GetValuedResourceRequest(); + } + + public static com.google.cloud.securitycenter.v2.GetValuedResourceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetValuedResourceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.GetValuedResourceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetValuedResourceRequestOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetValuedResourceRequestOrBuilder.java new file mode 100644 index 000000000000..c004a8bfb7b5 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GetValuedResourceRequestOrBuilder.java @@ -0,0 +1,61 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface GetValuedResourceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.GetValuedResourceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of this valued resource
+   *
+   * Valid format:
+   * "organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of this valued resource
+   *
+   * Valid format:
+   * "organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GroupFindingsRequest.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GroupFindingsRequest.java new file mode 100644 index 000000000000..766743d04201 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GroupFindingsRequest.java @@ -0,0 +1,1829 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Request message for grouping by findings.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.GroupFindingsRequest} + */ +public final class GroupFindingsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.GroupFindingsRequest) + GroupFindingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GroupFindingsRequest.newBuilder() to construct. + private GroupFindingsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GroupFindingsRequest() { + parent_ = ""; + filter_ = ""; + groupBy_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GroupFindingsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GroupFindingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GroupFindingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.GroupFindingsRequest.class, + com.google.cloud.securitycenter.v2.GroupFindingsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Name of the source to groupBy. If no location is specified,
+   * finding is assumed to be in global.
+   *  The following list shows some examples:
+   *
+   * + `organizations/[organization_id]/sources/[source_id]`
+   * +
+   * `organizations/[organization_id]/sources/[source_id]/locations/[location_id]`
+   * + `folders/[folder_id]/sources/[source_id]`
+   * + `folders/[folder_id]/sources/[source_id]/locations/[location_id]`
+   * + `projects/[project_id]/sources/[source_id]`
+   * + `projects/[project_id]/sources/[source_id]/locations/[location_id]`
+   *
+   * To groupBy across all sources provide a source_id of `-`. The following
+   * list shows some examples:
+   *
+   * + `organizations/{organization_id}/sources/-`
+   * + `organizations/{organization_id}/sources/-/locations/[location_id]`
+   * + `folders/{folder_id}/sources/-`
+   * + `folders/{folder_id}/sources/-/locations/[location_id]`
+   * + `projects/{project_id}/sources/-`
+   * + `projects/{project_id}/sources/-/locations/[location_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. Name of the source to groupBy. If no location is specified,
+   * finding is assumed to be in global.
+   *  The following list shows some examples:
+   *
+   * + `organizations/[organization_id]/sources/[source_id]`
+   * +
+   * `organizations/[organization_id]/sources/[source_id]/locations/[location_id]`
+   * + `folders/[folder_id]/sources/[source_id]`
+   * + `folders/[folder_id]/sources/[source_id]/locations/[location_id]`
+   * + `projects/[project_id]/sources/[source_id]`
+   * + `projects/[project_id]/sources/[source_id]/locations/[location_id]`
+   *
+   * To groupBy across all sources provide a source_id of `-`. The following
+   * list shows some examples:
+   *
+   * + `organizations/{organization_id}/sources/-`
+   * + `organizations/{organization_id}/sources/-/locations/[location_id]`
+   * + `folders/{folder_id}/sources/-`
+   * + `folders/{folder_id}/sources/-/locations/[location_id]`
+   * + `projects/{project_id}/sources/-`
+   * + `projects/{project_id}/sources/-/locations/[location_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; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Expression that defines the filter to apply across findings.
+   * The expression is a list of one or more restrictions combined via logical
+   * operators `AND` and `OR`.
+   * Parentheses are supported, and `OR` has higher precedence than `AND`.
+   *
+   * Restrictions have the form `<field> <operator> <value>` and may have a `-`
+   * character in front of them to indicate negation. Examples include:
+   *
+   *  * name
+   *  * security_marks.marks.marka
+   *
+   * The supported operators are:
+   *
+   * * `=` for all value types.
+   * * `>`, `<`, `>=`, `<=` for integer values.
+   * * `:`, meaning substring matching, for strings.
+   *
+   * The supported value types are:
+   *
+   * * string literals in quotes.
+   * * integer literals without quotes.
+   * * boolean literals `true` and `false` without quotes.
+   *
+   * The following field and operator combinations are supported:
+   *
+   * * name: `=`
+   * * parent: `=`, `:`
+   * * resource_name: `=`, `:`
+   * * state: `=`, `:`
+   * * category: `=`, `:`
+   * * external_uri: `=`, `:`
+   * * event_time: `=`, `>`, `<`, `>=`, `<=`
+   *
+   *   Usage: This should be milliseconds since epoch or an RFC3339 string.
+   *   Examples:
+   *     `event_time = "2019-06-10T16:07:18-07:00"`
+   *     `event_time = 1560208038000`
+   *
+   * * severity: `=`, `:`
+   * * security_marks.marks: `=`, `:`
+   * * resource:
+   *   * resource.name: `=`, `:`
+   *   * resource.parent_name: `=`, `:`
+   *   * resource.parent_display_name: `=`, `:`
+   *   * resource.project_name: `=`, `:`
+   *   * resource.project_display_name: `=`, `:`
+   *   * resource.type: `=`, `:`
+   * 
+ * + * 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 defines the filter to apply across findings.
+   * The expression is a list of one or more restrictions combined via logical
+   * operators `AND` and `OR`.
+   * Parentheses are supported, and `OR` has higher precedence than `AND`.
+   *
+   * Restrictions have the form `<field> <operator> <value>` and may have a `-`
+   * character in front of them to indicate negation. Examples include:
+   *
+   *  * name
+   *  * security_marks.marks.marka
+   *
+   * The supported operators are:
+   *
+   * * `=` for all value types.
+   * * `>`, `<`, `>=`, `<=` for integer values.
+   * * `:`, meaning substring matching, for strings.
+   *
+   * The supported value types are:
+   *
+   * * string literals in quotes.
+   * * integer literals without quotes.
+   * * boolean literals `true` and `false` without quotes.
+   *
+   * The following field and operator combinations are supported:
+   *
+   * * name: `=`
+   * * parent: `=`, `:`
+   * * resource_name: `=`, `:`
+   * * state: `=`, `:`
+   * * category: `=`, `:`
+   * * external_uri: `=`, `:`
+   * * event_time: `=`, `>`, `<`, `>=`, `<=`
+   *
+   *   Usage: This should be milliseconds since epoch or an RFC3339 string.
+   *   Examples:
+   *     `event_time = "2019-06-10T16:07:18-07:00"`
+   *     `event_time = 1560208038000`
+   *
+   * * severity: `=`, `:`
+   * * security_marks.marks: `=`, `:`
+   * * resource:
+   *   * resource.name: `=`, `:`
+   *   * resource.parent_name: `=`, `:`
+   *   * resource.parent_display_name: `=`, `:`
+   *   * resource.project_name: `=`, `:`
+   *   * resource.project_display_name: `=`, `:`
+   *   * resource.type: `=`, `:`
+   * 
+ * + * 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 GROUP_BY_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object groupBy_ = ""; + /** + * + * + *
+   * Required. Expression that defines what assets fields to use for grouping.
+   * The string value should follow SQL syntax: comma separated list of fields.
+   * For example: "parent,resource_name".
+   *
+   * The following fields are supported:
+   *
+   * * resource_name
+   * * category
+   * * state
+   * * parent
+   * * severity
+   * 
+ * + * string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The groupBy. + */ + @java.lang.Override + public java.lang.String getGroupBy() { + java.lang.Object ref = groupBy_; + 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(); + groupBy_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Expression that defines what assets fields to use for grouping.
+   * The string value should follow SQL syntax: comma separated list of fields.
+   * For example: "parent,resource_name".
+   *
+   * The following fields are supported:
+   *
+   * * resource_name
+   * * category
+   * * state
+   * * parent
+   * * severity
+   * 
+ * + * string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for groupBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGroupByBytes() { + java.lang.Object ref = groupBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + groupBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * The value returned by the last `GroupFindingsResponse`; indicates
+   * that this is a continuation of a prior `GroupFindings` call, and
+   * that the system should return the next page of data.
+   * 
+ * + * string page_token = 7; + * + * @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; + } + } + /** + * + * + *
+   * The value returned by the last `GroupFindingsResponse`; indicates
+   * that this is a continuation of a prior `GroupFindings` call, and
+   * that the system should return the next page of data.
+   * 
+ * + * string page_token = 7; + * + * @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; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 8; + private int pageSize_ = 0; + /** + * + * + *
+   * The maximum number of results to return in a single response. Default is
+   * 10, minimum is 1, maximum is 1000.
+   * 
+ * + * int32 page_size = 8; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + 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(groupBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, groupBy_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, pageToken_); + } + if (pageSize_ != 0) { + output.writeInt32(8, pageSize_); + } + getUnknownFields().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(groupBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, groupBy_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, pageToken_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(8, pageSize_); + } + size += getUnknownFields().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.v2.GroupFindingsRequest)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.GroupFindingsRequest other = + (com.google.cloud.securitycenter.v2.GroupFindingsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getGroupBy().equals(other.getGroupBy())) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + GROUP_BY_FIELD_NUMBER; + hash = (53 * hash) + getGroupBy().hashCode(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.GroupFindingsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.GroupFindingsRequest 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.v2.GroupFindingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.GroupFindingsRequest 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.v2.GroupFindingsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.GroupFindingsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.GroupFindingsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.GroupFindingsRequest 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.v2.GroupFindingsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.GroupFindingsRequest 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.v2.GroupFindingsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.GroupFindingsRequest 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.v2.GroupFindingsRequest 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 grouping by findings.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.GroupFindingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.GroupFindingsRequest) + com.google.cloud.securitycenter.v2.GroupFindingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GroupFindingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GroupFindingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.GroupFindingsRequest.class, + com.google.cloud.securitycenter.v2.GroupFindingsRequest.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.GroupFindingsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + filter_ = ""; + groupBy_ = ""; + pageToken_ = ""; + pageSize_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GroupFindingsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.GroupFindingsRequest getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.GroupFindingsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.GroupFindingsRequest build() { + com.google.cloud.securitycenter.v2.GroupFindingsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.GroupFindingsRequest buildPartial() { + com.google.cloud.securitycenter.v2.GroupFindingsRequest result = + new com.google.cloud.securitycenter.v2.GroupFindingsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.GroupFindingsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.groupBy_ = groupBy_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.pageSize_ = pageSize_; + } + } + + @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.v2.GroupFindingsRequest) { + return mergeFrom((com.google.cloud.securitycenter.v2.GroupFindingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.GroupFindingsRequest other) { + if (other == com.google.cloud.securitycenter.v2.GroupFindingsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getGroupBy().isEmpty()) { + groupBy_ = other.groupBy_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + groupBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 58: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 58 + case 64: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 64 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Name of the source to groupBy. If no location is specified,
+     * finding is assumed to be in global.
+     *  The following list shows some examples:
+     *
+     * + `organizations/[organization_id]/sources/[source_id]`
+     * +
+     * `organizations/[organization_id]/sources/[source_id]/locations/[location_id]`
+     * + `folders/[folder_id]/sources/[source_id]`
+     * + `folders/[folder_id]/sources/[source_id]/locations/[location_id]`
+     * + `projects/[project_id]/sources/[source_id]`
+     * + `projects/[project_id]/sources/[source_id]/locations/[location_id]`
+     *
+     * To groupBy across all sources provide a source_id of `-`. The following
+     * list shows some examples:
+     *
+     * + `organizations/{organization_id}/sources/-`
+     * + `organizations/{organization_id}/sources/-/locations/[location_id]`
+     * + `folders/{folder_id}/sources/-`
+     * + `folders/{folder_id}/sources/-/locations/[location_id]`
+     * + `projects/{project_id}/sources/-`
+     * + `projects/{project_id}/sources/-/locations/[location_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. Name of the source to groupBy. If no location is specified,
+     * finding is assumed to be in global.
+     *  The following list shows some examples:
+     *
+     * + `organizations/[organization_id]/sources/[source_id]`
+     * +
+     * `organizations/[organization_id]/sources/[source_id]/locations/[location_id]`
+     * + `folders/[folder_id]/sources/[source_id]`
+     * + `folders/[folder_id]/sources/[source_id]/locations/[location_id]`
+     * + `projects/[project_id]/sources/[source_id]`
+     * + `projects/[project_id]/sources/[source_id]/locations/[location_id]`
+     *
+     * To groupBy across all sources provide a source_id of `-`. The following
+     * list shows some examples:
+     *
+     * + `organizations/{organization_id}/sources/-`
+     * + `organizations/{organization_id}/sources/-/locations/[location_id]`
+     * + `folders/{folder_id}/sources/-`
+     * + `folders/{folder_id}/sources/-/locations/[location_id]`
+     * + `projects/{project_id}/sources/-`
+     * + `projects/{project_id}/sources/-/locations/[location_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. Name of the source to groupBy. If no location is specified,
+     * finding is assumed to be in global.
+     *  The following list shows some examples:
+     *
+     * + `organizations/[organization_id]/sources/[source_id]`
+     * +
+     * `organizations/[organization_id]/sources/[source_id]/locations/[location_id]`
+     * + `folders/[folder_id]/sources/[source_id]`
+     * + `folders/[folder_id]/sources/[source_id]/locations/[location_id]`
+     * + `projects/[project_id]/sources/[source_id]`
+     * + `projects/[project_id]/sources/[source_id]/locations/[location_id]`
+     *
+     * To groupBy across all sources provide a source_id of `-`. The following
+     * list shows some examples:
+     *
+     * + `organizations/{organization_id}/sources/-`
+     * + `organizations/{organization_id}/sources/-/locations/[location_id]`
+     * + `folders/{folder_id}/sources/-`
+     * + `folders/{folder_id}/sources/-/locations/[location_id]`
+     * + `projects/{project_id}/sources/-`
+     * + `projects/{project_id}/sources/-/locations/[location_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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the source to groupBy. If no location is specified,
+     * finding is assumed to be in global.
+     *  The following list shows some examples:
+     *
+     * + `organizations/[organization_id]/sources/[source_id]`
+     * +
+     * `organizations/[organization_id]/sources/[source_id]/locations/[location_id]`
+     * + `folders/[folder_id]/sources/[source_id]`
+     * + `folders/[folder_id]/sources/[source_id]/locations/[location_id]`
+     * + `projects/[project_id]/sources/[source_id]`
+     * + `projects/[project_id]/sources/[source_id]/locations/[location_id]`
+     *
+     * To groupBy across all sources provide a source_id of `-`. The following
+     * list shows some examples:
+     *
+     * + `organizations/{organization_id}/sources/-`
+     * + `organizations/{organization_id}/sources/-/locations/[location_id]`
+     * + `folders/{folder_id}/sources/-`
+     * + `folders/{folder_id}/sources/-/locations/[location_id]`
+     * + `projects/{project_id}/sources/-`
+     * + `projects/{project_id}/sources/-/locations/[location_id]`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the source to groupBy. If no location is specified,
+     * finding is assumed to be in global.
+     *  The following list shows some examples:
+     *
+     * + `organizations/[organization_id]/sources/[source_id]`
+     * +
+     * `organizations/[organization_id]/sources/[source_id]/locations/[location_id]`
+     * + `folders/[folder_id]/sources/[source_id]`
+     * + `folders/[folder_id]/sources/[source_id]/locations/[location_id]`
+     * + `projects/[project_id]/sources/[source_id]`
+     * + `projects/[project_id]/sources/[source_id]/locations/[location_id]`
+     *
+     * To groupBy across all sources provide a source_id of `-`. The following
+     * list shows some examples:
+     *
+     * + `organizations/{organization_id}/sources/-`
+     * + `organizations/{organization_id}/sources/-/locations/[location_id]`
+     * + `folders/{folder_id}/sources/-`
+     * + `folders/{folder_id}/sources/-/locations/[location_id]`
+     * + `projects/{project_id}/sources/-`
+     * + `projects/{project_id}/sources/-/locations/[location_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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Expression that defines the filter to apply across findings.
+     * The expression is a list of one or more restrictions combined via logical
+     * operators `AND` and `OR`.
+     * Parentheses are supported, and `OR` has higher precedence than `AND`.
+     *
+     * Restrictions have the form `<field> <operator> <value>` and may have a `-`
+     * character in front of them to indicate negation. Examples include:
+     *
+     *  * name
+     *  * security_marks.marks.marka
+     *
+     * The supported operators are:
+     *
+     * * `=` for all value types.
+     * * `>`, `<`, `>=`, `<=` for integer values.
+     * * `:`, meaning substring matching, for strings.
+     *
+     * The supported value types are:
+     *
+     * * string literals in quotes.
+     * * integer literals without quotes.
+     * * boolean literals `true` and `false` without quotes.
+     *
+     * The following field and operator combinations are supported:
+     *
+     * * name: `=`
+     * * parent: `=`, `:`
+     * * resource_name: `=`, `:`
+     * * state: `=`, `:`
+     * * category: `=`, `:`
+     * * external_uri: `=`, `:`
+     * * event_time: `=`, `>`, `<`, `>=`, `<=`
+     *
+     *   Usage: This should be milliseconds since epoch or an RFC3339 string.
+     *   Examples:
+     *     `event_time = "2019-06-10T16:07:18-07:00"`
+     *     `event_time = 1560208038000`
+     *
+     * * severity: `=`, `:`
+     * * security_marks.marks: `=`, `:`
+     * * resource:
+     *   * resource.name: `=`, `:`
+     *   * resource.parent_name: `=`, `:`
+     *   * resource.parent_display_name: `=`, `:`
+     *   * resource.project_name: `=`, `:`
+     *   * resource.project_display_name: `=`, `:`
+     *   * resource.type: `=`, `:`
+     * 
+ * + * 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 defines the filter to apply across findings.
+     * The expression is a list of one or more restrictions combined via logical
+     * operators `AND` and `OR`.
+     * Parentheses are supported, and `OR` has higher precedence than `AND`.
+     *
+     * Restrictions have the form `<field> <operator> <value>` and may have a `-`
+     * character in front of them to indicate negation. Examples include:
+     *
+     *  * name
+     *  * security_marks.marks.marka
+     *
+     * The supported operators are:
+     *
+     * * `=` for all value types.
+     * * `>`, `<`, `>=`, `<=` for integer values.
+     * * `:`, meaning substring matching, for strings.
+     *
+     * The supported value types are:
+     *
+     * * string literals in quotes.
+     * * integer literals without quotes.
+     * * boolean literals `true` and `false` without quotes.
+     *
+     * The following field and operator combinations are supported:
+     *
+     * * name: `=`
+     * * parent: `=`, `:`
+     * * resource_name: `=`, `:`
+     * * state: `=`, `:`
+     * * category: `=`, `:`
+     * * external_uri: `=`, `:`
+     * * event_time: `=`, `>`, `<`, `>=`, `<=`
+     *
+     *   Usage: This should be milliseconds since epoch or an RFC3339 string.
+     *   Examples:
+     *     `event_time = "2019-06-10T16:07:18-07:00"`
+     *     `event_time = 1560208038000`
+     *
+     * * severity: `=`, `:`
+     * * security_marks.marks: `=`, `:`
+     * * resource:
+     *   * resource.name: `=`, `:`
+     *   * resource.parent_name: `=`, `:`
+     *   * resource.parent_display_name: `=`, `:`
+     *   * resource.project_name: `=`, `:`
+     *   * resource.project_display_name: `=`, `:`
+     *   * resource.type: `=`, `:`
+     * 
+ * + * 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 defines the filter to apply across findings.
+     * The expression is a list of one or more restrictions combined via logical
+     * operators `AND` and `OR`.
+     * Parentheses are supported, and `OR` has higher precedence than `AND`.
+     *
+     * Restrictions have the form `<field> <operator> <value>` and may have a `-`
+     * character in front of them to indicate negation. Examples include:
+     *
+     *  * name
+     *  * security_marks.marks.marka
+     *
+     * The supported operators are:
+     *
+     * * `=` for all value types.
+     * * `>`, `<`, `>=`, `<=` for integer values.
+     * * `:`, meaning substring matching, for strings.
+     *
+     * The supported value types are:
+     *
+     * * string literals in quotes.
+     * * integer literals without quotes.
+     * * boolean literals `true` and `false` without quotes.
+     *
+     * The following field and operator combinations are supported:
+     *
+     * * name: `=`
+     * * parent: `=`, `:`
+     * * resource_name: `=`, `:`
+     * * state: `=`, `:`
+     * * category: `=`, `:`
+     * * external_uri: `=`, `:`
+     * * event_time: `=`, `>`, `<`, `>=`, `<=`
+     *
+     *   Usage: This should be milliseconds since epoch or an RFC3339 string.
+     *   Examples:
+     *     `event_time = "2019-06-10T16:07:18-07:00"`
+     *     `event_time = 1560208038000`
+     *
+     * * severity: `=`, `:`
+     * * security_marks.marks: `=`, `:`
+     * * resource:
+     *   * resource.name: `=`, `:`
+     *   * resource.parent_name: `=`, `:`
+     *   * resource.parent_display_name: `=`, `:`
+     *   * resource.project_name: `=`, `:`
+     *   * resource.project_display_name: `=`, `:`
+     *   * resource.type: `=`, `:`
+     * 
+ * + * 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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Expression that defines the filter to apply across findings.
+     * The expression is a list of one or more restrictions combined via logical
+     * operators `AND` and `OR`.
+     * Parentheses are supported, and `OR` has higher precedence than `AND`.
+     *
+     * Restrictions have the form `<field> <operator> <value>` and may have a `-`
+     * character in front of them to indicate negation. Examples include:
+     *
+     *  * name
+     *  * security_marks.marks.marka
+     *
+     * The supported operators are:
+     *
+     * * `=` for all value types.
+     * * `>`, `<`, `>=`, `<=` for integer values.
+     * * `:`, meaning substring matching, for strings.
+     *
+     * The supported value types are:
+     *
+     * * string literals in quotes.
+     * * integer literals without quotes.
+     * * boolean literals `true` and `false` without quotes.
+     *
+     * The following field and operator combinations are supported:
+     *
+     * * name: `=`
+     * * parent: `=`, `:`
+     * * resource_name: `=`, `:`
+     * * state: `=`, `:`
+     * * category: `=`, `:`
+     * * external_uri: `=`, `:`
+     * * event_time: `=`, `>`, `<`, `>=`, `<=`
+     *
+     *   Usage: This should be milliseconds since epoch or an RFC3339 string.
+     *   Examples:
+     *     `event_time = "2019-06-10T16:07:18-07:00"`
+     *     `event_time = 1560208038000`
+     *
+     * * severity: `=`, `:`
+     * * security_marks.marks: `=`, `:`
+     * * resource:
+     *   * resource.name: `=`, `:`
+     *   * resource.parent_name: `=`, `:`
+     *   * resource.parent_display_name: `=`, `:`
+     *   * resource.project_name: `=`, `:`
+     *   * resource.project_display_name: `=`, `:`
+     *   * resource.type: `=`, `:`
+     * 
+ * + * string filter = 2; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Expression that defines the filter to apply across findings.
+     * The expression is a list of one or more restrictions combined via logical
+     * operators `AND` and `OR`.
+     * Parentheses are supported, and `OR` has higher precedence than `AND`.
+     *
+     * Restrictions have the form `<field> <operator> <value>` and may have a `-`
+     * character in front of them to indicate negation. Examples include:
+     *
+     *  * name
+     *  * security_marks.marks.marka
+     *
+     * The supported operators are:
+     *
+     * * `=` for all value types.
+     * * `>`, `<`, `>=`, `<=` for integer values.
+     * * `:`, meaning substring matching, for strings.
+     *
+     * The supported value types are:
+     *
+     * * string literals in quotes.
+     * * integer literals without quotes.
+     * * boolean literals `true` and `false` without quotes.
+     *
+     * The following field and operator combinations are supported:
+     *
+     * * name: `=`
+     * * parent: `=`, `:`
+     * * resource_name: `=`, `:`
+     * * state: `=`, `:`
+     * * category: `=`, `:`
+     * * external_uri: `=`, `:`
+     * * event_time: `=`, `>`, `<`, `>=`, `<=`
+     *
+     *   Usage: This should be milliseconds since epoch or an RFC3339 string.
+     *   Examples:
+     *     `event_time = "2019-06-10T16:07:18-07:00"`
+     *     `event_time = 1560208038000`
+     *
+     * * severity: `=`, `:`
+     * * security_marks.marks: `=`, `:`
+     * * resource:
+     *   * resource.name: `=`, `:`
+     *   * resource.parent_name: `=`, `:`
+     *   * resource.parent_display_name: `=`, `:`
+     *   * resource.project_name: `=`, `:`
+     *   * resource.project_display_name: `=`, `:`
+     *   * resource.type: `=`, `:`
+     * 
+ * + * 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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object groupBy_ = ""; + /** + * + * + *
+     * Required. Expression that defines what assets fields to use for grouping.
+     * The string value should follow SQL syntax: comma separated list of fields.
+     * For example: "parent,resource_name".
+     *
+     * The following fields are supported:
+     *
+     * * resource_name
+     * * category
+     * * state
+     * * parent
+     * * severity
+     * 
+ * + * string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The groupBy. + */ + public java.lang.String getGroupBy() { + java.lang.Object ref = groupBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Expression that defines what assets fields to use for grouping.
+     * The string value should follow SQL syntax: comma separated list of fields.
+     * For example: "parent,resource_name".
+     *
+     * The following fields are supported:
+     *
+     * * resource_name
+     * * category
+     * * state
+     * * parent
+     * * severity
+     * 
+ * + * string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for groupBy. + */ + public com.google.protobuf.ByteString getGroupByBytes() { + java.lang.Object ref = groupBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + groupBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Expression that defines what assets fields to use for grouping.
+     * The string value should follow SQL syntax: comma separated list of fields.
+     * For example: "parent,resource_name".
+     *
+     * The following fields are supported:
+     *
+     * * resource_name
+     * * category
+     * * state
+     * * parent
+     * * severity
+     * 
+ * + * string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The groupBy to set. + * @return This builder for chaining. + */ + public Builder setGroupBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + groupBy_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Expression that defines what assets fields to use for grouping.
+     * The string value should follow SQL syntax: comma separated list of fields.
+     * For example: "parent,resource_name".
+     *
+     * The following fields are supported:
+     *
+     * * resource_name
+     * * category
+     * * state
+     * * parent
+     * * severity
+     * 
+ * + * string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearGroupBy() { + groupBy_ = getDefaultInstance().getGroupBy(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Expression that defines what assets fields to use for grouping.
+     * The string value should follow SQL syntax: comma separated list of fields.
+     * For example: "parent,resource_name".
+     *
+     * The following fields are supported:
+     *
+     * * resource_name
+     * * category
+     * * state
+     * * parent
+     * * severity
+     * 
+ * + * string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for groupBy to set. + * @return This builder for chaining. + */ + public Builder setGroupByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + groupBy_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The value returned by the last `GroupFindingsResponse`; indicates
+     * that this is a continuation of a prior `GroupFindings` call, and
+     * that the system should return the next page of data.
+     * 
+ * + * string page_token = 7; + * + * @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; + } + } + /** + * + * + *
+     * The value returned by the last `GroupFindingsResponse`; indicates
+     * that this is a continuation of a prior `GroupFindings` call, and
+     * that the system should return the next page of data.
+     * 
+ * + * string page_token = 7; + * + * @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; + } + } + /** + * + * + *
+     * The value returned by the last `GroupFindingsResponse`; indicates
+     * that this is a continuation of a prior `GroupFindings` call, and
+     * that the system should return the next page of data.
+     * 
+ * + * string page_token = 7; + * + * @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; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The value returned by the last `GroupFindingsResponse`; indicates
+     * that this is a continuation of a prior `GroupFindings` call, and
+     * that the system should return the next page of data.
+     * 
+ * + * string page_token = 7; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The value returned by the last `GroupFindingsResponse`; indicates
+     * that this is a continuation of a prior `GroupFindings` call, and
+     * that the system should return the next page of data.
+     * 
+ * + * string page_token = 7; + * + * @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; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of results to return in a single response. Default is
+     * 10, minimum is 1, maximum is 1000.
+     * 
+ * + * int32 page_size = 8; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of results to return in a single response. Default is
+     * 10, minimum is 1, maximum is 1000.
+     * 
+ * + * int32 page_size = 8; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of results to return in a single response. Default is
+     * 10, minimum is 1, maximum is 1000.
+     * 
+ * + * int32 page_size = 8; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000010); + pageSize_ = 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.v2.GroupFindingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.GroupFindingsRequest) + private static final com.google.cloud.securitycenter.v2.GroupFindingsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.GroupFindingsRequest(); + } + + public static com.google.cloud.securitycenter.v2.GroupFindingsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GroupFindingsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.GroupFindingsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GroupFindingsRequestOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GroupFindingsRequestOrBuilder.java new file mode 100644 index 000000000000..d915f64c4742 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GroupFindingsRequestOrBuilder.java @@ -0,0 +1,300 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface GroupFindingsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.GroupFindingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the source to groupBy. If no location is specified,
+   * finding is assumed to be in global.
+   *  The following list shows some examples:
+   *
+   * + `organizations/[organization_id]/sources/[source_id]`
+   * +
+   * `organizations/[organization_id]/sources/[source_id]/locations/[location_id]`
+   * + `folders/[folder_id]/sources/[source_id]`
+   * + `folders/[folder_id]/sources/[source_id]/locations/[location_id]`
+   * + `projects/[project_id]/sources/[source_id]`
+   * + `projects/[project_id]/sources/[source_id]/locations/[location_id]`
+   *
+   * To groupBy across all sources provide a source_id of `-`. The following
+   * list shows some examples:
+   *
+   * + `organizations/{organization_id}/sources/-`
+   * + `organizations/{organization_id}/sources/-/locations/[location_id]`
+   * + `folders/{folder_id}/sources/-`
+   * + `folders/{folder_id}/sources/-/locations/[location_id]`
+   * + `projects/{project_id}/sources/-`
+   * + `projects/{project_id}/sources/-/locations/[location_id]`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Name of the source to groupBy. If no location is specified,
+   * finding is assumed to be in global.
+   *  The following list shows some examples:
+   *
+   * + `organizations/[organization_id]/sources/[source_id]`
+   * +
+   * `organizations/[organization_id]/sources/[source_id]/locations/[location_id]`
+   * + `folders/[folder_id]/sources/[source_id]`
+   * + `folders/[folder_id]/sources/[source_id]/locations/[location_id]`
+   * + `projects/[project_id]/sources/[source_id]`
+   * + `projects/[project_id]/sources/[source_id]/locations/[location_id]`
+   *
+   * To groupBy across all sources provide a source_id of `-`. The following
+   * list shows some examples:
+   *
+   * + `organizations/{organization_id}/sources/-`
+   * + `organizations/{organization_id}/sources/-/locations/[location_id]`
+   * + `folders/{folder_id}/sources/-`
+   * + `folders/{folder_id}/sources/-/locations/[location_id]`
+   * + `projects/{project_id}/sources/-`
+   * + `projects/{project_id}/sources/-/locations/[location_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 defines the filter to apply across findings.
+   * The expression is a list of one or more restrictions combined via logical
+   * operators `AND` and `OR`.
+   * Parentheses are supported, and `OR` has higher precedence than `AND`.
+   *
+   * Restrictions have the form `<field> <operator> <value>` and may have a `-`
+   * character in front of them to indicate negation. Examples include:
+   *
+   *  * name
+   *  * security_marks.marks.marka
+   *
+   * The supported operators are:
+   *
+   * * `=` for all value types.
+   * * `>`, `<`, `>=`, `<=` for integer values.
+   * * `:`, meaning substring matching, for strings.
+   *
+   * The supported value types are:
+   *
+   * * string literals in quotes.
+   * * integer literals without quotes.
+   * * boolean literals `true` and `false` without quotes.
+   *
+   * The following field and operator combinations are supported:
+   *
+   * * name: `=`
+   * * parent: `=`, `:`
+   * * resource_name: `=`, `:`
+   * * state: `=`, `:`
+   * * category: `=`, `:`
+   * * external_uri: `=`, `:`
+   * * event_time: `=`, `>`, `<`, `>=`, `<=`
+   *
+   *   Usage: This should be milliseconds since epoch or an RFC3339 string.
+   *   Examples:
+   *     `event_time = "2019-06-10T16:07:18-07:00"`
+   *     `event_time = 1560208038000`
+   *
+   * * severity: `=`, `:`
+   * * security_marks.marks: `=`, `:`
+   * * resource:
+   *   * resource.name: `=`, `:`
+   *   * resource.parent_name: `=`, `:`
+   *   * resource.parent_display_name: `=`, `:`
+   *   * resource.project_name: `=`, `:`
+   *   * resource.project_display_name: `=`, `:`
+   *   * resource.type: `=`, `:`
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Expression that defines the filter to apply across findings.
+   * The expression is a list of one or more restrictions combined via logical
+   * operators `AND` and `OR`.
+   * Parentheses are supported, and `OR` has higher precedence than `AND`.
+   *
+   * Restrictions have the form `<field> <operator> <value>` and may have a `-`
+   * character in front of them to indicate negation. Examples include:
+   *
+   *  * name
+   *  * security_marks.marks.marka
+   *
+   * The supported operators are:
+   *
+   * * `=` for all value types.
+   * * `>`, `<`, `>=`, `<=` for integer values.
+   * * `:`, meaning substring matching, for strings.
+   *
+   * The supported value types are:
+   *
+   * * string literals in quotes.
+   * * integer literals without quotes.
+   * * boolean literals `true` and `false` without quotes.
+   *
+   * The following field and operator combinations are supported:
+   *
+   * * name: `=`
+   * * parent: `=`, `:`
+   * * resource_name: `=`, `:`
+   * * state: `=`, `:`
+   * * category: `=`, `:`
+   * * external_uri: `=`, `:`
+   * * event_time: `=`, `>`, `<`, `>=`, `<=`
+   *
+   *   Usage: This should be milliseconds since epoch or an RFC3339 string.
+   *   Examples:
+   *     `event_time = "2019-06-10T16:07:18-07:00"`
+   *     `event_time = 1560208038000`
+   *
+   * * severity: `=`, `:`
+   * * security_marks.marks: `=`, `:`
+   * * resource:
+   *   * resource.name: `=`, `:`
+   *   * resource.parent_name: `=`, `:`
+   *   * resource.parent_display_name: `=`, `:`
+   *   * resource.project_name: `=`, `:`
+   *   * resource.project_display_name: `=`, `:`
+   *   * resource.type: `=`, `:`
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Required. Expression that defines what assets fields to use for grouping.
+   * The string value should follow SQL syntax: comma separated list of fields.
+   * For example: "parent,resource_name".
+   *
+   * The following fields are supported:
+   *
+   * * resource_name
+   * * category
+   * * state
+   * * parent
+   * * severity
+   * 
+ * + * string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The groupBy. + */ + java.lang.String getGroupBy(); + /** + * + * + *
+   * Required. Expression that defines what assets fields to use for grouping.
+   * The string value should follow SQL syntax: comma separated list of fields.
+   * For example: "parent,resource_name".
+   *
+   * The following fields are supported:
+   *
+   * * resource_name
+   * * category
+   * * state
+   * * parent
+   * * severity
+   * 
+ * + * string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for groupBy. + */ + com.google.protobuf.ByteString getGroupByBytes(); + + /** + * + * + *
+   * The value returned by the last `GroupFindingsResponse`; indicates
+   * that this is a continuation of a prior `GroupFindings` call, and
+   * that the system should return the next page of data.
+   * 
+ * + * string page_token = 7; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The value returned by the last `GroupFindingsResponse`; indicates
+   * that this is a continuation of a prior `GroupFindings` call, and
+   * that the system should return the next page of data.
+   * 
+ * + * string page_token = 7; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * The maximum number of results to return in a single response. Default is
+   * 10, minimum is 1, maximum is 1000.
+   * 
+ * + * int32 page_size = 8; + * + * @return The pageSize. + */ + int getPageSize(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GroupFindingsResponse.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GroupFindingsResponse.java new file mode 100644 index 000000000000..64cec4777468 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GroupFindingsResponse.java @@ -0,0 +1,1277 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Response message for group by findings.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.GroupFindingsResponse} + */ +public final class GroupFindingsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.GroupFindingsResponse) + GroupFindingsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use GroupFindingsResponse.newBuilder() to construct. + private GroupFindingsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GroupFindingsResponse() { + groupByResults_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GroupFindingsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GroupFindingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GroupFindingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.GroupFindingsResponse.class, + com.google.cloud.securitycenter.v2.GroupFindingsResponse.Builder.class); + } + + public static final int GROUP_BY_RESULTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List groupByResults_; + /** + * + * + *
+   * Group results. There exists an element for each existing unique
+   * combination of property/values. The element contains a count for the number
+   * of times those specific property/values appear.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.GroupResult group_by_results = 1; + */ + @java.lang.Override + public java.util.List getGroupByResultsList() { + return groupByResults_; + } + /** + * + * + *
+   * Group results. There exists an element for each existing unique
+   * combination of property/values. The element contains a count for the number
+   * of times those specific property/values appear.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.GroupResult group_by_results = 1; + */ + @java.lang.Override + public java.util.List + getGroupByResultsOrBuilderList() { + return groupByResults_; + } + /** + * + * + *
+   * Group results. There exists an element for each existing unique
+   * combination of property/values. The element contains a count for the number
+   * of times those specific property/values appear.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.GroupResult group_by_results = 1; + */ + @java.lang.Override + public int getGroupByResultsCount() { + return groupByResults_.size(); + } + /** + * + * + *
+   * Group results. There exists an element for each existing unique
+   * combination of property/values. The element contains a count for the number
+   * of times those specific property/values appear.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.GroupResult group_by_results = 1; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.GroupResult getGroupByResults(int index) { + return groupByResults_.get(index); + } + /** + * + * + *
+   * Group results. There exists an element for each existing unique
+   * combination of property/values. The element contains a count for the number
+   * of times those specific property/values appear.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.GroupResult group_by_results = 1; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.GroupResultOrBuilder getGroupByResultsOrBuilder( + int index) { + return groupByResults_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results.
+   * 
+ * + * string next_page_token = 3; + * + * @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; + } + } + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results.
+   * 
+ * + * string next_page_token = 3; + * + * @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; + } + } + + public static final int TOTAL_SIZE_FIELD_NUMBER = 4; + private int totalSize_ = 0; + /** + * + * + *
+   * The total number of results matching the query.
+   * 
+ * + * int32 total_size = 4; + * + * @return The totalSize. + */ + @java.lang.Override + public int getTotalSize() { + return totalSize_; + } + + 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 < groupByResults_.size(); i++) { + output.writeMessage(1, groupByResults_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, nextPageToken_); + } + if (totalSize_ != 0) { + output.writeInt32(4, totalSize_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < groupByResults_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, groupByResults_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nextPageToken_); + } + if (totalSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, totalSize_); + } + size += getUnknownFields().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.v2.GroupFindingsResponse)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.GroupFindingsResponse other = + (com.google.cloud.securitycenter.v2.GroupFindingsResponse) obj; + + if (!getGroupByResultsList().equals(other.getGroupByResultsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (getTotalSize() != other.getTotalSize()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getGroupByResultsCount() > 0) { + hash = (37 * hash) + GROUP_BY_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getGroupByResultsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (37 * hash) + TOTAL_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getTotalSize(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.GroupFindingsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.GroupFindingsResponse 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.v2.GroupFindingsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.GroupFindingsResponse 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.v2.GroupFindingsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.GroupFindingsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.GroupFindingsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.GroupFindingsResponse 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.v2.GroupFindingsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.GroupFindingsResponse 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.v2.GroupFindingsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.GroupFindingsResponse 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.v2.GroupFindingsResponse 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 group by findings.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.GroupFindingsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.GroupFindingsResponse) + com.google.cloud.securitycenter.v2.GroupFindingsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GroupFindingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GroupFindingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.GroupFindingsResponse.class, + com.google.cloud.securitycenter.v2.GroupFindingsResponse.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.GroupFindingsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (groupByResultsBuilder_ == null) { + groupByResults_ = java.util.Collections.emptyList(); + } else { + groupByResults_ = null; + groupByResultsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + totalSize_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GroupFindingsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.GroupFindingsResponse getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.GroupFindingsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.GroupFindingsResponse build() { + com.google.cloud.securitycenter.v2.GroupFindingsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.GroupFindingsResponse buildPartial() { + com.google.cloud.securitycenter.v2.GroupFindingsResponse result = + new com.google.cloud.securitycenter.v2.GroupFindingsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.securitycenter.v2.GroupFindingsResponse result) { + if (groupByResultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + groupByResults_ = java.util.Collections.unmodifiableList(groupByResults_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.groupByResults_ = groupByResults_; + } else { + result.groupByResults_ = groupByResultsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.GroupFindingsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.totalSize_ = totalSize_; + } + } + + @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.v2.GroupFindingsResponse) { + return mergeFrom((com.google.cloud.securitycenter.v2.GroupFindingsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.GroupFindingsResponse other) { + if (other == com.google.cloud.securitycenter.v2.GroupFindingsResponse.getDefaultInstance()) + return this; + if (groupByResultsBuilder_ == null) { + if (!other.groupByResults_.isEmpty()) { + if (groupByResults_.isEmpty()) { + groupByResults_ = other.groupByResults_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureGroupByResultsIsMutable(); + groupByResults_.addAll(other.groupByResults_); + } + onChanged(); + } + } else { + if (!other.groupByResults_.isEmpty()) { + if (groupByResultsBuilder_.isEmpty()) { + groupByResultsBuilder_.dispose(); + groupByResultsBuilder_ = null; + groupByResults_ = other.groupByResults_; + bitField0_ = (bitField0_ & ~0x00000001); + groupByResultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getGroupByResultsFieldBuilder() + : null; + } else { + groupByResultsBuilder_.addAllMessages(other.groupByResults_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getTotalSize() != 0) { + setTotalSize(other.getTotalSize()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.securitycenter.v2.GroupResult m = + input.readMessage( + com.google.cloud.securitycenter.v2.GroupResult.parser(), extensionRegistry); + if (groupByResultsBuilder_ == null) { + ensureGroupByResultsIsMutable(); + groupByResults_.add(m); + } else { + groupByResultsBuilder_.addMessage(m); + } + break; + } // case 10 + case 26: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 32: + { + totalSize_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List groupByResults_ = + java.util.Collections.emptyList(); + + private void ensureGroupByResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + groupByResults_ = + new java.util.ArrayList( + groupByResults_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.GroupResult, + com.google.cloud.securitycenter.v2.GroupResult.Builder, + com.google.cloud.securitycenter.v2.GroupResultOrBuilder> + groupByResultsBuilder_; + + /** + * + * + *
+     * Group results. There exists an element for each existing unique
+     * combination of property/values. The element contains a count for the number
+     * of times those specific property/values appear.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.GroupResult group_by_results = 1; + */ + public java.util.List getGroupByResultsList() { + if (groupByResultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(groupByResults_); + } else { + return groupByResultsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Group results. There exists an element for each existing unique
+     * combination of property/values. The element contains a count for the number
+     * of times those specific property/values appear.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.GroupResult group_by_results = 1; + */ + public int getGroupByResultsCount() { + if (groupByResultsBuilder_ == null) { + return groupByResults_.size(); + } else { + return groupByResultsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Group results. There exists an element for each existing unique
+     * combination of property/values. The element contains a count for the number
+     * of times those specific property/values appear.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.GroupResult group_by_results = 1; + */ + public com.google.cloud.securitycenter.v2.GroupResult getGroupByResults(int index) { + if (groupByResultsBuilder_ == null) { + return groupByResults_.get(index); + } else { + return groupByResultsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Group results. There exists an element for each existing unique
+     * combination of property/values. The element contains a count for the number
+     * of times those specific property/values appear.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.GroupResult group_by_results = 1; + */ + public Builder setGroupByResults( + int index, com.google.cloud.securitycenter.v2.GroupResult value) { + if (groupByResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupByResultsIsMutable(); + groupByResults_.set(index, value); + onChanged(); + } else { + groupByResultsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Group results. There exists an element for each existing unique
+     * combination of property/values. The element contains a count for the number
+     * of times those specific property/values appear.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.GroupResult group_by_results = 1; + */ + public Builder setGroupByResults( + int index, com.google.cloud.securitycenter.v2.GroupResult.Builder builderForValue) { + if (groupByResultsBuilder_ == null) { + ensureGroupByResultsIsMutable(); + groupByResults_.set(index, builderForValue.build()); + onChanged(); + } else { + groupByResultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Group results. There exists an element for each existing unique
+     * combination of property/values. The element contains a count for the number
+     * of times those specific property/values appear.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.GroupResult group_by_results = 1; + */ + public Builder addGroupByResults(com.google.cloud.securitycenter.v2.GroupResult value) { + if (groupByResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupByResultsIsMutable(); + groupByResults_.add(value); + onChanged(); + } else { + groupByResultsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Group results. There exists an element for each existing unique
+     * combination of property/values. The element contains a count for the number
+     * of times those specific property/values appear.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.GroupResult group_by_results = 1; + */ + public Builder addGroupByResults( + int index, com.google.cloud.securitycenter.v2.GroupResult value) { + if (groupByResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupByResultsIsMutable(); + groupByResults_.add(index, value); + onChanged(); + } else { + groupByResultsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Group results. There exists an element for each existing unique
+     * combination of property/values. The element contains a count for the number
+     * of times those specific property/values appear.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.GroupResult group_by_results = 1; + */ + public Builder addGroupByResults( + com.google.cloud.securitycenter.v2.GroupResult.Builder builderForValue) { + if (groupByResultsBuilder_ == null) { + ensureGroupByResultsIsMutable(); + groupByResults_.add(builderForValue.build()); + onChanged(); + } else { + groupByResultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Group results. There exists an element for each existing unique
+     * combination of property/values. The element contains a count for the number
+     * of times those specific property/values appear.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.GroupResult group_by_results = 1; + */ + public Builder addGroupByResults( + int index, com.google.cloud.securitycenter.v2.GroupResult.Builder builderForValue) { + if (groupByResultsBuilder_ == null) { + ensureGroupByResultsIsMutable(); + groupByResults_.add(index, builderForValue.build()); + onChanged(); + } else { + groupByResultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Group results. There exists an element for each existing unique
+     * combination of property/values. The element contains a count for the number
+     * of times those specific property/values appear.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.GroupResult group_by_results = 1; + */ + public Builder addAllGroupByResults( + java.lang.Iterable values) { + if (groupByResultsBuilder_ == null) { + ensureGroupByResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, groupByResults_); + onChanged(); + } else { + groupByResultsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Group results. There exists an element for each existing unique
+     * combination of property/values. The element contains a count for the number
+     * of times those specific property/values appear.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.GroupResult group_by_results = 1; + */ + public Builder clearGroupByResults() { + if (groupByResultsBuilder_ == null) { + groupByResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + groupByResultsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Group results. There exists an element for each existing unique
+     * combination of property/values. The element contains a count for the number
+     * of times those specific property/values appear.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.GroupResult group_by_results = 1; + */ + public Builder removeGroupByResults(int index) { + if (groupByResultsBuilder_ == null) { + ensureGroupByResultsIsMutable(); + groupByResults_.remove(index); + onChanged(); + } else { + groupByResultsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Group results. There exists an element for each existing unique
+     * combination of property/values. The element contains a count for the number
+     * of times those specific property/values appear.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.GroupResult group_by_results = 1; + */ + public com.google.cloud.securitycenter.v2.GroupResult.Builder getGroupByResultsBuilder( + int index) { + return getGroupByResultsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Group results. There exists an element for each existing unique
+     * combination of property/values. The element contains a count for the number
+     * of times those specific property/values appear.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.GroupResult group_by_results = 1; + */ + public com.google.cloud.securitycenter.v2.GroupResultOrBuilder getGroupByResultsOrBuilder( + int index) { + if (groupByResultsBuilder_ == null) { + return groupByResults_.get(index); + } else { + return groupByResultsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Group results. There exists an element for each existing unique
+     * combination of property/values. The element contains a count for the number
+     * of times those specific property/values appear.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.GroupResult group_by_results = 1; + */ + public java.util.List + getGroupByResultsOrBuilderList() { + if (groupByResultsBuilder_ != null) { + return groupByResultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(groupByResults_); + } + } + /** + * + * + *
+     * Group results. There exists an element for each existing unique
+     * combination of property/values. The element contains a count for the number
+     * of times those specific property/values appear.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.GroupResult group_by_results = 1; + */ + public com.google.cloud.securitycenter.v2.GroupResult.Builder addGroupByResultsBuilder() { + return getGroupByResultsFieldBuilder() + .addBuilder(com.google.cloud.securitycenter.v2.GroupResult.getDefaultInstance()); + } + /** + * + * + *
+     * Group results. There exists an element for each existing unique
+     * combination of property/values. The element contains a count for the number
+     * of times those specific property/values appear.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.GroupResult group_by_results = 1; + */ + public com.google.cloud.securitycenter.v2.GroupResult.Builder addGroupByResultsBuilder( + int index) { + return getGroupByResultsFieldBuilder() + .addBuilder(index, com.google.cloud.securitycenter.v2.GroupResult.getDefaultInstance()); + } + /** + * + * + *
+     * Group results. There exists an element for each existing unique
+     * combination of property/values. The element contains a count for the number
+     * of times those specific property/values appear.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.GroupResult group_by_results = 1; + */ + public java.util.List + getGroupByResultsBuilderList() { + return getGroupByResultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.GroupResult, + com.google.cloud.securitycenter.v2.GroupResult.Builder, + com.google.cloud.securitycenter.v2.GroupResultOrBuilder> + getGroupByResultsFieldBuilder() { + if (groupByResultsBuilder_ == null) { + groupByResultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.GroupResult, + com.google.cloud.securitycenter.v2.GroupResult.Builder, + com.google.cloud.securitycenter.v2.GroupResultOrBuilder>( + groupByResults_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + groupByResults_ = null; + } + return groupByResultsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results.
+     * 
+ * + * string next_page_token = 3; + * + * @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; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results.
+     * 
+ * + * string next_page_token = 3; + * + * @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; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results.
+     * 
+ * + * string next_page_token = 3; + * + * @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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results.
+     * 
+ * + * string next_page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results.
+     * 
+ * + * string next_page_token = 3; + * + * @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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int totalSize_; + /** + * + * + *
+     * The total number of results matching the query.
+     * 
+ * + * int32 total_size = 4; + * + * @return The totalSize. + */ + @java.lang.Override + public int getTotalSize() { + return totalSize_; + } + /** + * + * + *
+     * The total number of results matching the query.
+     * 
+ * + * int32 total_size = 4; + * + * @param value The totalSize to set. + * @return This builder for chaining. + */ + public Builder setTotalSize(int value) { + + totalSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The total number of results matching the query.
+     * 
+ * + * int32 total_size = 4; + * + * @return This builder for chaining. + */ + public Builder clearTotalSize() { + bitField0_ = (bitField0_ & ~0x00000004); + totalSize_ = 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.v2.GroupFindingsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.GroupFindingsResponse) + private static final com.google.cloud.securitycenter.v2.GroupFindingsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.GroupFindingsResponse(); + } + + public static com.google.cloud.securitycenter.v2.GroupFindingsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GroupFindingsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.GroupFindingsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GroupFindingsResponseOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GroupFindingsResponseOrBuilder.java new file mode 100644 index 000000000000..98a838442a96 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GroupFindingsResponseOrBuilder.java @@ -0,0 +1,128 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface GroupFindingsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.GroupFindingsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Group results. There exists an element for each existing unique
+   * combination of property/values. The element contains a count for the number
+   * of times those specific property/values appear.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.GroupResult group_by_results = 1; + */ + java.util.List getGroupByResultsList(); + /** + * + * + *
+   * Group results. There exists an element for each existing unique
+   * combination of property/values. The element contains a count for the number
+   * of times those specific property/values appear.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.GroupResult group_by_results = 1; + */ + com.google.cloud.securitycenter.v2.GroupResult getGroupByResults(int index); + /** + * + * + *
+   * Group results. There exists an element for each existing unique
+   * combination of property/values. The element contains a count for the number
+   * of times those specific property/values appear.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.GroupResult group_by_results = 1; + */ + int getGroupByResultsCount(); + /** + * + * + *
+   * Group results. There exists an element for each existing unique
+   * combination of property/values. The element contains a count for the number
+   * of times those specific property/values appear.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.GroupResult group_by_results = 1; + */ + java.util.List + getGroupByResultsOrBuilderList(); + /** + * + * + *
+   * Group results. There exists an element for each existing unique
+   * combination of property/values. The element contains a count for the number
+   * of times those specific property/values appear.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.GroupResult group_by_results = 1; + */ + com.google.cloud.securitycenter.v2.GroupResultOrBuilder getGroupByResultsOrBuilder(int index); + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results.
+   * 
+ * + * string next_page_token = 3; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results.
+   * 
+ * + * string next_page_token = 3; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * The total number of results matching the query.
+   * 
+ * + * int32 total_size = 4; + * + * @return The totalSize. + */ + int getTotalSize(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GroupResult.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GroupResult.java new file mode 100644 index 000000000000..b8ddd8a2f5ec --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GroupResult.java @@ -0,0 +1,937 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Result containing the properties and count of a groupBy request.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.GroupResult} + */ +public final class GroupResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.GroupResult) + GroupResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use GroupResult.newBuilder() to construct. + private GroupResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GroupResult() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GroupResult(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GroupResult_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetProperties(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GroupResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.GroupResult.class, + com.google.cloud.securitycenter.v2.GroupResult.Builder.class); + } + + public static final int PROPERTIES_FIELD_NUMBER = 1; + + private static final class PropertiesDefaultEntryHolder { + static final com.google.protobuf.MapEntry + defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GroupResult_PropertiesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.protobuf.Value.getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField properties_; + + private com.google.protobuf.MapField + internalGetProperties() { + if (properties_ == null) { + return com.google.protobuf.MapField.emptyMapField(PropertiesDefaultEntryHolder.defaultEntry); + } + return properties_; + } + + public int getPropertiesCount() { + return internalGetProperties().getMap().size(); + } + /** + * + * + *
+   * Properties matching the groupBy fields in the request.
+   * 
+ * + * map<string, .google.protobuf.Value> properties = 1; + */ + @java.lang.Override + public boolean containsProperties(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetProperties().getMap().containsKey(key); + } + /** Use {@link #getPropertiesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getProperties() { + return getPropertiesMap(); + } + /** + * + * + *
+   * Properties matching the groupBy fields in the request.
+   * 
+ * + * map<string, .google.protobuf.Value> properties = 1; + */ + @java.lang.Override + public java.util.Map getPropertiesMap() { + return internalGetProperties().getMap(); + } + /** + * + * + *
+   * Properties matching the groupBy fields in the request.
+   * 
+ * + * map<string, .google.protobuf.Value> properties = 1; + */ + @java.lang.Override + public /* nullable */ com.google.protobuf.Value getPropertiesOrDefault( + java.lang.String key, + /* nullable */ + com.google.protobuf.Value defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetProperties().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Properties matching the groupBy fields in the request.
+   * 
+ * + * map<string, .google.protobuf.Value> properties = 1; + */ + @java.lang.Override + public com.google.protobuf.Value getPropertiesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetProperties().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int COUNT_FIELD_NUMBER = 2; + private long count_ = 0L; + /** + * + * + *
+   * Total count of resources for the given properties.
+   * 
+ * + * int64 count = 2; + * + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + + 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 { + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetProperties(), PropertiesDefaultEntryHolder.defaultEntry, 1); + if (count_ != 0L) { + output.writeInt64(2, count_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry : + internalGetProperties().getMap().entrySet()) { + com.google.protobuf.MapEntry properties__ = + PropertiesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, properties__); + } + if (count_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, count_); + } + size += getUnknownFields().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.v2.GroupResult)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.GroupResult other = + (com.google.cloud.securitycenter.v2.GroupResult) obj; + + if (!internalGetProperties().equals(other.internalGetProperties())) return false; + if (getCount() != other.getCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetProperties().getMap().isEmpty()) { + hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + internalGetProperties().hashCode(); + } + hash = (37 * hash) + COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.GroupResult parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.GroupResult 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.v2.GroupResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.GroupResult 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.v2.GroupResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.GroupResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.GroupResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.GroupResult 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.v2.GroupResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.GroupResult 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.v2.GroupResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.GroupResult 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.v2.GroupResult 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; + } + /** + * + * + *
+   * Result containing the properties and count of a groupBy request.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.GroupResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.GroupResult) + com.google.cloud.securitycenter.v2.GroupResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GroupResult_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetProperties(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetMutableProperties(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GroupResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.GroupResult.class, + com.google.cloud.securitycenter.v2.GroupResult.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.GroupResult.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + internalGetMutableProperties().clear(); + count_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.SecuritycenterServiceProto + .internal_static_google_cloud_securitycenter_v2_GroupResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.GroupResult getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.GroupResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.GroupResult build() { + com.google.cloud.securitycenter.v2.GroupResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.GroupResult buildPartial() { + com.google.cloud.securitycenter.v2.GroupResult result = + new com.google.cloud.securitycenter.v2.GroupResult(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.GroupResult result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.properties_ = + internalGetProperties().build(PropertiesDefaultEntryHolder.defaultEntry); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.count_ = count_; + } + } + + @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.v2.GroupResult) { + return mergeFrom((com.google.cloud.securitycenter.v2.GroupResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.GroupResult other) { + if (other == com.google.cloud.securitycenter.v2.GroupResult.getDefaultInstance()) return this; + internalGetMutableProperties().mergeFrom(other.internalGetProperties()); + bitField0_ |= 0x00000001; + if (other.getCount() != 0L) { + setCount(other.getCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.MapEntry + properties__ = + input.readMessage( + PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableProperties() + .ensureBuilderMap() + .put(properties__.getKey(), properties__.getValue()); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + count_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private static final class PropertiesConverter + implements com.google.protobuf.MapFieldBuilder.Converter< + java.lang.String, com.google.protobuf.ValueOrBuilder, com.google.protobuf.Value> { + @java.lang.Override + public com.google.protobuf.Value build(com.google.protobuf.ValueOrBuilder val) { + if (val instanceof com.google.protobuf.Value) { + return (com.google.protobuf.Value) val; + } + return ((com.google.protobuf.Value.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry + defaultEntry() { + return PropertiesDefaultEntryHolder.defaultEntry; + } + }; + + private static final PropertiesConverter propertiesConverter = new PropertiesConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.protobuf.ValueOrBuilder, + com.google.protobuf.Value, + com.google.protobuf.Value.Builder> + properties_; + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.protobuf.ValueOrBuilder, + com.google.protobuf.Value, + com.google.protobuf.Value.Builder> + internalGetProperties() { + if (properties_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(propertiesConverter); + } + return properties_; + } + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.protobuf.ValueOrBuilder, + com.google.protobuf.Value, + com.google.protobuf.Value.Builder> + internalGetMutableProperties() { + if (properties_ == null) { + properties_ = new com.google.protobuf.MapFieldBuilder<>(propertiesConverter); + } + bitField0_ |= 0x00000001; + onChanged(); + return properties_; + } + + public int getPropertiesCount() { + return internalGetProperties().ensureBuilderMap().size(); + } + /** + * + * + *
+     * Properties matching the groupBy fields in the request.
+     * 
+ * + * map<string, .google.protobuf.Value> properties = 1; + */ + @java.lang.Override + public boolean containsProperties(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetProperties().ensureBuilderMap().containsKey(key); + } + /** Use {@link #getPropertiesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getProperties() { + return getPropertiesMap(); + } + /** + * + * + *
+     * Properties matching the groupBy fields in the request.
+     * 
+ * + * map<string, .google.protobuf.Value> properties = 1; + */ + @java.lang.Override + public java.util.Map getPropertiesMap() { + return internalGetProperties().getImmutableMap(); + } + /** + * + * + *
+     * Properties matching the groupBy fields in the request.
+     * 
+ * + * map<string, .google.protobuf.Value> properties = 1; + */ + @java.lang.Override + public /* nullable */ com.google.protobuf.Value getPropertiesOrDefault( + java.lang.String key, + /* nullable */ + com.google.protobuf.Value defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetMutableProperties().ensureBuilderMap(); + return map.containsKey(key) ? propertiesConverter.build(map.get(key)) : defaultValue; + } + /** + * + * + *
+     * Properties matching the groupBy fields in the request.
+     * 
+ * + * map<string, .google.protobuf.Value> properties = 1; + */ + @java.lang.Override + public com.google.protobuf.Value getPropertiesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetMutableProperties().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return propertiesConverter.build(map.get(key)); + } + + public Builder clearProperties() { + bitField0_ = (bitField0_ & ~0x00000001); + internalGetMutableProperties().clear(); + return this; + } + /** + * + * + *
+     * Properties matching the groupBy fields in the request.
+     * 
+ * + * map<string, .google.protobuf.Value> properties = 1; + */ + public Builder removeProperties(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableProperties().ensureBuilderMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableProperties() { + bitField0_ |= 0x00000001; + return internalGetMutableProperties().ensureMessageMap(); + } + /** + * + * + *
+     * Properties matching the groupBy fields in the request.
+     * 
+ * + * map<string, .google.protobuf.Value> properties = 1; + */ + public Builder putProperties(java.lang.String key, com.google.protobuf.Value value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableProperties().ensureBuilderMap().put(key, value); + bitField0_ |= 0x00000001; + return this; + } + /** + * + * + *
+     * Properties matching the groupBy fields in the request.
+     * 
+ * + * map<string, .google.protobuf.Value> properties = 1; + */ + public Builder putAllProperties( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableProperties().ensureBuilderMap().putAll(values); + bitField0_ |= 0x00000001; + return this; + } + /** + * + * + *
+     * Properties matching the groupBy fields in the request.
+     * 
+ * + * map<string, .google.protobuf.Value> properties = 1; + */ + public com.google.protobuf.Value.Builder putPropertiesBuilderIfAbsent(java.lang.String key) { + java.util.Map builderMap = + internalGetMutableProperties().ensureBuilderMap(); + com.google.protobuf.ValueOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.protobuf.Value.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.protobuf.Value) { + entry = ((com.google.protobuf.Value) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.protobuf.Value.Builder) entry; + } + + private long count_; + /** + * + * + *
+     * Total count of resources for the given properties.
+     * 
+ * + * int64 count = 2; + * + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + /** + * + * + *
+     * Total count of resources for the given properties.
+     * 
+ * + * int64 count = 2; + * + * @param value The count to set. + * @return This builder for chaining. + */ + public Builder setCount(long value) { + + count_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Total count of resources for the given properties.
+     * 
+ * + * int64 count = 2; + * + * @return This builder for chaining. + */ + public Builder clearCount() { + bitField0_ = (bitField0_ & ~0x00000002); + count_ = 0L; + 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.v2.GroupResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.GroupResult) + private static final com.google.cloud.securitycenter.v2.GroupResult DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.GroupResult(); + } + + public static com.google.cloud.securitycenter.v2.GroupResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GroupResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.GroupResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GroupResultOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GroupResultOrBuilder.java new file mode 100644 index 000000000000..54a051a0ad68 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/GroupResultOrBuilder.java @@ -0,0 +1,97 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/securitycenter_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface GroupResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.GroupResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Properties matching the groupBy fields in the request.
+   * 
+ * + * map<string, .google.protobuf.Value> properties = 1; + */ + int getPropertiesCount(); + /** + * + * + *
+   * Properties matching the groupBy fields in the request.
+   * 
+ * + * map<string, .google.protobuf.Value> properties = 1; + */ + boolean containsProperties(java.lang.String key); + /** Use {@link #getPropertiesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getProperties(); + /** + * + * + *
+   * Properties matching the groupBy fields in the request.
+   * 
+ * + * map<string, .google.protobuf.Value> properties = 1; + */ + java.util.Map getPropertiesMap(); + /** + * + * + *
+   * Properties matching the groupBy fields in the request.
+   * 
+ * + * map<string, .google.protobuf.Value> properties = 1; + */ + /* nullable */ + com.google.protobuf.Value getPropertiesOrDefault( + java.lang.String key, + /* nullable */ + com.google.protobuf.Value defaultValue); + /** + * + * + *
+   * Properties matching the groupBy fields in the request.
+   * 
+ * + * map<string, .google.protobuf.Value> properties = 1; + */ + com.google.protobuf.Value getPropertiesOrThrow(java.lang.String key); + + /** + * + * + *
+   * Total count of resources for the given properties.
+   * 
+ * + * int64 count = 2; + * + * @return The count. + */ + long getCount(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/IamBinding.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/IamBinding.java new file mode 100644 index 000000000000..72999490737d --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/IamBinding.java @@ -0,0 +1,1133 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/iam_binding.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Represents a particular IAM binding, which captures a member's role addition,
+ * removal, or state.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.IamBinding} + */ +public final class IamBinding extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.IamBinding) + IamBindingOrBuilder { + private static final long serialVersionUID = 0L; + // Use IamBinding.newBuilder() to construct. + private IamBinding(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IamBinding() { + action_ = 0; + role_ = ""; + member_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IamBinding(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.IamBindingProto + .internal_static_google_cloud_securitycenter_v2_IamBinding_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.IamBindingProto + .internal_static_google_cloud_securitycenter_v2_IamBinding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.IamBinding.class, + com.google.cloud.securitycenter.v2.IamBinding.Builder.class); + } + + /** + * + * + *
+   * The type of action performed on a Binding in a policy.
+   * 
+ * + * Protobuf enum {@code google.cloud.securitycenter.v2.IamBinding.Action} + */ + public enum Action implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified.
+     * 
+ * + * ACTION_UNSPECIFIED = 0; + */ + ACTION_UNSPECIFIED(0), + /** + * + * + *
+     * Addition of a Binding.
+     * 
+ * + * ADD = 1; + */ + ADD(1), + /** + * + * + *
+     * Removal of a Binding.
+     * 
+ * + * REMOVE = 2; + */ + REMOVE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified.
+     * 
+ * + * ACTION_UNSPECIFIED = 0; + */ + public static final int ACTION_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Addition of a Binding.
+     * 
+ * + * ADD = 1; + */ + public static final int ADD_VALUE = 1; + /** + * + * + *
+     * Removal of a Binding.
+     * 
+ * + * REMOVE = 2; + */ + public static final int REMOVE_VALUE = 2; + + 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 Action 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 Action forNumber(int value) { + switch (value) { + case 0: + return ACTION_UNSPECIFIED; + case 1: + return ADD; + case 2: + return REMOVE; + 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 Action findValueByNumber(int number) { + return Action.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.v2.IamBinding.getDescriptor().getEnumTypes().get(0); + } + + private static final Action[] VALUES = values(); + + public static Action 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 Action(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v2.IamBinding.Action) + } + + public static final int ACTION_FIELD_NUMBER = 1; + private int action_ = 0; + /** + * + * + *
+   * The action that was performed on a Binding.
+   * 
+ * + * .google.cloud.securitycenter.v2.IamBinding.Action action = 1; + * + * @return The enum numeric value on the wire for action. + */ + @java.lang.Override + public int getActionValue() { + return action_; + } + /** + * + * + *
+   * The action that was performed on a Binding.
+   * 
+ * + * .google.cloud.securitycenter.v2.IamBinding.Action action = 1; + * + * @return The action. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.IamBinding.Action getAction() { + com.google.cloud.securitycenter.v2.IamBinding.Action result = + com.google.cloud.securitycenter.v2.IamBinding.Action.forNumber(action_); + return result == null + ? com.google.cloud.securitycenter.v2.IamBinding.Action.UNRECOGNIZED + : result; + } + + public static final int ROLE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object role_ = ""; + /** + * + * + *
+   * Role that is assigned to "members".
+   * For example, "roles/viewer", "roles/editor", or "roles/owner".
+   * 
+ * + * string role = 2; + * + * @return The role. + */ + @java.lang.Override + public java.lang.String getRole() { + java.lang.Object ref = role_; + 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(); + role_ = s; + return s; + } + } + /** + * + * + *
+   * Role that is assigned to "members".
+   * For example, "roles/viewer", "roles/editor", or "roles/owner".
+   * 
+ * + * string role = 2; + * + * @return The bytes for role. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRoleBytes() { + java.lang.Object ref = role_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + role_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MEMBER_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object member_ = ""; + /** + * + * + *
+   * A single identity requesting access for a Cloud Platform resource, for
+   * example, "foo@google.com".
+   * 
+ * + * string member = 3; + * + * @return The member. + */ + @java.lang.Override + public java.lang.String getMember() { + java.lang.Object ref = member_; + 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(); + member_ = s; + return s; + } + } + /** + * + * + *
+   * A single identity requesting access for a Cloud Platform resource, for
+   * example, "foo@google.com".
+   * 
+ * + * string member = 3; + * + * @return The bytes for member. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMemberBytes() { + java.lang.Object ref = member_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + member_ = 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 (action_ + != com.google.cloud.securitycenter.v2.IamBinding.Action.ACTION_UNSPECIFIED.getNumber()) { + output.writeEnum(1, action_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(role_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, role_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(member_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, member_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (action_ + != com.google.cloud.securitycenter.v2.IamBinding.Action.ACTION_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, action_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(role_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, role_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(member_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, member_); + } + size += getUnknownFields().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.v2.IamBinding)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.IamBinding other = + (com.google.cloud.securitycenter.v2.IamBinding) obj; + + if (action_ != other.action_) return false; + if (!getRole().equals(other.getRole())) return false; + if (!getMember().equals(other.getMember())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + action_; + hash = (37 * hash) + ROLE_FIELD_NUMBER; + hash = (53 * hash) + getRole().hashCode(); + hash = (37 * hash) + MEMBER_FIELD_NUMBER; + hash = (53 * hash) + getMember().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.IamBinding parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.IamBinding 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.v2.IamBinding parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.IamBinding 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.v2.IamBinding parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.IamBinding parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.IamBinding parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.IamBinding 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.v2.IamBinding parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.IamBinding 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.v2.IamBinding parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.IamBinding 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.v2.IamBinding 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; + } + /** + * + * + *
+   * Represents a particular IAM binding, which captures a member's role addition,
+   * removal, or state.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.IamBinding} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.IamBinding) + com.google.cloud.securitycenter.v2.IamBindingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.IamBindingProto + .internal_static_google_cloud_securitycenter_v2_IamBinding_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.IamBindingProto + .internal_static_google_cloud_securitycenter_v2_IamBinding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.IamBinding.class, + com.google.cloud.securitycenter.v2.IamBinding.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.IamBinding.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + action_ = 0; + role_ = ""; + member_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.IamBindingProto + .internal_static_google_cloud_securitycenter_v2_IamBinding_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.IamBinding getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.IamBinding.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.IamBinding build() { + com.google.cloud.securitycenter.v2.IamBinding result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.IamBinding buildPartial() { + com.google.cloud.securitycenter.v2.IamBinding result = + new com.google.cloud.securitycenter.v2.IamBinding(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.IamBinding result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.action_ = action_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.role_ = role_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.member_ = member_; + } + } + + @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.v2.IamBinding) { + return mergeFrom((com.google.cloud.securitycenter.v2.IamBinding) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.IamBinding other) { + if (other == com.google.cloud.securitycenter.v2.IamBinding.getDefaultInstance()) return this; + if (other.action_ != 0) { + setActionValue(other.getActionValue()); + } + if (!other.getRole().isEmpty()) { + role_ = other.role_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getMember().isEmpty()) { + member_ = other.member_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + action_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + role_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + member_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int action_ = 0; + /** + * + * + *
+     * The action that was performed on a Binding.
+     * 
+ * + * .google.cloud.securitycenter.v2.IamBinding.Action action = 1; + * + * @return The enum numeric value on the wire for action. + */ + @java.lang.Override + public int getActionValue() { + return action_; + } + /** + * + * + *
+     * The action that was performed on a Binding.
+     * 
+ * + * .google.cloud.securitycenter.v2.IamBinding.Action action = 1; + * + * @param value The enum numeric value on the wire for action to set. + * @return This builder for chaining. + */ + public Builder setActionValue(int value) { + action_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The action that was performed on a Binding.
+     * 
+ * + * .google.cloud.securitycenter.v2.IamBinding.Action action = 1; + * + * @return The action. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.IamBinding.Action getAction() { + com.google.cloud.securitycenter.v2.IamBinding.Action result = + com.google.cloud.securitycenter.v2.IamBinding.Action.forNumber(action_); + return result == null + ? com.google.cloud.securitycenter.v2.IamBinding.Action.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The action that was performed on a Binding.
+     * 
+ * + * .google.cloud.securitycenter.v2.IamBinding.Action action = 1; + * + * @param value The action to set. + * @return This builder for chaining. + */ + public Builder setAction(com.google.cloud.securitycenter.v2.IamBinding.Action value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + action_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The action that was performed on a Binding.
+     * 
+ * + * .google.cloud.securitycenter.v2.IamBinding.Action action = 1; + * + * @return This builder for chaining. + */ + public Builder clearAction() { + bitField0_ = (bitField0_ & ~0x00000001); + action_ = 0; + onChanged(); + return this; + } + + private java.lang.Object role_ = ""; + /** + * + * + *
+     * Role that is assigned to "members".
+     * For example, "roles/viewer", "roles/editor", or "roles/owner".
+     * 
+ * + * string role = 2; + * + * @return The role. + */ + public java.lang.String getRole() { + java.lang.Object ref = role_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + role_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Role that is assigned to "members".
+     * For example, "roles/viewer", "roles/editor", or "roles/owner".
+     * 
+ * + * string role = 2; + * + * @return The bytes for role. + */ + public com.google.protobuf.ByteString getRoleBytes() { + java.lang.Object ref = role_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + role_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Role that is assigned to "members".
+     * For example, "roles/viewer", "roles/editor", or "roles/owner".
+     * 
+ * + * string role = 2; + * + * @param value The role to set. + * @return This builder for chaining. + */ + public Builder setRole(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + role_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Role that is assigned to "members".
+     * For example, "roles/viewer", "roles/editor", or "roles/owner".
+     * 
+ * + * string role = 2; + * + * @return This builder for chaining. + */ + public Builder clearRole() { + role_ = getDefaultInstance().getRole(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Role that is assigned to "members".
+     * For example, "roles/viewer", "roles/editor", or "roles/owner".
+     * 
+ * + * string role = 2; + * + * @param value The bytes for role to set. + * @return This builder for chaining. + */ + public Builder setRoleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + role_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object member_ = ""; + /** + * + * + *
+     * A single identity requesting access for a Cloud Platform resource, for
+     * example, "foo@google.com".
+     * 
+ * + * string member = 3; + * + * @return The member. + */ + public java.lang.String getMember() { + java.lang.Object ref = member_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + member_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A single identity requesting access for a Cloud Platform resource, for
+     * example, "foo@google.com".
+     * 
+ * + * string member = 3; + * + * @return The bytes for member. + */ + public com.google.protobuf.ByteString getMemberBytes() { + java.lang.Object ref = member_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + member_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A single identity requesting access for a Cloud Platform resource, for
+     * example, "foo@google.com".
+     * 
+ * + * string member = 3; + * + * @param value The member to set. + * @return This builder for chaining. + */ + public Builder setMember(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + member_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A single identity requesting access for a Cloud Platform resource, for
+     * example, "foo@google.com".
+     * 
+ * + * string member = 3; + * + * @return This builder for chaining. + */ + public Builder clearMember() { + member_ = getDefaultInstance().getMember(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A single identity requesting access for a Cloud Platform resource, for
+     * example, "foo@google.com".
+     * 
+ * + * string member = 3; + * + * @param value The bytes for member to set. + * @return This builder for chaining. + */ + public Builder setMemberBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + member_ = value; + bitField0_ |= 0x00000004; + 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.v2.IamBinding) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.IamBinding) + private static final com.google.cloud.securitycenter.v2.IamBinding DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.IamBinding(); + } + + public static com.google.cloud.securitycenter.v2.IamBinding getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IamBinding parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.IamBinding getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/IamBindingOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/IamBindingOrBuilder.java new file mode 100644 index 000000000000..cd35ee895f9e --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/IamBindingOrBuilder.java @@ -0,0 +1,105 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/iam_binding.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface IamBindingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.IamBinding) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The action that was performed on a Binding.
+   * 
+ * + * .google.cloud.securitycenter.v2.IamBinding.Action action = 1; + * + * @return The enum numeric value on the wire for action. + */ + int getActionValue(); + /** + * + * + *
+   * The action that was performed on a Binding.
+   * 
+ * + * .google.cloud.securitycenter.v2.IamBinding.Action action = 1; + * + * @return The action. + */ + com.google.cloud.securitycenter.v2.IamBinding.Action getAction(); + + /** + * + * + *
+   * Role that is assigned to "members".
+   * For example, "roles/viewer", "roles/editor", or "roles/owner".
+   * 
+ * + * string role = 2; + * + * @return The role. + */ + java.lang.String getRole(); + /** + * + * + *
+   * Role that is assigned to "members".
+   * For example, "roles/viewer", "roles/editor", or "roles/owner".
+   * 
+ * + * string role = 2; + * + * @return The bytes for role. + */ + com.google.protobuf.ByteString getRoleBytes(); + + /** + * + * + *
+   * A single identity requesting access for a Cloud Platform resource, for
+   * example, "foo@google.com".
+   * 
+ * + * string member = 3; + * + * @return The member. + */ + java.lang.String getMember(); + /** + * + * + *
+   * A single identity requesting access for a Cloud Platform resource, for
+   * example, "foo@google.com".
+   * 
+ * + * string member = 3; + * + * @return The bytes for member. + */ + com.google.protobuf.ByteString getMemberBytes(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/IamBindingProto.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/IamBindingProto.java new file mode 100644 index 000000000000..e1a99dc2917a --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/IamBindingProto.java @@ -0,0 +1,72 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/iam_binding.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public final class IamBindingProto { + private IamBindingProto() {} + + 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_v2_IamBinding_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_IamBinding_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/v2/iam_bin" + + "ding.proto\022\036google.cloud.securitycenter." + + "v2\"\244\001\n\nIamBinding\022A\n\006action\030\001 \001(\01621.goog" + + "le.cloud.securitycenter.v2.IamBinding.Ac" + + "tion\022\014\n\004role\030\002 \001(\t\022\016\n\006member\030\003 \001(\t\"5\n\006Ac" + + "tion\022\026\n\022ACTION_UNSPECIFIED\020\000\022\007\n\003ADD\020\001\022\n\n" + + "\006REMOVE\020\002B\351\001\n\"com.google.cloud.securityc" + + "enter.v2B\017IamBindingProtoP\001ZJcloud.googl" + + "e.com/go/securitycenter/apiv2/securityce" + + "nterpb;securitycenterpb\252\002\036Google.Cloud.S" + + "ecurityCenter.V2\312\002\036Google\\Cloud\\Security" + + "Center\\V2\352\002!Google::Cloud::SecurityCente" + + "r::V2b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_cloud_securitycenter_v2_IamBinding_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_securitycenter_v2_IamBinding_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_IamBinding_descriptor, + new java.lang.String[] { + "Action", "Role", "Member", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Indicator.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Indicator.java new file mode 100644 index 000000000000..ec1d0e85575c --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Indicator.java @@ -0,0 +1,6472 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/indicator.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Represents what's commonly known as an _indicator of compromise_ (IoC) in
+ * computer forensics. This is an artifact observed on a network or in an
+ * operating system that, with high confidence, indicates a computer intrusion.
+ * For more information, see [Indicator of
+ * compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise).
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Indicator} + */ +public final class Indicator extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.Indicator) + IndicatorOrBuilder { + private static final long serialVersionUID = 0L; + // Use Indicator.newBuilder() to construct. + private Indicator(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Indicator() { + ipAddresses_ = com.google.protobuf.LazyStringArrayList.emptyList(); + domains_ = com.google.protobuf.LazyStringArrayList.emptyList(); + signatures_ = java.util.Collections.emptyList(); + uris_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Indicator(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.IndicatorProto + .internal_static_google_cloud_securitycenter_v2_Indicator_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.IndicatorProto + .internal_static_google_cloud_securitycenter_v2_Indicator_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Indicator.class, + com.google.cloud.securitycenter.v2.Indicator.Builder.class); + } + + public interface ProcessSignatureOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.Indicator.ProcessSignature) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Signature indicating that a binary family was matched.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; + * + * + * @return Whether the memoryHashSignature field is set. + */ + boolean hasMemoryHashSignature(); + /** + * + * + *
+     * Signature indicating that a binary family was matched.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; + * + * + * @return The memoryHashSignature. + */ + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + getMemoryHashSignature(); + /** + * + * + *
+     * Signature indicating that a binary family was matched.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; + * + */ + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignatureOrBuilder + getMemoryHashSignatureOrBuilder(); + + /** + * + * + *
+     * Signature indicating that a YARA rule was matched.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; + * + * + * @return Whether the yaraRuleSignature field is set. + */ + boolean hasYaraRuleSignature(); + /** + * + * + *
+     * Signature indicating that a YARA rule was matched.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; + * + * + * @return The yaraRuleSignature. + */ + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + getYaraRuleSignature(); + /** + * + * + *
+     * Signature indicating that a YARA rule was matched.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; + * + */ + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignatureOrBuilder + getYaraRuleSignatureOrBuilder(); + + /** + * + * + *
+     * Describes the type of resource associated with the signature.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType signature_type = 8; + * + * + * @return The enum numeric value on the wire for signatureType. + */ + int getSignatureTypeValue(); + /** + * + * + *
+     * Describes the type of resource associated with the signature.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType signature_type = 8; + * + * + * @return The signatureType. + */ + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType getSignatureType(); + + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureCase getSignatureCase(); + } + /** + * + * + *
+   * Indicates what signature matched this process.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Indicator.ProcessSignature} + */ + public static final class ProcessSignature extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.Indicator.ProcessSignature) + ProcessSignatureOrBuilder { + private static final long serialVersionUID = 0L; + // Use ProcessSignature.newBuilder() to construct. + private ProcessSignature(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ProcessSignature() { + signatureType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ProcessSignature(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.IndicatorProto + .internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.IndicatorProto + .internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.class, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.Builder.class); + } + + /** + * + * + *
+     * Possible resource types to be associated with a signature.
+     * 
+ * + * Protobuf enum {@code google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType} + */ + public enum SignatureType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * The default signature type.
+       * 
+ * + * SIGNATURE_TYPE_UNSPECIFIED = 0; + */ + SIGNATURE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+       * Used for signatures concerning processes.
+       * 
+ * + * SIGNATURE_TYPE_PROCESS = 1; + */ + SIGNATURE_TYPE_PROCESS(1), + /** + * + * + *
+       * Used for signatures concerning disks.
+       * 
+ * + * SIGNATURE_TYPE_FILE = 2; + */ + SIGNATURE_TYPE_FILE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * The default signature type.
+       * 
+ * + * SIGNATURE_TYPE_UNSPECIFIED = 0; + */ + public static final int SIGNATURE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Used for signatures concerning processes.
+       * 
+ * + * SIGNATURE_TYPE_PROCESS = 1; + */ + public static final int SIGNATURE_TYPE_PROCESS_VALUE = 1; + /** + * + * + *
+       * Used for signatures concerning disks.
+       * 
+ * + * SIGNATURE_TYPE_FILE = 2; + */ + public static final int SIGNATURE_TYPE_FILE_VALUE = 2; + + 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 SignatureType 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 SignatureType forNumber(int value) { + switch (value) { + case 0: + return SIGNATURE_TYPE_UNSPECIFIED; + case 1: + return SIGNATURE_TYPE_PROCESS; + case 2: + return SIGNATURE_TYPE_FILE; + 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 SignatureType findValueByNumber(int number) { + return SignatureType.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.v2.Indicator.ProcessSignature.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final SignatureType[] VALUES = values(); + + public static SignatureType 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 SignatureType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType) + } + + public interface MemoryHashSignatureOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The binary family.
+       * 
+ * + * string binary_family = 1; + * + * @return The binaryFamily. + */ + java.lang.String getBinaryFamily(); + /** + * + * + *
+       * The binary family.
+       * 
+ * + * string binary_family = 1; + * + * @return The bytes for binaryFamily. + */ + com.google.protobuf.ByteString getBinaryFamilyBytes(); + + /** + * + * + *
+       * The list of memory hash detections contributing to the binary family
+       * match.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + java.util.List< + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection> + getDetectionsList(); + /** + * + * + *
+       * The list of memory hash detections contributing to the binary family
+       * match.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection + getDetections(int index); + /** + * + * + *
+       * The list of memory hash detections contributing to the binary family
+       * match.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + int getDetectionsCount(); + /** + * + * + *
+       * The list of memory hash detections contributing to the binary family
+       * match.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + java.util.List< + ? extends + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .DetectionOrBuilder> + getDetectionsOrBuilderList(); + /** + * + * + *
+       * The list of memory hash detections contributing to the binary family
+       * match.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .DetectionOrBuilder + getDetectionsOrBuilder(int index); + } + /** + * + * + *
+     * A signature corresponding to memory page hashes.
+     * 
+ * + * Protobuf type {@code + * google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature} + */ + public static final class MemoryHashSignature extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature) + MemoryHashSignatureOrBuilder { + private static final long serialVersionUID = 0L; + // Use MemoryHashSignature.newBuilder() to construct. + private MemoryHashSignature(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MemoryHashSignature() { + binaryFamily_ = ""; + detections_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MemoryHashSignature(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.IndicatorProto + .internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_MemoryHashSignature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.IndicatorProto + .internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_MemoryHashSignature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .class, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Builder.class); + } + + public interface DetectionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * The name of the binary associated with the memory hash
+         * signature detection.
+         * 
+ * + * string binary = 2; + * + * @return The binary. + */ + java.lang.String getBinary(); + /** + * + * + *
+         * The name of the binary associated with the memory hash
+         * signature detection.
+         * 
+ * + * string binary = 2; + * + * @return The bytes for binary. + */ + com.google.protobuf.ByteString getBinaryBytes(); + + /** + * + * + *
+         * The percentage of memory page hashes in the signature
+         * that were matched.
+         * 
+ * + * double percent_pages_matched = 3; + * + * @return The percentPagesMatched. + */ + double getPercentPagesMatched(); + } + /** + * + * + *
+       * Memory hash detection contributing to the binary family match.
+       * 
+ * + * Protobuf type {@code + * google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection} + */ + public static final class Detection extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection) + DetectionOrBuilder { + private static final long serialVersionUID = 0L; + // Use Detection.newBuilder() to construct. + private Detection(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Detection() { + binary_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Detection(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.IndicatorProto + .internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_MemoryHashSignature_Detection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.IndicatorProto + .internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_MemoryHashSignature_Detection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection.class, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection.Builder.class); + } + + public static final int BINARY_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object binary_ = ""; + /** + * + * + *
+         * The name of the binary associated with the memory hash
+         * signature detection.
+         * 
+ * + * string binary = 2; + * + * @return The binary. + */ + @java.lang.Override + public java.lang.String getBinary() { + java.lang.Object ref = binary_; + 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(); + binary_ = s; + return s; + } + } + /** + * + * + *
+         * The name of the binary associated with the memory hash
+         * signature detection.
+         * 
+ * + * string binary = 2; + * + * @return The bytes for binary. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBinaryBytes() { + java.lang.Object ref = binary_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + binary_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PERCENT_PAGES_MATCHED_FIELD_NUMBER = 3; + private double percentPagesMatched_ = 0D; + /** + * + * + *
+         * The percentage of memory page hashes in the signature
+         * that were matched.
+         * 
+ * + * double percent_pages_matched = 3; + * + * @return The percentPagesMatched. + */ + @java.lang.Override + public double getPercentPagesMatched() { + return percentPagesMatched_; + } + + 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(binary_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, binary_); + } + if (java.lang.Double.doubleToRawLongBits(percentPagesMatched_) != 0) { + output.writeDouble(3, percentPagesMatched_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(binary_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, binary_); + } + if (java.lang.Double.doubleToRawLongBits(percentPagesMatched_) != 0) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize(3, percentPagesMatched_); + } + size += getUnknownFields().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.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection + other = + (com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection) + obj; + + if (!getBinary().equals(other.getBinary())) return false; + if (java.lang.Double.doubleToLongBits(getPercentPagesMatched()) + != java.lang.Double.doubleToLongBits(other.getPercentPagesMatched())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + BINARY_FIELD_NUMBER; + hash = (53 * hash) + getBinary().hashCode(); + hash = (37 * hash) + PERCENT_PAGES_MATCHED_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getPercentPagesMatched())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignature.Detection + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignature.Detection + 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.v2.Indicator.ProcessSignature + .MemoryHashSignature.Detection + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignature.Detection + 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.v2.Indicator.ProcessSignature + .MemoryHashSignature.Detection + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignature.Detection + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignature.Detection + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignature.Detection + 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.v2.Indicator.ProcessSignature + .MemoryHashSignature.Detection + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignature.Detection + 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.v2.Indicator.ProcessSignature + .MemoryHashSignature.Detection + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignature.Detection + 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.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection + 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; + } + /** + * + * + *
+         * Memory hash detection contributing to the binary family match.
+         * 
+ * + * Protobuf type {@code + * google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection) + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .DetectionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.IndicatorProto + .internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_MemoryHashSignature_Detection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.IndicatorProto + .internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_MemoryHashSignature_Detection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignature.Detection.class, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignature.Detection.Builder.class); + } + + // Construct using + // com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + binary_ = ""; + percentPagesMatched_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.IndicatorProto + .internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_MemoryHashSignature_Detection_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection + getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection + build() { + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection + buildPartial() { + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection + result = + new com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignature.Detection(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.binary_ = binary_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.percentPagesMatched_ = percentPagesMatched_; + } + } + + @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.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection) { + return mergeFrom( + (com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection + other) { + if (other + == com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection.getDefaultInstance()) return this; + if (!other.getBinary().isEmpty()) { + binary_ = other.binary_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPercentPagesMatched() != 0D) { + setPercentPagesMatched(other.getPercentPagesMatched()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + binary_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 18 + case 25: + { + percentPagesMatched_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 25 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object binary_ = ""; + /** + * + * + *
+           * The name of the binary associated with the memory hash
+           * signature detection.
+           * 
+ * + * string binary = 2; + * + * @return The binary. + */ + public java.lang.String getBinary() { + java.lang.Object ref = binary_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + binary_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * The name of the binary associated with the memory hash
+           * signature detection.
+           * 
+ * + * string binary = 2; + * + * @return The bytes for binary. + */ + public com.google.protobuf.ByteString getBinaryBytes() { + java.lang.Object ref = binary_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + binary_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * The name of the binary associated with the memory hash
+           * signature detection.
+           * 
+ * + * string binary = 2; + * + * @param value The binary to set. + * @return This builder for chaining. + */ + public Builder setBinary(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + binary_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+           * The name of the binary associated with the memory hash
+           * signature detection.
+           * 
+ * + * string binary = 2; + * + * @return This builder for chaining. + */ + public Builder clearBinary() { + binary_ = getDefaultInstance().getBinary(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+           * The name of the binary associated with the memory hash
+           * signature detection.
+           * 
+ * + * string binary = 2; + * + * @param value The bytes for binary to set. + * @return This builder for chaining. + */ + public Builder setBinaryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + binary_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private double percentPagesMatched_; + /** + * + * + *
+           * The percentage of memory page hashes in the signature
+           * that were matched.
+           * 
+ * + * double percent_pages_matched = 3; + * + * @return The percentPagesMatched. + */ + @java.lang.Override + public double getPercentPagesMatched() { + return percentPagesMatched_; + } + /** + * + * + *
+           * The percentage of memory page hashes in the signature
+           * that were matched.
+           * 
+ * + * double percent_pages_matched = 3; + * + * @param value The percentPagesMatched to set. + * @return This builder for chaining. + */ + public Builder setPercentPagesMatched(double value) { + + percentPagesMatched_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+           * The percentage of memory page hashes in the signature
+           * that were matched.
+           * 
+ * + * double percent_pages_matched = 3; + * + * @return This builder for chaining. + */ + public Builder clearPercentPagesMatched() { + bitField0_ = (bitField0_ & ~0x00000002); + percentPagesMatched_ = 0D; + 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.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection) + private static final com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignature.Detection + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection(); + } + + public static com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignature.Detection + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Detection parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int BINARY_FAMILY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object binaryFamily_ = ""; + /** + * + * + *
+       * The binary family.
+       * 
+ * + * string binary_family = 1; + * + * @return The binaryFamily. + */ + @java.lang.Override + public java.lang.String getBinaryFamily() { + java.lang.Object ref = binaryFamily_; + 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(); + binaryFamily_ = s; + return s; + } + } + /** + * + * + *
+       * The binary family.
+       * 
+ * + * string binary_family = 1; + * + * @return The bytes for binaryFamily. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBinaryFamilyBytes() { + java.lang.Object ref = binaryFamily_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + binaryFamily_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DETECTIONS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection> + detections_; + /** + * + * + *
+       * The list of memory hash detections contributing to the binary family
+       * match.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection> + getDetectionsList() { + return detections_; + } + /** + * + * + *
+       * The list of memory hash detections contributing to the binary family
+       * match.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .DetectionOrBuilder> + getDetectionsOrBuilderList() { + return detections_; + } + /** + * + * + *
+       * The list of memory hash detections contributing to the binary family
+       * match.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + @java.lang.Override + public int getDetectionsCount() { + return detections_.size(); + } + /** + * + * + *
+       * The list of memory hash detections contributing to the binary family
+       * match.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection + getDetections(int index) { + return detections_.get(index); + } + /** + * + * + *
+       * The list of memory hash detections contributing to the binary family
+       * match.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .DetectionOrBuilder + getDetectionsOrBuilder(int index) { + return detections_.get(index); + } + + 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(binaryFamily_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, binaryFamily_); + } + for (int i = 0; i < detections_.size(); i++) { + output.writeMessage(4, detections_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(binaryFamily_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, binaryFamily_); + } + for (int i = 0; i < detections_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, detections_.get(i)); + } + size += getUnknownFields().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.v2.Indicator.ProcessSignature.MemoryHashSignature)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature other = + (com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature) obj; + + if (!getBinaryFamily().equals(other.getBinaryFamily())) return false; + if (!getDetectionsList().equals(other.getDetectionsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + BINARY_FAMILY_FIELD_NUMBER; + hash = (53 * hash) + getBinaryFamily().hashCode(); + if (getDetectionsCount() > 0) { + hash = (37 * hash) + DETECTIONS_FIELD_NUMBER; + hash = (53 * hash) + getDetectionsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignature + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignature + 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.v2.Indicator.ProcessSignature + .MemoryHashSignature + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignature + 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.v2.Indicator.ProcessSignature + .MemoryHashSignature + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignature + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignature + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignature + 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.v2.Indicator.ProcessSignature + .MemoryHashSignature + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignature + 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.v2.Indicator.ProcessSignature + .MemoryHashSignature + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignature + 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.v2.Indicator.ProcessSignature.MemoryHashSignature + 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 signature corresponding to memory page hashes.
+       * 
+ * + * Protobuf type {@code + * google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature) + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignatureOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.IndicatorProto + .internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_MemoryHashSignature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.IndicatorProto + .internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_MemoryHashSignature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .class, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Builder.class); + } + + // Construct using + // com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + binaryFamily_ = ""; + if (detectionsBuilder_ == null) { + detections_ = java.util.Collections.emptyList(); + } else { + detections_ = null; + detectionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.IndicatorProto + .internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_MemoryHashSignature_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + build() { + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + buildPartial() { + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature result = + new com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature( + this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + result) { + if (detectionsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + detections_ = java.util.Collections.unmodifiableList(detections_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.detections_ = detections_; + } else { + result.detections_ = detectionsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.binaryFamily_ = binaryFamily_; + } + } + + @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.v2.Indicator.ProcessSignature.MemoryHashSignature) { + return mergeFrom( + (com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + other) { + if (other + == com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .getDefaultInstance()) return this; + if (!other.getBinaryFamily().isEmpty()) { + binaryFamily_ = other.binaryFamily_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (detectionsBuilder_ == null) { + if (!other.detections_.isEmpty()) { + if (detections_.isEmpty()) { + detections_ = other.detections_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureDetectionsIsMutable(); + detections_.addAll(other.detections_); + } + onChanged(); + } + } else { + if (!other.detections_.isEmpty()) { + if (detectionsBuilder_.isEmpty()) { + detectionsBuilder_.dispose(); + detectionsBuilder_ = null; + detections_ = other.detections_; + bitField0_ = (bitField0_ & ~0x00000002); + detectionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDetectionsFieldBuilder() + : null; + } else { + detectionsBuilder_.addAllMessages(other.detections_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + binaryFamily_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 34: + { + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignature.Detection + m = + input.readMessage( + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignature.Detection.parser(), + extensionRegistry); + if (detectionsBuilder_ == null) { + ensureDetectionsIsMutable(); + detections_.add(m); + } else { + detectionsBuilder_.addMessage(m); + } + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object binaryFamily_ = ""; + /** + * + * + *
+         * The binary family.
+         * 
+ * + * string binary_family = 1; + * + * @return The binaryFamily. + */ + public java.lang.String getBinaryFamily() { + java.lang.Object ref = binaryFamily_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + binaryFamily_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The binary family.
+         * 
+ * + * string binary_family = 1; + * + * @return The bytes for binaryFamily. + */ + public com.google.protobuf.ByteString getBinaryFamilyBytes() { + java.lang.Object ref = binaryFamily_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + binaryFamily_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The binary family.
+         * 
+ * + * string binary_family = 1; + * + * @param value The binaryFamily to set. + * @return This builder for chaining. + */ + public Builder setBinaryFamily(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + binaryFamily_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * The binary family.
+         * 
+ * + * string binary_family = 1; + * + * @return This builder for chaining. + */ + public Builder clearBinaryFamily() { + binaryFamily_ = getDefaultInstance().getBinaryFamily(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * The binary family.
+         * 
+ * + * string binary_family = 1; + * + * @param value The bytes for binaryFamily to set. + * @return This builder for chaining. + */ + public Builder setBinaryFamilyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + binaryFamily_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection> + detections_ = java.util.Collections.emptyList(); + + private void ensureDetectionsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + detections_ = + new java.util.ArrayList< + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignature.Detection>(detections_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection.Builder, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .DetectionOrBuilder> + detectionsBuilder_; + + /** + * + * + *
+         * The list of memory hash detections contributing to the binary family
+         * match.
+         * 
+ * + * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + public java.util.List< + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection> + getDetectionsList() { + if (detectionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(detections_); + } else { + return detectionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+         * The list of memory hash detections contributing to the binary family
+         * match.
+         * 
+ * + * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + public int getDetectionsCount() { + if (detectionsBuilder_ == null) { + return detections_.size(); + } else { + return detectionsBuilder_.getCount(); + } + } + /** + * + * + *
+         * The list of memory hash detections contributing to the binary family
+         * match.
+         * 
+ * + * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection + getDetections(int index) { + if (detectionsBuilder_ == null) { + return detections_.get(index); + } else { + return detectionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+         * The list of memory hash detections contributing to the binary family
+         * match.
+         * 
+ * + * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + public Builder setDetections( + int index, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection + value) { + if (detectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectionsIsMutable(); + detections_.set(index, value); + onChanged(); + } else { + detectionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+         * The list of memory hash detections contributing to the binary family
+         * match.
+         * 
+ * + * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + public Builder setDetections( + int index, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection.Builder + builderForValue) { + if (detectionsBuilder_ == null) { + ensureDetectionsIsMutable(); + detections_.set(index, builderForValue.build()); + onChanged(); + } else { + detectionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * The list of memory hash detections contributing to the binary family
+         * match.
+         * 
+ * + * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + public Builder addDetections( + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection + value) { + if (detectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectionsIsMutable(); + detections_.add(value); + onChanged(); + } else { + detectionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+         * The list of memory hash detections contributing to the binary family
+         * match.
+         * 
+ * + * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + public Builder addDetections( + int index, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection + value) { + if (detectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectionsIsMutable(); + detections_.add(index, value); + onChanged(); + } else { + detectionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+         * The list of memory hash detections contributing to the binary family
+         * match.
+         * 
+ * + * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + public Builder addDetections( + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection.Builder + builderForValue) { + if (detectionsBuilder_ == null) { + ensureDetectionsIsMutable(); + detections_.add(builderForValue.build()); + onChanged(); + } else { + detectionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * The list of memory hash detections contributing to the binary family
+         * match.
+         * 
+ * + * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + public Builder addDetections( + int index, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection.Builder + builderForValue) { + if (detectionsBuilder_ == null) { + ensureDetectionsIsMutable(); + detections_.add(index, builderForValue.build()); + onChanged(); + } else { + detectionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * The list of memory hash detections contributing to the binary family
+         * match.
+         * 
+ * + * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + public Builder addAllDetections( + java.lang.Iterable< + ? extends + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignature.Detection> + values) { + if (detectionsBuilder_ == null) { + ensureDetectionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, detections_); + onChanged(); + } else { + detectionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+         * The list of memory hash detections contributing to the binary family
+         * match.
+         * 
+ * + * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + public Builder clearDetections() { + if (detectionsBuilder_ == null) { + detections_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + detectionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * The list of memory hash detections contributing to the binary family
+         * match.
+         * 
+ * + * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + public Builder removeDetections(int index) { + if (detectionsBuilder_ == null) { + ensureDetectionsIsMutable(); + detections_.remove(index); + onChanged(); + } else { + detectionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+         * The list of memory hash detections contributing to the binary family
+         * match.
+         * 
+ * + * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection.Builder + getDetectionsBuilder(int index) { + return getDetectionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+         * The list of memory hash detections contributing to the binary family
+         * match.
+         * 
+ * + * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .DetectionOrBuilder + getDetectionsOrBuilder(int index) { + if (detectionsBuilder_ == null) { + return detections_.get(index); + } else { + return detectionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+         * The list of memory hash detections contributing to the binary family
+         * match.
+         * 
+ * + * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + public java.util.List< + ? extends + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignature.DetectionOrBuilder> + getDetectionsOrBuilderList() { + if (detectionsBuilder_ != null) { + return detectionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(detections_); + } + } + /** + * + * + *
+         * The list of memory hash detections contributing to the binary family
+         * match.
+         * 
+ * + * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection.Builder + addDetectionsBuilder() { + return getDetectionsFieldBuilder() + .addBuilder( + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection.getDefaultInstance()); + } + /** + * + * + *
+         * The list of memory hash detections contributing to the binary family
+         * match.
+         * 
+ * + * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection.Builder + addDetectionsBuilder(int index) { + return getDetectionsFieldBuilder() + .addBuilder( + index, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection.getDefaultInstance()); + } + /** + * + * + *
+         * The list of memory hash detections contributing to the binary family
+         * match.
+         * 
+ * + * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + public java.util.List< + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection.Builder> + getDetectionsBuilderList() { + return getDetectionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Detection.Builder, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .DetectionOrBuilder> + getDetectionsFieldBuilder() { + if (detectionsBuilder_ == null) { + detectionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignature.Detection, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignature.Detection.Builder, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignature.DetectionOrBuilder>( + detections_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + detections_ = null; + } + return detectionsBuilder_; + } + + @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.v2.Indicator.ProcessSignature.MemoryHashSignature) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature) + private static final com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignature + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature(); + } + + public static com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignature + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MemoryHashSignature parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.Indicator.ProcessSignature.MemoryHashSignature + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface YaraRuleSignatureOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The name of the YARA rule.
+       * 
+ * + * string yara_rule = 5; + * + * @return The yaraRule. + */ + java.lang.String getYaraRule(); + /** + * + * + *
+       * The name of the YARA rule.
+       * 
+ * + * string yara_rule = 5; + * + * @return The bytes for yaraRule. + */ + com.google.protobuf.ByteString getYaraRuleBytes(); + } + /** + * + * + *
+     * A signature corresponding to a YARA rule.
+     * 
+ * + * Protobuf type {@code + * google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature} + */ + public static final class YaraRuleSignature extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature) + YaraRuleSignatureOrBuilder { + private static final long serialVersionUID = 0L; + // Use YaraRuleSignature.newBuilder() to construct. + private YaraRuleSignature(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private YaraRuleSignature() { + yaraRule_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new YaraRuleSignature(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.IndicatorProto + .internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_YaraRuleSignature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.IndicatorProto + .internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_YaraRuleSignature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + .class, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + .Builder.class); + } + + public static final int YARA_RULE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object yaraRule_ = ""; + /** + * + * + *
+       * The name of the YARA rule.
+       * 
+ * + * string yara_rule = 5; + * + * @return The yaraRule. + */ + @java.lang.Override + public java.lang.String getYaraRule() { + java.lang.Object ref = yaraRule_; + 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(); + yaraRule_ = s; + return s; + } + } + /** + * + * + *
+       * The name of the YARA rule.
+       * 
+ * + * string yara_rule = 5; + * + * @return The bytes for yaraRule. + */ + @java.lang.Override + public com.google.protobuf.ByteString getYaraRuleBytes() { + java.lang.Object ref = yaraRule_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + yaraRule_ = 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(yaraRule_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, yaraRule_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(yaraRule_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, yaraRule_); + } + size += getUnknownFields().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.v2.Indicator.ProcessSignature.YaraRuleSignature)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature other = + (com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature) obj; + + if (!getYaraRule().equals(other.getYaraRule())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + YARA_RULE_FIELD_NUMBER; + hash = (53 * hash) + getYaraRule().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + 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.v2.Indicator.ProcessSignature.YaraRuleSignature + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + 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.v2.Indicator.ProcessSignature.YaraRuleSignature + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + 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.v2.Indicator.ProcessSignature.YaraRuleSignature + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + 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.v2.Indicator.ProcessSignature.YaraRuleSignature + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + 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.v2.Indicator.ProcessSignature.YaraRuleSignature + 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 signature corresponding to a YARA rule.
+       * 
+ * + * Protobuf type {@code + * google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature) + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignatureOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.IndicatorProto + .internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_YaraRuleSignature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.IndicatorProto + .internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_YaraRuleSignature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + .class, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + .Builder.class); + } + + // Construct using + // com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + yaraRule_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.IndicatorProto + .internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_YaraRuleSignature_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + build() { + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + buildPartial() { + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature result = + new com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.yaraRule_ = yaraRule_; + } + } + + @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.v2.Indicator.ProcessSignature.YaraRuleSignature) { + return mergeFrom( + (com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature other) { + if (other + == com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + .getDefaultInstance()) return this; + if (!other.getYaraRule().isEmpty()) { + yaraRule_ = other.yaraRule_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 42: + { + yaraRule_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object yaraRule_ = ""; + /** + * + * + *
+         * The name of the YARA rule.
+         * 
+ * + * string yara_rule = 5; + * + * @return The yaraRule. + */ + public java.lang.String getYaraRule() { + java.lang.Object ref = yaraRule_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + yaraRule_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The name of the YARA rule.
+         * 
+ * + * string yara_rule = 5; + * + * @return The bytes for yaraRule. + */ + public com.google.protobuf.ByteString getYaraRuleBytes() { + java.lang.Object ref = yaraRule_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + yaraRule_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The name of the YARA rule.
+         * 
+ * + * string yara_rule = 5; + * + * @param value The yaraRule to set. + * @return This builder for chaining. + */ + public Builder setYaraRule(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + yaraRule_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * The name of the YARA rule.
+         * 
+ * + * string yara_rule = 5; + * + * @return This builder for chaining. + */ + public Builder clearYaraRule() { + yaraRule_ = getDefaultInstance().getYaraRule(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * The name of the YARA rule.
+         * 
+ * + * string yara_rule = 5; + * + * @param value The bytes for yaraRule to set. + * @return This builder for chaining. + */ + public Builder setYaraRuleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + yaraRule_ = value; + bitField0_ |= 0x00000001; + 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.v2.Indicator.ProcessSignature.YaraRuleSignature) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature) + private static final com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .YaraRuleSignature + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature(); + } + + public static com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public YaraRuleSignature parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.Indicator.ProcessSignature.YaraRuleSignature + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int signatureCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object signature_; + + public enum SignatureCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + MEMORY_HASH_SIGNATURE(6), + YARA_RULE_SIGNATURE(7), + SIGNATURE_NOT_SET(0); + private final int value; + + private SignatureCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SignatureCase valueOf(int value) { + return forNumber(value); + } + + public static SignatureCase forNumber(int value) { + switch (value) { + case 6: + return MEMORY_HASH_SIGNATURE; + case 7: + return YARA_RULE_SIGNATURE; + case 0: + return SIGNATURE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SignatureCase getSignatureCase() { + return SignatureCase.forNumber(signatureCase_); + } + + public static final int MEMORY_HASH_SIGNATURE_FIELD_NUMBER = 6; + /** + * + * + *
+     * Signature indicating that a binary family was matched.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; + * + * + * @return Whether the memoryHashSignature field is set. + */ + @java.lang.Override + public boolean hasMemoryHashSignature() { + return signatureCase_ == 6; + } + /** + * + * + *
+     * Signature indicating that a binary family was matched.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; + * + * + * @return The memoryHashSignature. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + getMemoryHashSignature() { + if (signatureCase_ == 6) { + return (com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature) + signature_; + } + return com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .getDefaultInstance(); + } + /** + * + * + *
+     * Signature indicating that a binary family was matched.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignatureOrBuilder + getMemoryHashSignatureOrBuilder() { + if (signatureCase_ == 6) { + return (com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature) + signature_; + } + return com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .getDefaultInstance(); + } + + public static final int YARA_RULE_SIGNATURE_FIELD_NUMBER = 7; + /** + * + * + *
+     * Signature indicating that a YARA rule was matched.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; + * + * + * @return Whether the yaraRuleSignature field is set. + */ + @java.lang.Override + public boolean hasYaraRuleSignature() { + return signatureCase_ == 7; + } + /** + * + * + *
+     * Signature indicating that a YARA rule was matched.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; + * + * + * @return The yaraRuleSignature. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + getYaraRuleSignature() { + if (signatureCase_ == 7) { + return (com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature) + signature_; + } + return com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + .getDefaultInstance(); + } + /** + * + * + *
+     * Signature indicating that a YARA rule was matched.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignatureOrBuilder + getYaraRuleSignatureOrBuilder() { + if (signatureCase_ == 7) { + return (com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature) + signature_; + } + return com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + .getDefaultInstance(); + } + + public static final int SIGNATURE_TYPE_FIELD_NUMBER = 8; + private int signatureType_ = 0; + /** + * + * + *
+     * Describes the type of resource associated with the signature.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType signature_type = 8; + * + * + * @return The enum numeric value on the wire for signatureType. + */ + @java.lang.Override + public int getSignatureTypeValue() { + return signatureType_; + } + /** + * + * + *
+     * Describes the type of resource associated with the signature.
+     * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType signature_type = 8; + * + * + * @return The signatureType. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType + getSignatureType() { + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType result = + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType.forNumber( + signatureType_); + return result == null + ? com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType.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 (signatureCase_ == 6) { + output.writeMessage( + 6, + (com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature) + signature_); + } + if (signatureCase_ == 7) { + output.writeMessage( + 7, + (com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature) + signature_); + } + if (signatureType_ + != com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType + .SIGNATURE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(8, signatureType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (signatureCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, + (com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature) + signature_); + } + if (signatureCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, + (com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature) + signature_); + } + if (signatureType_ + != com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType + .SIGNATURE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, signatureType_); + } + size += getUnknownFields().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.v2.Indicator.ProcessSignature)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature other = + (com.google.cloud.securitycenter.v2.Indicator.ProcessSignature) obj; + + if (signatureType_ != other.signatureType_) return false; + if (!getSignatureCase().equals(other.getSignatureCase())) return false; + switch (signatureCase_) { + case 6: + if (!getMemoryHashSignature().equals(other.getMemoryHashSignature())) return false; + break; + case 7: + if (!getYaraRuleSignature().equals(other.getYaraRuleSignature())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + SIGNATURE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + signatureType_; + switch (signatureCase_) { + case 6: + hash = (37 * hash) + MEMORY_HASH_SIGNATURE_FIELD_NUMBER; + hash = (53 * hash) + getMemoryHashSignature().hashCode(); + break; + case 7: + hash = (37 * hash) + YARA_RULE_SIGNATURE_FIELD_NUMBER; + hash = (53 * hash) + getYaraRuleSignature().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.Indicator.ProcessSignature parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Indicator.ProcessSignature 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.v2.Indicator.ProcessSignature parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Indicator.ProcessSignature 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.v2.Indicator.ProcessSignature parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Indicator.ProcessSignature parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.Indicator.ProcessSignature parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Indicator.ProcessSignature 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.v2.Indicator.ProcessSignature parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Indicator.ProcessSignature 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.v2.Indicator.ProcessSignature parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Indicator.ProcessSignature 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.v2.Indicator.ProcessSignature 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; + } + /** + * + * + *
+     * Indicates what signature matched this process.
+     * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Indicator.ProcessSignature} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.Indicator.ProcessSignature) + com.google.cloud.securitycenter.v2.Indicator.ProcessSignatureOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.IndicatorProto + .internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.IndicatorProto + .internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.class, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (memoryHashSignatureBuilder_ != null) { + memoryHashSignatureBuilder_.clear(); + } + if (yaraRuleSignatureBuilder_ != null) { + yaraRuleSignatureBuilder_.clear(); + } + signatureType_ = 0; + signatureCase_ = 0; + signature_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.IndicatorProto + .internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignature build() { + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignature buildPartial() { + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature result = + new com.google.cloud.securitycenter.v2.Indicator.ProcessSignature(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.signatureType_ = signatureType_; + } + } + + private void buildPartialOneofs( + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature result) { + result.signatureCase_ = signatureCase_; + result.signature_ = this.signature_; + if (signatureCase_ == 6 && memoryHashSignatureBuilder_ != null) { + result.signature_ = memoryHashSignatureBuilder_.build(); + } + if (signatureCase_ == 7 && yaraRuleSignatureBuilder_ != null) { + result.signature_ = yaraRuleSignatureBuilder_.build(); + } + } + + @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.v2.Indicator.ProcessSignature) { + return mergeFrom((com.google.cloud.securitycenter.v2.Indicator.ProcessSignature) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature other) { + if (other + == com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.getDefaultInstance()) + return this; + if (other.signatureType_ != 0) { + setSignatureTypeValue(other.getSignatureTypeValue()); + } + switch (other.getSignatureCase()) { + case MEMORY_HASH_SIGNATURE: + { + mergeMemoryHashSignature(other.getMemoryHashSignature()); + break; + } + case YARA_RULE_SIGNATURE: + { + mergeYaraRuleSignature(other.getYaraRuleSignature()); + break; + } + case SIGNATURE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 50: + { + input.readMessage( + getMemoryHashSignatureFieldBuilder().getBuilder(), extensionRegistry); + signatureCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage( + getYaraRuleSignatureFieldBuilder().getBuilder(), extensionRegistry); + signatureCase_ = 7; + break; + } // case 58 + case 64: + { + signatureType_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 64 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int signatureCase_ = 0; + private java.lang.Object signature_; + + public SignatureCase getSignatureCase() { + return SignatureCase.forNumber(signatureCase_); + } + + public Builder clearSignature() { + signatureCase_ = 0; + signature_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Builder, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignatureOrBuilder> + memoryHashSignatureBuilder_; + /** + * + * + *
+       * Signature indicating that a binary family was matched.
+       * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; + * + * + * @return Whether the memoryHashSignature field is set. + */ + @java.lang.Override + public boolean hasMemoryHashSignature() { + return signatureCase_ == 6; + } + /** + * + * + *
+       * Signature indicating that a binary family was matched.
+       * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; + * + * + * @return The memoryHashSignature. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + getMemoryHashSignature() { + if (memoryHashSignatureBuilder_ == null) { + if (signatureCase_ == 6) { + return (com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignature) + signature_; + } + return com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .getDefaultInstance(); + } else { + if (signatureCase_ == 6) { + return memoryHashSignatureBuilder_.getMessage(); + } + return com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Signature indicating that a binary family was matched.
+       * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; + * + */ + public Builder setMemoryHashSignature( + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature value) { + if (memoryHashSignatureBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + signature_ = value; + onChanged(); + } else { + memoryHashSignatureBuilder_.setMessage(value); + } + signatureCase_ = 6; + return this; + } + /** + * + * + *
+       * Signature indicating that a binary family was matched.
+       * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; + * + */ + public Builder setMemoryHashSignature( + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Builder + builderForValue) { + if (memoryHashSignatureBuilder_ == null) { + signature_ = builderForValue.build(); + onChanged(); + } else { + memoryHashSignatureBuilder_.setMessage(builderForValue.build()); + } + signatureCase_ = 6; + return this; + } + /** + * + * + *
+       * Signature indicating that a binary family was matched.
+       * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; + * + */ + public Builder mergeMemoryHashSignature( + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature value) { + if (memoryHashSignatureBuilder_ == null) { + if (signatureCase_ == 6 + && signature_ + != com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignature.getDefaultInstance()) { + signature_ = + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .newBuilder( + (com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignature) + signature_) + .mergeFrom(value) + .buildPartial(); + } else { + signature_ = value; + } + onChanged(); + } else { + if (signatureCase_ == 6) { + memoryHashSignatureBuilder_.mergeFrom(value); + } else { + memoryHashSignatureBuilder_.setMessage(value); + } + } + signatureCase_ = 6; + return this; + } + /** + * + * + *
+       * Signature indicating that a binary family was matched.
+       * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; + * + */ + public Builder clearMemoryHashSignature() { + if (memoryHashSignatureBuilder_ == null) { + if (signatureCase_ == 6) { + signatureCase_ = 0; + signature_ = null; + onChanged(); + } + } else { + if (signatureCase_ == 6) { + signatureCase_ = 0; + signature_ = null; + } + memoryHashSignatureBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Signature indicating that a binary family was matched.
+       * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; + * + */ + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Builder + getMemoryHashSignatureBuilder() { + return getMemoryHashSignatureFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Signature indicating that a binary family was matched.
+       * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignatureOrBuilder + getMemoryHashSignatureOrBuilder() { + if ((signatureCase_ == 6) && (memoryHashSignatureBuilder_ != null)) { + return memoryHashSignatureBuilder_.getMessageOrBuilder(); + } else { + if (signatureCase_ == 6) { + return (com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignature) + signature_; + } + return com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Signature indicating that a binary family was matched.
+       * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Builder, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignatureOrBuilder> + getMemoryHashSignatureFieldBuilder() { + if (memoryHashSignatureBuilder_ == null) { + if (!(signatureCase_ == 6)) { + signature_ = + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .getDefaultInstance(); + } + memoryHashSignatureBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + .Builder, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignatureOrBuilder>( + (com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .MemoryHashSignature) + signature_, + getParentForChildren(), + isClean()); + signature_ = null; + } + signatureCase_ = 6; + onChanged(); + return memoryHashSignatureBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + .Builder, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .YaraRuleSignatureOrBuilder> + yaraRuleSignatureBuilder_; + /** + * + * + *
+       * Signature indicating that a YARA rule was matched.
+       * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; + * + * + * @return Whether the yaraRuleSignature field is set. + */ + @java.lang.Override + public boolean hasYaraRuleSignature() { + return signatureCase_ == 7; + } + /** + * + * + *
+       * Signature indicating that a YARA rule was matched.
+       * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; + * + * + * @return The yaraRuleSignature. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + getYaraRuleSignature() { + if (yaraRuleSignatureBuilder_ == null) { + if (signatureCase_ == 7) { + return (com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature) + signature_; + } + return com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + .getDefaultInstance(); + } else { + if (signatureCase_ == 7) { + return yaraRuleSignatureBuilder_.getMessage(); + } + return com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Signature indicating that a YARA rule was matched.
+       * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; + * + */ + public Builder setYaraRuleSignature( + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature value) { + if (yaraRuleSignatureBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + signature_ = value; + onChanged(); + } else { + yaraRuleSignatureBuilder_.setMessage(value); + } + signatureCase_ = 7; + return this; + } + /** + * + * + *
+       * Signature indicating that a YARA rule was matched.
+       * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; + * + */ + public Builder setYaraRuleSignature( + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature.Builder + builderForValue) { + if (yaraRuleSignatureBuilder_ == null) { + signature_ = builderForValue.build(); + onChanged(); + } else { + yaraRuleSignatureBuilder_.setMessage(builderForValue.build()); + } + signatureCase_ = 7; + return this; + } + /** + * + * + *
+       * Signature indicating that a YARA rule was matched.
+       * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; + * + */ + public Builder mergeYaraRuleSignature( + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature value) { + if (yaraRuleSignatureBuilder_ == null) { + if (signatureCase_ == 7 + && signature_ + != com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + .getDefaultInstance()) { + signature_ = + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + .newBuilder( + (com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .YaraRuleSignature) + signature_) + .mergeFrom(value) + .buildPartial(); + } else { + signature_ = value; + } + onChanged(); + } else { + if (signatureCase_ == 7) { + yaraRuleSignatureBuilder_.mergeFrom(value); + } else { + yaraRuleSignatureBuilder_.setMessage(value); + } + } + signatureCase_ = 7; + return this; + } + /** + * + * + *
+       * Signature indicating that a YARA rule was matched.
+       * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; + * + */ + public Builder clearYaraRuleSignature() { + if (yaraRuleSignatureBuilder_ == null) { + if (signatureCase_ == 7) { + signatureCase_ = 0; + signature_ = null; + onChanged(); + } + } else { + if (signatureCase_ == 7) { + signatureCase_ = 0; + signature_ = null; + } + yaraRuleSignatureBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Signature indicating that a YARA rule was matched.
+       * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; + * + */ + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature.Builder + getYaraRuleSignatureBuilder() { + return getYaraRuleSignatureFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Signature indicating that a YARA rule was matched.
+       * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .YaraRuleSignatureOrBuilder + getYaraRuleSignatureOrBuilder() { + if ((signatureCase_ == 7) && (yaraRuleSignatureBuilder_ != null)) { + return yaraRuleSignatureBuilder_.getMessageOrBuilder(); + } else { + if (signatureCase_ == 7) { + return (com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature) + signature_; + } + return com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Signature indicating that a YARA rule was matched.
+       * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + .Builder, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .YaraRuleSignatureOrBuilder> + getYaraRuleSignatureFieldBuilder() { + if (yaraRuleSignatureBuilder_ == null) { + if (!(signatureCase_ == 7)) { + signature_ = + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + .getDefaultInstance(); + } + yaraRuleSignatureBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + .Builder, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + .YaraRuleSignatureOrBuilder>( + (com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature) + signature_, + getParentForChildren(), + isClean()); + signature_ = null; + } + signatureCase_ = 7; + onChanged(); + return yaraRuleSignatureBuilder_; + } + + private int signatureType_ = 0; + /** + * + * + *
+       * Describes the type of resource associated with the signature.
+       * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType signature_type = 8; + * + * + * @return The enum numeric value on the wire for signatureType. + */ + @java.lang.Override + public int getSignatureTypeValue() { + return signatureType_; + } + /** + * + * + *
+       * Describes the type of resource associated with the signature.
+       * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType signature_type = 8; + * + * + * @param value The enum numeric value on the wire for signatureType to set. + * @return This builder for chaining. + */ + public Builder setSignatureTypeValue(int value) { + signatureType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Describes the type of resource associated with the signature.
+       * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType signature_type = 8; + * + * + * @return The signatureType. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType + getSignatureType() { + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType result = + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType.forNumber( + signatureType_); + return result == null + ? com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType + .UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Describes the type of resource associated with the signature.
+       * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType signature_type = 8; + * + * + * @param value The signatureType to set. + * @return This builder for chaining. + */ + public Builder setSignatureType( + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + signatureType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Describes the type of resource associated with the signature.
+       * 
+ * + * + * .google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType signature_type = 8; + * + * + * @return This builder for chaining. + */ + public Builder clearSignatureType() { + bitField0_ = (bitField0_ & ~0x00000004); + signatureType_ = 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.v2.Indicator.ProcessSignature) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.Indicator.ProcessSignature) + private static final com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.Indicator.ProcessSignature(); + } + + public static com.google.cloud.securitycenter.v2.Indicator.ProcessSignature + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProcessSignature parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.Indicator.ProcessSignature + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int IP_ADDRESSES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList ipAddresses_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * The list of IP addresses that are associated with the finding.
+   * 
+ * + * repeated string ip_addresses = 1; + * + * @return A list containing the ipAddresses. + */ + public com.google.protobuf.ProtocolStringList getIpAddressesList() { + return ipAddresses_; + } + /** + * + * + *
+   * The list of IP addresses that are associated with the finding.
+   * 
+ * + * repeated string ip_addresses = 1; + * + * @return The count of ipAddresses. + */ + public int getIpAddressesCount() { + return ipAddresses_.size(); + } + /** + * + * + *
+   * The list of IP addresses that are associated with the finding.
+   * 
+ * + * repeated string ip_addresses = 1; + * + * @param index The index of the element to return. + * @return The ipAddresses at the given index. + */ + public java.lang.String getIpAddresses(int index) { + return ipAddresses_.get(index); + } + /** + * + * + *
+   * The list of IP addresses that are associated with the finding.
+   * 
+ * + * repeated string ip_addresses = 1; + * + * @param index The index of the value to return. + * @return The bytes of the ipAddresses at the given index. + */ + public com.google.protobuf.ByteString getIpAddressesBytes(int index) { + return ipAddresses_.getByteString(index); + } + + public static final int DOMAINS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList domains_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * List of domains associated to the Finding.
+   * 
+ * + * repeated string domains = 2; + * + * @return A list containing the domains. + */ + public com.google.protobuf.ProtocolStringList getDomainsList() { + return domains_; + } + /** + * + * + *
+   * List of domains associated to the Finding.
+   * 
+ * + * repeated string domains = 2; + * + * @return The count of domains. + */ + public int getDomainsCount() { + return domains_.size(); + } + /** + * + * + *
+   * List of domains associated to the Finding.
+   * 
+ * + * repeated string domains = 2; + * + * @param index The index of the element to return. + * @return The domains at the given index. + */ + public java.lang.String getDomains(int index) { + return domains_.get(index); + } + /** + * + * + *
+   * List of domains associated to the Finding.
+   * 
+ * + * repeated string domains = 2; + * + * @param index The index of the value to return. + * @return The bytes of the domains at the given index. + */ + public com.google.protobuf.ByteString getDomainsBytes(int index) { + return domains_.getByteString(index); + } + + public static final int SIGNATURES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List signatures_; + /** + * + * + *
+   * The list of matched signatures indicating that the given
+   * process is present in the environment.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature signatures = 3; + * + */ + @java.lang.Override + public java.util.List + getSignaturesList() { + return signatures_; + } + /** + * + * + *
+   * The list of matched signatures indicating that the given
+   * process is present in the environment.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature signatures = 3; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.securitycenter.v2.Indicator.ProcessSignatureOrBuilder> + getSignaturesOrBuilderList() { + return signatures_; + } + /** + * + * + *
+   * The list of matched signatures indicating that the given
+   * process is present in the environment.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature signatures = 3; + * + */ + @java.lang.Override + public int getSignaturesCount() { + return signatures_.size(); + } + /** + * + * + *
+   * The list of matched signatures indicating that the given
+   * process is present in the environment.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature signatures = 3; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignature getSignatures(int index) { + return signatures_.get(index); + } + /** + * + * + *
+   * The list of matched signatures indicating that the given
+   * process is present in the environment.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature signatures = 3; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignatureOrBuilder + getSignaturesOrBuilder(int index) { + return signatures_.get(index); + } + + public static final int URIS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList uris_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * The list of URIs associated to the Findings.
+   * 
+ * + * repeated string uris = 4; + * + * @return A list containing the uris. + */ + public com.google.protobuf.ProtocolStringList getUrisList() { + return uris_; + } + /** + * + * + *
+   * The list of URIs associated to the Findings.
+   * 
+ * + * repeated string uris = 4; + * + * @return The count of uris. + */ + public int getUrisCount() { + return uris_.size(); + } + /** + * + * + *
+   * The list of URIs associated to the Findings.
+   * 
+ * + * repeated string uris = 4; + * + * @param index The index of the element to return. + * @return The uris at the given index. + */ + public java.lang.String getUris(int index) { + return uris_.get(index); + } + /** + * + * + *
+   * The list of URIs associated to the Findings.
+   * 
+ * + * repeated string uris = 4; + * + * @param index The index of the value to return. + * @return The bytes of the uris at the given index. + */ + public com.google.protobuf.ByteString getUrisBytes(int index) { + return uris_.getByteString(index); + } + + 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 < ipAddresses_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ipAddresses_.getRaw(i)); + } + for (int i = 0; i < domains_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, domains_.getRaw(i)); + } + for (int i = 0; i < signatures_.size(); i++) { + output.writeMessage(3, signatures_.get(i)); + } + for (int i = 0; i < uris_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, uris_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < ipAddresses_.size(); i++) { + dataSize += computeStringSizeNoTag(ipAddresses_.getRaw(i)); + } + size += dataSize; + size += 1 * getIpAddressesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < domains_.size(); i++) { + dataSize += computeStringSizeNoTag(domains_.getRaw(i)); + } + size += dataSize; + size += 1 * getDomainsList().size(); + } + for (int i = 0; i < signatures_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, signatures_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < uris_.size(); i++) { + dataSize += computeStringSizeNoTag(uris_.getRaw(i)); + } + size += dataSize; + size += 1 * getUrisList().size(); + } + size += getUnknownFields().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.v2.Indicator)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.Indicator other = + (com.google.cloud.securitycenter.v2.Indicator) obj; + + if (!getIpAddressesList().equals(other.getIpAddressesList())) return false; + if (!getDomainsList().equals(other.getDomainsList())) return false; + if (!getSignaturesList().equals(other.getSignaturesList())) return false; + if (!getUrisList().equals(other.getUrisList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getIpAddressesCount() > 0) { + hash = (37 * hash) + IP_ADDRESSES_FIELD_NUMBER; + hash = (53 * hash) + getIpAddressesList().hashCode(); + } + if (getDomainsCount() > 0) { + hash = (37 * hash) + DOMAINS_FIELD_NUMBER; + hash = (53 * hash) + getDomainsList().hashCode(); + } + if (getSignaturesCount() > 0) { + hash = (37 * hash) + SIGNATURES_FIELD_NUMBER; + hash = (53 * hash) + getSignaturesList().hashCode(); + } + if (getUrisCount() > 0) { + hash = (37 * hash) + URIS_FIELD_NUMBER; + hash = (53 * hash) + getUrisList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.Indicator parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Indicator 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.v2.Indicator parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Indicator 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.v2.Indicator parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Indicator parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.Indicator parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Indicator 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.v2.Indicator parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Indicator 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.v2.Indicator parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Indicator 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.v2.Indicator 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; + } + /** + * + * + *
+   * Represents what's commonly known as an _indicator of compromise_ (IoC) in
+   * computer forensics. This is an artifact observed on a network or in an
+   * operating system that, with high confidence, indicates a computer intrusion.
+   * For more information, see [Indicator of
+   * compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise).
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Indicator} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.Indicator) + com.google.cloud.securitycenter.v2.IndicatorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.IndicatorProto + .internal_static_google_cloud_securitycenter_v2_Indicator_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.IndicatorProto + .internal_static_google_cloud_securitycenter_v2_Indicator_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Indicator.class, + com.google.cloud.securitycenter.v2.Indicator.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.Indicator.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + ipAddresses_ = com.google.protobuf.LazyStringArrayList.emptyList(); + domains_ = com.google.protobuf.LazyStringArrayList.emptyList(); + if (signaturesBuilder_ == null) { + signatures_ = java.util.Collections.emptyList(); + } else { + signatures_ = null; + signaturesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + uris_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.IndicatorProto + .internal_static_google_cloud_securitycenter_v2_Indicator_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Indicator getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.Indicator.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Indicator build() { + com.google.cloud.securitycenter.v2.Indicator result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Indicator buildPartial() { + com.google.cloud.securitycenter.v2.Indicator result = + new com.google.cloud.securitycenter.v2.Indicator(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.securitycenter.v2.Indicator result) { + if (signaturesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + signatures_ = java.util.Collections.unmodifiableList(signatures_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.signatures_ = signatures_; + } else { + result.signatures_ = signaturesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.Indicator result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + ipAddresses_.makeImmutable(); + result.ipAddresses_ = ipAddresses_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + domains_.makeImmutable(); + result.domains_ = domains_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + uris_.makeImmutable(); + result.uris_ = uris_; + } + } + + @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.v2.Indicator) { + return mergeFrom((com.google.cloud.securitycenter.v2.Indicator) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.Indicator other) { + if (other == com.google.cloud.securitycenter.v2.Indicator.getDefaultInstance()) return this; + if (!other.ipAddresses_.isEmpty()) { + if (ipAddresses_.isEmpty()) { + ipAddresses_ = other.ipAddresses_; + bitField0_ |= 0x00000001; + } else { + ensureIpAddressesIsMutable(); + ipAddresses_.addAll(other.ipAddresses_); + } + onChanged(); + } + if (!other.domains_.isEmpty()) { + if (domains_.isEmpty()) { + domains_ = other.domains_; + bitField0_ |= 0x00000002; + } else { + ensureDomainsIsMutable(); + domains_.addAll(other.domains_); + } + onChanged(); + } + if (signaturesBuilder_ == null) { + if (!other.signatures_.isEmpty()) { + if (signatures_.isEmpty()) { + signatures_ = other.signatures_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureSignaturesIsMutable(); + signatures_.addAll(other.signatures_); + } + onChanged(); + } + } else { + if (!other.signatures_.isEmpty()) { + if (signaturesBuilder_.isEmpty()) { + signaturesBuilder_.dispose(); + signaturesBuilder_ = null; + signatures_ = other.signatures_; + bitField0_ = (bitField0_ & ~0x00000004); + signaturesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSignaturesFieldBuilder() + : null; + } else { + signaturesBuilder_.addAllMessages(other.signatures_); + } + } + } + if (!other.uris_.isEmpty()) { + if (uris_.isEmpty()) { + uris_ = other.uris_; + bitField0_ |= 0x00000008; + } else { + ensureUrisIsMutable(); + uris_.addAll(other.uris_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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(); + ensureIpAddressesIsMutable(); + ipAddresses_.add(s); + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDomainsIsMutable(); + domains_.add(s); + break; + } // case 18 + case 26: + { + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature m = + input.readMessage( + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.parser(), + extensionRegistry); + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + signatures_.add(m); + } else { + signaturesBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUrisIsMutable(); + uris_.add(s); + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList ipAddresses_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureIpAddressesIsMutable() { + if (!ipAddresses_.isModifiable()) { + ipAddresses_ = new com.google.protobuf.LazyStringArrayList(ipAddresses_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+     * The list of IP addresses that are associated with the finding.
+     * 
+ * + * repeated string ip_addresses = 1; + * + * @return A list containing the ipAddresses. + */ + public com.google.protobuf.ProtocolStringList getIpAddressesList() { + ipAddresses_.makeImmutable(); + return ipAddresses_; + } + /** + * + * + *
+     * The list of IP addresses that are associated with the finding.
+     * 
+ * + * repeated string ip_addresses = 1; + * + * @return The count of ipAddresses. + */ + public int getIpAddressesCount() { + return ipAddresses_.size(); + } + /** + * + * + *
+     * The list of IP addresses that are associated with the finding.
+     * 
+ * + * repeated string ip_addresses = 1; + * + * @param index The index of the element to return. + * @return The ipAddresses at the given index. + */ + public java.lang.String getIpAddresses(int index) { + return ipAddresses_.get(index); + } + /** + * + * + *
+     * The list of IP addresses that are associated with the finding.
+     * 
+ * + * repeated string ip_addresses = 1; + * + * @param index The index of the value to return. + * @return The bytes of the ipAddresses at the given index. + */ + public com.google.protobuf.ByteString getIpAddressesBytes(int index) { + return ipAddresses_.getByteString(index); + } + /** + * + * + *
+     * The list of IP addresses that are associated with the finding.
+     * 
+ * + * repeated string ip_addresses = 1; + * + * @param index The index to set the value at. + * @param value The ipAddresses to set. + * @return This builder for chaining. + */ + public Builder setIpAddresses(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIpAddressesIsMutable(); + ipAddresses_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of IP addresses that are associated with the finding.
+     * 
+ * + * repeated string ip_addresses = 1; + * + * @param value The ipAddresses to add. + * @return This builder for chaining. + */ + public Builder addIpAddresses(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIpAddressesIsMutable(); + ipAddresses_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of IP addresses that are associated with the finding.
+     * 
+ * + * repeated string ip_addresses = 1; + * + * @param values The ipAddresses to add. + * @return This builder for chaining. + */ + public Builder addAllIpAddresses(java.lang.Iterable values) { + ensureIpAddressesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ipAddresses_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of IP addresses that are associated with the finding.
+     * 
+ * + * repeated string ip_addresses = 1; + * + * @return This builder for chaining. + */ + public Builder clearIpAddresses() { + ipAddresses_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of IP addresses that are associated with the finding.
+     * 
+ * + * repeated string ip_addresses = 1; + * + * @param value The bytes of the ipAddresses to add. + * @return This builder for chaining. + */ + public Builder addIpAddressesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureIpAddressesIsMutable(); + ipAddresses_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList domains_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureDomainsIsMutable() { + if (!domains_.isModifiable()) { + domains_ = new com.google.protobuf.LazyStringArrayList(domains_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * List of domains associated to the Finding.
+     * 
+ * + * repeated string domains = 2; + * + * @return A list containing the domains. + */ + public com.google.protobuf.ProtocolStringList getDomainsList() { + domains_.makeImmutable(); + return domains_; + } + /** + * + * + *
+     * List of domains associated to the Finding.
+     * 
+ * + * repeated string domains = 2; + * + * @return The count of domains. + */ + public int getDomainsCount() { + return domains_.size(); + } + /** + * + * + *
+     * List of domains associated to the Finding.
+     * 
+ * + * repeated string domains = 2; + * + * @param index The index of the element to return. + * @return The domains at the given index. + */ + public java.lang.String getDomains(int index) { + return domains_.get(index); + } + /** + * + * + *
+     * List of domains associated to the Finding.
+     * 
+ * + * repeated string domains = 2; + * + * @param index The index of the value to return. + * @return The bytes of the domains at the given index. + */ + public com.google.protobuf.ByteString getDomainsBytes(int index) { + return domains_.getByteString(index); + } + /** + * + * + *
+     * List of domains associated to the Finding.
+     * 
+ * + * repeated string domains = 2; + * + * @param index The index to set the value at. + * @param value The domains to set. + * @return This builder for chaining. + */ + public Builder setDomains(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDomainsIsMutable(); + domains_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * List of domains associated to the Finding.
+     * 
+ * + * repeated string domains = 2; + * + * @param value The domains to add. + * @return This builder for chaining. + */ + public Builder addDomains(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDomainsIsMutable(); + domains_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * List of domains associated to the Finding.
+     * 
+ * + * repeated string domains = 2; + * + * @param values The domains to add. + * @return This builder for chaining. + */ + public Builder addAllDomains(java.lang.Iterable values) { + ensureDomainsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, domains_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * List of domains associated to the Finding.
+     * 
+ * + * repeated string domains = 2; + * + * @return This builder for chaining. + */ + public Builder clearDomains() { + domains_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * List of domains associated to the Finding.
+     * 
+ * + * repeated string domains = 2; + * + * @param value The bytes of the domains to add. + * @return This builder for chaining. + */ + public Builder addDomainsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDomainsIsMutable(); + domains_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List + signatures_ = java.util.Collections.emptyList(); + + private void ensureSignaturesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + signatures_ = + new java.util.ArrayList( + signatures_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.Builder, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignatureOrBuilder> + signaturesBuilder_; + + /** + * + * + *
+     * The list of matched signatures indicating that the given
+     * process is present in the environment.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature signatures = 3; + * + */ + public java.util.List + getSignaturesList() { + if (signaturesBuilder_ == null) { + return java.util.Collections.unmodifiableList(signatures_); + } else { + return signaturesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of matched signatures indicating that the given
+     * process is present in the environment.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature signatures = 3; + * + */ + public int getSignaturesCount() { + if (signaturesBuilder_ == null) { + return signatures_.size(); + } else { + return signaturesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of matched signatures indicating that the given
+     * process is present in the environment.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature signatures = 3; + * + */ + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignature getSignatures(int index) { + if (signaturesBuilder_ == null) { + return signatures_.get(index); + } else { + return signaturesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of matched signatures indicating that the given
+     * process is present in the environment.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature signatures = 3; + * + */ + public Builder setSignatures( + int index, com.google.cloud.securitycenter.v2.Indicator.ProcessSignature value) { + if (signaturesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSignaturesIsMutable(); + signatures_.set(index, value); + onChanged(); + } else { + signaturesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of matched signatures indicating that the given
+     * process is present in the environment.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature signatures = 3; + * + */ + public Builder setSignatures( + int index, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.Builder builderForValue) { + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + signatures_.set(index, builderForValue.build()); + onChanged(); + } else { + signaturesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of matched signatures indicating that the given
+     * process is present in the environment.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature signatures = 3; + * + */ + public Builder addSignatures( + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature value) { + if (signaturesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSignaturesIsMutable(); + signatures_.add(value); + onChanged(); + } else { + signaturesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of matched signatures indicating that the given
+     * process is present in the environment.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature signatures = 3; + * + */ + public Builder addSignatures( + int index, com.google.cloud.securitycenter.v2.Indicator.ProcessSignature value) { + if (signaturesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSignaturesIsMutable(); + signatures_.add(index, value); + onChanged(); + } else { + signaturesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of matched signatures indicating that the given
+     * process is present in the environment.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature signatures = 3; + * + */ + public Builder addSignatures( + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.Builder builderForValue) { + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + signatures_.add(builderForValue.build()); + onChanged(); + } else { + signaturesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of matched signatures indicating that the given
+     * process is present in the environment.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature signatures = 3; + * + */ + public Builder addSignatures( + int index, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.Builder builderForValue) { + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + signatures_.add(index, builderForValue.build()); + onChanged(); + } else { + signaturesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of matched signatures indicating that the given
+     * process is present in the environment.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature signatures = 3; + * + */ + public Builder addAllSignatures( + java.lang.Iterable + values) { + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, signatures_); + onChanged(); + } else { + signaturesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of matched signatures indicating that the given
+     * process is present in the environment.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature signatures = 3; + * + */ + public Builder clearSignatures() { + if (signaturesBuilder_ == null) { + signatures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + signaturesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of matched signatures indicating that the given
+     * process is present in the environment.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature signatures = 3; + * + */ + public Builder removeSignatures(int index) { + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + signatures_.remove(index); + onChanged(); + } else { + signaturesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of matched signatures indicating that the given
+     * process is present in the environment.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature signatures = 3; + * + */ + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.Builder + getSignaturesBuilder(int index) { + return getSignaturesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of matched signatures indicating that the given
+     * process is present in the environment.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature signatures = 3; + * + */ + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignatureOrBuilder + getSignaturesOrBuilder(int index) { + if (signaturesBuilder_ == null) { + return signatures_.get(index); + } else { + return signaturesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of matched signatures indicating that the given
+     * process is present in the environment.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature signatures = 3; + * + */ + public java.util.List< + ? extends com.google.cloud.securitycenter.v2.Indicator.ProcessSignatureOrBuilder> + getSignaturesOrBuilderList() { + if (signaturesBuilder_ != null) { + return signaturesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(signatures_); + } + } + /** + * + * + *
+     * The list of matched signatures indicating that the given
+     * process is present in the environment.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature signatures = 3; + * + */ + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.Builder + addSignaturesBuilder() { + return getSignaturesFieldBuilder() + .addBuilder( + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.getDefaultInstance()); + } + /** + * + * + *
+     * The list of matched signatures indicating that the given
+     * process is present in the environment.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature signatures = 3; + * + */ + public com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.Builder + addSignaturesBuilder(int index) { + return getSignaturesFieldBuilder() + .addBuilder( + index, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.getDefaultInstance()); + } + /** + * + * + *
+     * The list of matched signatures indicating that the given
+     * process is present in the environment.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature signatures = 3; + * + */ + public java.util.List + getSignaturesBuilderList() { + return getSignaturesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.Builder, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignatureOrBuilder> + getSignaturesFieldBuilder() { + if (signaturesBuilder_ == null) { + signaturesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature.Builder, + com.google.cloud.securitycenter.v2.Indicator.ProcessSignatureOrBuilder>( + signatures_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + signatures_ = null; + } + return signaturesBuilder_; + } + + private com.google.protobuf.LazyStringArrayList uris_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUrisIsMutable() { + if (!uris_.isModifiable()) { + uris_ = new com.google.protobuf.LazyStringArrayList(uris_); + } + bitField0_ |= 0x00000008; + } + /** + * + * + *
+     * The list of URIs associated to the Findings.
+     * 
+ * + * repeated string uris = 4; + * + * @return A list containing the uris. + */ + public com.google.protobuf.ProtocolStringList getUrisList() { + uris_.makeImmutable(); + return uris_; + } + /** + * + * + *
+     * The list of URIs associated to the Findings.
+     * 
+ * + * repeated string uris = 4; + * + * @return The count of uris. + */ + public int getUrisCount() { + return uris_.size(); + } + /** + * + * + *
+     * The list of URIs associated to the Findings.
+     * 
+ * + * repeated string uris = 4; + * + * @param index The index of the element to return. + * @return The uris at the given index. + */ + public java.lang.String getUris(int index) { + return uris_.get(index); + } + /** + * + * + *
+     * The list of URIs associated to the Findings.
+     * 
+ * + * repeated string uris = 4; + * + * @param index The index of the value to return. + * @return The bytes of the uris at the given index. + */ + public com.google.protobuf.ByteString getUrisBytes(int index) { + return uris_.getByteString(index); + } + /** + * + * + *
+     * The list of URIs associated to the Findings.
+     * 
+ * + * repeated string uris = 4; + * + * @param index The index to set the value at. + * @param value The uris to set. + * @return This builder for chaining. + */ + public Builder setUris(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUrisIsMutable(); + uris_.set(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of URIs associated to the Findings.
+     * 
+ * + * repeated string uris = 4; + * + * @param value The uris to add. + * @return This builder for chaining. + */ + public Builder addUris(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUrisIsMutable(); + uris_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of URIs associated to the Findings.
+     * 
+ * + * repeated string uris = 4; + * + * @param values The uris to add. + * @return This builder for chaining. + */ + public Builder addAllUris(java.lang.Iterable values) { + ensureUrisIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, uris_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of URIs associated to the Findings.
+     * 
+ * + * repeated string uris = 4; + * + * @return This builder for chaining. + */ + public Builder clearUris() { + uris_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of URIs associated to the Findings.
+     * 
+ * + * repeated string uris = 4; + * + * @param value The bytes of the uris to add. + * @return This builder for chaining. + */ + public Builder addUrisBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUrisIsMutable(); + uris_.add(value); + bitField0_ |= 0x00000008; + 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.v2.Indicator) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.Indicator) + private static final com.google.cloud.securitycenter.v2.Indicator DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.Indicator(); + } + + public static com.google.cloud.securitycenter.v2.Indicator getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Indicator parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.Indicator getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/IndicatorOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/IndicatorOrBuilder.java new file mode 100644 index 000000000000..6ab7dd085cf3 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/IndicatorOrBuilder.java @@ -0,0 +1,242 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/indicator.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface IndicatorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.Indicator) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of IP addresses that are associated with the finding.
+   * 
+ * + * repeated string ip_addresses = 1; + * + * @return A list containing the ipAddresses. + */ + java.util.List getIpAddressesList(); + /** + * + * + *
+   * The list of IP addresses that are associated with the finding.
+   * 
+ * + * repeated string ip_addresses = 1; + * + * @return The count of ipAddresses. + */ + int getIpAddressesCount(); + /** + * + * + *
+   * The list of IP addresses that are associated with the finding.
+   * 
+ * + * repeated string ip_addresses = 1; + * + * @param index The index of the element to return. + * @return The ipAddresses at the given index. + */ + java.lang.String getIpAddresses(int index); + /** + * + * + *
+   * The list of IP addresses that are associated with the finding.
+   * 
+ * + * repeated string ip_addresses = 1; + * + * @param index The index of the value to return. + * @return The bytes of the ipAddresses at the given index. + */ + com.google.protobuf.ByteString getIpAddressesBytes(int index); + + /** + * + * + *
+   * List of domains associated to the Finding.
+   * 
+ * + * repeated string domains = 2; + * + * @return A list containing the domains. + */ + java.util.List getDomainsList(); + /** + * + * + *
+   * List of domains associated to the Finding.
+   * 
+ * + * repeated string domains = 2; + * + * @return The count of domains. + */ + int getDomainsCount(); + /** + * + * + *
+   * List of domains associated to the Finding.
+   * 
+ * + * repeated string domains = 2; + * + * @param index The index of the element to return. + * @return The domains at the given index. + */ + java.lang.String getDomains(int index); + /** + * + * + *
+   * List of domains associated to the Finding.
+   * 
+ * + * repeated string domains = 2; + * + * @param index The index of the value to return. + * @return The bytes of the domains at the given index. + */ + com.google.protobuf.ByteString getDomainsBytes(int index); + + /** + * + * + *
+   * The list of matched signatures indicating that the given
+   * process is present in the environment.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature signatures = 3; + * + */ + java.util.List getSignaturesList(); + /** + * + * + *
+   * The list of matched signatures indicating that the given
+   * process is present in the environment.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature signatures = 3; + * + */ + com.google.cloud.securitycenter.v2.Indicator.ProcessSignature getSignatures(int index); + /** + * + * + *
+   * The list of matched signatures indicating that the given
+   * process is present in the environment.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature signatures = 3; + * + */ + int getSignaturesCount(); + /** + * + * + *
+   * The list of matched signatures indicating that the given
+   * process is present in the environment.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature signatures = 3; + * + */ + java.util.List + getSignaturesOrBuilderList(); + /** + * + * + *
+   * The list of matched signatures indicating that the given
+   * process is present in the environment.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Indicator.ProcessSignature signatures = 3; + * + */ + com.google.cloud.securitycenter.v2.Indicator.ProcessSignatureOrBuilder getSignaturesOrBuilder( + int index); + + /** + * + * + *
+   * The list of URIs associated to the Findings.
+   * 
+ * + * repeated string uris = 4; + * + * @return A list containing the uris. + */ + java.util.List getUrisList(); + /** + * + * + *
+   * The list of URIs associated to the Findings.
+   * 
+ * + * repeated string uris = 4; + * + * @return The count of uris. + */ + int getUrisCount(); + /** + * + * + *
+   * The list of URIs associated to the Findings.
+   * 
+ * + * repeated string uris = 4; + * + * @param index The index of the element to return. + * @return The uris at the given index. + */ + java.lang.String getUris(int index); + /** + * + * + *
+   * The list of URIs associated to the Findings.
+   * 
+ * + * repeated string uris = 4; + * + * @param index The index of the value to return. + * @return The bytes of the uris at the given index. + */ + com.google.protobuf.ByteString getUrisBytes(int index); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/IndicatorProto.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/IndicatorProto.java new file mode 100644 index 000000000000..3d201a064fed --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/IndicatorProto.java @@ -0,0 +1,143 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/indicator.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public final class IndicatorProto { + private IndicatorProto() {} + + 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_v2_Indicator_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_Indicator_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_MemoryHashSignature_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_MemoryHashSignature_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_MemoryHashSignature_Detection_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_MemoryHashSignature_Detection_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_YaraRuleSignature_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_YaraRuleSignature_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n.google/cloud/securitycenter/v2/indicat" + + "or.proto\022\036google.cloud.securitycenter.v2" + + "\"\331\006\n\tIndicator\022\024\n\014ip_addresses\030\001 \003(\t\022\017\n\007" + + "domains\030\002 \003(\t\022N\n\nsignatures\030\003 \003(\0132:.goog" + + "le.cloud.securitycenter.v2.Indicator.Pro" + + "cessSignature\022\014\n\004uris\030\004 \003(\t\032\306\005\n\020ProcessS" + + "ignature\022o\n\025memory_hash_signature\030\006 \001(\0132" + + "N.google.cloud.securitycenter.v2.Indicat" + + "or.ProcessSignature.MemoryHashSignatureH" + + "\000\022k\n\023yara_rule_signature\030\007 \001(\0132L.google." + + "cloud.securitycenter.v2.Indicator.Proces" + + "sSignature.YaraRuleSignatureH\000\022`\n\016signat" + + "ure_type\030\010 \001(\0162H.google.cloud.securityce" + + "nter.v2.Indicator.ProcessSignature.Signa" + + "tureType\032\326\001\n\023MemoryHashSignature\022\025\n\rbina" + + "ry_family\030\001 \001(\t\022l\n\ndetections\030\004 \003(\0132X.go" + + "ogle.cloud.securitycenter.v2.Indicator.P" + + "rocessSignature.MemoryHashSignature.Dete" + + "ction\032:\n\tDetection\022\016\n\006binary\030\002 \001(\t\022\035\n\025pe" + + "rcent_pages_matched\030\003 \001(\001\032&\n\021YaraRuleSig" + + "nature\022\021\n\tyara_rule\030\005 \001(\t\"d\n\rSignatureTy" + + "pe\022\036\n\032SIGNATURE_TYPE_UNSPECIFIED\020\000\022\032\n\026SI" + + "GNATURE_TYPE_PROCESS\020\001\022\027\n\023SIGNATURE_TYPE" + + "_FILE\020\002B\013\n\tsignatureB\350\001\n\"com.google.clou" + + "d.securitycenter.v2B\016IndicatorProtoP\001ZJc" + + "loud.google.com/go/securitycenter/apiv2/" + + "securitycenterpb;securitycenterpb\252\002\036Goog" + + "le.Cloud.SecurityCenter.V2\312\002\036Google\\Clou" + + "d\\SecurityCenter\\V2\352\002!Google::Cloud::Sec" + + "urityCenter::V2b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_cloud_securitycenter_v2_Indicator_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_securitycenter_v2_Indicator_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_Indicator_descriptor, + new java.lang.String[] { + "IpAddresses", "Domains", "Signatures", "Uris", + }); + internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_descriptor = + internal_static_google_cloud_securitycenter_v2_Indicator_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_descriptor, + new java.lang.String[] { + "MemoryHashSignature", "YaraRuleSignature", "SignatureType", "Signature", + }); + internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_MemoryHashSignature_descriptor = + internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_MemoryHashSignature_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_MemoryHashSignature_descriptor, + new java.lang.String[] { + "BinaryFamily", "Detections", + }); + internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_MemoryHashSignature_Detection_descriptor = + internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_MemoryHashSignature_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_MemoryHashSignature_Detection_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_MemoryHashSignature_Detection_descriptor, + new java.lang.String[] { + "Binary", "PercentPagesMatched", + }); + internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_YaraRuleSignature_descriptor = + internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_YaraRuleSignature_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_Indicator_ProcessSignature_YaraRuleSignature_descriptor, + new java.lang.String[] { + "YaraRule", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/KernelRootkit.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/KernelRootkit.java new file mode 100644 index 000000000000..9dc69c099c8e --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/KernelRootkit.java @@ -0,0 +1,1406 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/kernel_rootkit.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Kernel mode rootkit signatures.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.KernelRootkit} + */ +public final class KernelRootkit extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.KernelRootkit) + KernelRootkitOrBuilder { + private static final long serialVersionUID = 0L; + // Use KernelRootkit.newBuilder() to construct. + private KernelRootkit(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private KernelRootkit() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new KernelRootkit(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.KernelRootkitProto + .internal_static_google_cloud_securitycenter_v2_KernelRootkit_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.KernelRootkitProto + .internal_static_google_cloud_securitycenter_v2_KernelRootkit_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.KernelRootkit.class, + com.google.cloud.securitycenter.v2.KernelRootkit.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Rootkit name, when available.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Rootkit name, when available.
+   * 
+ * + * 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 UNEXPECTED_CODE_MODIFICATION_FIELD_NUMBER = 2; + private boolean unexpectedCodeModification_ = false; + /** + * + * + *
+   * True if unexpected modifications of kernel code memory are present.
+   * 
+ * + * bool unexpected_code_modification = 2; + * + * @return The unexpectedCodeModification. + */ + @java.lang.Override + public boolean getUnexpectedCodeModification() { + return unexpectedCodeModification_; + } + + public static final int UNEXPECTED_READ_ONLY_DATA_MODIFICATION_FIELD_NUMBER = 3; + private boolean unexpectedReadOnlyDataModification_ = false; + /** + * + * + *
+   * True if unexpected modifications of kernel read-only data memory are
+   * present.
+   * 
+ * + * bool unexpected_read_only_data_modification = 3; + * + * @return The unexpectedReadOnlyDataModification. + */ + @java.lang.Override + public boolean getUnexpectedReadOnlyDataModification() { + return unexpectedReadOnlyDataModification_; + } + + public static final int UNEXPECTED_FTRACE_HANDLER_FIELD_NUMBER = 4; + private boolean unexpectedFtraceHandler_ = false; + /** + * + * + *
+   * True if `ftrace` points are present with callbacks pointing to regions
+   * that are not in the expected kernel or module code range.
+   * 
+ * + * bool unexpected_ftrace_handler = 4; + * + * @return The unexpectedFtraceHandler. + */ + @java.lang.Override + public boolean getUnexpectedFtraceHandler() { + return unexpectedFtraceHandler_; + } + + public static final int UNEXPECTED_KPROBE_HANDLER_FIELD_NUMBER = 5; + private boolean unexpectedKprobeHandler_ = false; + /** + * + * + *
+   * True if `kprobe` points are present with callbacks pointing to regions
+   * that are not in the expected kernel or module code range.
+   * 
+ * + * bool unexpected_kprobe_handler = 5; + * + * @return The unexpectedKprobeHandler. + */ + @java.lang.Override + public boolean getUnexpectedKprobeHandler() { + return unexpectedKprobeHandler_; + } + + public static final int UNEXPECTED_KERNEL_CODE_PAGES_FIELD_NUMBER = 6; + private boolean unexpectedKernelCodePages_ = false; + /** + * + * + *
+   * True if kernel code pages that are not in the expected kernel or module
+   * code regions are present.
+   * 
+ * + * bool unexpected_kernel_code_pages = 6; + * + * @return The unexpectedKernelCodePages. + */ + @java.lang.Override + public boolean getUnexpectedKernelCodePages() { + return unexpectedKernelCodePages_; + } + + public static final int UNEXPECTED_SYSTEM_CALL_HANDLER_FIELD_NUMBER = 7; + private boolean unexpectedSystemCallHandler_ = false; + /** + * + * + *
+   * True if system call handlers that are are not in the expected kernel or
+   * module code regions are present.
+   * 
+ * + * bool unexpected_system_call_handler = 7; + * + * @return The unexpectedSystemCallHandler. + */ + @java.lang.Override + public boolean getUnexpectedSystemCallHandler() { + return unexpectedSystemCallHandler_; + } + + public static final int UNEXPECTED_INTERRUPT_HANDLER_FIELD_NUMBER = 8; + private boolean unexpectedInterruptHandler_ = false; + /** + * + * + *
+   * True if interrupt handlers that are are not in the expected kernel or
+   * module code regions are present.
+   * 
+ * + * bool unexpected_interrupt_handler = 8; + * + * @return The unexpectedInterruptHandler. + */ + @java.lang.Override + public boolean getUnexpectedInterruptHandler() { + return unexpectedInterruptHandler_; + } + + public static final int UNEXPECTED_PROCESSES_IN_RUNQUEUE_FIELD_NUMBER = 9; + private boolean unexpectedProcessesInRunqueue_ = false; + /** + * + * + *
+   * True if unexpected processes in the scheduler run queue are present. Such
+   * processes are in the run queue, but not in the process task list.
+   * 
+ * + * bool unexpected_processes_in_runqueue = 9; + * + * @return The unexpectedProcessesInRunqueue. + */ + @java.lang.Override + public boolean getUnexpectedProcessesInRunqueue() { + return unexpectedProcessesInRunqueue_; + } + + 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 (unexpectedCodeModification_ != false) { + output.writeBool(2, unexpectedCodeModification_); + } + if (unexpectedReadOnlyDataModification_ != false) { + output.writeBool(3, unexpectedReadOnlyDataModification_); + } + if (unexpectedFtraceHandler_ != false) { + output.writeBool(4, unexpectedFtraceHandler_); + } + if (unexpectedKprobeHandler_ != false) { + output.writeBool(5, unexpectedKprobeHandler_); + } + if (unexpectedKernelCodePages_ != false) { + output.writeBool(6, unexpectedKernelCodePages_); + } + if (unexpectedSystemCallHandler_ != false) { + output.writeBool(7, unexpectedSystemCallHandler_); + } + if (unexpectedInterruptHandler_ != false) { + output.writeBool(8, unexpectedInterruptHandler_); + } + if (unexpectedProcessesInRunqueue_ != false) { + output.writeBool(9, unexpectedProcessesInRunqueue_); + } + getUnknownFields().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 (unexpectedCodeModification_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, unexpectedCodeModification_); + } + if (unexpectedReadOnlyDataModification_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 3, unexpectedReadOnlyDataModification_); + } + if (unexpectedFtraceHandler_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, unexpectedFtraceHandler_); + } + if (unexpectedKprobeHandler_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, unexpectedKprobeHandler_); + } + if (unexpectedKernelCodePages_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, unexpectedKernelCodePages_); + } + if (unexpectedSystemCallHandler_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(7, unexpectedSystemCallHandler_); + } + if (unexpectedInterruptHandler_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, unexpectedInterruptHandler_); + } + if (unexpectedProcessesInRunqueue_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(9, unexpectedProcessesInRunqueue_); + } + size += getUnknownFields().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.v2.KernelRootkit)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.KernelRootkit other = + (com.google.cloud.securitycenter.v2.KernelRootkit) obj; + + if (!getName().equals(other.getName())) return false; + if (getUnexpectedCodeModification() != other.getUnexpectedCodeModification()) return false; + if (getUnexpectedReadOnlyDataModification() != other.getUnexpectedReadOnlyDataModification()) + return false; + if (getUnexpectedFtraceHandler() != other.getUnexpectedFtraceHandler()) return false; + if (getUnexpectedKprobeHandler() != other.getUnexpectedKprobeHandler()) return false; + if (getUnexpectedKernelCodePages() != other.getUnexpectedKernelCodePages()) return false; + if (getUnexpectedSystemCallHandler() != other.getUnexpectedSystemCallHandler()) return false; + if (getUnexpectedInterruptHandler() != other.getUnexpectedInterruptHandler()) return false; + if (getUnexpectedProcessesInRunqueue() != other.getUnexpectedProcessesInRunqueue()) + return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + UNEXPECTED_CODE_MODIFICATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUnexpectedCodeModification()); + hash = (37 * hash) + UNEXPECTED_READ_ONLY_DATA_MODIFICATION_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashBoolean(getUnexpectedReadOnlyDataModification()); + hash = (37 * hash) + UNEXPECTED_FTRACE_HANDLER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUnexpectedFtraceHandler()); + hash = (37 * hash) + UNEXPECTED_KPROBE_HANDLER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUnexpectedKprobeHandler()); + hash = (37 * hash) + UNEXPECTED_KERNEL_CODE_PAGES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUnexpectedKernelCodePages()); + hash = (37 * hash) + UNEXPECTED_SYSTEM_CALL_HANDLER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUnexpectedSystemCallHandler()); + hash = (37 * hash) + UNEXPECTED_INTERRUPT_HANDLER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUnexpectedInterruptHandler()); + hash = (37 * hash) + UNEXPECTED_PROCESSES_IN_RUNQUEUE_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUnexpectedProcessesInRunqueue()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.KernelRootkit parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.KernelRootkit 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.v2.KernelRootkit parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.KernelRootkit 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.v2.KernelRootkit parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.KernelRootkit parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.KernelRootkit parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.KernelRootkit 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.v2.KernelRootkit parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.KernelRootkit 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.v2.KernelRootkit parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.KernelRootkit 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.v2.KernelRootkit 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; + } + /** + * + * + *
+   * Kernel mode rootkit signatures.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.KernelRootkit} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.KernelRootkit) + com.google.cloud.securitycenter.v2.KernelRootkitOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.KernelRootkitProto + .internal_static_google_cloud_securitycenter_v2_KernelRootkit_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.KernelRootkitProto + .internal_static_google_cloud_securitycenter_v2_KernelRootkit_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.KernelRootkit.class, + com.google.cloud.securitycenter.v2.KernelRootkit.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.KernelRootkit.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + unexpectedCodeModification_ = false; + unexpectedReadOnlyDataModification_ = false; + unexpectedFtraceHandler_ = false; + unexpectedKprobeHandler_ = false; + unexpectedKernelCodePages_ = false; + unexpectedSystemCallHandler_ = false; + unexpectedInterruptHandler_ = false; + unexpectedProcessesInRunqueue_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.KernelRootkitProto + .internal_static_google_cloud_securitycenter_v2_KernelRootkit_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.KernelRootkit getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.KernelRootkit.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.KernelRootkit build() { + com.google.cloud.securitycenter.v2.KernelRootkit result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.KernelRootkit buildPartial() { + com.google.cloud.securitycenter.v2.KernelRootkit result = + new com.google.cloud.securitycenter.v2.KernelRootkit(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.KernelRootkit result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.unexpectedCodeModification_ = unexpectedCodeModification_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.unexpectedReadOnlyDataModification_ = unexpectedReadOnlyDataModification_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.unexpectedFtraceHandler_ = unexpectedFtraceHandler_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.unexpectedKprobeHandler_ = unexpectedKprobeHandler_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.unexpectedKernelCodePages_ = unexpectedKernelCodePages_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.unexpectedSystemCallHandler_ = unexpectedSystemCallHandler_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.unexpectedInterruptHandler_ = unexpectedInterruptHandler_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.unexpectedProcessesInRunqueue_ = unexpectedProcessesInRunqueue_; + } + } + + @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.v2.KernelRootkit) { + return mergeFrom((com.google.cloud.securitycenter.v2.KernelRootkit) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.KernelRootkit other) { + if (other == com.google.cloud.securitycenter.v2.KernelRootkit.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getUnexpectedCodeModification() != false) { + setUnexpectedCodeModification(other.getUnexpectedCodeModification()); + } + if (other.getUnexpectedReadOnlyDataModification() != false) { + setUnexpectedReadOnlyDataModification(other.getUnexpectedReadOnlyDataModification()); + } + if (other.getUnexpectedFtraceHandler() != false) { + setUnexpectedFtraceHandler(other.getUnexpectedFtraceHandler()); + } + if (other.getUnexpectedKprobeHandler() != false) { + setUnexpectedKprobeHandler(other.getUnexpectedKprobeHandler()); + } + if (other.getUnexpectedKernelCodePages() != false) { + setUnexpectedKernelCodePages(other.getUnexpectedKernelCodePages()); + } + if (other.getUnexpectedSystemCallHandler() != false) { + setUnexpectedSystemCallHandler(other.getUnexpectedSystemCallHandler()); + } + if (other.getUnexpectedInterruptHandler() != false) { + setUnexpectedInterruptHandler(other.getUnexpectedInterruptHandler()); + } + if (other.getUnexpectedProcessesInRunqueue() != false) { + setUnexpectedProcessesInRunqueue(other.getUnexpectedProcessesInRunqueue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + unexpectedCodeModification_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + unexpectedReadOnlyDataModification_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + unexpectedFtraceHandler_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + unexpectedKprobeHandler_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: + { + unexpectedKernelCodePages_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: + { + unexpectedSystemCallHandler_ = input.readBool(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 64: + { + unexpectedInterruptHandler_ = input.readBool(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 72: + { + unexpectedProcessesInRunqueue_ = input.readBool(); + bitField0_ |= 0x00000100; + break; + } // case 72 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Rootkit name, when available.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Rootkit name, when available.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Rootkit name, when available.
+     * 
+ * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Rootkit name, when available.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Rootkit name, when available.
+     * 
+ * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean unexpectedCodeModification_; + /** + * + * + *
+     * True if unexpected modifications of kernel code memory are present.
+     * 
+ * + * bool unexpected_code_modification = 2; + * + * @return The unexpectedCodeModification. + */ + @java.lang.Override + public boolean getUnexpectedCodeModification() { + return unexpectedCodeModification_; + } + /** + * + * + *
+     * True if unexpected modifications of kernel code memory are present.
+     * 
+ * + * bool unexpected_code_modification = 2; + * + * @param value The unexpectedCodeModification to set. + * @return This builder for chaining. + */ + public Builder setUnexpectedCodeModification(boolean value) { + + unexpectedCodeModification_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * True if unexpected modifications of kernel code memory are present.
+     * 
+ * + * bool unexpected_code_modification = 2; + * + * @return This builder for chaining. + */ + public Builder clearUnexpectedCodeModification() { + bitField0_ = (bitField0_ & ~0x00000002); + unexpectedCodeModification_ = false; + onChanged(); + return this; + } + + private boolean unexpectedReadOnlyDataModification_; + /** + * + * + *
+     * True if unexpected modifications of kernel read-only data memory are
+     * present.
+     * 
+ * + * bool unexpected_read_only_data_modification = 3; + * + * @return The unexpectedReadOnlyDataModification. + */ + @java.lang.Override + public boolean getUnexpectedReadOnlyDataModification() { + return unexpectedReadOnlyDataModification_; + } + /** + * + * + *
+     * True if unexpected modifications of kernel read-only data memory are
+     * present.
+     * 
+ * + * bool unexpected_read_only_data_modification = 3; + * + * @param value The unexpectedReadOnlyDataModification to set. + * @return This builder for chaining. + */ + public Builder setUnexpectedReadOnlyDataModification(boolean value) { + + unexpectedReadOnlyDataModification_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * True if unexpected modifications of kernel read-only data memory are
+     * present.
+     * 
+ * + * bool unexpected_read_only_data_modification = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnexpectedReadOnlyDataModification() { + bitField0_ = (bitField0_ & ~0x00000004); + unexpectedReadOnlyDataModification_ = false; + onChanged(); + return this; + } + + private boolean unexpectedFtraceHandler_; + /** + * + * + *
+     * True if `ftrace` points are present with callbacks pointing to regions
+     * that are not in the expected kernel or module code range.
+     * 
+ * + * bool unexpected_ftrace_handler = 4; + * + * @return The unexpectedFtraceHandler. + */ + @java.lang.Override + public boolean getUnexpectedFtraceHandler() { + return unexpectedFtraceHandler_; + } + /** + * + * + *
+     * True if `ftrace` points are present with callbacks pointing to regions
+     * that are not in the expected kernel or module code range.
+     * 
+ * + * bool unexpected_ftrace_handler = 4; + * + * @param value The unexpectedFtraceHandler to set. + * @return This builder for chaining. + */ + public Builder setUnexpectedFtraceHandler(boolean value) { + + unexpectedFtraceHandler_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * True if `ftrace` points are present with callbacks pointing to regions
+     * that are not in the expected kernel or module code range.
+     * 
+ * + * bool unexpected_ftrace_handler = 4; + * + * @return This builder for chaining. + */ + public Builder clearUnexpectedFtraceHandler() { + bitField0_ = (bitField0_ & ~0x00000008); + unexpectedFtraceHandler_ = false; + onChanged(); + return this; + } + + private boolean unexpectedKprobeHandler_; + /** + * + * + *
+     * True if `kprobe` points are present with callbacks pointing to regions
+     * that are not in the expected kernel or module code range.
+     * 
+ * + * bool unexpected_kprobe_handler = 5; + * + * @return The unexpectedKprobeHandler. + */ + @java.lang.Override + public boolean getUnexpectedKprobeHandler() { + return unexpectedKprobeHandler_; + } + /** + * + * + *
+     * True if `kprobe` points are present with callbacks pointing to regions
+     * that are not in the expected kernel or module code range.
+     * 
+ * + * bool unexpected_kprobe_handler = 5; + * + * @param value The unexpectedKprobeHandler to set. + * @return This builder for chaining. + */ + public Builder setUnexpectedKprobeHandler(boolean value) { + + unexpectedKprobeHandler_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * True if `kprobe` points are present with callbacks pointing to regions
+     * that are not in the expected kernel or module code range.
+     * 
+ * + * bool unexpected_kprobe_handler = 5; + * + * @return This builder for chaining. + */ + public Builder clearUnexpectedKprobeHandler() { + bitField0_ = (bitField0_ & ~0x00000010); + unexpectedKprobeHandler_ = false; + onChanged(); + return this; + } + + private boolean unexpectedKernelCodePages_; + /** + * + * + *
+     * True if kernel code pages that are not in the expected kernel or module
+     * code regions are present.
+     * 
+ * + * bool unexpected_kernel_code_pages = 6; + * + * @return The unexpectedKernelCodePages. + */ + @java.lang.Override + public boolean getUnexpectedKernelCodePages() { + return unexpectedKernelCodePages_; + } + /** + * + * + *
+     * True if kernel code pages that are not in the expected kernel or module
+     * code regions are present.
+     * 
+ * + * bool unexpected_kernel_code_pages = 6; + * + * @param value The unexpectedKernelCodePages to set. + * @return This builder for chaining. + */ + public Builder setUnexpectedKernelCodePages(boolean value) { + + unexpectedKernelCodePages_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * True if kernel code pages that are not in the expected kernel or module
+     * code regions are present.
+     * 
+ * + * bool unexpected_kernel_code_pages = 6; + * + * @return This builder for chaining. + */ + public Builder clearUnexpectedKernelCodePages() { + bitField0_ = (bitField0_ & ~0x00000020); + unexpectedKernelCodePages_ = false; + onChanged(); + return this; + } + + private boolean unexpectedSystemCallHandler_; + /** + * + * + *
+     * True if system call handlers that are are not in the expected kernel or
+     * module code regions are present.
+     * 
+ * + * bool unexpected_system_call_handler = 7; + * + * @return The unexpectedSystemCallHandler. + */ + @java.lang.Override + public boolean getUnexpectedSystemCallHandler() { + return unexpectedSystemCallHandler_; + } + /** + * + * + *
+     * True if system call handlers that are are not in the expected kernel or
+     * module code regions are present.
+     * 
+ * + * bool unexpected_system_call_handler = 7; + * + * @param value The unexpectedSystemCallHandler to set. + * @return This builder for chaining. + */ + public Builder setUnexpectedSystemCallHandler(boolean value) { + + unexpectedSystemCallHandler_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * True if system call handlers that are are not in the expected kernel or
+     * module code regions are present.
+     * 
+ * + * bool unexpected_system_call_handler = 7; + * + * @return This builder for chaining. + */ + public Builder clearUnexpectedSystemCallHandler() { + bitField0_ = (bitField0_ & ~0x00000040); + unexpectedSystemCallHandler_ = false; + onChanged(); + return this; + } + + private boolean unexpectedInterruptHandler_; + /** + * + * + *
+     * True if interrupt handlers that are are not in the expected kernel or
+     * module code regions are present.
+     * 
+ * + * bool unexpected_interrupt_handler = 8; + * + * @return The unexpectedInterruptHandler. + */ + @java.lang.Override + public boolean getUnexpectedInterruptHandler() { + return unexpectedInterruptHandler_; + } + /** + * + * + *
+     * True if interrupt handlers that are are not in the expected kernel or
+     * module code regions are present.
+     * 
+ * + * bool unexpected_interrupt_handler = 8; + * + * @param value The unexpectedInterruptHandler to set. + * @return This builder for chaining. + */ + public Builder setUnexpectedInterruptHandler(boolean value) { + + unexpectedInterruptHandler_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * True if interrupt handlers that are are not in the expected kernel or
+     * module code regions are present.
+     * 
+ * + * bool unexpected_interrupt_handler = 8; + * + * @return This builder for chaining. + */ + public Builder clearUnexpectedInterruptHandler() { + bitField0_ = (bitField0_ & ~0x00000080); + unexpectedInterruptHandler_ = false; + onChanged(); + return this; + } + + private boolean unexpectedProcessesInRunqueue_; + /** + * + * + *
+     * True if unexpected processes in the scheduler run queue are present. Such
+     * processes are in the run queue, but not in the process task list.
+     * 
+ * + * bool unexpected_processes_in_runqueue = 9; + * + * @return The unexpectedProcessesInRunqueue. + */ + @java.lang.Override + public boolean getUnexpectedProcessesInRunqueue() { + return unexpectedProcessesInRunqueue_; + } + /** + * + * + *
+     * True if unexpected processes in the scheduler run queue are present. Such
+     * processes are in the run queue, but not in the process task list.
+     * 
+ * + * bool unexpected_processes_in_runqueue = 9; + * + * @param value The unexpectedProcessesInRunqueue to set. + * @return This builder for chaining. + */ + public Builder setUnexpectedProcessesInRunqueue(boolean value) { + + unexpectedProcessesInRunqueue_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * True if unexpected processes in the scheduler run queue are present. Such
+     * processes are in the run queue, but not in the process task list.
+     * 
+ * + * bool unexpected_processes_in_runqueue = 9; + * + * @return This builder for chaining. + */ + public Builder clearUnexpectedProcessesInRunqueue() { + bitField0_ = (bitField0_ & ~0x00000100); + unexpectedProcessesInRunqueue_ = false; + 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.v2.KernelRootkit) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.KernelRootkit) + private static final com.google.cloud.securitycenter.v2.KernelRootkit DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.KernelRootkit(); + } + + public static com.google.cloud.securitycenter.v2.KernelRootkit getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KernelRootkit parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.KernelRootkit getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/KernelRootkitOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/KernelRootkitOrBuilder.java new file mode 100644 index 000000000000..7582d34b61c6 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/KernelRootkitOrBuilder.java @@ -0,0 +1,162 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/kernel_rootkit.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface KernelRootkitOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.KernelRootkit) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Rootkit name, when available.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Rootkit name, when available.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * True if unexpected modifications of kernel code memory are present.
+   * 
+ * + * bool unexpected_code_modification = 2; + * + * @return The unexpectedCodeModification. + */ + boolean getUnexpectedCodeModification(); + + /** + * + * + *
+   * True if unexpected modifications of kernel read-only data memory are
+   * present.
+   * 
+ * + * bool unexpected_read_only_data_modification = 3; + * + * @return The unexpectedReadOnlyDataModification. + */ + boolean getUnexpectedReadOnlyDataModification(); + + /** + * + * + *
+   * True if `ftrace` points are present with callbacks pointing to regions
+   * that are not in the expected kernel or module code range.
+   * 
+ * + * bool unexpected_ftrace_handler = 4; + * + * @return The unexpectedFtraceHandler. + */ + boolean getUnexpectedFtraceHandler(); + + /** + * + * + *
+   * True if `kprobe` points are present with callbacks pointing to regions
+   * that are not in the expected kernel or module code range.
+   * 
+ * + * bool unexpected_kprobe_handler = 5; + * + * @return The unexpectedKprobeHandler. + */ + boolean getUnexpectedKprobeHandler(); + + /** + * + * + *
+   * True if kernel code pages that are not in the expected kernel or module
+   * code regions are present.
+   * 
+ * + * bool unexpected_kernel_code_pages = 6; + * + * @return The unexpectedKernelCodePages. + */ + boolean getUnexpectedKernelCodePages(); + + /** + * + * + *
+   * True if system call handlers that are are not in the expected kernel or
+   * module code regions are present.
+   * 
+ * + * bool unexpected_system_call_handler = 7; + * + * @return The unexpectedSystemCallHandler. + */ + boolean getUnexpectedSystemCallHandler(); + + /** + * + * + *
+   * True if interrupt handlers that are are not in the expected kernel or
+   * module code regions are present.
+   * 
+ * + * bool unexpected_interrupt_handler = 8; + * + * @return The unexpectedInterruptHandler. + */ + boolean getUnexpectedInterruptHandler(); + + /** + * + * + *
+   * True if unexpected processes in the scheduler run queue are present. Such
+   * processes are in the run queue, but not in the process task list.
+   * 
+ * + * bool unexpected_processes_in_runqueue = 9; + * + * @return The unexpectedProcessesInRunqueue. + */ + boolean getUnexpectedProcessesInRunqueue(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/KernelRootkitProto.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/KernelRootkitProto.java new file mode 100644 index 000000000000..099248efc67b --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/KernelRootkitProto.java @@ -0,0 +1,84 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/kernel_rootkit.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public final class KernelRootkitProto { + private KernelRootkitProto() {} + + 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_v2_KernelRootkit_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_KernelRootkit_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n3google/cloud/securitycenter/v2/kernel_" + + "rootkit.proto\022\036google.cloud.securitycent" + + "er.v2\"\327\002\n\rKernelRootkit\022\014\n\004name\030\001 \001(\t\022$\n" + + "\034unexpected_code_modification\030\002 \001(\010\022.\n&u" + + "nexpected_read_only_data_modification\030\003 " + + "\001(\010\022!\n\031unexpected_ftrace_handler\030\004 \001(\010\022!" + + "\n\031unexpected_kprobe_handler\030\005 \001(\010\022$\n\034une" + + "xpected_kernel_code_pages\030\006 \001(\010\022&\n\036unexp" + + "ected_system_call_handler\030\007 \001(\010\022$\n\034unexp" + + "ected_interrupt_handler\030\010 \001(\010\022(\n unexpec" + + "ted_processes_in_runqueue\030\t \001(\010B\354\001\n\"com." + + "google.cloud.securitycenter.v2B\022KernelRo" + + "otkitProtoP\001ZJcloud.google.com/go/securi" + + "tycenter/apiv2/securitycenterpb;security" + + "centerpb\252\002\036Google.Cloud.SecurityCenter.V" + + "2\312\002\036Google\\Cloud\\SecurityCenter\\V2\352\002!Goo" + + "gle::Cloud::SecurityCenter::V2b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_cloud_securitycenter_v2_KernelRootkit_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_securitycenter_v2_KernelRootkit_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_KernelRootkit_descriptor, + new java.lang.String[] { + "Name", + "UnexpectedCodeModification", + "UnexpectedReadOnlyDataModification", + "UnexpectedFtraceHandler", + "UnexpectedKprobeHandler", + "UnexpectedKernelCodePages", + "UnexpectedSystemCallHandler", + "UnexpectedInterruptHandler", + "UnexpectedProcessesInRunqueue", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Kubernetes.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Kubernetes.java new file mode 100644 index 000000000000..daab74fffcb0 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Kubernetes.java @@ -0,0 +1,15955 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/kubernetes.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Kubernetes-related attributes.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Kubernetes} + */ +public final class Kubernetes extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.Kubernetes) + KubernetesOrBuilder { + private static final long serialVersionUID = 0L; + // Use Kubernetes.newBuilder() to construct. + private Kubernetes(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Kubernetes() { + pods_ = java.util.Collections.emptyList(); + nodes_ = java.util.Collections.emptyList(); + nodePools_ = java.util.Collections.emptyList(); + roles_ = java.util.Collections.emptyList(); + bindings_ = java.util.Collections.emptyList(); + accessReviews_ = java.util.Collections.emptyList(); + objects_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Kubernetes(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Kubernetes.class, + com.google.cloud.securitycenter.v2.Kubernetes.Builder.class); + } + + public interface PodOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.Kubernetes.Pod) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Kubernetes Pod namespace.
+     * 
+ * + * string ns = 1; + * + * @return The ns. + */ + java.lang.String getNs(); + /** + * + * + *
+     * Kubernetes Pod namespace.
+     * 
+ * + * string ns = 1; + * + * @return The bytes for ns. + */ + com.google.protobuf.ByteString getNsBytes(); + + /** + * + * + *
+     * Kubernetes Pod name.
+     * 
+ * + * string name = 2; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Kubernetes Pod name.
+     * 
+ * + * string name = 2; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+     * Pod labels.  For Kubernetes containers, these are applied to the
+     * container.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 3; + */ + java.util.List getLabelsList(); + /** + * + * + *
+     * Pod labels.  For Kubernetes containers, these are applied to the
+     * container.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 3; + */ + com.google.cloud.securitycenter.v2.Label getLabels(int index); + /** + * + * + *
+     * Pod labels.  For Kubernetes containers, these are applied to the
+     * container.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 3; + */ + int getLabelsCount(); + /** + * + * + *
+     * Pod labels.  For Kubernetes containers, these are applied to the
+     * container.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 3; + */ + java.util.List + getLabelsOrBuilderList(); + /** + * + * + *
+     * Pod labels.  For Kubernetes containers, these are applied to the
+     * container.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 3; + */ + com.google.cloud.securitycenter.v2.LabelOrBuilder getLabelsOrBuilder(int index); + + /** + * + * + *
+     * Pod containers associated with this finding, if any.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 4; + */ + java.util.List getContainersList(); + /** + * + * + *
+     * Pod containers associated with this finding, if any.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 4; + */ + com.google.cloud.securitycenter.v2.Container getContainers(int index); + /** + * + * + *
+     * Pod containers associated with this finding, if any.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 4; + */ + int getContainersCount(); + /** + * + * + *
+     * Pod containers associated with this finding, if any.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 4; + */ + java.util.List + getContainersOrBuilderList(); + /** + * + * + *
+     * Pod containers associated with this finding, if any.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 4; + */ + com.google.cloud.securitycenter.v2.ContainerOrBuilder getContainersOrBuilder(int index); + } + /** + * + * + *
+   * A Kubernetes Pod.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Kubernetes.Pod} + */ + public static final class Pod extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.Kubernetes.Pod) + PodOrBuilder { + private static final long serialVersionUID = 0L; + // Use Pod.newBuilder() to construct. + private Pod(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Pod() { + ns_ = ""; + name_ = ""; + labels_ = java.util.Collections.emptyList(); + containers_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Pod(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_Pod_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_Pod_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Kubernetes.Pod.class, + com.google.cloud.securitycenter.v2.Kubernetes.Pod.Builder.class); + } + + public static final int NS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object ns_ = ""; + /** + * + * + *
+     * Kubernetes Pod namespace.
+     * 
+ * + * string ns = 1; + * + * @return The ns. + */ + @java.lang.Override + public java.lang.String getNs() { + java.lang.Object ref = ns_; + 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(); + ns_ = s; + return s; + } + } + /** + * + * + *
+     * Kubernetes Pod namespace.
+     * 
+ * + * string ns = 1; + * + * @return The bytes for ns. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNsBytes() { + java.lang.Object ref = ns_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ns_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+     * Kubernetes Pod name.
+     * 
+ * + * string name = 2; + * + * @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; + } + } + /** + * + * + *
+     * Kubernetes Pod name.
+     * 
+ * + * string name = 2; + * + * @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 LABELS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List labels_; + /** + * + * + *
+     * Pod labels.  For Kubernetes containers, these are applied to the
+     * container.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 3; + */ + @java.lang.Override + public java.util.List getLabelsList() { + return labels_; + } + /** + * + * + *
+     * Pod labels.  For Kubernetes containers, these are applied to the
+     * container.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 3; + */ + @java.lang.Override + public java.util.List + getLabelsOrBuilderList() { + return labels_; + } + /** + * + * + *
+     * Pod labels.  For Kubernetes containers, these are applied to the
+     * container.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 3; + */ + @java.lang.Override + public int getLabelsCount() { + return labels_.size(); + } + /** + * + * + *
+     * Pod labels.  For Kubernetes containers, these are applied to the
+     * container.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 3; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Label getLabels(int index) { + return labels_.get(index); + } + /** + * + * + *
+     * Pod labels.  For Kubernetes containers, these are applied to the
+     * container.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 3; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.LabelOrBuilder getLabelsOrBuilder(int index) { + return labels_.get(index); + } + + public static final int CONTAINERS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List containers_; + /** + * + * + *
+     * Pod containers associated with this finding, if any.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 4; + */ + @java.lang.Override + public java.util.List getContainersList() { + return containers_; + } + /** + * + * + *
+     * Pod containers associated with this finding, if any.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 4; + */ + @java.lang.Override + public java.util.List + getContainersOrBuilderList() { + return containers_; + } + /** + * + * + *
+     * Pod containers associated with this finding, if any.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 4; + */ + @java.lang.Override + public int getContainersCount() { + return containers_.size(); + } + /** + * + * + *
+     * Pod containers associated with this finding, if any.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 4; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Container getContainers(int index) { + return containers_.get(index); + } + /** + * + * + *
+     * Pod containers associated with this finding, if any.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 4; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.ContainerOrBuilder getContainersOrBuilder(int index) { + return containers_.get(index); + } + + 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(ns_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ns_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + for (int i = 0; i < labels_.size(); i++) { + output.writeMessage(3, labels_.get(i)); + } + for (int i = 0; i < containers_.size(); i++) { + output.writeMessage(4, containers_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ns_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ns_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + for (int i = 0; i < labels_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, labels_.get(i)); + } + for (int i = 0; i < containers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, containers_.get(i)); + } + size += getUnknownFields().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.v2.Kubernetes.Pod)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.Kubernetes.Pod other = + (com.google.cloud.securitycenter.v2.Kubernetes.Pod) obj; + + if (!getNs().equals(other.getNs())) return false; + if (!getName().equals(other.getName())) return false; + if (!getLabelsList().equals(other.getLabelsList())) return false; + if (!getContainersList().equals(other.getContainersList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + NS_FIELD_NUMBER; + hash = (53 * hash) + getNs().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getLabelsCount() > 0) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + getLabelsList().hashCode(); + } + if (getContainersCount() > 0) { + hash = (37 * hash) + CONTAINERS_FIELD_NUMBER; + hash = (53 * hash) + getContainersList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Pod parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Pod 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.v2.Kubernetes.Pod parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Pod 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.v2.Kubernetes.Pod parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Pod parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Pod parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Pod 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.v2.Kubernetes.Pod parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Pod 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.v2.Kubernetes.Pod parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Pod 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.v2.Kubernetes.Pod 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 Kubernetes Pod.
+     * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Kubernetes.Pod} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.Kubernetes.Pod) + com.google.cloud.securitycenter.v2.Kubernetes.PodOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_Pod_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_Pod_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Kubernetes.Pod.class, + com.google.cloud.securitycenter.v2.Kubernetes.Pod.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.Kubernetes.Pod.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + ns_ = ""; + name_ = ""; + if (labelsBuilder_ == null) { + labels_ = java.util.Collections.emptyList(); + } else { + labels_ = null; + labelsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + if (containersBuilder_ == null) { + containers_ = java.util.Collections.emptyList(); + } else { + containers_ = null; + containersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_Pod_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.Pod getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.Kubernetes.Pod.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.Pod build() { + com.google.cloud.securitycenter.v2.Kubernetes.Pod result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.Pod buildPartial() { + com.google.cloud.securitycenter.v2.Kubernetes.Pod result = + new com.google.cloud.securitycenter.v2.Kubernetes.Pod(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.securitycenter.v2.Kubernetes.Pod result) { + if (labelsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + labels_ = java.util.Collections.unmodifiableList(labels_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.labels_ = labels_; + } else { + result.labels_ = labelsBuilder_.build(); + } + if (containersBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + containers_ = java.util.Collections.unmodifiableList(containers_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.containers_ = containers_; + } else { + result.containers_ = containersBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.Kubernetes.Pod result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.ns_ = ns_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + } + + @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.v2.Kubernetes.Pod) { + return mergeFrom((com.google.cloud.securitycenter.v2.Kubernetes.Pod) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.Kubernetes.Pod other) { + if (other == com.google.cloud.securitycenter.v2.Kubernetes.Pod.getDefaultInstance()) + return this; + if (!other.getNs().isEmpty()) { + ns_ = other.ns_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (labelsBuilder_ == null) { + if (!other.labels_.isEmpty()) { + if (labels_.isEmpty()) { + labels_ = other.labels_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureLabelsIsMutable(); + labels_.addAll(other.labels_); + } + onChanged(); + } + } else { + if (!other.labels_.isEmpty()) { + if (labelsBuilder_.isEmpty()) { + labelsBuilder_.dispose(); + labelsBuilder_ = null; + labels_ = other.labels_; + bitField0_ = (bitField0_ & ~0x00000004); + labelsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getLabelsFieldBuilder() + : null; + } else { + labelsBuilder_.addAllMessages(other.labels_); + } + } + } + if (containersBuilder_ == null) { + if (!other.containers_.isEmpty()) { + if (containers_.isEmpty()) { + containers_ = other.containers_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureContainersIsMutable(); + containers_.addAll(other.containers_); + } + onChanged(); + } + } else { + if (!other.containers_.isEmpty()) { + if (containersBuilder_.isEmpty()) { + containersBuilder_.dispose(); + containersBuilder_ = null; + containers_ = other.containers_; + bitField0_ = (bitField0_ & ~0x00000008); + containersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getContainersFieldBuilder() + : null; + } else { + containersBuilder_.addAllMessages(other.containers_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + ns_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.cloud.securitycenter.v2.Label m = + input.readMessage( + com.google.cloud.securitycenter.v2.Label.parser(), extensionRegistry); + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.add(m); + } else { + labelsBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: + { + com.google.cloud.securitycenter.v2.Container m = + input.readMessage( + com.google.cloud.securitycenter.v2.Container.parser(), extensionRegistry); + if (containersBuilder_ == null) { + ensureContainersIsMutable(); + containers_.add(m); + } else { + containersBuilder_.addMessage(m); + } + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object ns_ = ""; + /** + * + * + *
+       * Kubernetes Pod namespace.
+       * 
+ * + * string ns = 1; + * + * @return The ns. + */ + public java.lang.String getNs() { + java.lang.Object ref = ns_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ns_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Kubernetes Pod namespace.
+       * 
+ * + * string ns = 1; + * + * @return The bytes for ns. + */ + public com.google.protobuf.ByteString getNsBytes() { + java.lang.Object ref = ns_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ns_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Kubernetes Pod namespace.
+       * 
+ * + * string ns = 1; + * + * @param value The ns to set. + * @return This builder for chaining. + */ + public Builder setNs(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ns_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Kubernetes Pod namespace.
+       * 
+ * + * string ns = 1; + * + * @return This builder for chaining. + */ + public Builder clearNs() { + ns_ = getDefaultInstance().getNs(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Kubernetes Pod namespace.
+       * 
+ * + * string ns = 1; + * + * @param value The bytes for ns to set. + * @return This builder for chaining. + */ + public Builder setNsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ns_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * Kubernetes Pod name.
+       * 
+ * + * string name = 2; + * + * @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; + } + } + /** + * + * + *
+       * Kubernetes Pod name.
+       * 
+ * + * string name = 2; + * + * @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; + } + } + /** + * + * + *
+       * Kubernetes Pod name.
+       * 
+ * + * string name = 2; + * + * @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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Kubernetes Pod name.
+       * 
+ * + * string name = 2; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Kubernetes Pod name.
+       * 
+ * + * string name = 2; + * + * @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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List labels_ = + java.util.Collections.emptyList(); + + private void ensureLabelsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + labels_ = new java.util.ArrayList(labels_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Label, + com.google.cloud.securitycenter.v2.Label.Builder, + com.google.cloud.securitycenter.v2.LabelOrBuilder> + labelsBuilder_; + + /** + * + * + *
+       * Pod labels.  For Kubernetes containers, these are applied to the
+       * container.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 3; + */ + public java.util.List getLabelsList() { + if (labelsBuilder_ == null) { + return java.util.Collections.unmodifiableList(labels_); + } else { + return labelsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Pod labels.  For Kubernetes containers, these are applied to the
+       * container.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 3; + */ + public int getLabelsCount() { + if (labelsBuilder_ == null) { + return labels_.size(); + } else { + return labelsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Pod labels.  For Kubernetes containers, these are applied to the
+       * container.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 3; + */ + public com.google.cloud.securitycenter.v2.Label getLabels(int index) { + if (labelsBuilder_ == null) { + return labels_.get(index); + } else { + return labelsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Pod labels.  For Kubernetes containers, these are applied to the
+       * container.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 3; + */ + public Builder setLabels(int index, com.google.cloud.securitycenter.v2.Label value) { + if (labelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelsIsMutable(); + labels_.set(index, value); + onChanged(); + } else { + labelsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Pod labels.  For Kubernetes containers, these are applied to the
+       * container.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 3; + */ + public Builder setLabels( + int index, com.google.cloud.securitycenter.v2.Label.Builder builderForValue) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.set(index, builderForValue.build()); + onChanged(); + } else { + labelsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Pod labels.  For Kubernetes containers, these are applied to the
+       * container.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 3; + */ + public Builder addLabels(com.google.cloud.securitycenter.v2.Label value) { + if (labelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelsIsMutable(); + labels_.add(value); + onChanged(); + } else { + labelsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Pod labels.  For Kubernetes containers, these are applied to the
+       * container.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 3; + */ + public Builder addLabels(int index, com.google.cloud.securitycenter.v2.Label value) { + if (labelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelsIsMutable(); + labels_.add(index, value); + onChanged(); + } else { + labelsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Pod labels.  For Kubernetes containers, these are applied to the
+       * container.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 3; + */ + public Builder addLabels(com.google.cloud.securitycenter.v2.Label.Builder builderForValue) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.add(builderForValue.build()); + onChanged(); + } else { + labelsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Pod labels.  For Kubernetes containers, these are applied to the
+       * container.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 3; + */ + public Builder addLabels( + int index, com.google.cloud.securitycenter.v2.Label.Builder builderForValue) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.add(index, builderForValue.build()); + onChanged(); + } else { + labelsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Pod labels.  For Kubernetes containers, these are applied to the
+       * container.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 3; + */ + public Builder addAllLabels( + java.lang.Iterable values) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, labels_); + onChanged(); + } else { + labelsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Pod labels.  For Kubernetes containers, these are applied to the
+       * container.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 3; + */ + public Builder clearLabels() { + if (labelsBuilder_ == null) { + labels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + labelsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Pod labels.  For Kubernetes containers, these are applied to the
+       * container.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 3; + */ + public Builder removeLabels(int index) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.remove(index); + onChanged(); + } else { + labelsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Pod labels.  For Kubernetes containers, these are applied to the
+       * container.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 3; + */ + public com.google.cloud.securitycenter.v2.Label.Builder getLabelsBuilder(int index) { + return getLabelsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Pod labels.  For Kubernetes containers, these are applied to the
+       * container.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 3; + */ + public com.google.cloud.securitycenter.v2.LabelOrBuilder getLabelsOrBuilder(int index) { + if (labelsBuilder_ == null) { + return labels_.get(index); + } else { + return labelsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Pod labels.  For Kubernetes containers, these are applied to the
+       * container.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 3; + */ + public java.util.List + getLabelsOrBuilderList() { + if (labelsBuilder_ != null) { + return labelsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(labels_); + } + } + /** + * + * + *
+       * Pod labels.  For Kubernetes containers, these are applied to the
+       * container.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 3; + */ + public com.google.cloud.securitycenter.v2.Label.Builder addLabelsBuilder() { + return getLabelsFieldBuilder() + .addBuilder(com.google.cloud.securitycenter.v2.Label.getDefaultInstance()); + } + /** + * + * + *
+       * Pod labels.  For Kubernetes containers, these are applied to the
+       * container.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 3; + */ + public com.google.cloud.securitycenter.v2.Label.Builder addLabelsBuilder(int index) { + return getLabelsFieldBuilder() + .addBuilder(index, com.google.cloud.securitycenter.v2.Label.getDefaultInstance()); + } + /** + * + * + *
+       * Pod labels.  For Kubernetes containers, these are applied to the
+       * container.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Label labels = 3; + */ + public java.util.List + getLabelsBuilderList() { + return getLabelsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Label, + com.google.cloud.securitycenter.v2.Label.Builder, + com.google.cloud.securitycenter.v2.LabelOrBuilder> + getLabelsFieldBuilder() { + if (labelsBuilder_ == null) { + labelsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Label, + com.google.cloud.securitycenter.v2.Label.Builder, + com.google.cloud.securitycenter.v2.LabelOrBuilder>( + labels_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + labels_ = null; + } + return labelsBuilder_; + } + + private java.util.List containers_ = + java.util.Collections.emptyList(); + + private void ensureContainersIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + containers_ = + new java.util.ArrayList(containers_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Container, + com.google.cloud.securitycenter.v2.Container.Builder, + com.google.cloud.securitycenter.v2.ContainerOrBuilder> + containersBuilder_; + + /** + * + * + *
+       * Pod containers associated with this finding, if any.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 4; + */ + public java.util.List getContainersList() { + if (containersBuilder_ == null) { + return java.util.Collections.unmodifiableList(containers_); + } else { + return containersBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Pod containers associated with this finding, if any.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 4; + */ + public int getContainersCount() { + if (containersBuilder_ == null) { + return containers_.size(); + } else { + return containersBuilder_.getCount(); + } + } + /** + * + * + *
+       * Pod containers associated with this finding, if any.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 4; + */ + public com.google.cloud.securitycenter.v2.Container getContainers(int index) { + if (containersBuilder_ == null) { + return containers_.get(index); + } else { + return containersBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Pod containers associated with this finding, if any.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 4; + */ + public Builder setContainers(int index, com.google.cloud.securitycenter.v2.Container value) { + if (containersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContainersIsMutable(); + containers_.set(index, value); + onChanged(); + } else { + containersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Pod containers associated with this finding, if any.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 4; + */ + public Builder setContainers( + int index, com.google.cloud.securitycenter.v2.Container.Builder builderForValue) { + if (containersBuilder_ == null) { + ensureContainersIsMutable(); + containers_.set(index, builderForValue.build()); + onChanged(); + } else { + containersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Pod containers associated with this finding, if any.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 4; + */ + public Builder addContainers(com.google.cloud.securitycenter.v2.Container value) { + if (containersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContainersIsMutable(); + containers_.add(value); + onChanged(); + } else { + containersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Pod containers associated with this finding, if any.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 4; + */ + public Builder addContainers(int index, com.google.cloud.securitycenter.v2.Container value) { + if (containersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContainersIsMutable(); + containers_.add(index, value); + onChanged(); + } else { + containersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Pod containers associated with this finding, if any.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 4; + */ + public Builder addContainers( + com.google.cloud.securitycenter.v2.Container.Builder builderForValue) { + if (containersBuilder_ == null) { + ensureContainersIsMutable(); + containers_.add(builderForValue.build()); + onChanged(); + } else { + containersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Pod containers associated with this finding, if any.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 4; + */ + public Builder addContainers( + int index, com.google.cloud.securitycenter.v2.Container.Builder builderForValue) { + if (containersBuilder_ == null) { + ensureContainersIsMutable(); + containers_.add(index, builderForValue.build()); + onChanged(); + } else { + containersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Pod containers associated with this finding, if any.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 4; + */ + public Builder addAllContainers( + java.lang.Iterable values) { + if (containersBuilder_ == null) { + ensureContainersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, containers_); + onChanged(); + } else { + containersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Pod containers associated with this finding, if any.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 4; + */ + public Builder clearContainers() { + if (containersBuilder_ == null) { + containers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + containersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Pod containers associated with this finding, if any.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 4; + */ + public Builder removeContainers(int index) { + if (containersBuilder_ == null) { + ensureContainersIsMutable(); + containers_.remove(index); + onChanged(); + } else { + containersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Pod containers associated with this finding, if any.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 4; + */ + public com.google.cloud.securitycenter.v2.Container.Builder getContainersBuilder(int index) { + return getContainersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Pod containers associated with this finding, if any.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 4; + */ + public com.google.cloud.securitycenter.v2.ContainerOrBuilder getContainersOrBuilder( + int index) { + if (containersBuilder_ == null) { + return containers_.get(index); + } else { + return containersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Pod containers associated with this finding, if any.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 4; + */ + public java.util.List + getContainersOrBuilderList() { + if (containersBuilder_ != null) { + return containersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(containers_); + } + } + /** + * + * + *
+       * Pod containers associated with this finding, if any.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 4; + */ + public com.google.cloud.securitycenter.v2.Container.Builder addContainersBuilder() { + return getContainersFieldBuilder() + .addBuilder(com.google.cloud.securitycenter.v2.Container.getDefaultInstance()); + } + /** + * + * + *
+       * Pod containers associated with this finding, if any.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 4; + */ + public com.google.cloud.securitycenter.v2.Container.Builder addContainersBuilder(int index) { + return getContainersFieldBuilder() + .addBuilder(index, com.google.cloud.securitycenter.v2.Container.getDefaultInstance()); + } + /** + * + * + *
+       * Pod containers associated with this finding, if any.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 4; + */ + public java.util.List + getContainersBuilderList() { + return getContainersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Container, + com.google.cloud.securitycenter.v2.Container.Builder, + com.google.cloud.securitycenter.v2.ContainerOrBuilder> + getContainersFieldBuilder() { + if (containersBuilder_ == null) { + containersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Container, + com.google.cloud.securitycenter.v2.Container.Builder, + com.google.cloud.securitycenter.v2.ContainerOrBuilder>( + containers_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + containers_ = null; + } + return containersBuilder_; + } + + @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.v2.Kubernetes.Pod) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.Kubernetes.Pod) + private static final com.google.cloud.securitycenter.v2.Kubernetes.Pod DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.Kubernetes.Pod(); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Pod getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Pod parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.Kubernetes.Pod getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface NodeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.Kubernetes.Node) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * [Full resource name](https://google.aip.dev/122#full-resource-names) of
+     * the Compute Engine VM running the cluster node.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * [Full resource name](https://google.aip.dev/122#full-resource-names) of
+     * the Compute Engine VM running the cluster node.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + } + /** + * + * + *
+   * Kubernetes nodes associated with the finding.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Kubernetes.Node} + */ + public static final class Node extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.Kubernetes.Node) + NodeOrBuilder { + private static final long serialVersionUID = 0L; + // Use Node.newBuilder() to construct. + private Node(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Node() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Node(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_Node_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_Node_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Kubernetes.Node.class, + com.google.cloud.securitycenter.v2.Kubernetes.Node.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+     * [Full resource name](https://google.aip.dev/122#full-resource-names) of
+     * the Compute Engine VM running the cluster node.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * [Full resource name](https://google.aip.dev/122#full-resource-names) of
+     * the Compute Engine VM running the cluster node.
+     * 
+ * + * 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; + } + } + + 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_); + } + getUnknownFields().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 += getUnknownFields().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.v2.Kubernetes.Node)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.Kubernetes.Node other = + (com.google.cloud.securitycenter.v2.Kubernetes.Node) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Node parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Node 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.v2.Kubernetes.Node parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Node 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.v2.Kubernetes.Node parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Node parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Node parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Node 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.v2.Kubernetes.Node parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Node 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.v2.Kubernetes.Node parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Node 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.v2.Kubernetes.Node 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; + } + /** + * + * + *
+     * Kubernetes nodes associated with the finding.
+     * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Kubernetes.Node} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.Kubernetes.Node) + com.google.cloud.securitycenter.v2.Kubernetes.NodeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_Node_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_Node_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Kubernetes.Node.class, + com.google.cloud.securitycenter.v2.Kubernetes.Node.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.Kubernetes.Node.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_Node_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.Node getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.Kubernetes.Node.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.Node build() { + com.google.cloud.securitycenter.v2.Kubernetes.Node result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.Node buildPartial() { + com.google.cloud.securitycenter.v2.Kubernetes.Node result = + new com.google.cloud.securitycenter.v2.Kubernetes.Node(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.Kubernetes.Node result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.v2.Kubernetes.Node) { + return mergeFrom((com.google.cloud.securitycenter.v2.Kubernetes.Node) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.Kubernetes.Node other) { + if (other == com.google.cloud.securitycenter.v2.Kubernetes.Node.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * [Full resource name](https://google.aip.dev/122#full-resource-names) of
+       * the Compute Engine VM running the cluster node.
+       * 
+ * + * 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; + } + } + /** + * + * + *
+       * [Full resource name](https://google.aip.dev/122#full-resource-names) of
+       * the Compute Engine VM running the cluster node.
+       * 
+ * + * 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; + } + } + /** + * + * + *
+       * [Full resource name](https://google.aip.dev/122#full-resource-names) of
+       * the Compute Engine VM running the cluster node.
+       * 
+ * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * [Full resource name](https://google.aip.dev/122#full-resource-names) of
+       * the Compute Engine VM running the cluster node.
+       * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * [Full resource name](https://google.aip.dev/122#full-resource-names) of
+       * the Compute Engine VM running the cluster node.
+       * 
+ * + * 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; + bitField0_ |= 0x00000001; + 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.v2.Kubernetes.Node) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.Kubernetes.Node) + private static final com.google.cloud.securitycenter.v2.Kubernetes.Node DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.Kubernetes.Node(); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Node getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Node parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.Kubernetes.Node getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface NodePoolOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.Kubernetes.NodePool) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Kubernetes node pool name.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Kubernetes node pool name.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+     * Nodes associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + java.util.List getNodesList(); + /** + * + * + *
+     * Nodes associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + com.google.cloud.securitycenter.v2.Kubernetes.Node getNodes(int index); + /** + * + * + *
+     * Nodes associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + int getNodesCount(); + /** + * + * + *
+     * Nodes associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + java.util.List + getNodesOrBuilderList(); + /** + * + * + *
+     * Nodes associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + com.google.cloud.securitycenter.v2.Kubernetes.NodeOrBuilder getNodesOrBuilder(int index); + } + /** + * + * + *
+   * Provides GKE node pool information.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Kubernetes.NodePool} + */ + public static final class NodePool extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.Kubernetes.NodePool) + NodePoolOrBuilder { + private static final long serialVersionUID = 0L; + // Use NodePool.newBuilder() to construct. + private NodePool(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NodePool() { + name_ = ""; + nodes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NodePool(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_NodePool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_NodePool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Kubernetes.NodePool.class, + com.google.cloud.securitycenter.v2.Kubernetes.NodePool.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+     * Kubernetes node pool name.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Kubernetes node pool name.
+     * 
+ * + * 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 NODES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List nodes_; + /** + * + * + *
+     * Nodes associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + @java.lang.Override + public java.util.List getNodesList() { + return nodes_; + } + /** + * + * + *
+     * Nodes associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + @java.lang.Override + public java.util.List + getNodesOrBuilderList() { + return nodes_; + } + /** + * + * + *
+     * Nodes associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + @java.lang.Override + public int getNodesCount() { + return nodes_.size(); + } + /** + * + * + *
+     * Nodes associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.Node getNodes(int index) { + return nodes_.get(index); + } + /** + * + * + *
+     * Nodes associated with the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.NodeOrBuilder getNodesOrBuilder( + int index) { + return nodes_.get(index); + } + + 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 < nodes_.size(); i++) { + output.writeMessage(2, nodes_.get(i)); + } + getUnknownFields().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_); + } + for (int i = 0; i < nodes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, nodes_.get(i)); + } + size += getUnknownFields().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.v2.Kubernetes.NodePool)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.Kubernetes.NodePool other = + (com.google.cloud.securitycenter.v2.Kubernetes.NodePool) obj; + + if (!getName().equals(other.getName())) return false; + if (!getNodesList().equals(other.getNodesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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 (getNodesCount() > 0) { + hash = (37 * hash) + NODES_FIELD_NUMBER; + hash = (53 * hash) + getNodesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.NodePool parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.NodePool 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.v2.Kubernetes.NodePool parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.NodePool 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.v2.Kubernetes.NodePool parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.NodePool parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.NodePool parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.NodePool 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.v2.Kubernetes.NodePool parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.NodePool 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.v2.Kubernetes.NodePool parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.NodePool 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.v2.Kubernetes.NodePool 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; + } + /** + * + * + *
+     * Provides GKE node pool information.
+     * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Kubernetes.NodePool} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.Kubernetes.NodePool) + com.google.cloud.securitycenter.v2.Kubernetes.NodePoolOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_NodePool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_NodePool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Kubernetes.NodePool.class, + com.google.cloud.securitycenter.v2.Kubernetes.NodePool.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.Kubernetes.NodePool.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + if (nodesBuilder_ == null) { + nodes_ = java.util.Collections.emptyList(); + } else { + nodes_ = null; + nodesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_NodePool_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.NodePool getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.Kubernetes.NodePool.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.NodePool build() { + com.google.cloud.securitycenter.v2.Kubernetes.NodePool result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.NodePool buildPartial() { + com.google.cloud.securitycenter.v2.Kubernetes.NodePool result = + new com.google.cloud.securitycenter.v2.Kubernetes.NodePool(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.securitycenter.v2.Kubernetes.NodePool result) { + if (nodesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + nodes_ = java.util.Collections.unmodifiableList(nodes_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.nodes_ = nodes_; + } else { + result.nodes_ = nodesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.Kubernetes.NodePool result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.v2.Kubernetes.NodePool) { + return mergeFrom((com.google.cloud.securitycenter.v2.Kubernetes.NodePool) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.Kubernetes.NodePool other) { + if (other == com.google.cloud.securitycenter.v2.Kubernetes.NodePool.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (nodesBuilder_ == null) { + if (!other.nodes_.isEmpty()) { + if (nodes_.isEmpty()) { + nodes_ = other.nodes_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureNodesIsMutable(); + nodes_.addAll(other.nodes_); + } + onChanged(); + } + } else { + if (!other.nodes_.isEmpty()) { + if (nodesBuilder_.isEmpty()) { + nodesBuilder_.dispose(); + nodesBuilder_ = null; + nodes_ = other.nodes_; + bitField0_ = (bitField0_ & ~0x00000002); + nodesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getNodesFieldBuilder() + : null; + } else { + nodesBuilder_.addAllMessages(other.nodes_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.securitycenter.v2.Kubernetes.Node m = + input.readMessage( + com.google.cloud.securitycenter.v2.Kubernetes.Node.parser(), + extensionRegistry); + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.add(m); + } else { + nodesBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * Kubernetes node pool name.
+       * 
+ * + * 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; + } + } + /** + * + * + *
+       * Kubernetes node pool name.
+       * 
+ * + * 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; + } + } + /** + * + * + *
+       * Kubernetes node pool name.
+       * 
+ * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Kubernetes node pool name.
+       * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Kubernetes node pool name.
+       * 
+ * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List nodes_ = + java.util.Collections.emptyList(); + + private void ensureNodesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + nodes_ = + new java.util.ArrayList(nodes_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Kubernetes.Node, + com.google.cloud.securitycenter.v2.Kubernetes.Node.Builder, + com.google.cloud.securitycenter.v2.Kubernetes.NodeOrBuilder> + nodesBuilder_; + + /** + * + * + *
+       * Nodes associated with the finding.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + public java.util.List getNodesList() { + if (nodesBuilder_ == null) { + return java.util.Collections.unmodifiableList(nodes_); + } else { + return nodesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Nodes associated with the finding.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + public int getNodesCount() { + if (nodesBuilder_ == null) { + return nodes_.size(); + } else { + return nodesBuilder_.getCount(); + } + } + /** + * + * + *
+       * Nodes associated with the finding.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.Node getNodes(int index) { + if (nodesBuilder_ == null) { + return nodes_.get(index); + } else { + return nodesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Nodes associated with the finding.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + public Builder setNodes(int index, com.google.cloud.securitycenter.v2.Kubernetes.Node value) { + if (nodesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodesIsMutable(); + nodes_.set(index, value); + onChanged(); + } else { + nodesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Nodes associated with the finding.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + public Builder setNodes( + int index, com.google.cloud.securitycenter.v2.Kubernetes.Node.Builder builderForValue) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.set(index, builderForValue.build()); + onChanged(); + } else { + nodesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Nodes associated with the finding.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + public Builder addNodes(com.google.cloud.securitycenter.v2.Kubernetes.Node value) { + if (nodesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodesIsMutable(); + nodes_.add(value); + onChanged(); + } else { + nodesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Nodes associated with the finding.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + public Builder addNodes(int index, com.google.cloud.securitycenter.v2.Kubernetes.Node value) { + if (nodesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodesIsMutable(); + nodes_.add(index, value); + onChanged(); + } else { + nodesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Nodes associated with the finding.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + public Builder addNodes( + com.google.cloud.securitycenter.v2.Kubernetes.Node.Builder builderForValue) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.add(builderForValue.build()); + onChanged(); + } else { + nodesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Nodes associated with the finding.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + public Builder addNodes( + int index, com.google.cloud.securitycenter.v2.Kubernetes.Node.Builder builderForValue) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.add(index, builderForValue.build()); + onChanged(); + } else { + nodesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Nodes associated with the finding.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + public Builder addAllNodes( + java.lang.Iterable values) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, nodes_); + onChanged(); + } else { + nodesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Nodes associated with the finding.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + public Builder clearNodes() { + if (nodesBuilder_ == null) { + nodes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + nodesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Nodes associated with the finding.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + public Builder removeNodes(int index) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.remove(index); + onChanged(); + } else { + nodesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Nodes associated with the finding.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.Node.Builder getNodesBuilder(int index) { + return getNodesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Nodes associated with the finding.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.NodeOrBuilder getNodesOrBuilder( + int index) { + if (nodesBuilder_ == null) { + return nodes_.get(index); + } else { + return nodesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Nodes associated with the finding.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + public java.util.List + getNodesOrBuilderList() { + if (nodesBuilder_ != null) { + return nodesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(nodes_); + } + } + /** + * + * + *
+       * Nodes associated with the finding.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.Node.Builder addNodesBuilder() { + return getNodesFieldBuilder() + .addBuilder(com.google.cloud.securitycenter.v2.Kubernetes.Node.getDefaultInstance()); + } + /** + * + * + *
+       * Nodes associated with the finding.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.Node.Builder addNodesBuilder(int index) { + return getNodesFieldBuilder() + .addBuilder( + index, com.google.cloud.securitycenter.v2.Kubernetes.Node.getDefaultInstance()); + } + /** + * + * + *
+       * Nodes associated with the finding.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + public java.util.List + getNodesBuilderList() { + return getNodesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Kubernetes.Node, + com.google.cloud.securitycenter.v2.Kubernetes.Node.Builder, + com.google.cloud.securitycenter.v2.Kubernetes.NodeOrBuilder> + getNodesFieldBuilder() { + if (nodesBuilder_ == null) { + nodesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Kubernetes.Node, + com.google.cloud.securitycenter.v2.Kubernetes.Node.Builder, + com.google.cloud.securitycenter.v2.Kubernetes.NodeOrBuilder>( + nodes_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + nodes_ = null; + } + return nodesBuilder_; + } + + @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.v2.Kubernetes.NodePool) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.Kubernetes.NodePool) + private static final com.google.cloud.securitycenter.v2.Kubernetes.NodePool DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.Kubernetes.NodePool(); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.NodePool getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NodePool parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.Kubernetes.NodePool getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface RoleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.Kubernetes.Role) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Role type.
+     * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes.Role.Kind kind = 1; + * + * @return The enum numeric value on the wire for kind. + */ + int getKindValue(); + /** + * + * + *
+     * Role type.
+     * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes.Role.Kind kind = 1; + * + * @return The kind. + */ + com.google.cloud.securitycenter.v2.Kubernetes.Role.Kind getKind(); + + /** + * + * + *
+     * Role namespace.
+     * 
+ * + * string ns = 2; + * + * @return The ns. + */ + java.lang.String getNs(); + /** + * + * + *
+     * Role namespace.
+     * 
+ * + * string ns = 2; + * + * @return The bytes for ns. + */ + com.google.protobuf.ByteString getNsBytes(); + + /** + * + * + *
+     * Role name.
+     * 
+ * + * string name = 3; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Role name.
+     * 
+ * + * string name = 3; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + } + /** + * + * + *
+   * Kubernetes Role or ClusterRole.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Kubernetes.Role} + */ + public static final class Role extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.Kubernetes.Role) + RoleOrBuilder { + private static final long serialVersionUID = 0L; + // Use Role.newBuilder() to construct. + private Role(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Role() { + kind_ = 0; + ns_ = ""; + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Role(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_Role_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_Role_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Kubernetes.Role.class, + com.google.cloud.securitycenter.v2.Kubernetes.Role.Builder.class); + } + + /** + * + * + *
+     * Types of Kubernetes roles.
+     * 
+ * + * Protobuf enum {@code google.cloud.securitycenter.v2.Kubernetes.Role.Kind} + */ + public enum Kind implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Role type is not specified.
+       * 
+ * + * KIND_UNSPECIFIED = 0; + */ + KIND_UNSPECIFIED(0), + /** + * + * + *
+       * Kubernetes Role.
+       * 
+ * + * ROLE = 1; + */ + ROLE(1), + /** + * + * + *
+       * Kubernetes ClusterRole.
+       * 
+ * + * CLUSTER_ROLE = 2; + */ + CLUSTER_ROLE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Role type is not specified.
+       * 
+ * + * KIND_UNSPECIFIED = 0; + */ + public static final int KIND_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Kubernetes Role.
+       * 
+ * + * ROLE = 1; + */ + public static final int ROLE_VALUE = 1; + /** + * + * + *
+       * Kubernetes ClusterRole.
+       * 
+ * + * CLUSTER_ROLE = 2; + */ + public static final int CLUSTER_ROLE_VALUE = 2; + + 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 Kind 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 Kind forNumber(int value) { + switch (value) { + case 0: + return KIND_UNSPECIFIED; + case 1: + return ROLE; + case 2: + return CLUSTER_ROLE; + 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 Kind findValueByNumber(int number) { + return Kind.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.v2.Kubernetes.Role.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Kind[] VALUES = values(); + + public static Kind 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 Kind(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v2.Kubernetes.Role.Kind) + } + + public static final int KIND_FIELD_NUMBER = 1; + private int kind_ = 0; + /** + * + * + *
+     * Role type.
+     * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes.Role.Kind kind = 1; + * + * @return The enum numeric value on the wire for kind. + */ + @java.lang.Override + public int getKindValue() { + return kind_; + } + /** + * + * + *
+     * Role type.
+     * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes.Role.Kind kind = 1; + * + * @return The kind. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.Role.Kind getKind() { + com.google.cloud.securitycenter.v2.Kubernetes.Role.Kind result = + com.google.cloud.securitycenter.v2.Kubernetes.Role.Kind.forNumber(kind_); + return result == null + ? com.google.cloud.securitycenter.v2.Kubernetes.Role.Kind.UNRECOGNIZED + : result; + } + + public static final int NS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object ns_ = ""; + /** + * + * + *
+     * Role namespace.
+     * 
+ * + * string ns = 2; + * + * @return The ns. + */ + @java.lang.Override + public java.lang.String getNs() { + java.lang.Object ref = ns_; + 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(); + ns_ = s; + return s; + } + } + /** + * + * + *
+     * Role namespace.
+     * 
+ * + * string ns = 2; + * + * @return The bytes for ns. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNsBytes() { + java.lang.Object ref = ns_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ns_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+     * Role name.
+     * 
+ * + * string name = 3; + * + * @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; + } + } + /** + * + * + *
+     * Role name.
+     * 
+ * + * string name = 3; + * + * @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 (kind_ + != com.google.cloud.securitycenter.v2.Kubernetes.Role.Kind.KIND_UNSPECIFIED.getNumber()) { + output.writeEnum(1, kind_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ns_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ns_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (kind_ + != com.google.cloud.securitycenter.v2.Kubernetes.Role.Kind.KIND_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, kind_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ns_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ns_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); + } + size += getUnknownFields().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.v2.Kubernetes.Role)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.Kubernetes.Role other = + (com.google.cloud.securitycenter.v2.Kubernetes.Role) obj; + + if (kind_ != other.kind_) return false; + if (!getNs().equals(other.getNs())) return false; + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + KIND_FIELD_NUMBER; + hash = (53 * hash) + kind_; + hash = (37 * hash) + NS_FIELD_NUMBER; + hash = (53 * hash) + getNs().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Role parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Role 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.v2.Kubernetes.Role parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Role 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.v2.Kubernetes.Role parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Role parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Role parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Role 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.v2.Kubernetes.Role parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Role 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.v2.Kubernetes.Role parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Role 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.v2.Kubernetes.Role 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; + } + /** + * + * + *
+     * Kubernetes Role or ClusterRole.
+     * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Kubernetes.Role} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.Kubernetes.Role) + com.google.cloud.securitycenter.v2.Kubernetes.RoleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_Role_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_Role_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Kubernetes.Role.class, + com.google.cloud.securitycenter.v2.Kubernetes.Role.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.Kubernetes.Role.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + kind_ = 0; + ns_ = ""; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_Role_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.Role getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.Kubernetes.Role.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.Role build() { + com.google.cloud.securitycenter.v2.Kubernetes.Role result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.Role buildPartial() { + com.google.cloud.securitycenter.v2.Kubernetes.Role result = + new com.google.cloud.securitycenter.v2.Kubernetes.Role(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.Kubernetes.Role result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.kind_ = kind_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.ns_ = ns_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.name_ = name_; + } + } + + @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.v2.Kubernetes.Role) { + return mergeFrom((com.google.cloud.securitycenter.v2.Kubernetes.Role) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.Kubernetes.Role other) { + if (other == com.google.cloud.securitycenter.v2.Kubernetes.Role.getDefaultInstance()) + return this; + if (other.kind_ != 0) { + setKindValue(other.getKindValue()); + } + if (!other.getNs().isEmpty()) { + ns_ = other.ns_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + kind_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + ns_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int kind_ = 0; + /** + * + * + *
+       * Role type.
+       * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes.Role.Kind kind = 1; + * + * @return The enum numeric value on the wire for kind. + */ + @java.lang.Override + public int getKindValue() { + return kind_; + } + /** + * + * + *
+       * Role type.
+       * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes.Role.Kind kind = 1; + * + * @param value The enum numeric value on the wire for kind to set. + * @return This builder for chaining. + */ + public Builder setKindValue(int value) { + kind_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Role type.
+       * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes.Role.Kind kind = 1; + * + * @return The kind. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.Role.Kind getKind() { + com.google.cloud.securitycenter.v2.Kubernetes.Role.Kind result = + com.google.cloud.securitycenter.v2.Kubernetes.Role.Kind.forNumber(kind_); + return result == null + ? com.google.cloud.securitycenter.v2.Kubernetes.Role.Kind.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Role type.
+       * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes.Role.Kind kind = 1; + * + * @param value The kind to set. + * @return This builder for chaining. + */ + public Builder setKind(com.google.cloud.securitycenter.v2.Kubernetes.Role.Kind value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + kind_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Role type.
+       * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes.Role.Kind kind = 1; + * + * @return This builder for chaining. + */ + public Builder clearKind() { + bitField0_ = (bitField0_ & ~0x00000001); + kind_ = 0; + onChanged(); + return this; + } + + private java.lang.Object ns_ = ""; + /** + * + * + *
+       * Role namespace.
+       * 
+ * + * string ns = 2; + * + * @return The ns. + */ + public java.lang.String getNs() { + java.lang.Object ref = ns_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ns_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Role namespace.
+       * 
+ * + * string ns = 2; + * + * @return The bytes for ns. + */ + public com.google.protobuf.ByteString getNsBytes() { + java.lang.Object ref = ns_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ns_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Role namespace.
+       * 
+ * + * string ns = 2; + * + * @param value The ns to set. + * @return This builder for chaining. + */ + public Builder setNs(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ns_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Role namespace.
+       * 
+ * + * string ns = 2; + * + * @return This builder for chaining. + */ + public Builder clearNs() { + ns_ = getDefaultInstance().getNs(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Role namespace.
+       * 
+ * + * string ns = 2; + * + * @param value The bytes for ns to set. + * @return This builder for chaining. + */ + public Builder setNsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ns_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * Role name.
+       * 
+ * + * string name = 3; + * + * @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; + } + } + /** + * + * + *
+       * Role name.
+       * 
+ * + * string name = 3; + * + * @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; + } + } + /** + * + * + *
+       * Role name.
+       * 
+ * + * string name = 3; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Role name.
+       * 
+ * + * string name = 3; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * Role name.
+       * 
+ * + * string name = 3; + * + * @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; + bitField0_ |= 0x00000004; + 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.v2.Kubernetes.Role) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.Kubernetes.Role) + private static final com.google.cloud.securitycenter.v2.Kubernetes.Role DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.Kubernetes.Role(); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Role getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Role parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.Kubernetes.Role getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface BindingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.Kubernetes.Binding) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Namespace for the binding.
+     * 
+ * + * string ns = 1; + * + * @return The ns. + */ + java.lang.String getNs(); + /** + * + * + *
+     * Namespace for the binding.
+     * 
+ * + * string ns = 1; + * + * @return The bytes for ns. + */ + com.google.protobuf.ByteString getNsBytes(); + + /** + * + * + *
+     * Name for the binding.
+     * 
+ * + * string name = 2; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Name for the binding.
+     * 
+ * + * string name = 2; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+     * The Role or ClusterRole referenced by the binding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes.Role role = 3; + * + * @return Whether the role field is set. + */ + boolean hasRole(); + /** + * + * + *
+     * The Role or ClusterRole referenced by the binding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes.Role role = 3; + * + * @return The role. + */ + com.google.cloud.securitycenter.v2.Kubernetes.Role getRole(); + /** + * + * + *
+     * The Role or ClusterRole referenced by the binding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes.Role role = 3; + */ + com.google.cloud.securitycenter.v2.Kubernetes.RoleOrBuilder getRoleOrBuilder(); + + /** + * + * + *
+     * Represents one or more subjects that are bound to the role. Not always
+     * available for PATCH requests.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Subject subjects = 4; + */ + java.util.List getSubjectsList(); + /** + * + * + *
+     * Represents one or more subjects that are bound to the role. Not always
+     * available for PATCH requests.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Subject subjects = 4; + */ + com.google.cloud.securitycenter.v2.Kubernetes.Subject getSubjects(int index); + /** + * + * + *
+     * Represents one or more subjects that are bound to the role. Not always
+     * available for PATCH requests.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Subject subjects = 4; + */ + int getSubjectsCount(); + /** + * + * + *
+     * Represents one or more subjects that are bound to the role. Not always
+     * available for PATCH requests.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Subject subjects = 4; + */ + java.util.List + getSubjectsOrBuilderList(); + /** + * + * + *
+     * Represents one or more subjects that are bound to the role. Not always
+     * available for PATCH requests.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Subject subjects = 4; + */ + com.google.cloud.securitycenter.v2.Kubernetes.SubjectOrBuilder getSubjectsOrBuilder(int index); + } + /** + * + * + *
+   * Represents a Kubernetes RoleBinding or ClusterRoleBinding.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Kubernetes.Binding} + */ + public static final class Binding extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.Kubernetes.Binding) + BindingOrBuilder { + private static final long serialVersionUID = 0L; + // Use Binding.newBuilder() to construct. + private Binding(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Binding() { + ns_ = ""; + name_ = ""; + subjects_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Binding(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_Binding_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_Binding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Kubernetes.Binding.class, + com.google.cloud.securitycenter.v2.Kubernetes.Binding.Builder.class); + } + + private int bitField0_; + public static final int NS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object ns_ = ""; + /** + * + * + *
+     * Namespace for the binding.
+     * 
+ * + * string ns = 1; + * + * @return The ns. + */ + @java.lang.Override + public java.lang.String getNs() { + java.lang.Object ref = ns_; + 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(); + ns_ = s; + return s; + } + } + /** + * + * + *
+     * Namespace for the binding.
+     * 
+ * + * string ns = 1; + * + * @return The bytes for ns. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNsBytes() { + java.lang.Object ref = ns_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ns_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+     * Name for the binding.
+     * 
+ * + * string name = 2; + * + * @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; + } + } + /** + * + * + *
+     * Name for the binding.
+     * 
+ * + * string name = 2; + * + * @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 ROLE_FIELD_NUMBER = 3; + private com.google.cloud.securitycenter.v2.Kubernetes.Role role_; + /** + * + * + *
+     * The Role or ClusterRole referenced by the binding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes.Role role = 3; + * + * @return Whether the role field is set. + */ + @java.lang.Override + public boolean hasRole() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The Role or ClusterRole referenced by the binding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes.Role role = 3; + * + * @return The role. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.Role getRole() { + return role_ == null + ? com.google.cloud.securitycenter.v2.Kubernetes.Role.getDefaultInstance() + : role_; + } + /** + * + * + *
+     * The Role or ClusterRole referenced by the binding.
+     * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes.Role role = 3; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.RoleOrBuilder getRoleOrBuilder() { + return role_ == null + ? com.google.cloud.securitycenter.v2.Kubernetes.Role.getDefaultInstance() + : role_; + } + + public static final int SUBJECTS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List subjects_; + /** + * + * + *
+     * Represents one or more subjects that are bound to the role. Not always
+     * available for PATCH requests.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Subject subjects = 4; + */ + @java.lang.Override + public java.util.List getSubjectsList() { + return subjects_; + } + /** + * + * + *
+     * Represents one or more subjects that are bound to the role. Not always
+     * available for PATCH requests.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Subject subjects = 4; + */ + @java.lang.Override + public java.util.List + getSubjectsOrBuilderList() { + return subjects_; + } + /** + * + * + *
+     * Represents one or more subjects that are bound to the role. Not always
+     * available for PATCH requests.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Subject subjects = 4; + */ + @java.lang.Override + public int getSubjectsCount() { + return subjects_.size(); + } + /** + * + * + *
+     * Represents one or more subjects that are bound to the role. Not always
+     * available for PATCH requests.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Subject subjects = 4; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.Subject getSubjects(int index) { + return subjects_.get(index); + } + /** + * + * + *
+     * Represents one or more subjects that are bound to the role. Not always
+     * available for PATCH requests.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Subject subjects = 4; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.SubjectOrBuilder getSubjectsOrBuilder( + int index) { + return subjects_.get(index); + } + + 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(ns_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ns_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getRole()); + } + for (int i = 0; i < subjects_.size(); i++) { + output.writeMessage(4, subjects_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ns_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ns_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getRole()); + } + for (int i = 0; i < subjects_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, subjects_.get(i)); + } + size += getUnknownFields().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.v2.Kubernetes.Binding)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.Kubernetes.Binding other = + (com.google.cloud.securitycenter.v2.Kubernetes.Binding) obj; + + if (!getNs().equals(other.getNs())) return false; + if (!getName().equals(other.getName())) return false; + if (hasRole() != other.hasRole()) return false; + if (hasRole()) { + if (!getRole().equals(other.getRole())) return false; + } + if (!getSubjectsList().equals(other.getSubjectsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + NS_FIELD_NUMBER; + hash = (53 * hash) + getNs().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasRole()) { + hash = (37 * hash) + ROLE_FIELD_NUMBER; + hash = (53 * hash) + getRole().hashCode(); + } + if (getSubjectsCount() > 0) { + hash = (37 * hash) + SUBJECTS_FIELD_NUMBER; + hash = (53 * hash) + getSubjectsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Binding parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Binding 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.v2.Kubernetes.Binding parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Binding 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.v2.Kubernetes.Binding parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Binding parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Binding parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Binding 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.v2.Kubernetes.Binding parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Binding 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.v2.Kubernetes.Binding parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Binding 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.v2.Kubernetes.Binding 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; + } + /** + * + * + *
+     * Represents a Kubernetes RoleBinding or ClusterRoleBinding.
+     * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Kubernetes.Binding} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.Kubernetes.Binding) + com.google.cloud.securitycenter.v2.Kubernetes.BindingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_Binding_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_Binding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Kubernetes.Binding.class, + com.google.cloud.securitycenter.v2.Kubernetes.Binding.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.Kubernetes.Binding.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getRoleFieldBuilder(); + getSubjectsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + ns_ = ""; + name_ = ""; + role_ = null; + if (roleBuilder_ != null) { + roleBuilder_.dispose(); + roleBuilder_ = null; + } + if (subjectsBuilder_ == null) { + subjects_ = java.util.Collections.emptyList(); + } else { + subjects_ = null; + subjectsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_Binding_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.Binding getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.Kubernetes.Binding.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.Binding build() { + com.google.cloud.securitycenter.v2.Kubernetes.Binding result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.Binding buildPartial() { + com.google.cloud.securitycenter.v2.Kubernetes.Binding result = + new com.google.cloud.securitycenter.v2.Kubernetes.Binding(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.securitycenter.v2.Kubernetes.Binding result) { + if (subjectsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + subjects_ = java.util.Collections.unmodifiableList(subjects_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.subjects_ = subjects_; + } else { + result.subjects_ = subjectsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.Kubernetes.Binding result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.ns_ = ns_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.role_ = roleBuilder_ == null ? role_ : roleBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v2.Kubernetes.Binding) { + return mergeFrom((com.google.cloud.securitycenter.v2.Kubernetes.Binding) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.Kubernetes.Binding other) { + if (other == com.google.cloud.securitycenter.v2.Kubernetes.Binding.getDefaultInstance()) + return this; + if (!other.getNs().isEmpty()) { + ns_ = other.ns_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasRole()) { + mergeRole(other.getRole()); + } + if (subjectsBuilder_ == null) { + if (!other.subjects_.isEmpty()) { + if (subjects_.isEmpty()) { + subjects_ = other.subjects_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureSubjectsIsMutable(); + subjects_.addAll(other.subjects_); + } + onChanged(); + } + } else { + if (!other.subjects_.isEmpty()) { + if (subjectsBuilder_.isEmpty()) { + subjectsBuilder_.dispose(); + subjectsBuilder_ = null; + subjects_ = other.subjects_; + bitField0_ = (bitField0_ & ~0x00000008); + subjectsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSubjectsFieldBuilder() + : null; + } else { + subjectsBuilder_.addAllMessages(other.subjects_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + ns_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getRoleFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.cloud.securitycenter.v2.Kubernetes.Subject m = + input.readMessage( + com.google.cloud.securitycenter.v2.Kubernetes.Subject.parser(), + extensionRegistry); + if (subjectsBuilder_ == null) { + ensureSubjectsIsMutable(); + subjects_.add(m); + } else { + subjectsBuilder_.addMessage(m); + } + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object ns_ = ""; + /** + * + * + *
+       * Namespace for the binding.
+       * 
+ * + * string ns = 1; + * + * @return The ns. + */ + public java.lang.String getNs() { + java.lang.Object ref = ns_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ns_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Namespace for the binding.
+       * 
+ * + * string ns = 1; + * + * @return The bytes for ns. + */ + public com.google.protobuf.ByteString getNsBytes() { + java.lang.Object ref = ns_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ns_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Namespace for the binding.
+       * 
+ * + * string ns = 1; + * + * @param value The ns to set. + * @return This builder for chaining. + */ + public Builder setNs(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ns_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Namespace for the binding.
+       * 
+ * + * string ns = 1; + * + * @return This builder for chaining. + */ + public Builder clearNs() { + ns_ = getDefaultInstance().getNs(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Namespace for the binding.
+       * 
+ * + * string ns = 1; + * + * @param value The bytes for ns to set. + * @return This builder for chaining. + */ + public Builder setNsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ns_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * Name for the binding.
+       * 
+ * + * string name = 2; + * + * @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; + } + } + /** + * + * + *
+       * Name for the binding.
+       * 
+ * + * string name = 2; + * + * @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; + } + } + /** + * + * + *
+       * Name for the binding.
+       * 
+ * + * string name = 2; + * + * @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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Name for the binding.
+       * 
+ * + * string name = 2; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Name for the binding.
+       * 
+ * + * string name = 2; + * + * @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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.securitycenter.v2.Kubernetes.Role role_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Kubernetes.Role, + com.google.cloud.securitycenter.v2.Kubernetes.Role.Builder, + com.google.cloud.securitycenter.v2.Kubernetes.RoleOrBuilder> + roleBuilder_; + /** + * + * + *
+       * The Role or ClusterRole referenced by the binding.
+       * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes.Role role = 3; + * + * @return Whether the role field is set. + */ + public boolean hasRole() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+       * The Role or ClusterRole referenced by the binding.
+       * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes.Role role = 3; + * + * @return The role. + */ + public com.google.cloud.securitycenter.v2.Kubernetes.Role getRole() { + if (roleBuilder_ == null) { + return role_ == null + ? com.google.cloud.securitycenter.v2.Kubernetes.Role.getDefaultInstance() + : role_; + } else { + return roleBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The Role or ClusterRole referenced by the binding.
+       * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes.Role role = 3; + */ + public Builder setRole(com.google.cloud.securitycenter.v2.Kubernetes.Role value) { + if (roleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + role_ = value; + } else { + roleBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The Role or ClusterRole referenced by the binding.
+       * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes.Role role = 3; + */ + public Builder setRole( + com.google.cloud.securitycenter.v2.Kubernetes.Role.Builder builderForValue) { + if (roleBuilder_ == null) { + role_ = builderForValue.build(); + } else { + roleBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The Role or ClusterRole referenced by the binding.
+       * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes.Role role = 3; + */ + public Builder mergeRole(com.google.cloud.securitycenter.v2.Kubernetes.Role value) { + if (roleBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && role_ != null + && role_ != com.google.cloud.securitycenter.v2.Kubernetes.Role.getDefaultInstance()) { + getRoleBuilder().mergeFrom(value); + } else { + role_ = value; + } + } else { + roleBuilder_.mergeFrom(value); + } + if (role_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+       * The Role or ClusterRole referenced by the binding.
+       * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes.Role role = 3; + */ + public Builder clearRole() { + bitField0_ = (bitField0_ & ~0x00000004); + role_ = null; + if (roleBuilder_ != null) { + roleBuilder_.dispose(); + roleBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * The Role or ClusterRole referenced by the binding.
+       * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes.Role role = 3; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.Role.Builder getRoleBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getRoleFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The Role or ClusterRole referenced by the binding.
+       * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes.Role role = 3; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.RoleOrBuilder getRoleOrBuilder() { + if (roleBuilder_ != null) { + return roleBuilder_.getMessageOrBuilder(); + } else { + return role_ == null + ? com.google.cloud.securitycenter.v2.Kubernetes.Role.getDefaultInstance() + : role_; + } + } + /** + * + * + *
+       * The Role or ClusterRole referenced by the binding.
+       * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes.Role role = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Kubernetes.Role, + com.google.cloud.securitycenter.v2.Kubernetes.Role.Builder, + com.google.cloud.securitycenter.v2.Kubernetes.RoleOrBuilder> + getRoleFieldBuilder() { + if (roleBuilder_ == null) { + roleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v2.Kubernetes.Role, + com.google.cloud.securitycenter.v2.Kubernetes.Role.Builder, + com.google.cloud.securitycenter.v2.Kubernetes.RoleOrBuilder>( + getRole(), getParentForChildren(), isClean()); + role_ = null; + } + return roleBuilder_; + } + + private java.util.List subjects_ = + java.util.Collections.emptyList(); + + private void ensureSubjectsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + subjects_ = + new java.util.ArrayList( + subjects_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Kubernetes.Subject, + com.google.cloud.securitycenter.v2.Kubernetes.Subject.Builder, + com.google.cloud.securitycenter.v2.Kubernetes.SubjectOrBuilder> + subjectsBuilder_; + + /** + * + * + *
+       * Represents one or more subjects that are bound to the role. Not always
+       * available for PATCH requests.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Subject subjects = 4; + */ + public java.util.List + getSubjectsList() { + if (subjectsBuilder_ == null) { + return java.util.Collections.unmodifiableList(subjects_); + } else { + return subjectsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Represents one or more subjects that are bound to the role. Not always
+       * available for PATCH requests.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Subject subjects = 4; + */ + public int getSubjectsCount() { + if (subjectsBuilder_ == null) { + return subjects_.size(); + } else { + return subjectsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Represents one or more subjects that are bound to the role. Not always
+       * available for PATCH requests.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Subject subjects = 4; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.Subject getSubjects(int index) { + if (subjectsBuilder_ == null) { + return subjects_.get(index); + } else { + return subjectsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Represents one or more subjects that are bound to the role. Not always
+       * available for PATCH requests.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Subject subjects = 4; + */ + public Builder setSubjects( + int index, com.google.cloud.securitycenter.v2.Kubernetes.Subject value) { + if (subjectsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectsIsMutable(); + subjects_.set(index, value); + onChanged(); + } else { + subjectsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Represents one or more subjects that are bound to the role. Not always
+       * available for PATCH requests.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Subject subjects = 4; + */ + public Builder setSubjects( + int index, + com.google.cloud.securitycenter.v2.Kubernetes.Subject.Builder builderForValue) { + if (subjectsBuilder_ == null) { + ensureSubjectsIsMutable(); + subjects_.set(index, builderForValue.build()); + onChanged(); + } else { + subjectsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Represents one or more subjects that are bound to the role. Not always
+       * available for PATCH requests.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Subject subjects = 4; + */ + public Builder addSubjects(com.google.cloud.securitycenter.v2.Kubernetes.Subject value) { + if (subjectsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectsIsMutable(); + subjects_.add(value); + onChanged(); + } else { + subjectsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Represents one or more subjects that are bound to the role. Not always
+       * available for PATCH requests.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Subject subjects = 4; + */ + public Builder addSubjects( + int index, com.google.cloud.securitycenter.v2.Kubernetes.Subject value) { + if (subjectsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectsIsMutable(); + subjects_.add(index, value); + onChanged(); + } else { + subjectsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Represents one or more subjects that are bound to the role. Not always
+       * available for PATCH requests.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Subject subjects = 4; + */ + public Builder addSubjects( + com.google.cloud.securitycenter.v2.Kubernetes.Subject.Builder builderForValue) { + if (subjectsBuilder_ == null) { + ensureSubjectsIsMutable(); + subjects_.add(builderForValue.build()); + onChanged(); + } else { + subjectsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Represents one or more subjects that are bound to the role. Not always
+       * available for PATCH requests.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Subject subjects = 4; + */ + public Builder addSubjects( + int index, + com.google.cloud.securitycenter.v2.Kubernetes.Subject.Builder builderForValue) { + if (subjectsBuilder_ == null) { + ensureSubjectsIsMutable(); + subjects_.add(index, builderForValue.build()); + onChanged(); + } else { + subjectsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Represents one or more subjects that are bound to the role. Not always
+       * available for PATCH requests.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Subject subjects = 4; + */ + public Builder addAllSubjects( + java.lang.Iterable + values) { + if (subjectsBuilder_ == null) { + ensureSubjectsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, subjects_); + onChanged(); + } else { + subjectsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Represents one or more subjects that are bound to the role. Not always
+       * available for PATCH requests.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Subject subjects = 4; + */ + public Builder clearSubjects() { + if (subjectsBuilder_ == null) { + subjects_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + subjectsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Represents one or more subjects that are bound to the role. Not always
+       * available for PATCH requests.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Subject subjects = 4; + */ + public Builder removeSubjects(int index) { + if (subjectsBuilder_ == null) { + ensureSubjectsIsMutable(); + subjects_.remove(index); + onChanged(); + } else { + subjectsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Represents one or more subjects that are bound to the role. Not always
+       * available for PATCH requests.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Subject subjects = 4; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.Subject.Builder getSubjectsBuilder( + int index) { + return getSubjectsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Represents one or more subjects that are bound to the role. Not always
+       * available for PATCH requests.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Subject subjects = 4; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.SubjectOrBuilder getSubjectsOrBuilder( + int index) { + if (subjectsBuilder_ == null) { + return subjects_.get(index); + } else { + return subjectsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Represents one or more subjects that are bound to the role. Not always
+       * available for PATCH requests.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Subject subjects = 4; + */ + public java.util.List< + ? extends com.google.cloud.securitycenter.v2.Kubernetes.SubjectOrBuilder> + getSubjectsOrBuilderList() { + if (subjectsBuilder_ != null) { + return subjectsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(subjects_); + } + } + /** + * + * + *
+       * Represents one or more subjects that are bound to the role. Not always
+       * available for PATCH requests.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Subject subjects = 4; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.Subject.Builder addSubjectsBuilder() { + return getSubjectsFieldBuilder() + .addBuilder(com.google.cloud.securitycenter.v2.Kubernetes.Subject.getDefaultInstance()); + } + /** + * + * + *
+       * Represents one or more subjects that are bound to the role. Not always
+       * available for PATCH requests.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Subject subjects = 4; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.Subject.Builder addSubjectsBuilder( + int index) { + return getSubjectsFieldBuilder() + .addBuilder( + index, com.google.cloud.securitycenter.v2.Kubernetes.Subject.getDefaultInstance()); + } + /** + * + * + *
+       * Represents one or more subjects that are bound to the role. Not always
+       * available for PATCH requests.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Subject subjects = 4; + */ + public java.util.List + getSubjectsBuilderList() { + return getSubjectsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Kubernetes.Subject, + com.google.cloud.securitycenter.v2.Kubernetes.Subject.Builder, + com.google.cloud.securitycenter.v2.Kubernetes.SubjectOrBuilder> + getSubjectsFieldBuilder() { + if (subjectsBuilder_ == null) { + subjectsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Kubernetes.Subject, + com.google.cloud.securitycenter.v2.Kubernetes.Subject.Builder, + com.google.cloud.securitycenter.v2.Kubernetes.SubjectOrBuilder>( + subjects_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + subjects_ = null; + } + return subjectsBuilder_; + } + + @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.v2.Kubernetes.Binding) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.Kubernetes.Binding) + private static final com.google.cloud.securitycenter.v2.Kubernetes.Binding DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.Kubernetes.Binding(); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Binding getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Binding parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.Kubernetes.Binding getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SubjectOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.Kubernetes.Subject) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Authentication type for the subject.
+     * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType kind = 1; + * + * @return The enum numeric value on the wire for kind. + */ + int getKindValue(); + /** + * + * + *
+     * Authentication type for the subject.
+     * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType kind = 1; + * + * @return The kind. + */ + com.google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType getKind(); + + /** + * + * + *
+     * Namespace for the subject.
+     * 
+ * + * string ns = 2; + * + * @return The ns. + */ + java.lang.String getNs(); + /** + * + * + *
+     * Namespace for the subject.
+     * 
+ * + * string ns = 2; + * + * @return The bytes for ns. + */ + com.google.protobuf.ByteString getNsBytes(); + + /** + * + * + *
+     * Name for the subject.
+     * 
+ * + * string name = 3; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Name for the subject.
+     * 
+ * + * string name = 3; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + } + /** + * + * + *
+   * Represents a Kubernetes subject.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Kubernetes.Subject} + */ + public static final class Subject extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.Kubernetes.Subject) + SubjectOrBuilder { + private static final long serialVersionUID = 0L; + // Use Subject.newBuilder() to construct. + private Subject(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Subject() { + kind_ = 0; + ns_ = ""; + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Subject(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_Subject_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_Subject_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Kubernetes.Subject.class, + com.google.cloud.securitycenter.v2.Kubernetes.Subject.Builder.class); + } + + /** + * + * + *
+     * Auth types that can be used for the subject's kind field.
+     * 
+ * + * Protobuf enum {@code google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType} + */ + public enum AuthType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Authentication is not specified.
+       * 
+ * + * AUTH_TYPE_UNSPECIFIED = 0; + */ + AUTH_TYPE_UNSPECIFIED(0), + /** + * + * + *
+       * User with valid certificate.
+       * 
+ * + * USER = 1; + */ + USER(1), + /** + * + * + *
+       * Users managed by Kubernetes API with credentials stored as secrets.
+       * 
+ * + * SERVICEACCOUNT = 2; + */ + SERVICEACCOUNT(2), + /** + * + * + *
+       * Collection of users.
+       * 
+ * + * GROUP = 3; + */ + GROUP(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Authentication is not specified.
+       * 
+ * + * AUTH_TYPE_UNSPECIFIED = 0; + */ + public static final int AUTH_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * User with valid certificate.
+       * 
+ * + * USER = 1; + */ + public static final int USER_VALUE = 1; + /** + * + * + *
+       * Users managed by Kubernetes API with credentials stored as secrets.
+       * 
+ * + * SERVICEACCOUNT = 2; + */ + public static final int SERVICEACCOUNT_VALUE = 2; + /** + * + * + *
+       * Collection of users.
+       * 
+ * + * GROUP = 3; + */ + public static final int GROUP_VALUE = 3; + + 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 AuthType 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 AuthType forNumber(int value) { + switch (value) { + case 0: + return AUTH_TYPE_UNSPECIFIED; + case 1: + return USER; + case 2: + return SERVICEACCOUNT; + case 3: + return GROUP; + 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 AuthType findValueByNumber(int number) { + return AuthType.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.v2.Kubernetes.Subject.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final AuthType[] VALUES = values(); + + public static AuthType 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 AuthType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType) + } + + public static final int KIND_FIELD_NUMBER = 1; + private int kind_ = 0; + /** + * + * + *
+     * Authentication type for the subject.
+     * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType kind = 1; + * + * @return The enum numeric value on the wire for kind. + */ + @java.lang.Override + public int getKindValue() { + return kind_; + } + /** + * + * + *
+     * Authentication type for the subject.
+     * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType kind = 1; + * + * @return The kind. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType getKind() { + com.google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType result = + com.google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType.forNumber(kind_); + return result == null + ? com.google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType.UNRECOGNIZED + : result; + } + + public static final int NS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object ns_ = ""; + /** + * + * + *
+     * Namespace for the subject.
+     * 
+ * + * string ns = 2; + * + * @return The ns. + */ + @java.lang.Override + public java.lang.String getNs() { + java.lang.Object ref = ns_; + 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(); + ns_ = s; + return s; + } + } + /** + * + * + *
+     * Namespace for the subject.
+     * 
+ * + * string ns = 2; + * + * @return The bytes for ns. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNsBytes() { + java.lang.Object ref = ns_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ns_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+     * Name for the subject.
+     * 
+ * + * string name = 3; + * + * @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; + } + } + /** + * + * + *
+     * Name for the subject.
+     * 
+ * + * string name = 3; + * + * @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 (kind_ + != com.google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType.AUTH_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, kind_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ns_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ns_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (kind_ + != com.google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType.AUTH_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, kind_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ns_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ns_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); + } + size += getUnknownFields().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.v2.Kubernetes.Subject)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.Kubernetes.Subject other = + (com.google.cloud.securitycenter.v2.Kubernetes.Subject) obj; + + if (kind_ != other.kind_) return false; + if (!getNs().equals(other.getNs())) return false; + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + KIND_FIELD_NUMBER; + hash = (53 * hash) + kind_; + hash = (37 * hash) + NS_FIELD_NUMBER; + hash = (53 * hash) + getNs().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Subject parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Subject 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.v2.Kubernetes.Subject parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Subject 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.v2.Kubernetes.Subject parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Subject parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Subject parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Subject 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.v2.Kubernetes.Subject parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Subject 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.v2.Kubernetes.Subject parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Subject 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.v2.Kubernetes.Subject 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; + } + /** + * + * + *
+     * Represents a Kubernetes subject.
+     * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Kubernetes.Subject} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.Kubernetes.Subject) + com.google.cloud.securitycenter.v2.Kubernetes.SubjectOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_Subject_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_Subject_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Kubernetes.Subject.class, + com.google.cloud.securitycenter.v2.Kubernetes.Subject.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.Kubernetes.Subject.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + kind_ = 0; + ns_ = ""; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_Subject_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.Subject getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.Kubernetes.Subject.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.Subject build() { + com.google.cloud.securitycenter.v2.Kubernetes.Subject result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.Subject buildPartial() { + com.google.cloud.securitycenter.v2.Kubernetes.Subject result = + new com.google.cloud.securitycenter.v2.Kubernetes.Subject(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.Kubernetes.Subject result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.kind_ = kind_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.ns_ = ns_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.name_ = name_; + } + } + + @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.v2.Kubernetes.Subject) { + return mergeFrom((com.google.cloud.securitycenter.v2.Kubernetes.Subject) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.Kubernetes.Subject other) { + if (other == com.google.cloud.securitycenter.v2.Kubernetes.Subject.getDefaultInstance()) + return this; + if (other.kind_ != 0) { + setKindValue(other.getKindValue()); + } + if (!other.getNs().isEmpty()) { + ns_ = other.ns_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + kind_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + ns_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int kind_ = 0; + /** + * + * + *
+       * Authentication type for the subject.
+       * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType kind = 1; + * + * @return The enum numeric value on the wire for kind. + */ + @java.lang.Override + public int getKindValue() { + return kind_; + } + /** + * + * + *
+       * Authentication type for the subject.
+       * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType kind = 1; + * + * @param value The enum numeric value on the wire for kind to set. + * @return This builder for chaining. + */ + public Builder setKindValue(int value) { + kind_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Authentication type for the subject.
+       * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType kind = 1; + * + * @return The kind. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType getKind() { + com.google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType result = + com.google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType.forNumber(kind_); + return result == null + ? com.google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Authentication type for the subject.
+       * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType kind = 1; + * + * @param value The kind to set. + * @return This builder for chaining. + */ + public Builder setKind(com.google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + kind_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Authentication type for the subject.
+       * 
+ * + * .google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType kind = 1; + * + * @return This builder for chaining. + */ + public Builder clearKind() { + bitField0_ = (bitField0_ & ~0x00000001); + kind_ = 0; + onChanged(); + return this; + } + + private java.lang.Object ns_ = ""; + /** + * + * + *
+       * Namespace for the subject.
+       * 
+ * + * string ns = 2; + * + * @return The ns. + */ + public java.lang.String getNs() { + java.lang.Object ref = ns_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ns_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Namespace for the subject.
+       * 
+ * + * string ns = 2; + * + * @return The bytes for ns. + */ + public com.google.protobuf.ByteString getNsBytes() { + java.lang.Object ref = ns_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ns_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Namespace for the subject.
+       * 
+ * + * string ns = 2; + * + * @param value The ns to set. + * @return This builder for chaining. + */ + public Builder setNs(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ns_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Namespace for the subject.
+       * 
+ * + * string ns = 2; + * + * @return This builder for chaining. + */ + public Builder clearNs() { + ns_ = getDefaultInstance().getNs(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Namespace for the subject.
+       * 
+ * + * string ns = 2; + * + * @param value The bytes for ns to set. + * @return This builder for chaining. + */ + public Builder setNsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ns_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * Name for the subject.
+       * 
+ * + * string name = 3; + * + * @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; + } + } + /** + * + * + *
+       * Name for the subject.
+       * 
+ * + * string name = 3; + * + * @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; + } + } + /** + * + * + *
+       * Name for the subject.
+       * 
+ * + * string name = 3; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Name for the subject.
+       * 
+ * + * string name = 3; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * Name for the subject.
+       * 
+ * + * string name = 3; + * + * @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; + bitField0_ |= 0x00000004; + 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.v2.Kubernetes.Subject) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.Kubernetes.Subject) + private static final com.google.cloud.securitycenter.v2.Kubernetes.Subject DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.Kubernetes.Subject(); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Subject getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Subject parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.Kubernetes.Subject getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AccessReviewOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.Kubernetes.AccessReview) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The API group of the resource. "*" means all.
+     * 
+ * + * string group = 1; + * + * @return The group. + */ + java.lang.String getGroup(); + /** + * + * + *
+     * The API group of the resource. "*" means all.
+     * 
+ * + * string group = 1; + * + * @return The bytes for group. + */ + com.google.protobuf.ByteString getGroupBytes(); + + /** + * + * + *
+     * Namespace of the action being requested. Currently, there is no
+     * distinction between no namespace and all namespaces.  Both
+     * are represented by "" (empty).
+     * 
+ * + * string ns = 2; + * + * @return The ns. + */ + java.lang.String getNs(); + /** + * + * + *
+     * Namespace of the action being requested. Currently, there is no
+     * distinction between no namespace and all namespaces.  Both
+     * are represented by "" (empty).
+     * 
+ * + * string ns = 2; + * + * @return The bytes for ns. + */ + com.google.protobuf.ByteString getNsBytes(); + + /** + * + * + *
+     * The name of the resource being requested. Empty means all.
+     * 
+ * + * string name = 3; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * The name of the resource being requested. Empty means all.
+     * 
+ * + * string name = 3; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+     * The optional resource type requested. "*" means all.
+     * 
+ * + * string resource = 4; + * + * @return The resource. + */ + java.lang.String getResource(); + /** + * + * + *
+     * The optional resource type requested. "*" means all.
+     * 
+ * + * string resource = 4; + * + * @return The bytes for resource. + */ + com.google.protobuf.ByteString getResourceBytes(); + + /** + * + * + *
+     * The optional subresource type.
+     * 
+ * + * string subresource = 5; + * + * @return The subresource. + */ + java.lang.String getSubresource(); + /** + * + * + *
+     * The optional subresource type.
+     * 
+ * + * string subresource = 5; + * + * @return The bytes for subresource. + */ + com.google.protobuf.ByteString getSubresourceBytes(); + + /** + * + * + *
+     * A Kubernetes resource API verb, like get, list, watch, create, update,
+     * delete, proxy. "*" means all.
+     * 
+ * + * string verb = 6; + * + * @return The verb. + */ + java.lang.String getVerb(); + /** + * + * + *
+     * A Kubernetes resource API verb, like get, list, watch, create, update,
+     * delete, proxy. "*" means all.
+     * 
+ * + * string verb = 6; + * + * @return The bytes for verb. + */ + com.google.protobuf.ByteString getVerbBytes(); + + /** + * + * + *
+     * The API version of the resource. "*" means all.
+     * 
+ * + * string version = 7; + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+     * The API version of the resource. "*" means all.
+     * 
+ * + * string version = 7; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); + } + /** + * + * + *
+   * Conveys information about a Kubernetes access review (such as one returned
+   * by a [`kubectl auth
+   * can-i`](https://kubernetes.io/docs/reference/access-authn-authz/authorization/#checking-api-access)
+   * command) that was involved in a finding.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Kubernetes.AccessReview} + */ + public static final class AccessReview extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.Kubernetes.AccessReview) + AccessReviewOrBuilder { + private static final long serialVersionUID = 0L; + // Use AccessReview.newBuilder() to construct. + private AccessReview(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AccessReview() { + group_ = ""; + ns_ = ""; + name_ = ""; + resource_ = ""; + subresource_ = ""; + verb_ = ""; + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AccessReview(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_AccessReview_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_AccessReview_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Kubernetes.AccessReview.class, + com.google.cloud.securitycenter.v2.Kubernetes.AccessReview.Builder.class); + } + + public static final int GROUP_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object group_ = ""; + /** + * + * + *
+     * The API group of the resource. "*" means all.
+     * 
+ * + * string group = 1; + * + * @return The group. + */ + @java.lang.Override + public java.lang.String getGroup() { + java.lang.Object ref = group_; + 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(); + group_ = s; + return s; + } + } + /** + * + * + *
+     * The API group of the resource. "*" means all.
+     * 
+ * + * string group = 1; + * + * @return The bytes for group. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGroupBytes() { + java.lang.Object ref = group_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + group_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object ns_ = ""; + /** + * + * + *
+     * Namespace of the action being requested. Currently, there is no
+     * distinction between no namespace and all namespaces.  Both
+     * are represented by "" (empty).
+     * 
+ * + * string ns = 2; + * + * @return The ns. + */ + @java.lang.Override + public java.lang.String getNs() { + java.lang.Object ref = ns_; + 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(); + ns_ = s; + return s; + } + } + /** + * + * + *
+     * Namespace of the action being requested. Currently, there is no
+     * distinction between no namespace and all namespaces.  Both
+     * are represented by "" (empty).
+     * 
+ * + * string ns = 2; + * + * @return The bytes for ns. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNsBytes() { + java.lang.Object ref = ns_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ns_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+     * The name of the resource being requested. Empty means all.
+     * 
+ * + * string name = 3; + * + * @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; + } + } + /** + * + * + *
+     * The name of the resource being requested. Empty means all.
+     * 
+ * + * string name = 3; + * + * @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 RESOURCE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object resource_ = ""; + /** + * + * + *
+     * The optional resource type requested. "*" means all.
+     * 
+ * + * string resource = 4; + * + * @return The resource. + */ + @java.lang.Override + public java.lang.String getResource() { + java.lang.Object ref = resource_; + 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(); + resource_ = s; + return s; + } + } + /** + * + * + *
+     * The optional resource type requested. "*" means all.
+     * 
+ * + * string resource = 4; + * + * @return The bytes for resource. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBRESOURCE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object subresource_ = ""; + /** + * + * + *
+     * The optional subresource type.
+     * 
+ * + * string subresource = 5; + * + * @return The subresource. + */ + @java.lang.Override + public java.lang.String getSubresource() { + java.lang.Object ref = subresource_; + 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(); + subresource_ = s; + return s; + } + } + /** + * + * + *
+     * The optional subresource type.
+     * 
+ * + * string subresource = 5; + * + * @return The bytes for subresource. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSubresourceBytes() { + java.lang.Object ref = subresource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subresource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERB_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object verb_ = ""; + /** + * + * + *
+     * A Kubernetes resource API verb, like get, list, watch, create, update,
+     * delete, proxy. "*" means all.
+     * 
+ * + * string verb = 6; + * + * @return The verb. + */ + @java.lang.Override + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + 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(); + verb_ = s; + return s; + } + } + /** + * + * + *
+     * A Kubernetes resource API verb, like get, list, watch, create, update,
+     * delete, proxy. "*" means all.
+     * 
+ * + * string verb = 6; + * + * @return The bytes for verb. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + /** + * + * + *
+     * The API version of the resource. "*" means all.
+     * 
+ * + * string version = 7; + * + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + 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(); + version_ = s; + return s; + } + } + /** + * + * + *
+     * The API version of the resource. "*" means all.
+     * 
+ * + * string version = 7; + * + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = 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(group_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, group_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ns_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ns_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, resource_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subresource_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, subresource_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, verb_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, version_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(group_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, group_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ns_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ns_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, resource_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subresource_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, subresource_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, verb_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, version_); + } + size += getUnknownFields().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.v2.Kubernetes.AccessReview)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.Kubernetes.AccessReview other = + (com.google.cloud.securitycenter.v2.Kubernetes.AccessReview) obj; + + if (!getGroup().equals(other.getGroup())) return false; + if (!getNs().equals(other.getNs())) return false; + if (!getName().equals(other.getName())) return false; + if (!getResource().equals(other.getResource())) return false; + if (!getSubresource().equals(other.getSubresource())) return false; + if (!getVerb().equals(other.getVerb())) return false; + if (!getVersion().equals(other.getVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + GROUP_FIELD_NUMBER; + hash = (53 * hash) + getGroup().hashCode(); + hash = (37 * hash) + NS_FIELD_NUMBER; + hash = (53 * hash) + getNs().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + hash = (37 * hash) + SUBRESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSubresource().hashCode(); + hash = (37 * hash) + VERB_FIELD_NUMBER; + hash = (53 * hash) + getVerb().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.AccessReview parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.AccessReview 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.v2.Kubernetes.AccessReview parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.AccessReview 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.v2.Kubernetes.AccessReview parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.AccessReview parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.AccessReview parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.AccessReview 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.v2.Kubernetes.AccessReview parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.AccessReview 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.v2.Kubernetes.AccessReview parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.AccessReview 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.v2.Kubernetes.AccessReview 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; + } + /** + * + * + *
+     * Conveys information about a Kubernetes access review (such as one returned
+     * by a [`kubectl auth
+     * can-i`](https://kubernetes.io/docs/reference/access-authn-authz/authorization/#checking-api-access)
+     * command) that was involved in a finding.
+     * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Kubernetes.AccessReview} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.Kubernetes.AccessReview) + com.google.cloud.securitycenter.v2.Kubernetes.AccessReviewOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_AccessReview_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_AccessReview_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Kubernetes.AccessReview.class, + com.google.cloud.securitycenter.v2.Kubernetes.AccessReview.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.Kubernetes.AccessReview.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + group_ = ""; + ns_ = ""; + name_ = ""; + resource_ = ""; + subresource_ = ""; + verb_ = ""; + version_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_AccessReview_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.AccessReview + getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.Kubernetes.AccessReview.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.AccessReview build() { + com.google.cloud.securitycenter.v2.Kubernetes.AccessReview result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.AccessReview buildPartial() { + com.google.cloud.securitycenter.v2.Kubernetes.AccessReview result = + new com.google.cloud.securitycenter.v2.Kubernetes.AccessReview(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.securitycenter.v2.Kubernetes.AccessReview result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.group_ = group_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.ns_ = ns_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.resource_ = resource_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.subresource_ = subresource_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.verb_ = verb_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.version_ = version_; + } + } + + @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.v2.Kubernetes.AccessReview) { + return mergeFrom((com.google.cloud.securitycenter.v2.Kubernetes.AccessReview) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.Kubernetes.AccessReview other) { + if (other + == com.google.cloud.securitycenter.v2.Kubernetes.AccessReview.getDefaultInstance()) + return this; + if (!other.getGroup().isEmpty()) { + group_ = other.group_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getNs().isEmpty()) { + ns_ = other.ns_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getResource().isEmpty()) { + resource_ = other.resource_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getSubresource().isEmpty()) { + subresource_ = other.subresource_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getVerb().isEmpty()) { + verb_ = other.verb_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00000040; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + group_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + ns_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + resource_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + subresource_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + verb_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object group_ = ""; + /** + * + * + *
+       * The API group of the resource. "*" means all.
+       * 
+ * + * string group = 1; + * + * @return The group. + */ + public java.lang.String getGroup() { + java.lang.Object ref = group_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + group_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The API group of the resource. "*" means all.
+       * 
+ * + * string group = 1; + * + * @return The bytes for group. + */ + public com.google.protobuf.ByteString getGroupBytes() { + java.lang.Object ref = group_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + group_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The API group of the resource. "*" means all.
+       * 
+ * + * string group = 1; + * + * @param value The group to set. + * @return This builder for chaining. + */ + public Builder setGroup(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + group_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The API group of the resource. "*" means all.
+       * 
+ * + * string group = 1; + * + * @return This builder for chaining. + */ + public Builder clearGroup() { + group_ = getDefaultInstance().getGroup(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The API group of the resource. "*" means all.
+       * 
+ * + * string group = 1; + * + * @param value The bytes for group to set. + * @return This builder for chaining. + */ + public Builder setGroupBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + group_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object ns_ = ""; + /** + * + * + *
+       * Namespace of the action being requested. Currently, there is no
+       * distinction between no namespace and all namespaces.  Both
+       * are represented by "" (empty).
+       * 
+ * + * string ns = 2; + * + * @return The ns. + */ + public java.lang.String getNs() { + java.lang.Object ref = ns_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ns_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Namespace of the action being requested. Currently, there is no
+       * distinction between no namespace and all namespaces.  Both
+       * are represented by "" (empty).
+       * 
+ * + * string ns = 2; + * + * @return The bytes for ns. + */ + public com.google.protobuf.ByteString getNsBytes() { + java.lang.Object ref = ns_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ns_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Namespace of the action being requested. Currently, there is no
+       * distinction between no namespace and all namespaces.  Both
+       * are represented by "" (empty).
+       * 
+ * + * string ns = 2; + * + * @param value The ns to set. + * @return This builder for chaining. + */ + public Builder setNs(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ns_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Namespace of the action being requested. Currently, there is no
+       * distinction between no namespace and all namespaces.  Both
+       * are represented by "" (empty).
+       * 
+ * + * string ns = 2; + * + * @return This builder for chaining. + */ + public Builder clearNs() { + ns_ = getDefaultInstance().getNs(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Namespace of the action being requested. Currently, there is no
+       * distinction between no namespace and all namespaces.  Both
+       * are represented by "" (empty).
+       * 
+ * + * string ns = 2; + * + * @param value The bytes for ns to set. + * @return This builder for chaining. + */ + public Builder setNsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ns_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * The name of the resource being requested. Empty means all.
+       * 
+ * + * string name = 3; + * + * @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; + } + } + /** + * + * + *
+       * The name of the resource being requested. Empty means all.
+       * 
+ * + * string name = 3; + * + * @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; + } + } + /** + * + * + *
+       * The name of the resource being requested. Empty means all.
+       * 
+ * + * string name = 3; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the resource being requested. Empty means all.
+       * 
+ * + * string name = 3; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the resource being requested. Empty means all.
+       * 
+ * + * string name = 3; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object resource_ = ""; + /** + * + * + *
+       * The optional resource type requested. "*" means all.
+       * 
+ * + * string resource = 4; + * + * @return The resource. + */ + public java.lang.String getResource() { + java.lang.Object ref = resource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The optional resource type requested. "*" means all.
+       * 
+ * + * string resource = 4; + * + * @return The bytes for resource. + */ + public com.google.protobuf.ByteString getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The optional resource type requested. "*" means all.
+       * 
+ * + * string resource = 4; + * + * @param value The resource to set. + * @return This builder for chaining. + */ + public Builder setResource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * The optional resource type requested. "*" means all.
+       * 
+ * + * string resource = 4; + * + * @return This builder for chaining. + */ + public Builder clearResource() { + resource_ = getDefaultInstance().getResource(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+       * The optional resource type requested. "*" means all.
+       * 
+ * + * string resource = 4; + * + * @param value The bytes for resource to set. + * @return This builder for chaining. + */ + public Builder setResourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resource_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object subresource_ = ""; + /** + * + * + *
+       * The optional subresource type.
+       * 
+ * + * string subresource = 5; + * + * @return The subresource. + */ + public java.lang.String getSubresource() { + java.lang.Object ref = subresource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subresource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The optional subresource type.
+       * 
+ * + * string subresource = 5; + * + * @return The bytes for subresource. + */ + public com.google.protobuf.ByteString getSubresourceBytes() { + java.lang.Object ref = subresource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subresource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The optional subresource type.
+       * 
+ * + * string subresource = 5; + * + * @param value The subresource to set. + * @return This builder for chaining. + */ + public Builder setSubresource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + subresource_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * The optional subresource type.
+       * 
+ * + * string subresource = 5; + * + * @return This builder for chaining. + */ + public Builder clearSubresource() { + subresource_ = getDefaultInstance().getSubresource(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+       * The optional subresource type.
+       * 
+ * + * string subresource = 5; + * + * @param value The bytes for subresource to set. + * @return This builder for chaining. + */ + public Builder setSubresourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + subresource_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object verb_ = ""; + /** + * + * + *
+       * A Kubernetes resource API verb, like get, list, watch, create, update,
+       * delete, proxy. "*" means all.
+       * 
+ * + * string verb = 6; + * + * @return The verb. + */ + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * A Kubernetes resource API verb, like get, list, watch, create, update,
+       * delete, proxy. "*" means all.
+       * 
+ * + * string verb = 6; + * + * @return The bytes for verb. + */ + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * A Kubernetes resource API verb, like get, list, watch, create, update,
+       * delete, proxy. "*" means all.
+       * 
+ * + * string verb = 6; + * + * @param value The verb to set. + * @return This builder for chaining. + */ + public Builder setVerb(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + verb_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * A Kubernetes resource API verb, like get, list, watch, create, update,
+       * delete, proxy. "*" means all.
+       * 
+ * + * string verb = 6; + * + * @return This builder for chaining. + */ + public Builder clearVerb() { + verb_ = getDefaultInstance().getVerb(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+       * A Kubernetes resource API verb, like get, list, watch, create, update,
+       * delete, proxy. "*" means all.
+       * 
+ * + * string verb = 6; + * + * @param value The bytes for verb to set. + * @return This builder for chaining. + */ + public Builder setVerbBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + verb_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + * + * + *
+       * The API version of the resource. "*" means all.
+       * 
+ * + * string version = 7; + * + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The API version of the resource. "*" means all.
+       * 
+ * + * string version = 7; + * + * @return The bytes for version. + */ + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The API version of the resource. "*" means all.
+       * 
+ * + * string version = 7; + * + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + version_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+       * The API version of the resource. "*" means all.
+       * 
+ * + * string version = 7; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+       * The API version of the resource. "*" means all.
+       * 
+ * + * string version = 7; + * + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00000040; + 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.v2.Kubernetes.AccessReview) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.Kubernetes.AccessReview) + private static final com.google.cloud.securitycenter.v2.Kubernetes.AccessReview + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.Kubernetes.AccessReview(); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.AccessReview getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AccessReview parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.Kubernetes.AccessReview getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ObjectOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.Kubernetes.Object) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Kubernetes object group, such as "policy.k8s.io/v1".
+     * 
+ * + * string group = 1; + * + * @return The group. + */ + java.lang.String getGroup(); + /** + * + * + *
+     * Kubernetes object group, such as "policy.k8s.io/v1".
+     * 
+ * + * string group = 1; + * + * @return The bytes for group. + */ + com.google.protobuf.ByteString getGroupBytes(); + + /** + * + * + *
+     * Kubernetes object kind, such as "Namespace".
+     * 
+ * + * string kind = 2; + * + * @return The kind. + */ + java.lang.String getKind(); + /** + * + * + *
+     * Kubernetes object kind, such as "Namespace".
+     * 
+ * + * string kind = 2; + * + * @return The bytes for kind. + */ + com.google.protobuf.ByteString getKindBytes(); + + /** + * + * + *
+     * Kubernetes object namespace. Must be a valid DNS label. Named
+     * "ns" to avoid collision with C++ namespace keyword. For details see
+     * https://kubernetes.io/docs/tasks/administer-cluster/namespaces/.
+     * 
+ * + * string ns = 3; + * + * @return The ns. + */ + java.lang.String getNs(); + /** + * + * + *
+     * Kubernetes object namespace. Must be a valid DNS label. Named
+     * "ns" to avoid collision with C++ namespace keyword. For details see
+     * https://kubernetes.io/docs/tasks/administer-cluster/namespaces/.
+     * 
+ * + * string ns = 3; + * + * @return The bytes for ns. + */ + com.google.protobuf.ByteString getNsBytes(); + + /** + * + * + *
+     * Kubernetes object name. For details see
+     * https://kubernetes.io/docs/concepts/overview/working-with-objects/names/.
+     * 
+ * + * string name = 4; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Kubernetes object name. For details see
+     * https://kubernetes.io/docs/concepts/overview/working-with-objects/names/.
+     * 
+ * + * string name = 4; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+     * Pod containers associated with this finding, if any.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 5; + */ + java.util.List getContainersList(); + /** + * + * + *
+     * Pod containers associated with this finding, if any.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 5; + */ + com.google.cloud.securitycenter.v2.Container getContainers(int index); + /** + * + * + *
+     * Pod containers associated with this finding, if any.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 5; + */ + int getContainersCount(); + /** + * + * + *
+     * Pod containers associated with this finding, if any.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 5; + */ + java.util.List + getContainersOrBuilderList(); + /** + * + * + *
+     * Pod containers associated with this finding, if any.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 5; + */ + com.google.cloud.securitycenter.v2.ContainerOrBuilder getContainersOrBuilder(int index); + } + /** + * + * + *
+   * Kubernetes object related to the finding, uniquely identified by GKNN.
+   * Used if the object Kind is not one of Pod, Node, NodePool, Binding, or
+   * AccessReview.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Kubernetes.Object} + */ + public static final class Object extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.Kubernetes.Object) + ObjectOrBuilder { + private static final long serialVersionUID = 0L; + // Use Object.newBuilder() to construct. + private Object(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Object() { + group_ = ""; + kind_ = ""; + ns_ = ""; + name_ = ""; + containers_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Object(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_Object_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_Object_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Kubernetes.Object.class, + com.google.cloud.securitycenter.v2.Kubernetes.Object.Builder.class); + } + + public static final int GROUP_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object group_ = ""; + /** + * + * + *
+     * Kubernetes object group, such as "policy.k8s.io/v1".
+     * 
+ * + * string group = 1; + * + * @return The group. + */ + @java.lang.Override + public java.lang.String getGroup() { + java.lang.Object ref = group_; + 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(); + group_ = s; + return s; + } + } + /** + * + * + *
+     * Kubernetes object group, such as "policy.k8s.io/v1".
+     * 
+ * + * string group = 1; + * + * @return The bytes for group. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGroupBytes() { + java.lang.Object ref = group_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + group_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KIND_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object kind_ = ""; + /** + * + * + *
+     * Kubernetes object kind, such as "Namespace".
+     * 
+ * + * string kind = 2; + * + * @return The kind. + */ + @java.lang.Override + public java.lang.String getKind() { + java.lang.Object ref = kind_; + 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(); + kind_ = s; + return s; + } + } + /** + * + * + *
+     * Kubernetes object kind, such as "Namespace".
+     * 
+ * + * string kind = 2; + * + * @return The bytes for kind. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKindBytes() { + java.lang.Object ref = kind_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kind_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object ns_ = ""; + /** + * + * + *
+     * Kubernetes object namespace. Must be a valid DNS label. Named
+     * "ns" to avoid collision with C++ namespace keyword. For details see
+     * https://kubernetes.io/docs/tasks/administer-cluster/namespaces/.
+     * 
+ * + * string ns = 3; + * + * @return The ns. + */ + @java.lang.Override + public java.lang.String getNs() { + java.lang.Object ref = ns_; + 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(); + ns_ = s; + return s; + } + } + /** + * + * + *
+     * Kubernetes object namespace. Must be a valid DNS label. Named
+     * "ns" to avoid collision with C++ namespace keyword. For details see
+     * https://kubernetes.io/docs/tasks/administer-cluster/namespaces/.
+     * 
+ * + * string ns = 3; + * + * @return The bytes for ns. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNsBytes() { + java.lang.Object ref = ns_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ns_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+     * Kubernetes object name. For details see
+     * https://kubernetes.io/docs/concepts/overview/working-with-objects/names/.
+     * 
+ * + * string name = 4; + * + * @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; + } + } + /** + * + * + *
+     * Kubernetes object name. For details see
+     * https://kubernetes.io/docs/concepts/overview/working-with-objects/names/.
+     * 
+ * + * string name = 4; + * + * @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 CONTAINERS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List containers_; + /** + * + * + *
+     * Pod containers associated with this finding, if any.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 5; + */ + @java.lang.Override + public java.util.List getContainersList() { + return containers_; + } + /** + * + * + *
+     * Pod containers associated with this finding, if any.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 5; + */ + @java.lang.Override + public java.util.List + getContainersOrBuilderList() { + return containers_; + } + /** + * + * + *
+     * Pod containers associated with this finding, if any.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 5; + */ + @java.lang.Override + public int getContainersCount() { + return containers_.size(); + } + /** + * + * + *
+     * Pod containers associated with this finding, if any.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 5; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Container getContainers(int index) { + return containers_.get(index); + } + /** + * + * + *
+     * Pod containers associated with this finding, if any.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 5; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.ContainerOrBuilder getContainersOrBuilder(int index) { + return containers_.get(index); + } + + 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(group_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, group_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kind_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, kind_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ns_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, ns_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, name_); + } + for (int i = 0; i < containers_.size(); i++) { + output.writeMessage(5, containers_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(group_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, group_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kind_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, kind_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ns_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, ns_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, name_); + } + for (int i = 0; i < containers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, containers_.get(i)); + } + size += getUnknownFields().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.v2.Kubernetes.Object)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.Kubernetes.Object other = + (com.google.cloud.securitycenter.v2.Kubernetes.Object) obj; + + if (!getGroup().equals(other.getGroup())) return false; + if (!getKind().equals(other.getKind())) return false; + if (!getNs().equals(other.getNs())) return false; + if (!getName().equals(other.getName())) return false; + if (!getContainersList().equals(other.getContainersList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + GROUP_FIELD_NUMBER; + hash = (53 * hash) + getGroup().hashCode(); + hash = (37 * hash) + KIND_FIELD_NUMBER; + hash = (53 * hash) + getKind().hashCode(); + hash = (37 * hash) + NS_FIELD_NUMBER; + hash = (53 * hash) + getNs().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getContainersCount() > 0) { + hash = (37 * hash) + CONTAINERS_FIELD_NUMBER; + hash = (53 * hash) + getContainersList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Object parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Object 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.v2.Kubernetes.Object parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Object 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.v2.Kubernetes.Object parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Object parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Object parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Object 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.v2.Kubernetes.Object parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Object 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.v2.Kubernetes.Object parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Object 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.v2.Kubernetes.Object 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; + } + /** + * + * + *
+     * Kubernetes object related to the finding, uniquely identified by GKNN.
+     * Used if the object Kind is not one of Pod, Node, NodePool, Binding, or
+     * AccessReview.
+     * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Kubernetes.Object} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.Kubernetes.Object) + com.google.cloud.securitycenter.v2.Kubernetes.ObjectOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_Object_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_Object_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Kubernetes.Object.class, + com.google.cloud.securitycenter.v2.Kubernetes.Object.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.Kubernetes.Object.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + group_ = ""; + kind_ = ""; + ns_ = ""; + name_ = ""; + if (containersBuilder_ == null) { + containers_ = java.util.Collections.emptyList(); + } else { + containers_ = null; + containersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_Object_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.Object getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.Kubernetes.Object.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.Object build() { + com.google.cloud.securitycenter.v2.Kubernetes.Object result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.Object buildPartial() { + com.google.cloud.securitycenter.v2.Kubernetes.Object result = + new com.google.cloud.securitycenter.v2.Kubernetes.Object(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.securitycenter.v2.Kubernetes.Object result) { + if (containersBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + containers_ = java.util.Collections.unmodifiableList(containers_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.containers_ = containers_; + } else { + result.containers_ = containersBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.Kubernetes.Object result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.group_ = group_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.kind_ = kind_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.ns_ = ns_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.name_ = name_; + } + } + + @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.v2.Kubernetes.Object) { + return mergeFrom((com.google.cloud.securitycenter.v2.Kubernetes.Object) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.Kubernetes.Object other) { + if (other == com.google.cloud.securitycenter.v2.Kubernetes.Object.getDefaultInstance()) + return this; + if (!other.getGroup().isEmpty()) { + group_ = other.group_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getKind().isEmpty()) { + kind_ = other.kind_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getNs().isEmpty()) { + ns_ = other.ns_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (containersBuilder_ == null) { + if (!other.containers_.isEmpty()) { + if (containers_.isEmpty()) { + containers_ = other.containers_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureContainersIsMutable(); + containers_.addAll(other.containers_); + } + onChanged(); + } + } else { + if (!other.containers_.isEmpty()) { + if (containersBuilder_.isEmpty()) { + containersBuilder_.dispose(); + containersBuilder_ = null; + containers_ = other.containers_; + bitField0_ = (bitField0_ & ~0x00000010); + containersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getContainersFieldBuilder() + : null; + } else { + containersBuilder_.addAllMessages(other.containers_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + group_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + ns_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + com.google.cloud.securitycenter.v2.Container m = + input.readMessage( + com.google.cloud.securitycenter.v2.Container.parser(), extensionRegistry); + if (containersBuilder_ == null) { + ensureContainersIsMutable(); + containers_.add(m); + } else { + containersBuilder_.addMessage(m); + } + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object group_ = ""; + /** + * + * + *
+       * Kubernetes object group, such as "policy.k8s.io/v1".
+       * 
+ * + * string group = 1; + * + * @return The group. + */ + public java.lang.String getGroup() { + java.lang.Object ref = group_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + group_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Kubernetes object group, such as "policy.k8s.io/v1".
+       * 
+ * + * string group = 1; + * + * @return The bytes for group. + */ + public com.google.protobuf.ByteString getGroupBytes() { + java.lang.Object ref = group_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + group_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Kubernetes object group, such as "policy.k8s.io/v1".
+       * 
+ * + * string group = 1; + * + * @param value The group to set. + * @return This builder for chaining. + */ + public Builder setGroup(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + group_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Kubernetes object group, such as "policy.k8s.io/v1".
+       * 
+ * + * string group = 1; + * + * @return This builder for chaining. + */ + public Builder clearGroup() { + group_ = getDefaultInstance().getGroup(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Kubernetes object group, such as "policy.k8s.io/v1".
+       * 
+ * + * string group = 1; + * + * @param value The bytes for group to set. + * @return This builder for chaining. + */ + public Builder setGroupBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + group_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object kind_ = ""; + /** + * + * + *
+       * Kubernetes object kind, such as "Namespace".
+       * 
+ * + * string kind = 2; + * + * @return The kind. + */ + public java.lang.String getKind() { + java.lang.Object ref = kind_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kind_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Kubernetes object kind, such as "Namespace".
+       * 
+ * + * string kind = 2; + * + * @return The bytes for kind. + */ + public com.google.protobuf.ByteString getKindBytes() { + java.lang.Object ref = kind_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kind_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Kubernetes object kind, such as "Namespace".
+       * 
+ * + * string kind = 2; + * + * @param value The kind to set. + * @return This builder for chaining. + */ + public Builder setKind(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Kubernetes object kind, such as "Namespace".
+       * 
+ * + * string kind = 2; + * + * @return This builder for chaining. + */ + public Builder clearKind() { + kind_ = getDefaultInstance().getKind(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Kubernetes object kind, such as "Namespace".
+       * 
+ * + * string kind = 2; + * + * @param value The bytes for kind to set. + * @return This builder for chaining. + */ + public Builder setKindBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kind_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object ns_ = ""; + /** + * + * + *
+       * Kubernetes object namespace. Must be a valid DNS label. Named
+       * "ns" to avoid collision with C++ namespace keyword. For details see
+       * https://kubernetes.io/docs/tasks/administer-cluster/namespaces/.
+       * 
+ * + * string ns = 3; + * + * @return The ns. + */ + public java.lang.String getNs() { + java.lang.Object ref = ns_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ns_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Kubernetes object namespace. Must be a valid DNS label. Named
+       * "ns" to avoid collision with C++ namespace keyword. For details see
+       * https://kubernetes.io/docs/tasks/administer-cluster/namespaces/.
+       * 
+ * + * string ns = 3; + * + * @return The bytes for ns. + */ + public com.google.protobuf.ByteString getNsBytes() { + java.lang.Object ref = ns_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ns_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Kubernetes object namespace. Must be a valid DNS label. Named
+       * "ns" to avoid collision with C++ namespace keyword. For details see
+       * https://kubernetes.io/docs/tasks/administer-cluster/namespaces/.
+       * 
+ * + * string ns = 3; + * + * @param value The ns to set. + * @return This builder for chaining. + */ + public Builder setNs(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ns_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Kubernetes object namespace. Must be a valid DNS label. Named
+       * "ns" to avoid collision with C++ namespace keyword. For details see
+       * https://kubernetes.io/docs/tasks/administer-cluster/namespaces/.
+       * 
+ * + * string ns = 3; + * + * @return This builder for chaining. + */ + public Builder clearNs() { + ns_ = getDefaultInstance().getNs(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * Kubernetes object namespace. Must be a valid DNS label. Named
+       * "ns" to avoid collision with C++ namespace keyword. For details see
+       * https://kubernetes.io/docs/tasks/administer-cluster/namespaces/.
+       * 
+ * + * string ns = 3; + * + * @param value The bytes for ns to set. + * @return This builder for chaining. + */ + public Builder setNsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ns_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * Kubernetes object name. For details see
+       * https://kubernetes.io/docs/concepts/overview/working-with-objects/names/.
+       * 
+ * + * string name = 4; + * + * @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; + } + } + /** + * + * + *
+       * Kubernetes object name. For details see
+       * https://kubernetes.io/docs/concepts/overview/working-with-objects/names/.
+       * 
+ * + * string name = 4; + * + * @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; + } + } + /** + * + * + *
+       * Kubernetes object name. For details see
+       * https://kubernetes.io/docs/concepts/overview/working-with-objects/names/.
+       * 
+ * + * string name = 4; + * + * @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; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Kubernetes object name. For details see
+       * https://kubernetes.io/docs/concepts/overview/working-with-objects/names/.
+       * 
+ * + * string name = 4; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+       * Kubernetes object name. For details see
+       * https://kubernetes.io/docs/concepts/overview/working-with-objects/names/.
+       * 
+ * + * string name = 4; + * + * @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; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.util.List containers_ = + java.util.Collections.emptyList(); + + private void ensureContainersIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + containers_ = + new java.util.ArrayList(containers_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Container, + com.google.cloud.securitycenter.v2.Container.Builder, + com.google.cloud.securitycenter.v2.ContainerOrBuilder> + containersBuilder_; + + /** + * + * + *
+       * Pod containers associated with this finding, if any.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 5; + */ + public java.util.List getContainersList() { + if (containersBuilder_ == null) { + return java.util.Collections.unmodifiableList(containers_); + } else { + return containersBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Pod containers associated with this finding, if any.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 5; + */ + public int getContainersCount() { + if (containersBuilder_ == null) { + return containers_.size(); + } else { + return containersBuilder_.getCount(); + } + } + /** + * + * + *
+       * Pod containers associated with this finding, if any.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 5; + */ + public com.google.cloud.securitycenter.v2.Container getContainers(int index) { + if (containersBuilder_ == null) { + return containers_.get(index); + } else { + return containersBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Pod containers associated with this finding, if any.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 5; + */ + public Builder setContainers(int index, com.google.cloud.securitycenter.v2.Container value) { + if (containersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContainersIsMutable(); + containers_.set(index, value); + onChanged(); + } else { + containersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Pod containers associated with this finding, if any.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 5; + */ + public Builder setContainers( + int index, com.google.cloud.securitycenter.v2.Container.Builder builderForValue) { + if (containersBuilder_ == null) { + ensureContainersIsMutable(); + containers_.set(index, builderForValue.build()); + onChanged(); + } else { + containersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Pod containers associated with this finding, if any.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 5; + */ + public Builder addContainers(com.google.cloud.securitycenter.v2.Container value) { + if (containersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContainersIsMutable(); + containers_.add(value); + onChanged(); + } else { + containersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Pod containers associated with this finding, if any.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 5; + */ + public Builder addContainers(int index, com.google.cloud.securitycenter.v2.Container value) { + if (containersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContainersIsMutable(); + containers_.add(index, value); + onChanged(); + } else { + containersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Pod containers associated with this finding, if any.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 5; + */ + public Builder addContainers( + com.google.cloud.securitycenter.v2.Container.Builder builderForValue) { + if (containersBuilder_ == null) { + ensureContainersIsMutable(); + containers_.add(builderForValue.build()); + onChanged(); + } else { + containersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Pod containers associated with this finding, if any.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 5; + */ + public Builder addContainers( + int index, com.google.cloud.securitycenter.v2.Container.Builder builderForValue) { + if (containersBuilder_ == null) { + ensureContainersIsMutable(); + containers_.add(index, builderForValue.build()); + onChanged(); + } else { + containersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Pod containers associated with this finding, if any.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 5; + */ + public Builder addAllContainers( + java.lang.Iterable values) { + if (containersBuilder_ == null) { + ensureContainersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, containers_); + onChanged(); + } else { + containersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Pod containers associated with this finding, if any.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 5; + */ + public Builder clearContainers() { + if (containersBuilder_ == null) { + containers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + containersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Pod containers associated with this finding, if any.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 5; + */ + public Builder removeContainers(int index) { + if (containersBuilder_ == null) { + ensureContainersIsMutable(); + containers_.remove(index); + onChanged(); + } else { + containersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Pod containers associated with this finding, if any.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 5; + */ + public com.google.cloud.securitycenter.v2.Container.Builder getContainersBuilder(int index) { + return getContainersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Pod containers associated with this finding, if any.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 5; + */ + public com.google.cloud.securitycenter.v2.ContainerOrBuilder getContainersOrBuilder( + int index) { + if (containersBuilder_ == null) { + return containers_.get(index); + } else { + return containersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Pod containers associated with this finding, if any.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 5; + */ + public java.util.List + getContainersOrBuilderList() { + if (containersBuilder_ != null) { + return containersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(containers_); + } + } + /** + * + * + *
+       * Pod containers associated with this finding, if any.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 5; + */ + public com.google.cloud.securitycenter.v2.Container.Builder addContainersBuilder() { + return getContainersFieldBuilder() + .addBuilder(com.google.cloud.securitycenter.v2.Container.getDefaultInstance()); + } + /** + * + * + *
+       * Pod containers associated with this finding, if any.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 5; + */ + public com.google.cloud.securitycenter.v2.Container.Builder addContainersBuilder(int index) { + return getContainersFieldBuilder() + .addBuilder(index, com.google.cloud.securitycenter.v2.Container.getDefaultInstance()); + } + /** + * + * + *
+       * Pod containers associated with this finding, if any.
+       * 
+ * + * repeated .google.cloud.securitycenter.v2.Container containers = 5; + */ + public java.util.List + getContainersBuilderList() { + return getContainersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Container, + com.google.cloud.securitycenter.v2.Container.Builder, + com.google.cloud.securitycenter.v2.ContainerOrBuilder> + getContainersFieldBuilder() { + if (containersBuilder_ == null) { + containersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Container, + com.google.cloud.securitycenter.v2.Container.Builder, + com.google.cloud.securitycenter.v2.ContainerOrBuilder>( + containers_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); + containers_ = null; + } + return containersBuilder_; + } + + @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.v2.Kubernetes.Object) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.Kubernetes.Object) + private static final com.google.cloud.securitycenter.v2.Kubernetes.Object DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.Kubernetes.Object(); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes.Object getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Object parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.Kubernetes.Object getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int PODS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List pods_; + /** + * + * + *
+   * Kubernetes
+   * [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod)
+   * associated with the finding. This field contains Pod records for each
+   * container that is owned by a Pod.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Pod pods = 1; + */ + @java.lang.Override + public java.util.List getPodsList() { + return pods_; + } + /** + * + * + *
+   * Kubernetes
+   * [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod)
+   * associated with the finding. This field contains Pod records for each
+   * container that is owned by a Pod.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Pod pods = 1; + */ + @java.lang.Override + public java.util.List + getPodsOrBuilderList() { + return pods_; + } + /** + * + * + *
+   * Kubernetes
+   * [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod)
+   * associated with the finding. This field contains Pod records for each
+   * container that is owned by a Pod.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Pod pods = 1; + */ + @java.lang.Override + public int getPodsCount() { + return pods_.size(); + } + /** + * + * + *
+   * Kubernetes
+   * [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod)
+   * associated with the finding. This field contains Pod records for each
+   * container that is owned by a Pod.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Pod pods = 1; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.Pod getPods(int index) { + return pods_.get(index); + } + /** + * + * + *
+   * Kubernetes
+   * [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod)
+   * associated with the finding. This field contains Pod records for each
+   * container that is owned by a Pod.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Pod pods = 1; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.PodOrBuilder getPodsOrBuilder(int index) { + return pods_.get(index); + } + + public static final int NODES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List nodes_; + /** + * + * + *
+   * Provides Kubernetes
+   * [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes)
+   * information.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + @java.lang.Override + public java.util.List getNodesList() { + return nodes_; + } + /** + * + * + *
+   * Provides Kubernetes
+   * [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes)
+   * information.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + @java.lang.Override + public java.util.List + getNodesOrBuilderList() { + return nodes_; + } + /** + * + * + *
+   * Provides Kubernetes
+   * [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes)
+   * information.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + @java.lang.Override + public int getNodesCount() { + return nodes_.size(); + } + /** + * + * + *
+   * Provides Kubernetes
+   * [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes)
+   * information.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.Node getNodes(int index) { + return nodes_.get(index); + } + /** + * + * + *
+   * Provides Kubernetes
+   * [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes)
+   * information.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.NodeOrBuilder getNodesOrBuilder(int index) { + return nodes_.get(index); + } + + public static final int NODE_POOLS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List nodePools_; + /** + * + * + *
+   * GKE [node
+   * pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools)
+   * associated with the finding. This field contains node pool information for
+   * each node, when it is available.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.NodePool node_pools = 3; + */ + @java.lang.Override + public java.util.List getNodePoolsList() { + return nodePools_; + } + /** + * + * + *
+   * GKE [node
+   * pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools)
+   * associated with the finding. This field contains node pool information for
+   * each node, when it is available.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.NodePool node_pools = 3; + */ + @java.lang.Override + public java.util.List + getNodePoolsOrBuilderList() { + return nodePools_; + } + /** + * + * + *
+   * GKE [node
+   * pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools)
+   * associated with the finding. This field contains node pool information for
+   * each node, when it is available.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.NodePool node_pools = 3; + */ + @java.lang.Override + public int getNodePoolsCount() { + return nodePools_.size(); + } + /** + * + * + *
+   * GKE [node
+   * pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools)
+   * associated with the finding. This field contains node pool information for
+   * each node, when it is available.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.NodePool node_pools = 3; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.NodePool getNodePools(int index) { + return nodePools_.get(index); + } + /** + * + * + *
+   * GKE [node
+   * pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools)
+   * associated with the finding. This field contains node pool information for
+   * each node, when it is available.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.NodePool node_pools = 3; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.NodePoolOrBuilder getNodePoolsOrBuilder( + int index) { + return nodePools_.get(index); + } + + public static final int ROLES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List roles_; + /** + * + * + *
+   * Provides Kubernetes role information for findings that involve [Roles or
+   * ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Role roles = 4; + */ + @java.lang.Override + public java.util.List getRolesList() { + return roles_; + } + /** + * + * + *
+   * Provides Kubernetes role information for findings that involve [Roles or
+   * ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Role roles = 4; + */ + @java.lang.Override + public java.util.List + getRolesOrBuilderList() { + return roles_; + } + /** + * + * + *
+   * Provides Kubernetes role information for findings that involve [Roles or
+   * ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Role roles = 4; + */ + @java.lang.Override + public int getRolesCount() { + return roles_.size(); + } + /** + * + * + *
+   * Provides Kubernetes role information for findings that involve [Roles or
+   * ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Role roles = 4; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.Role getRoles(int index) { + return roles_.get(index); + } + /** + * + * + *
+   * Provides Kubernetes role information for findings that involve [Roles or
+   * ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Role roles = 4; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.RoleOrBuilder getRolesOrBuilder(int index) { + return roles_.get(index); + } + + public static final int BINDINGS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List bindings_; + /** + * + * + *
+   * Provides Kubernetes role binding information for findings that involve
+   * [RoleBindings or
+   * ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Binding bindings = 5; + */ + @java.lang.Override + public java.util.List getBindingsList() { + return bindings_; + } + /** + * + * + *
+   * Provides Kubernetes role binding information for findings that involve
+   * [RoleBindings or
+   * ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Binding bindings = 5; + */ + @java.lang.Override + public java.util.List + getBindingsOrBuilderList() { + return bindings_; + } + /** + * + * + *
+   * Provides Kubernetes role binding information for findings that involve
+   * [RoleBindings or
+   * ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Binding bindings = 5; + */ + @java.lang.Override + public int getBindingsCount() { + return bindings_.size(); + } + /** + * + * + *
+   * Provides Kubernetes role binding information for findings that involve
+   * [RoleBindings or
+   * ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Binding bindings = 5; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.Binding getBindings(int index) { + return bindings_.get(index); + } + /** + * + * + *
+   * Provides Kubernetes role binding information for findings that involve
+   * [RoleBindings or
+   * ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Binding bindings = 5; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.BindingOrBuilder getBindingsOrBuilder( + int index) { + return bindings_.get(index); + } + + public static final int ACCESS_REVIEWS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private java.util.List accessReviews_; + /** + * + * + *
+   * Provides information on any Kubernetes access reviews (privilege checks)
+   * relevant to the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.AccessReview access_reviews = 6; + * + */ + @java.lang.Override + public java.util.List + getAccessReviewsList() { + return accessReviews_; + } + /** + * + * + *
+   * Provides information on any Kubernetes access reviews (privilege checks)
+   * relevant to the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.AccessReview access_reviews = 6; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.securitycenter.v2.Kubernetes.AccessReviewOrBuilder> + getAccessReviewsOrBuilderList() { + return accessReviews_; + } + /** + * + * + *
+   * Provides information on any Kubernetes access reviews (privilege checks)
+   * relevant to the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.AccessReview access_reviews = 6; + * + */ + @java.lang.Override + public int getAccessReviewsCount() { + return accessReviews_.size(); + } + /** + * + * + *
+   * Provides information on any Kubernetes access reviews (privilege checks)
+   * relevant to the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.AccessReview access_reviews = 6; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.AccessReview getAccessReviews(int index) { + return accessReviews_.get(index); + } + /** + * + * + *
+   * Provides information on any Kubernetes access reviews (privilege checks)
+   * relevant to the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.AccessReview access_reviews = 6; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.AccessReviewOrBuilder + getAccessReviewsOrBuilder(int index) { + return accessReviews_.get(index); + } + + public static final int OBJECTS_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private java.util.List objects_; + /** + * + * + *
+   * Kubernetes objects related to the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Object objects = 7; + */ + @java.lang.Override + public java.util.List getObjectsList() { + return objects_; + } + /** + * + * + *
+   * Kubernetes objects related to the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Object objects = 7; + */ + @java.lang.Override + public java.util.List + getObjectsOrBuilderList() { + return objects_; + } + /** + * + * + *
+   * Kubernetes objects related to the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Object objects = 7; + */ + @java.lang.Override + public int getObjectsCount() { + return objects_.size(); + } + /** + * + * + *
+   * Kubernetes objects related to the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Object objects = 7; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.Object getObjects(int index) { + return objects_.get(index); + } + /** + * + * + *
+   * Kubernetes objects related to the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Object objects = 7; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes.ObjectOrBuilder getObjectsOrBuilder( + int index) { + return objects_.get(index); + } + + 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 < pods_.size(); i++) { + output.writeMessage(1, pods_.get(i)); + } + for (int i = 0; i < nodes_.size(); i++) { + output.writeMessage(2, nodes_.get(i)); + } + for (int i = 0; i < nodePools_.size(); i++) { + output.writeMessage(3, nodePools_.get(i)); + } + for (int i = 0; i < roles_.size(); i++) { + output.writeMessage(4, roles_.get(i)); + } + for (int i = 0; i < bindings_.size(); i++) { + output.writeMessage(5, bindings_.get(i)); + } + for (int i = 0; i < accessReviews_.size(); i++) { + output.writeMessage(6, accessReviews_.get(i)); + } + for (int i = 0; i < objects_.size(); i++) { + output.writeMessage(7, objects_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < pods_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, pods_.get(i)); + } + for (int i = 0; i < nodes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, nodes_.get(i)); + } + for (int i = 0; i < nodePools_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, nodePools_.get(i)); + } + for (int i = 0; i < roles_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, roles_.get(i)); + } + for (int i = 0; i < bindings_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, bindings_.get(i)); + } + for (int i = 0; i < accessReviews_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, accessReviews_.get(i)); + } + for (int i = 0; i < objects_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, objects_.get(i)); + } + size += getUnknownFields().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.v2.Kubernetes)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.Kubernetes other = + (com.google.cloud.securitycenter.v2.Kubernetes) obj; + + if (!getPodsList().equals(other.getPodsList())) return false; + if (!getNodesList().equals(other.getNodesList())) return false; + if (!getNodePoolsList().equals(other.getNodePoolsList())) return false; + if (!getRolesList().equals(other.getRolesList())) return false; + if (!getBindingsList().equals(other.getBindingsList())) return false; + if (!getAccessReviewsList().equals(other.getAccessReviewsList())) return false; + if (!getObjectsList().equals(other.getObjectsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPodsCount() > 0) { + hash = (37 * hash) + PODS_FIELD_NUMBER; + hash = (53 * hash) + getPodsList().hashCode(); + } + if (getNodesCount() > 0) { + hash = (37 * hash) + NODES_FIELD_NUMBER; + hash = (53 * hash) + getNodesList().hashCode(); + } + if (getNodePoolsCount() > 0) { + hash = (37 * hash) + NODE_POOLS_FIELD_NUMBER; + hash = (53 * hash) + getNodePoolsList().hashCode(); + } + if (getRolesCount() > 0) { + hash = (37 * hash) + ROLES_FIELD_NUMBER; + hash = (53 * hash) + getRolesList().hashCode(); + } + if (getBindingsCount() > 0) { + hash = (37 * hash) + BINDINGS_FIELD_NUMBER; + hash = (53 * hash) + getBindingsList().hashCode(); + } + if (getAccessReviewsCount() > 0) { + hash = (37 * hash) + ACCESS_REVIEWS_FIELD_NUMBER; + hash = (53 * hash) + getAccessReviewsList().hashCode(); + } + if (getObjectsCount() > 0) { + hash = (37 * hash) + OBJECTS_FIELD_NUMBER; + hash = (53 * hash) + getObjectsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.Kubernetes parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes 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.v2.Kubernetes parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes 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.v2.Kubernetes parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes 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.v2.Kubernetes parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes 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.v2.Kubernetes parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes 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.v2.Kubernetes 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; + } + /** + * + * + *
+   * Kubernetes-related attributes.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Kubernetes} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.Kubernetes) + com.google.cloud.securitycenter.v2.KubernetesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Kubernetes.class, + com.google.cloud.securitycenter.v2.Kubernetes.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.Kubernetes.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (podsBuilder_ == null) { + pods_ = java.util.Collections.emptyList(); + } else { + pods_ = null; + podsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (nodesBuilder_ == null) { + nodes_ = java.util.Collections.emptyList(); + } else { + nodes_ = null; + nodesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (nodePoolsBuilder_ == null) { + nodePools_ = java.util.Collections.emptyList(); + } else { + nodePools_ = null; + nodePoolsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + if (rolesBuilder_ == null) { + roles_ = java.util.Collections.emptyList(); + } else { + roles_ = null; + rolesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + if (bindingsBuilder_ == null) { + bindings_ = java.util.Collections.emptyList(); + } else { + bindings_ = null; + bindingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + if (accessReviewsBuilder_ == null) { + accessReviews_ = java.util.Collections.emptyList(); + } else { + accessReviews_ = null; + accessReviewsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + if (objectsBuilder_ == null) { + objects_ = java.util.Collections.emptyList(); + } else { + objects_ = null; + objectsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.KubernetesProto + .internal_static_google_cloud_securitycenter_v2_Kubernetes_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.Kubernetes.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes build() { + com.google.cloud.securitycenter.v2.Kubernetes result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Kubernetes buildPartial() { + com.google.cloud.securitycenter.v2.Kubernetes result = + new com.google.cloud.securitycenter.v2.Kubernetes(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.securitycenter.v2.Kubernetes result) { + if (podsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + pods_ = java.util.Collections.unmodifiableList(pods_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.pods_ = pods_; + } else { + result.pods_ = podsBuilder_.build(); + } + if (nodesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + nodes_ = java.util.Collections.unmodifiableList(nodes_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.nodes_ = nodes_; + } else { + result.nodes_ = nodesBuilder_.build(); + } + if (nodePoolsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + nodePools_ = java.util.Collections.unmodifiableList(nodePools_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.nodePools_ = nodePools_; + } else { + result.nodePools_ = nodePoolsBuilder_.build(); + } + if (rolesBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + roles_ = java.util.Collections.unmodifiableList(roles_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.roles_ = roles_; + } else { + result.roles_ = rolesBuilder_.build(); + } + if (bindingsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + bindings_ = java.util.Collections.unmodifiableList(bindings_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.bindings_ = bindings_; + } else { + result.bindings_ = bindingsBuilder_.build(); + } + if (accessReviewsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + accessReviews_ = java.util.Collections.unmodifiableList(accessReviews_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.accessReviews_ = accessReviews_; + } else { + result.accessReviews_ = accessReviewsBuilder_.build(); + } + if (objectsBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0)) { + objects_ = java.util.Collections.unmodifiableList(objects_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.objects_ = objects_; + } else { + result.objects_ = objectsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.Kubernetes result) { + int from_bitField0_ = bitField0_; + } + + @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.v2.Kubernetes) { + return mergeFrom((com.google.cloud.securitycenter.v2.Kubernetes) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.Kubernetes other) { + if (other == com.google.cloud.securitycenter.v2.Kubernetes.getDefaultInstance()) return this; + if (podsBuilder_ == null) { + if (!other.pods_.isEmpty()) { + if (pods_.isEmpty()) { + pods_ = other.pods_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePodsIsMutable(); + pods_.addAll(other.pods_); + } + onChanged(); + } + } else { + if (!other.pods_.isEmpty()) { + if (podsBuilder_.isEmpty()) { + podsBuilder_.dispose(); + podsBuilder_ = null; + pods_ = other.pods_; + bitField0_ = (bitField0_ & ~0x00000001); + podsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPodsFieldBuilder() + : null; + } else { + podsBuilder_.addAllMessages(other.pods_); + } + } + } + if (nodesBuilder_ == null) { + if (!other.nodes_.isEmpty()) { + if (nodes_.isEmpty()) { + nodes_ = other.nodes_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureNodesIsMutable(); + nodes_.addAll(other.nodes_); + } + onChanged(); + } + } else { + if (!other.nodes_.isEmpty()) { + if (nodesBuilder_.isEmpty()) { + nodesBuilder_.dispose(); + nodesBuilder_ = null; + nodes_ = other.nodes_; + bitField0_ = (bitField0_ & ~0x00000002); + nodesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getNodesFieldBuilder() + : null; + } else { + nodesBuilder_.addAllMessages(other.nodes_); + } + } + } + if (nodePoolsBuilder_ == null) { + if (!other.nodePools_.isEmpty()) { + if (nodePools_.isEmpty()) { + nodePools_ = other.nodePools_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureNodePoolsIsMutable(); + nodePools_.addAll(other.nodePools_); + } + onChanged(); + } + } else { + if (!other.nodePools_.isEmpty()) { + if (nodePoolsBuilder_.isEmpty()) { + nodePoolsBuilder_.dispose(); + nodePoolsBuilder_ = null; + nodePools_ = other.nodePools_; + bitField0_ = (bitField0_ & ~0x00000004); + nodePoolsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getNodePoolsFieldBuilder() + : null; + } else { + nodePoolsBuilder_.addAllMessages(other.nodePools_); + } + } + } + if (rolesBuilder_ == null) { + if (!other.roles_.isEmpty()) { + if (roles_.isEmpty()) { + roles_ = other.roles_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureRolesIsMutable(); + roles_.addAll(other.roles_); + } + onChanged(); + } + } else { + if (!other.roles_.isEmpty()) { + if (rolesBuilder_.isEmpty()) { + rolesBuilder_.dispose(); + rolesBuilder_ = null; + roles_ = other.roles_; + bitField0_ = (bitField0_ & ~0x00000008); + rolesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRolesFieldBuilder() + : null; + } else { + rolesBuilder_.addAllMessages(other.roles_); + } + } + } + if (bindingsBuilder_ == null) { + if (!other.bindings_.isEmpty()) { + if (bindings_.isEmpty()) { + bindings_ = other.bindings_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureBindingsIsMutable(); + bindings_.addAll(other.bindings_); + } + onChanged(); + } + } else { + if (!other.bindings_.isEmpty()) { + if (bindingsBuilder_.isEmpty()) { + bindingsBuilder_.dispose(); + bindingsBuilder_ = null; + bindings_ = other.bindings_; + bitField0_ = (bitField0_ & ~0x00000010); + bindingsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBindingsFieldBuilder() + : null; + } else { + bindingsBuilder_.addAllMessages(other.bindings_); + } + } + } + if (accessReviewsBuilder_ == null) { + if (!other.accessReviews_.isEmpty()) { + if (accessReviews_.isEmpty()) { + accessReviews_ = other.accessReviews_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureAccessReviewsIsMutable(); + accessReviews_.addAll(other.accessReviews_); + } + onChanged(); + } + } else { + if (!other.accessReviews_.isEmpty()) { + if (accessReviewsBuilder_.isEmpty()) { + accessReviewsBuilder_.dispose(); + accessReviewsBuilder_ = null; + accessReviews_ = other.accessReviews_; + bitField0_ = (bitField0_ & ~0x00000020); + accessReviewsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAccessReviewsFieldBuilder() + : null; + } else { + accessReviewsBuilder_.addAllMessages(other.accessReviews_); + } + } + } + if (objectsBuilder_ == null) { + if (!other.objects_.isEmpty()) { + if (objects_.isEmpty()) { + objects_ = other.objects_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureObjectsIsMutable(); + objects_.addAll(other.objects_); + } + onChanged(); + } + } else { + if (!other.objects_.isEmpty()) { + if (objectsBuilder_.isEmpty()) { + objectsBuilder_.dispose(); + objectsBuilder_ = null; + objects_ = other.objects_; + bitField0_ = (bitField0_ & ~0x00000040); + objectsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getObjectsFieldBuilder() + : null; + } else { + objectsBuilder_.addAllMessages(other.objects_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.securitycenter.v2.Kubernetes.Pod m = + input.readMessage( + com.google.cloud.securitycenter.v2.Kubernetes.Pod.parser(), + extensionRegistry); + if (podsBuilder_ == null) { + ensurePodsIsMutable(); + pods_.add(m); + } else { + podsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + com.google.cloud.securitycenter.v2.Kubernetes.Node m = + input.readMessage( + com.google.cloud.securitycenter.v2.Kubernetes.Node.parser(), + extensionRegistry); + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.add(m); + } else { + nodesBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + com.google.cloud.securitycenter.v2.Kubernetes.NodePool m = + input.readMessage( + com.google.cloud.securitycenter.v2.Kubernetes.NodePool.parser(), + extensionRegistry); + if (nodePoolsBuilder_ == null) { + ensureNodePoolsIsMutable(); + nodePools_.add(m); + } else { + nodePoolsBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: + { + com.google.cloud.securitycenter.v2.Kubernetes.Role m = + input.readMessage( + com.google.cloud.securitycenter.v2.Kubernetes.Role.parser(), + extensionRegistry); + if (rolesBuilder_ == null) { + ensureRolesIsMutable(); + roles_.add(m); + } else { + rolesBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + com.google.cloud.securitycenter.v2.Kubernetes.Binding m = + input.readMessage( + com.google.cloud.securitycenter.v2.Kubernetes.Binding.parser(), + extensionRegistry); + if (bindingsBuilder_ == null) { + ensureBindingsIsMutable(); + bindings_.add(m); + } else { + bindingsBuilder_.addMessage(m); + } + break; + } // case 42 + case 50: + { + com.google.cloud.securitycenter.v2.Kubernetes.AccessReview m = + input.readMessage( + com.google.cloud.securitycenter.v2.Kubernetes.AccessReview.parser(), + extensionRegistry); + if (accessReviewsBuilder_ == null) { + ensureAccessReviewsIsMutable(); + accessReviews_.add(m); + } else { + accessReviewsBuilder_.addMessage(m); + } + break; + } // case 50 + case 58: + { + com.google.cloud.securitycenter.v2.Kubernetes.Object m = + input.readMessage( + com.google.cloud.securitycenter.v2.Kubernetes.Object.parser(), + extensionRegistry); + if (objectsBuilder_ == null) { + ensureObjectsIsMutable(); + objects_.add(m); + } else { + objectsBuilder_.addMessage(m); + } + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List pods_ = + java.util.Collections.emptyList(); + + private void ensurePodsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + pods_ = new java.util.ArrayList(pods_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Kubernetes.Pod, + com.google.cloud.securitycenter.v2.Kubernetes.Pod.Builder, + com.google.cloud.securitycenter.v2.Kubernetes.PodOrBuilder> + podsBuilder_; + + /** + * + * + *
+     * Kubernetes
+     * [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod)
+     * associated with the finding. This field contains Pod records for each
+     * container that is owned by a Pod.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Pod pods = 1; + */ + public java.util.List getPodsList() { + if (podsBuilder_ == null) { + return java.util.Collections.unmodifiableList(pods_); + } else { + return podsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Kubernetes
+     * [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod)
+     * associated with the finding. This field contains Pod records for each
+     * container that is owned by a Pod.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Pod pods = 1; + */ + public int getPodsCount() { + if (podsBuilder_ == null) { + return pods_.size(); + } else { + return podsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Kubernetes
+     * [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod)
+     * associated with the finding. This field contains Pod records for each
+     * container that is owned by a Pod.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Pod pods = 1; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.Pod getPods(int index) { + if (podsBuilder_ == null) { + return pods_.get(index); + } else { + return podsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Kubernetes
+     * [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod)
+     * associated with the finding. This field contains Pod records for each
+     * container that is owned by a Pod.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Pod pods = 1; + */ + public Builder setPods(int index, com.google.cloud.securitycenter.v2.Kubernetes.Pod value) { + if (podsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePodsIsMutable(); + pods_.set(index, value); + onChanged(); + } else { + podsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Kubernetes
+     * [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod)
+     * associated with the finding. This field contains Pod records for each
+     * container that is owned by a Pod.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Pod pods = 1; + */ + public Builder setPods( + int index, com.google.cloud.securitycenter.v2.Kubernetes.Pod.Builder builderForValue) { + if (podsBuilder_ == null) { + ensurePodsIsMutable(); + pods_.set(index, builderForValue.build()); + onChanged(); + } else { + podsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Kubernetes
+     * [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod)
+     * associated with the finding. This field contains Pod records for each
+     * container that is owned by a Pod.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Pod pods = 1; + */ + public Builder addPods(com.google.cloud.securitycenter.v2.Kubernetes.Pod value) { + if (podsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePodsIsMutable(); + pods_.add(value); + onChanged(); + } else { + podsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Kubernetes
+     * [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod)
+     * associated with the finding. This field contains Pod records for each
+     * container that is owned by a Pod.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Pod pods = 1; + */ + public Builder addPods(int index, com.google.cloud.securitycenter.v2.Kubernetes.Pod value) { + if (podsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePodsIsMutable(); + pods_.add(index, value); + onChanged(); + } else { + podsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Kubernetes
+     * [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod)
+     * associated with the finding. This field contains Pod records for each
+     * container that is owned by a Pod.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Pod pods = 1; + */ + public Builder addPods( + com.google.cloud.securitycenter.v2.Kubernetes.Pod.Builder builderForValue) { + if (podsBuilder_ == null) { + ensurePodsIsMutable(); + pods_.add(builderForValue.build()); + onChanged(); + } else { + podsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Kubernetes
+     * [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod)
+     * associated with the finding. This field contains Pod records for each
+     * container that is owned by a Pod.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Pod pods = 1; + */ + public Builder addPods( + int index, com.google.cloud.securitycenter.v2.Kubernetes.Pod.Builder builderForValue) { + if (podsBuilder_ == null) { + ensurePodsIsMutable(); + pods_.add(index, builderForValue.build()); + onChanged(); + } else { + podsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Kubernetes
+     * [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod)
+     * associated with the finding. This field contains Pod records for each
+     * container that is owned by a Pod.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Pod pods = 1; + */ + public Builder addAllPods( + java.lang.Iterable values) { + if (podsBuilder_ == null) { + ensurePodsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pods_); + onChanged(); + } else { + podsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Kubernetes
+     * [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod)
+     * associated with the finding. This field contains Pod records for each
+     * container that is owned by a Pod.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Pod pods = 1; + */ + public Builder clearPods() { + if (podsBuilder_ == null) { + pods_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + podsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Kubernetes
+     * [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod)
+     * associated with the finding. This field contains Pod records for each
+     * container that is owned by a Pod.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Pod pods = 1; + */ + public Builder removePods(int index) { + if (podsBuilder_ == null) { + ensurePodsIsMutable(); + pods_.remove(index); + onChanged(); + } else { + podsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Kubernetes
+     * [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod)
+     * associated with the finding. This field contains Pod records for each
+     * container that is owned by a Pod.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Pod pods = 1; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.Pod.Builder getPodsBuilder(int index) { + return getPodsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Kubernetes
+     * [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod)
+     * associated with the finding. This field contains Pod records for each
+     * container that is owned by a Pod.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Pod pods = 1; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.PodOrBuilder getPodsOrBuilder(int index) { + if (podsBuilder_ == null) { + return pods_.get(index); + } else { + return podsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Kubernetes
+     * [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod)
+     * associated with the finding. This field contains Pod records for each
+     * container that is owned by a Pod.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Pod pods = 1; + */ + public java.util.List + getPodsOrBuilderList() { + if (podsBuilder_ != null) { + return podsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pods_); + } + } + /** + * + * + *
+     * Kubernetes
+     * [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod)
+     * associated with the finding. This field contains Pod records for each
+     * container that is owned by a Pod.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Pod pods = 1; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.Pod.Builder addPodsBuilder() { + return getPodsFieldBuilder() + .addBuilder(com.google.cloud.securitycenter.v2.Kubernetes.Pod.getDefaultInstance()); + } + /** + * + * + *
+     * Kubernetes
+     * [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod)
+     * associated with the finding. This field contains Pod records for each
+     * container that is owned by a Pod.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Pod pods = 1; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.Pod.Builder addPodsBuilder(int index) { + return getPodsFieldBuilder() + .addBuilder( + index, com.google.cloud.securitycenter.v2.Kubernetes.Pod.getDefaultInstance()); + } + /** + * + * + *
+     * Kubernetes
+     * [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod)
+     * associated with the finding. This field contains Pod records for each
+     * container that is owned by a Pod.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Pod pods = 1; + */ + public java.util.List + getPodsBuilderList() { + return getPodsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Kubernetes.Pod, + com.google.cloud.securitycenter.v2.Kubernetes.Pod.Builder, + com.google.cloud.securitycenter.v2.Kubernetes.PodOrBuilder> + getPodsFieldBuilder() { + if (podsBuilder_ == null) { + podsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Kubernetes.Pod, + com.google.cloud.securitycenter.v2.Kubernetes.Pod.Builder, + com.google.cloud.securitycenter.v2.Kubernetes.PodOrBuilder>( + pods_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + pods_ = null; + } + return podsBuilder_; + } + + private java.util.List nodes_ = + java.util.Collections.emptyList(); + + private void ensureNodesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + nodes_ = + new java.util.ArrayList(nodes_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Kubernetes.Node, + com.google.cloud.securitycenter.v2.Kubernetes.Node.Builder, + com.google.cloud.securitycenter.v2.Kubernetes.NodeOrBuilder> + nodesBuilder_; + + /** + * + * + *
+     * Provides Kubernetes
+     * [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes)
+     * information.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + public java.util.List getNodesList() { + if (nodesBuilder_ == null) { + return java.util.Collections.unmodifiableList(nodes_); + } else { + return nodesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Provides Kubernetes
+     * [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes)
+     * information.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + public int getNodesCount() { + if (nodesBuilder_ == null) { + return nodes_.size(); + } else { + return nodesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Provides Kubernetes
+     * [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes)
+     * information.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.Node getNodes(int index) { + if (nodesBuilder_ == null) { + return nodes_.get(index); + } else { + return nodesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Provides Kubernetes
+     * [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes)
+     * information.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + public Builder setNodes(int index, com.google.cloud.securitycenter.v2.Kubernetes.Node value) { + if (nodesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodesIsMutable(); + nodes_.set(index, value); + onChanged(); + } else { + nodesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Provides Kubernetes
+     * [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes)
+     * information.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + public Builder setNodes( + int index, com.google.cloud.securitycenter.v2.Kubernetes.Node.Builder builderForValue) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.set(index, builderForValue.build()); + onChanged(); + } else { + nodesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Provides Kubernetes
+     * [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes)
+     * information.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + public Builder addNodes(com.google.cloud.securitycenter.v2.Kubernetes.Node value) { + if (nodesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodesIsMutable(); + nodes_.add(value); + onChanged(); + } else { + nodesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Provides Kubernetes
+     * [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes)
+     * information.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + public Builder addNodes(int index, com.google.cloud.securitycenter.v2.Kubernetes.Node value) { + if (nodesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodesIsMutable(); + nodes_.add(index, value); + onChanged(); + } else { + nodesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Provides Kubernetes
+     * [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes)
+     * information.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + public Builder addNodes( + com.google.cloud.securitycenter.v2.Kubernetes.Node.Builder builderForValue) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.add(builderForValue.build()); + onChanged(); + } else { + nodesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Provides Kubernetes
+     * [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes)
+     * information.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + public Builder addNodes( + int index, com.google.cloud.securitycenter.v2.Kubernetes.Node.Builder builderForValue) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.add(index, builderForValue.build()); + onChanged(); + } else { + nodesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Provides Kubernetes
+     * [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes)
+     * information.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + public Builder addAllNodes( + java.lang.Iterable values) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, nodes_); + onChanged(); + } else { + nodesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Provides Kubernetes
+     * [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes)
+     * information.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + public Builder clearNodes() { + if (nodesBuilder_ == null) { + nodes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + nodesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Provides Kubernetes
+     * [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes)
+     * information.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + public Builder removeNodes(int index) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.remove(index); + onChanged(); + } else { + nodesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Provides Kubernetes
+     * [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes)
+     * information.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.Node.Builder getNodesBuilder(int index) { + return getNodesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Provides Kubernetes
+     * [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes)
+     * information.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.NodeOrBuilder getNodesOrBuilder( + int index) { + if (nodesBuilder_ == null) { + return nodes_.get(index); + } else { + return nodesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Provides Kubernetes
+     * [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes)
+     * information.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + public java.util.List + getNodesOrBuilderList() { + if (nodesBuilder_ != null) { + return nodesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(nodes_); + } + } + /** + * + * + *
+     * Provides Kubernetes
+     * [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes)
+     * information.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.Node.Builder addNodesBuilder() { + return getNodesFieldBuilder() + .addBuilder(com.google.cloud.securitycenter.v2.Kubernetes.Node.getDefaultInstance()); + } + /** + * + * + *
+     * Provides Kubernetes
+     * [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes)
+     * information.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.Node.Builder addNodesBuilder(int index) { + return getNodesFieldBuilder() + .addBuilder( + index, com.google.cloud.securitycenter.v2.Kubernetes.Node.getDefaultInstance()); + } + /** + * + * + *
+     * Provides Kubernetes
+     * [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes)
+     * information.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + public java.util.List + getNodesBuilderList() { + return getNodesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Kubernetes.Node, + com.google.cloud.securitycenter.v2.Kubernetes.Node.Builder, + com.google.cloud.securitycenter.v2.Kubernetes.NodeOrBuilder> + getNodesFieldBuilder() { + if (nodesBuilder_ == null) { + nodesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Kubernetes.Node, + com.google.cloud.securitycenter.v2.Kubernetes.Node.Builder, + com.google.cloud.securitycenter.v2.Kubernetes.NodeOrBuilder>( + nodes_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + nodes_ = null; + } + return nodesBuilder_; + } + + private java.util.List nodePools_ = + java.util.Collections.emptyList(); + + private void ensureNodePoolsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + nodePools_ = + new java.util.ArrayList( + nodePools_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Kubernetes.NodePool, + com.google.cloud.securitycenter.v2.Kubernetes.NodePool.Builder, + com.google.cloud.securitycenter.v2.Kubernetes.NodePoolOrBuilder> + nodePoolsBuilder_; + + /** + * + * + *
+     * GKE [node
+     * pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools)
+     * associated with the finding. This field contains node pool information for
+     * each node, when it is available.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.NodePool node_pools = 3; + */ + public java.util.List + getNodePoolsList() { + if (nodePoolsBuilder_ == null) { + return java.util.Collections.unmodifiableList(nodePools_); + } else { + return nodePoolsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * GKE [node
+     * pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools)
+     * associated with the finding. This field contains node pool information for
+     * each node, when it is available.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.NodePool node_pools = 3; + */ + public int getNodePoolsCount() { + if (nodePoolsBuilder_ == null) { + return nodePools_.size(); + } else { + return nodePoolsBuilder_.getCount(); + } + } + /** + * + * + *
+     * GKE [node
+     * pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools)
+     * associated with the finding. This field contains node pool information for
+     * each node, when it is available.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.NodePool node_pools = 3; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.NodePool getNodePools(int index) { + if (nodePoolsBuilder_ == null) { + return nodePools_.get(index); + } else { + return nodePoolsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * GKE [node
+     * pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools)
+     * associated with the finding. This field contains node pool information for
+     * each node, when it is available.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.NodePool node_pools = 3; + */ + public Builder setNodePools( + int index, com.google.cloud.securitycenter.v2.Kubernetes.NodePool value) { + if (nodePoolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodePoolsIsMutable(); + nodePools_.set(index, value); + onChanged(); + } else { + nodePoolsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * GKE [node
+     * pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools)
+     * associated with the finding. This field contains node pool information for
+     * each node, when it is available.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.NodePool node_pools = 3; + */ + public Builder setNodePools( + int index, com.google.cloud.securitycenter.v2.Kubernetes.NodePool.Builder builderForValue) { + if (nodePoolsBuilder_ == null) { + ensureNodePoolsIsMutable(); + nodePools_.set(index, builderForValue.build()); + onChanged(); + } else { + nodePoolsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * GKE [node
+     * pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools)
+     * associated with the finding. This field contains node pool information for
+     * each node, when it is available.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.NodePool node_pools = 3; + */ + public Builder addNodePools(com.google.cloud.securitycenter.v2.Kubernetes.NodePool value) { + if (nodePoolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodePoolsIsMutable(); + nodePools_.add(value); + onChanged(); + } else { + nodePoolsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * GKE [node
+     * pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools)
+     * associated with the finding. This field contains node pool information for
+     * each node, when it is available.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.NodePool node_pools = 3; + */ + public Builder addNodePools( + int index, com.google.cloud.securitycenter.v2.Kubernetes.NodePool value) { + if (nodePoolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodePoolsIsMutable(); + nodePools_.add(index, value); + onChanged(); + } else { + nodePoolsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * GKE [node
+     * pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools)
+     * associated with the finding. This field contains node pool information for
+     * each node, when it is available.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.NodePool node_pools = 3; + */ + public Builder addNodePools( + com.google.cloud.securitycenter.v2.Kubernetes.NodePool.Builder builderForValue) { + if (nodePoolsBuilder_ == null) { + ensureNodePoolsIsMutable(); + nodePools_.add(builderForValue.build()); + onChanged(); + } else { + nodePoolsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * GKE [node
+     * pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools)
+     * associated with the finding. This field contains node pool information for
+     * each node, when it is available.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.NodePool node_pools = 3; + */ + public Builder addNodePools( + int index, com.google.cloud.securitycenter.v2.Kubernetes.NodePool.Builder builderForValue) { + if (nodePoolsBuilder_ == null) { + ensureNodePoolsIsMutable(); + nodePools_.add(index, builderForValue.build()); + onChanged(); + } else { + nodePoolsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * GKE [node
+     * pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools)
+     * associated with the finding. This field contains node pool information for
+     * each node, when it is available.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.NodePool node_pools = 3; + */ + public Builder addAllNodePools( + java.lang.Iterable + values) { + if (nodePoolsBuilder_ == null) { + ensureNodePoolsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, nodePools_); + onChanged(); + } else { + nodePoolsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * GKE [node
+     * pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools)
+     * associated with the finding. This field contains node pool information for
+     * each node, when it is available.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.NodePool node_pools = 3; + */ + public Builder clearNodePools() { + if (nodePoolsBuilder_ == null) { + nodePools_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + nodePoolsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * GKE [node
+     * pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools)
+     * associated with the finding. This field contains node pool information for
+     * each node, when it is available.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.NodePool node_pools = 3; + */ + public Builder removeNodePools(int index) { + if (nodePoolsBuilder_ == null) { + ensureNodePoolsIsMutable(); + nodePools_.remove(index); + onChanged(); + } else { + nodePoolsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * GKE [node
+     * pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools)
+     * associated with the finding. This field contains node pool information for
+     * each node, when it is available.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.NodePool node_pools = 3; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.NodePool.Builder getNodePoolsBuilder( + int index) { + return getNodePoolsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * GKE [node
+     * pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools)
+     * associated with the finding. This field contains node pool information for
+     * each node, when it is available.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.NodePool node_pools = 3; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.NodePoolOrBuilder getNodePoolsOrBuilder( + int index) { + if (nodePoolsBuilder_ == null) { + return nodePools_.get(index); + } else { + return nodePoolsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * GKE [node
+     * pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools)
+     * associated with the finding. This field contains node pool information for
+     * each node, when it is available.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.NodePool node_pools = 3; + */ + public java.util.List + getNodePoolsOrBuilderList() { + if (nodePoolsBuilder_ != null) { + return nodePoolsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(nodePools_); + } + } + /** + * + * + *
+     * GKE [node
+     * pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools)
+     * associated with the finding. This field contains node pool information for
+     * each node, when it is available.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.NodePool node_pools = 3; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.NodePool.Builder addNodePoolsBuilder() { + return getNodePoolsFieldBuilder() + .addBuilder(com.google.cloud.securitycenter.v2.Kubernetes.NodePool.getDefaultInstance()); + } + /** + * + * + *
+     * GKE [node
+     * pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools)
+     * associated with the finding. This field contains node pool information for
+     * each node, when it is available.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.NodePool node_pools = 3; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.NodePool.Builder addNodePoolsBuilder( + int index) { + return getNodePoolsFieldBuilder() + .addBuilder( + index, com.google.cloud.securitycenter.v2.Kubernetes.NodePool.getDefaultInstance()); + } + /** + * + * + *
+     * GKE [node
+     * pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools)
+     * associated with the finding. This field contains node pool information for
+     * each node, when it is available.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.NodePool node_pools = 3; + */ + public java.util.List + getNodePoolsBuilderList() { + return getNodePoolsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Kubernetes.NodePool, + com.google.cloud.securitycenter.v2.Kubernetes.NodePool.Builder, + com.google.cloud.securitycenter.v2.Kubernetes.NodePoolOrBuilder> + getNodePoolsFieldBuilder() { + if (nodePoolsBuilder_ == null) { + nodePoolsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Kubernetes.NodePool, + com.google.cloud.securitycenter.v2.Kubernetes.NodePool.Builder, + com.google.cloud.securitycenter.v2.Kubernetes.NodePoolOrBuilder>( + nodePools_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + nodePools_ = null; + } + return nodePoolsBuilder_; + } + + private java.util.List roles_ = + java.util.Collections.emptyList(); + + private void ensureRolesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + roles_ = + new java.util.ArrayList(roles_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Kubernetes.Role, + com.google.cloud.securitycenter.v2.Kubernetes.Role.Builder, + com.google.cloud.securitycenter.v2.Kubernetes.RoleOrBuilder> + rolesBuilder_; + + /** + * + * + *
+     * Provides Kubernetes role information for findings that involve [Roles or
+     * ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Role roles = 4; + */ + public java.util.List getRolesList() { + if (rolesBuilder_ == null) { + return java.util.Collections.unmodifiableList(roles_); + } else { + return rolesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Provides Kubernetes role information for findings that involve [Roles or
+     * ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Role roles = 4; + */ + public int getRolesCount() { + if (rolesBuilder_ == null) { + return roles_.size(); + } else { + return rolesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Provides Kubernetes role information for findings that involve [Roles or
+     * ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Role roles = 4; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.Role getRoles(int index) { + if (rolesBuilder_ == null) { + return roles_.get(index); + } else { + return rolesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Provides Kubernetes role information for findings that involve [Roles or
+     * ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Role roles = 4; + */ + public Builder setRoles(int index, com.google.cloud.securitycenter.v2.Kubernetes.Role value) { + if (rolesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRolesIsMutable(); + roles_.set(index, value); + onChanged(); + } else { + rolesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Provides Kubernetes role information for findings that involve [Roles or
+     * ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Role roles = 4; + */ + public Builder setRoles( + int index, com.google.cloud.securitycenter.v2.Kubernetes.Role.Builder builderForValue) { + if (rolesBuilder_ == null) { + ensureRolesIsMutable(); + roles_.set(index, builderForValue.build()); + onChanged(); + } else { + rolesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Provides Kubernetes role information for findings that involve [Roles or
+     * ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Role roles = 4; + */ + public Builder addRoles(com.google.cloud.securitycenter.v2.Kubernetes.Role value) { + if (rolesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRolesIsMutable(); + roles_.add(value); + onChanged(); + } else { + rolesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Provides Kubernetes role information for findings that involve [Roles or
+     * ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Role roles = 4; + */ + public Builder addRoles(int index, com.google.cloud.securitycenter.v2.Kubernetes.Role value) { + if (rolesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRolesIsMutable(); + roles_.add(index, value); + onChanged(); + } else { + rolesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Provides Kubernetes role information for findings that involve [Roles or
+     * ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Role roles = 4; + */ + public Builder addRoles( + com.google.cloud.securitycenter.v2.Kubernetes.Role.Builder builderForValue) { + if (rolesBuilder_ == null) { + ensureRolesIsMutable(); + roles_.add(builderForValue.build()); + onChanged(); + } else { + rolesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Provides Kubernetes role information for findings that involve [Roles or
+     * ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Role roles = 4; + */ + public Builder addRoles( + int index, com.google.cloud.securitycenter.v2.Kubernetes.Role.Builder builderForValue) { + if (rolesBuilder_ == null) { + ensureRolesIsMutable(); + roles_.add(index, builderForValue.build()); + onChanged(); + } else { + rolesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Provides Kubernetes role information for findings that involve [Roles or
+     * ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Role roles = 4; + */ + public Builder addAllRoles( + java.lang.Iterable values) { + if (rolesBuilder_ == null) { + ensureRolesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, roles_); + onChanged(); + } else { + rolesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Provides Kubernetes role information for findings that involve [Roles or
+     * ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Role roles = 4; + */ + public Builder clearRoles() { + if (rolesBuilder_ == null) { + roles_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + rolesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Provides Kubernetes role information for findings that involve [Roles or
+     * ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Role roles = 4; + */ + public Builder removeRoles(int index) { + if (rolesBuilder_ == null) { + ensureRolesIsMutable(); + roles_.remove(index); + onChanged(); + } else { + rolesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Provides Kubernetes role information for findings that involve [Roles or
+     * ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Role roles = 4; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.Role.Builder getRolesBuilder(int index) { + return getRolesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Provides Kubernetes role information for findings that involve [Roles or
+     * ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Role roles = 4; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.RoleOrBuilder getRolesOrBuilder( + int index) { + if (rolesBuilder_ == null) { + return roles_.get(index); + } else { + return rolesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Provides Kubernetes role information for findings that involve [Roles or
+     * ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Role roles = 4; + */ + public java.util.List + getRolesOrBuilderList() { + if (rolesBuilder_ != null) { + return rolesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(roles_); + } + } + /** + * + * + *
+     * Provides Kubernetes role information for findings that involve [Roles or
+     * ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Role roles = 4; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.Role.Builder addRolesBuilder() { + return getRolesFieldBuilder() + .addBuilder(com.google.cloud.securitycenter.v2.Kubernetes.Role.getDefaultInstance()); + } + /** + * + * + *
+     * Provides Kubernetes role information for findings that involve [Roles or
+     * ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Role roles = 4; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.Role.Builder addRolesBuilder(int index) { + return getRolesFieldBuilder() + .addBuilder( + index, com.google.cloud.securitycenter.v2.Kubernetes.Role.getDefaultInstance()); + } + /** + * + * + *
+     * Provides Kubernetes role information for findings that involve [Roles or
+     * ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Role roles = 4; + */ + public java.util.List + getRolesBuilderList() { + return getRolesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Kubernetes.Role, + com.google.cloud.securitycenter.v2.Kubernetes.Role.Builder, + com.google.cloud.securitycenter.v2.Kubernetes.RoleOrBuilder> + getRolesFieldBuilder() { + if (rolesBuilder_ == null) { + rolesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Kubernetes.Role, + com.google.cloud.securitycenter.v2.Kubernetes.Role.Builder, + com.google.cloud.securitycenter.v2.Kubernetes.RoleOrBuilder>( + roles_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + roles_ = null; + } + return rolesBuilder_; + } + + private java.util.List bindings_ = + java.util.Collections.emptyList(); + + private void ensureBindingsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + bindings_ = + new java.util.ArrayList( + bindings_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Kubernetes.Binding, + com.google.cloud.securitycenter.v2.Kubernetes.Binding.Builder, + com.google.cloud.securitycenter.v2.Kubernetes.BindingOrBuilder> + bindingsBuilder_; + + /** + * + * + *
+     * Provides Kubernetes role binding information for findings that involve
+     * [RoleBindings or
+     * ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Binding bindings = 5; + */ + public java.util.List getBindingsList() { + if (bindingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(bindings_); + } else { + return bindingsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Provides Kubernetes role binding information for findings that involve
+     * [RoleBindings or
+     * ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Binding bindings = 5; + */ + public int getBindingsCount() { + if (bindingsBuilder_ == null) { + return bindings_.size(); + } else { + return bindingsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Provides Kubernetes role binding information for findings that involve
+     * [RoleBindings or
+     * ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Binding bindings = 5; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.Binding getBindings(int index) { + if (bindingsBuilder_ == null) { + return bindings_.get(index); + } else { + return bindingsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Provides Kubernetes role binding information for findings that involve
+     * [RoleBindings or
+     * ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Binding bindings = 5; + */ + public Builder setBindings( + int index, com.google.cloud.securitycenter.v2.Kubernetes.Binding value) { + if (bindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBindingsIsMutable(); + bindings_.set(index, value); + onChanged(); + } else { + bindingsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Provides Kubernetes role binding information for findings that involve
+     * [RoleBindings or
+     * ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Binding bindings = 5; + */ + public Builder setBindings( + int index, com.google.cloud.securitycenter.v2.Kubernetes.Binding.Builder builderForValue) { + if (bindingsBuilder_ == null) { + ensureBindingsIsMutable(); + bindings_.set(index, builderForValue.build()); + onChanged(); + } else { + bindingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Provides Kubernetes role binding information for findings that involve
+     * [RoleBindings or
+     * ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Binding bindings = 5; + */ + public Builder addBindings(com.google.cloud.securitycenter.v2.Kubernetes.Binding value) { + if (bindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBindingsIsMutable(); + bindings_.add(value); + onChanged(); + } else { + bindingsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Provides Kubernetes role binding information for findings that involve
+     * [RoleBindings or
+     * ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Binding bindings = 5; + */ + public Builder addBindings( + int index, com.google.cloud.securitycenter.v2.Kubernetes.Binding value) { + if (bindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBindingsIsMutable(); + bindings_.add(index, value); + onChanged(); + } else { + bindingsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Provides Kubernetes role binding information for findings that involve
+     * [RoleBindings or
+     * ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Binding bindings = 5; + */ + public Builder addBindings( + com.google.cloud.securitycenter.v2.Kubernetes.Binding.Builder builderForValue) { + if (bindingsBuilder_ == null) { + ensureBindingsIsMutable(); + bindings_.add(builderForValue.build()); + onChanged(); + } else { + bindingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Provides Kubernetes role binding information for findings that involve
+     * [RoleBindings or
+     * ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Binding bindings = 5; + */ + public Builder addBindings( + int index, com.google.cloud.securitycenter.v2.Kubernetes.Binding.Builder builderForValue) { + if (bindingsBuilder_ == null) { + ensureBindingsIsMutable(); + bindings_.add(index, builderForValue.build()); + onChanged(); + } else { + bindingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Provides Kubernetes role binding information for findings that involve
+     * [RoleBindings or
+     * ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Binding bindings = 5; + */ + public Builder addAllBindings( + java.lang.Iterable + values) { + if (bindingsBuilder_ == null) { + ensureBindingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, bindings_); + onChanged(); + } else { + bindingsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Provides Kubernetes role binding information for findings that involve
+     * [RoleBindings or
+     * ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Binding bindings = 5; + */ + public Builder clearBindings() { + if (bindingsBuilder_ == null) { + bindings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + bindingsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Provides Kubernetes role binding information for findings that involve
+     * [RoleBindings or
+     * ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Binding bindings = 5; + */ + public Builder removeBindings(int index) { + if (bindingsBuilder_ == null) { + ensureBindingsIsMutable(); + bindings_.remove(index); + onChanged(); + } else { + bindingsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Provides Kubernetes role binding information for findings that involve
+     * [RoleBindings or
+     * ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Binding bindings = 5; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.Binding.Builder getBindingsBuilder( + int index) { + return getBindingsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Provides Kubernetes role binding information for findings that involve
+     * [RoleBindings or
+     * ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Binding bindings = 5; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.BindingOrBuilder getBindingsOrBuilder( + int index) { + if (bindingsBuilder_ == null) { + return bindings_.get(index); + } else { + return bindingsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Provides Kubernetes role binding information for findings that involve
+     * [RoleBindings or
+     * ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Binding bindings = 5; + */ + public java.util.List + getBindingsOrBuilderList() { + if (bindingsBuilder_ != null) { + return bindingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bindings_); + } + } + /** + * + * + *
+     * Provides Kubernetes role binding information for findings that involve
+     * [RoleBindings or
+     * ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Binding bindings = 5; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.Binding.Builder addBindingsBuilder() { + return getBindingsFieldBuilder() + .addBuilder(com.google.cloud.securitycenter.v2.Kubernetes.Binding.getDefaultInstance()); + } + /** + * + * + *
+     * Provides Kubernetes role binding information for findings that involve
+     * [RoleBindings or
+     * ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Binding bindings = 5; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.Binding.Builder addBindingsBuilder( + int index) { + return getBindingsFieldBuilder() + .addBuilder( + index, com.google.cloud.securitycenter.v2.Kubernetes.Binding.getDefaultInstance()); + } + /** + * + * + *
+     * Provides Kubernetes role binding information for findings that involve
+     * [RoleBindings or
+     * ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Binding bindings = 5; + */ + public java.util.List + getBindingsBuilderList() { + return getBindingsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Kubernetes.Binding, + com.google.cloud.securitycenter.v2.Kubernetes.Binding.Builder, + com.google.cloud.securitycenter.v2.Kubernetes.BindingOrBuilder> + getBindingsFieldBuilder() { + if (bindingsBuilder_ == null) { + bindingsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Kubernetes.Binding, + com.google.cloud.securitycenter.v2.Kubernetes.Binding.Builder, + com.google.cloud.securitycenter.v2.Kubernetes.BindingOrBuilder>( + bindings_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); + bindings_ = null; + } + return bindingsBuilder_; + } + + private java.util.List + accessReviews_ = java.util.Collections.emptyList(); + + private void ensureAccessReviewsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + accessReviews_ = + new java.util.ArrayList( + accessReviews_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Kubernetes.AccessReview, + com.google.cloud.securitycenter.v2.Kubernetes.AccessReview.Builder, + com.google.cloud.securitycenter.v2.Kubernetes.AccessReviewOrBuilder> + accessReviewsBuilder_; + + /** + * + * + *
+     * Provides information on any Kubernetes access reviews (privilege checks)
+     * relevant to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.AccessReview access_reviews = 6; + * + */ + public java.util.List + getAccessReviewsList() { + if (accessReviewsBuilder_ == null) { + return java.util.Collections.unmodifiableList(accessReviews_); + } else { + return accessReviewsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Provides information on any Kubernetes access reviews (privilege checks)
+     * relevant to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.AccessReview access_reviews = 6; + * + */ + public int getAccessReviewsCount() { + if (accessReviewsBuilder_ == null) { + return accessReviews_.size(); + } else { + return accessReviewsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Provides information on any Kubernetes access reviews (privilege checks)
+     * relevant to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.AccessReview access_reviews = 6; + * + */ + public com.google.cloud.securitycenter.v2.Kubernetes.AccessReview getAccessReviews(int index) { + if (accessReviewsBuilder_ == null) { + return accessReviews_.get(index); + } else { + return accessReviewsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Provides information on any Kubernetes access reviews (privilege checks)
+     * relevant to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.AccessReview access_reviews = 6; + * + */ + public Builder setAccessReviews( + int index, com.google.cloud.securitycenter.v2.Kubernetes.AccessReview value) { + if (accessReviewsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccessReviewsIsMutable(); + accessReviews_.set(index, value); + onChanged(); + } else { + accessReviewsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Provides information on any Kubernetes access reviews (privilege checks)
+     * relevant to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.AccessReview access_reviews = 6; + * + */ + public Builder setAccessReviews( + int index, + com.google.cloud.securitycenter.v2.Kubernetes.AccessReview.Builder builderForValue) { + if (accessReviewsBuilder_ == null) { + ensureAccessReviewsIsMutable(); + accessReviews_.set(index, builderForValue.build()); + onChanged(); + } else { + accessReviewsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Provides information on any Kubernetes access reviews (privilege checks)
+     * relevant to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.AccessReview access_reviews = 6; + * + */ + public Builder addAccessReviews( + com.google.cloud.securitycenter.v2.Kubernetes.AccessReview value) { + if (accessReviewsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccessReviewsIsMutable(); + accessReviews_.add(value); + onChanged(); + } else { + accessReviewsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Provides information on any Kubernetes access reviews (privilege checks)
+     * relevant to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.AccessReview access_reviews = 6; + * + */ + public Builder addAccessReviews( + int index, com.google.cloud.securitycenter.v2.Kubernetes.AccessReview value) { + if (accessReviewsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccessReviewsIsMutable(); + accessReviews_.add(index, value); + onChanged(); + } else { + accessReviewsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Provides information on any Kubernetes access reviews (privilege checks)
+     * relevant to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.AccessReview access_reviews = 6; + * + */ + public Builder addAccessReviews( + com.google.cloud.securitycenter.v2.Kubernetes.AccessReview.Builder builderForValue) { + if (accessReviewsBuilder_ == null) { + ensureAccessReviewsIsMutable(); + accessReviews_.add(builderForValue.build()); + onChanged(); + } else { + accessReviewsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Provides information on any Kubernetes access reviews (privilege checks)
+     * relevant to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.AccessReview access_reviews = 6; + * + */ + public Builder addAccessReviews( + int index, + com.google.cloud.securitycenter.v2.Kubernetes.AccessReview.Builder builderForValue) { + if (accessReviewsBuilder_ == null) { + ensureAccessReviewsIsMutable(); + accessReviews_.add(index, builderForValue.build()); + onChanged(); + } else { + accessReviewsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Provides information on any Kubernetes access reviews (privilege checks)
+     * relevant to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.AccessReview access_reviews = 6; + * + */ + public Builder addAllAccessReviews( + java.lang.Iterable + values) { + if (accessReviewsBuilder_ == null) { + ensureAccessReviewsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, accessReviews_); + onChanged(); + } else { + accessReviewsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Provides information on any Kubernetes access reviews (privilege checks)
+     * relevant to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.AccessReview access_reviews = 6; + * + */ + public Builder clearAccessReviews() { + if (accessReviewsBuilder_ == null) { + accessReviews_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + accessReviewsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Provides information on any Kubernetes access reviews (privilege checks)
+     * relevant to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.AccessReview access_reviews = 6; + * + */ + public Builder removeAccessReviews(int index) { + if (accessReviewsBuilder_ == null) { + ensureAccessReviewsIsMutable(); + accessReviews_.remove(index); + onChanged(); + } else { + accessReviewsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Provides information on any Kubernetes access reviews (privilege checks)
+     * relevant to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.AccessReview access_reviews = 6; + * + */ + public com.google.cloud.securitycenter.v2.Kubernetes.AccessReview.Builder + getAccessReviewsBuilder(int index) { + return getAccessReviewsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Provides information on any Kubernetes access reviews (privilege checks)
+     * relevant to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.AccessReview access_reviews = 6; + * + */ + public com.google.cloud.securitycenter.v2.Kubernetes.AccessReviewOrBuilder + getAccessReviewsOrBuilder(int index) { + if (accessReviewsBuilder_ == null) { + return accessReviews_.get(index); + } else { + return accessReviewsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Provides information on any Kubernetes access reviews (privilege checks)
+     * relevant to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.AccessReview access_reviews = 6; + * + */ + public java.util.List< + ? extends com.google.cloud.securitycenter.v2.Kubernetes.AccessReviewOrBuilder> + getAccessReviewsOrBuilderList() { + if (accessReviewsBuilder_ != null) { + return accessReviewsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(accessReviews_); + } + } + /** + * + * + *
+     * Provides information on any Kubernetes access reviews (privilege checks)
+     * relevant to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.AccessReview access_reviews = 6; + * + */ + public com.google.cloud.securitycenter.v2.Kubernetes.AccessReview.Builder + addAccessReviewsBuilder() { + return getAccessReviewsFieldBuilder() + .addBuilder( + com.google.cloud.securitycenter.v2.Kubernetes.AccessReview.getDefaultInstance()); + } + /** + * + * + *
+     * Provides information on any Kubernetes access reviews (privilege checks)
+     * relevant to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.AccessReview access_reviews = 6; + * + */ + public com.google.cloud.securitycenter.v2.Kubernetes.AccessReview.Builder + addAccessReviewsBuilder(int index) { + return getAccessReviewsFieldBuilder() + .addBuilder( + index, + com.google.cloud.securitycenter.v2.Kubernetes.AccessReview.getDefaultInstance()); + } + /** + * + * + *
+     * Provides information on any Kubernetes access reviews (privilege checks)
+     * relevant to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.AccessReview access_reviews = 6; + * + */ + public java.util.List + getAccessReviewsBuilderList() { + return getAccessReviewsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Kubernetes.AccessReview, + com.google.cloud.securitycenter.v2.Kubernetes.AccessReview.Builder, + com.google.cloud.securitycenter.v2.Kubernetes.AccessReviewOrBuilder> + getAccessReviewsFieldBuilder() { + if (accessReviewsBuilder_ == null) { + accessReviewsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Kubernetes.AccessReview, + com.google.cloud.securitycenter.v2.Kubernetes.AccessReview.Builder, + com.google.cloud.securitycenter.v2.Kubernetes.AccessReviewOrBuilder>( + accessReviews_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + accessReviews_ = null; + } + return accessReviewsBuilder_; + } + + private java.util.List objects_ = + java.util.Collections.emptyList(); + + private void ensureObjectsIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + objects_ = + new java.util.ArrayList(objects_); + bitField0_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Kubernetes.Object, + com.google.cloud.securitycenter.v2.Kubernetes.Object.Builder, + com.google.cloud.securitycenter.v2.Kubernetes.ObjectOrBuilder> + objectsBuilder_; + + /** + * + * + *
+     * Kubernetes objects related to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Object objects = 7; + */ + public java.util.List getObjectsList() { + if (objectsBuilder_ == null) { + return java.util.Collections.unmodifiableList(objects_); + } else { + return objectsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Kubernetes objects related to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Object objects = 7; + */ + public int getObjectsCount() { + if (objectsBuilder_ == null) { + return objects_.size(); + } else { + return objectsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Kubernetes objects related to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Object objects = 7; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.Object getObjects(int index) { + if (objectsBuilder_ == null) { + return objects_.get(index); + } else { + return objectsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Kubernetes objects related to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Object objects = 7; + */ + public Builder setObjects( + int index, com.google.cloud.securitycenter.v2.Kubernetes.Object value) { + if (objectsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureObjectsIsMutable(); + objects_.set(index, value); + onChanged(); + } else { + objectsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Kubernetes objects related to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Object objects = 7; + */ + public Builder setObjects( + int index, com.google.cloud.securitycenter.v2.Kubernetes.Object.Builder builderForValue) { + if (objectsBuilder_ == null) { + ensureObjectsIsMutable(); + objects_.set(index, builderForValue.build()); + onChanged(); + } else { + objectsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Kubernetes objects related to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Object objects = 7; + */ + public Builder addObjects(com.google.cloud.securitycenter.v2.Kubernetes.Object value) { + if (objectsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureObjectsIsMutable(); + objects_.add(value); + onChanged(); + } else { + objectsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Kubernetes objects related to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Object objects = 7; + */ + public Builder addObjects( + int index, com.google.cloud.securitycenter.v2.Kubernetes.Object value) { + if (objectsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureObjectsIsMutable(); + objects_.add(index, value); + onChanged(); + } else { + objectsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Kubernetes objects related to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Object objects = 7; + */ + public Builder addObjects( + com.google.cloud.securitycenter.v2.Kubernetes.Object.Builder builderForValue) { + if (objectsBuilder_ == null) { + ensureObjectsIsMutable(); + objects_.add(builderForValue.build()); + onChanged(); + } else { + objectsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Kubernetes objects related to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Object objects = 7; + */ + public Builder addObjects( + int index, com.google.cloud.securitycenter.v2.Kubernetes.Object.Builder builderForValue) { + if (objectsBuilder_ == null) { + ensureObjectsIsMutable(); + objects_.add(index, builderForValue.build()); + onChanged(); + } else { + objectsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Kubernetes objects related to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Object objects = 7; + */ + public Builder addAllObjects( + java.lang.Iterable values) { + if (objectsBuilder_ == null) { + ensureObjectsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, objects_); + onChanged(); + } else { + objectsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Kubernetes objects related to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Object objects = 7; + */ + public Builder clearObjects() { + if (objectsBuilder_ == null) { + objects_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + objectsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Kubernetes objects related to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Object objects = 7; + */ + public Builder removeObjects(int index) { + if (objectsBuilder_ == null) { + ensureObjectsIsMutable(); + objects_.remove(index); + onChanged(); + } else { + objectsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Kubernetes objects related to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Object objects = 7; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.Object.Builder getObjectsBuilder( + int index) { + return getObjectsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Kubernetes objects related to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Object objects = 7; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.ObjectOrBuilder getObjectsOrBuilder( + int index) { + if (objectsBuilder_ == null) { + return objects_.get(index); + } else { + return objectsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Kubernetes objects related to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Object objects = 7; + */ + public java.util.List + getObjectsOrBuilderList() { + if (objectsBuilder_ != null) { + return objectsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(objects_); + } + } + /** + * + * + *
+     * Kubernetes objects related to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Object objects = 7; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.Object.Builder addObjectsBuilder() { + return getObjectsFieldBuilder() + .addBuilder(com.google.cloud.securitycenter.v2.Kubernetes.Object.getDefaultInstance()); + } + /** + * + * + *
+     * Kubernetes objects related to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Object objects = 7; + */ + public com.google.cloud.securitycenter.v2.Kubernetes.Object.Builder addObjectsBuilder( + int index) { + return getObjectsFieldBuilder() + .addBuilder( + index, com.google.cloud.securitycenter.v2.Kubernetes.Object.getDefaultInstance()); + } + /** + * + * + *
+     * Kubernetes objects related to the finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Object objects = 7; + */ + public java.util.List + getObjectsBuilderList() { + return getObjectsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Kubernetes.Object, + com.google.cloud.securitycenter.v2.Kubernetes.Object.Builder, + com.google.cloud.securitycenter.v2.Kubernetes.ObjectOrBuilder> + getObjectsFieldBuilder() { + if (objectsBuilder_ == null) { + objectsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v2.Kubernetes.Object, + com.google.cloud.securitycenter.v2.Kubernetes.Object.Builder, + com.google.cloud.securitycenter.v2.Kubernetes.ObjectOrBuilder>( + objects_, ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean()); + objects_ = null; + } + return objectsBuilder_; + } + + @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.v2.Kubernetes) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.Kubernetes) + private static final com.google.cloud.securitycenter.v2.Kubernetes DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.Kubernetes(); + } + + public static com.google.cloud.securitycenter.v2.Kubernetes getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Kubernetes parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v2.Kubernetes getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/KubernetesOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/KubernetesOrBuilder.java new file mode 100644 index 000000000000..ca9ac06d24b8 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/KubernetesOrBuilder.java @@ -0,0 +1,456 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/kubernetes.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public interface KubernetesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.Kubernetes) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Kubernetes
+   * [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod)
+   * associated with the finding. This field contains Pod records for each
+   * container that is owned by a Pod.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Pod pods = 1; + */ + java.util.List getPodsList(); + /** + * + * + *
+   * Kubernetes
+   * [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod)
+   * associated with the finding. This field contains Pod records for each
+   * container that is owned by a Pod.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Pod pods = 1; + */ + com.google.cloud.securitycenter.v2.Kubernetes.Pod getPods(int index); + /** + * + * + *
+   * Kubernetes
+   * [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod)
+   * associated with the finding. This field contains Pod records for each
+   * container that is owned by a Pod.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Pod pods = 1; + */ + int getPodsCount(); + /** + * + * + *
+   * Kubernetes
+   * [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod)
+   * associated with the finding. This field contains Pod records for each
+   * container that is owned by a Pod.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Pod pods = 1; + */ + java.util.List + getPodsOrBuilderList(); + /** + * + * + *
+   * Kubernetes
+   * [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod)
+   * associated with the finding. This field contains Pod records for each
+   * container that is owned by a Pod.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Pod pods = 1; + */ + com.google.cloud.securitycenter.v2.Kubernetes.PodOrBuilder getPodsOrBuilder(int index); + + /** + * + * + *
+   * Provides Kubernetes
+   * [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes)
+   * information.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + java.util.List getNodesList(); + /** + * + * + *
+   * Provides Kubernetes
+   * [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes)
+   * information.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + com.google.cloud.securitycenter.v2.Kubernetes.Node getNodes(int index); + /** + * + * + *
+   * Provides Kubernetes
+   * [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes)
+   * information.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + int getNodesCount(); + /** + * + * + *
+   * Provides Kubernetes
+   * [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes)
+   * information.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + java.util.List + getNodesOrBuilderList(); + /** + * + * + *
+   * Provides Kubernetes
+   * [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes)
+   * information.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Node nodes = 2; + */ + com.google.cloud.securitycenter.v2.Kubernetes.NodeOrBuilder getNodesOrBuilder(int index); + + /** + * + * + *
+   * GKE [node
+   * pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools)
+   * associated with the finding. This field contains node pool information for
+   * each node, when it is available.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.NodePool node_pools = 3; + */ + java.util.List getNodePoolsList(); + /** + * + * + *
+   * GKE [node
+   * pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools)
+   * associated with the finding. This field contains node pool information for
+   * each node, when it is available.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.NodePool node_pools = 3; + */ + com.google.cloud.securitycenter.v2.Kubernetes.NodePool getNodePools(int index); + /** + * + * + *
+   * GKE [node
+   * pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools)
+   * associated with the finding. This field contains node pool information for
+   * each node, when it is available.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.NodePool node_pools = 3; + */ + int getNodePoolsCount(); + /** + * + * + *
+   * GKE [node
+   * pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools)
+   * associated with the finding. This field contains node pool information for
+   * each node, when it is available.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.NodePool node_pools = 3; + */ + java.util.List + getNodePoolsOrBuilderList(); + /** + * + * + *
+   * GKE [node
+   * pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools)
+   * associated with the finding. This field contains node pool information for
+   * each node, when it is available.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.NodePool node_pools = 3; + */ + com.google.cloud.securitycenter.v2.Kubernetes.NodePoolOrBuilder getNodePoolsOrBuilder(int index); + + /** + * + * + *
+   * Provides Kubernetes role information for findings that involve [Roles or
+   * ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Role roles = 4; + */ + java.util.List getRolesList(); + /** + * + * + *
+   * Provides Kubernetes role information for findings that involve [Roles or
+   * ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Role roles = 4; + */ + com.google.cloud.securitycenter.v2.Kubernetes.Role getRoles(int index); + /** + * + * + *
+   * Provides Kubernetes role information for findings that involve [Roles or
+   * ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Role roles = 4; + */ + int getRolesCount(); + /** + * + * + *
+   * Provides Kubernetes role information for findings that involve [Roles or
+   * ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Role roles = 4; + */ + java.util.List + getRolesOrBuilderList(); + /** + * + * + *
+   * Provides Kubernetes role information for findings that involve [Roles or
+   * ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Role roles = 4; + */ + com.google.cloud.securitycenter.v2.Kubernetes.RoleOrBuilder getRolesOrBuilder(int index); + + /** + * + * + *
+   * Provides Kubernetes role binding information for findings that involve
+   * [RoleBindings or
+   * ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Binding bindings = 5; + */ + java.util.List getBindingsList(); + /** + * + * + *
+   * Provides Kubernetes role binding information for findings that involve
+   * [RoleBindings or
+   * ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Binding bindings = 5; + */ + com.google.cloud.securitycenter.v2.Kubernetes.Binding getBindings(int index); + /** + * + * + *
+   * Provides Kubernetes role binding information for findings that involve
+   * [RoleBindings or
+   * ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Binding bindings = 5; + */ + int getBindingsCount(); + /** + * + * + *
+   * Provides Kubernetes role binding information for findings that involve
+   * [RoleBindings or
+   * ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Binding bindings = 5; + */ + java.util.List + getBindingsOrBuilderList(); + /** + * + * + *
+   * Provides Kubernetes role binding information for findings that involve
+   * [RoleBindings or
+   * ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Binding bindings = 5; + */ + com.google.cloud.securitycenter.v2.Kubernetes.BindingOrBuilder getBindingsOrBuilder(int index); + + /** + * + * + *
+   * Provides information on any Kubernetes access reviews (privilege checks)
+   * relevant to the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.AccessReview access_reviews = 6; + * + */ + java.util.List getAccessReviewsList(); + /** + * + * + *
+   * Provides information on any Kubernetes access reviews (privilege checks)
+   * relevant to the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.AccessReview access_reviews = 6; + * + */ + com.google.cloud.securitycenter.v2.Kubernetes.AccessReview getAccessReviews(int index); + /** + * + * + *
+   * Provides information on any Kubernetes access reviews (privilege checks)
+   * relevant to the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.AccessReview access_reviews = 6; + * + */ + int getAccessReviewsCount(); + /** + * + * + *
+   * Provides information on any Kubernetes access reviews (privilege checks)
+   * relevant to the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.AccessReview access_reviews = 6; + * + */ + java.util.List + getAccessReviewsOrBuilderList(); + /** + * + * + *
+   * Provides information on any Kubernetes access reviews (privilege checks)
+   * relevant to the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.AccessReview access_reviews = 6; + * + */ + com.google.cloud.securitycenter.v2.Kubernetes.AccessReviewOrBuilder getAccessReviewsOrBuilder( + int index); + + /** + * + * + *
+   * Kubernetes objects related to the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Object objects = 7; + */ + java.util.List getObjectsList(); + /** + * + * + *
+   * Kubernetes objects related to the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Object objects = 7; + */ + com.google.cloud.securitycenter.v2.Kubernetes.Object getObjects(int index); + /** + * + * + *
+   * Kubernetes objects related to the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Object objects = 7; + */ + int getObjectsCount(); + /** + * + * + *
+   * Kubernetes objects related to the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Object objects = 7; + */ + java.util.List + getObjectsOrBuilderList(); + /** + * + * + *
+   * Kubernetes objects related to the finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v2.Kubernetes.Object objects = 7; + */ + com.google.cloud.securitycenter.v2.Kubernetes.ObjectOrBuilder getObjectsOrBuilder(int index); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/KubernetesProto.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/KubernetesProto.java new file mode 100644 index 000000000000..08c5e19a3d25 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/KubernetesProto.java @@ -0,0 +1,226 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/kubernetes.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +public final class KubernetesProto { + private KubernetesProto() {} + + 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_v2_Kubernetes_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_Kubernetes_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v2_Kubernetes_Pod_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_Kubernetes_Pod_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v2_Kubernetes_Node_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_Kubernetes_Node_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v2_Kubernetes_NodePool_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_Kubernetes_NodePool_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v2_Kubernetes_Role_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_Kubernetes_Role_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v2_Kubernetes_Binding_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_Kubernetes_Binding_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v2_Kubernetes_Subject_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_Kubernetes_Subject_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v2_Kubernetes_AccessReview_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_Kubernetes_AccessReview_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v2_Kubernetes_Object_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v2_Kubernetes_Object_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n/google/cloud/securitycenter/v2/kuberne" + + "tes.proto\022\036google.cloud.securitycenter.v" + + "2\032.google/cloud/securitycenter/v2/contai" + + "ner.proto\032*google/cloud/securitycenter/v" + + "2/label.proto\"\202\014\n\nKubernetes\022<\n\004pods\030\001 \003" + + "(\0132..google.cloud.securitycenter.v2.Kube" + + "rnetes.Pod\022>\n\005nodes\030\002 \003(\0132/.google.cloud" + + ".securitycenter.v2.Kubernetes.Node\022G\n\nno" + + "de_pools\030\003 \003(\01323.google.cloud.securityce" + + "nter.v2.Kubernetes.NodePool\022>\n\005roles\030\004 \003" + + "(\0132/.google.cloud.securitycenter.v2.Kube" + + "rnetes.Role\022D\n\010bindings\030\005 \003(\01322.google.c" + + "loud.securitycenter.v2.Kubernetes.Bindin" + + "g\022O\n\016access_reviews\030\006 \003(\01327.google.cloud" + + ".securitycenter.v2.Kubernetes.AccessRevi" + + "ew\022B\n\007objects\030\007 \003(\01321.google.cloud.secur" + + "itycenter.v2.Kubernetes.Object\032\225\001\n\003Pod\022\n" + + "\n\002ns\030\001 \001(\t\022\014\n\004name\030\002 \001(\t\0225\n\006labels\030\003 \003(\013" + + "2%.google.cloud.securitycenter.v2.Label\022" + + "=\n\ncontainers\030\004 \003(\0132).google.cloud.secur" + + "itycenter.v2.Container\032\024\n\004Node\022\014\n\004name\030\001" + + " \001(\t\032X\n\010NodePool\022\014\n\004name\030\001 \001(\t\022>\n\005nodes\030" + + "\002 \003(\0132/.google.cloud.securitycenter.v2.K" + + "ubernetes.Node\032\236\001\n\004Role\022B\n\004kind\030\001 \001(\01624." + + "google.cloud.securitycenter.v2.Kubernete" + + "s.Role.Kind\022\n\n\002ns\030\002 \001(\t\022\014\n\004name\030\003 \001(\t\"8\n" + + "\004Kind\022\024\n\020KIND_UNSPECIFIED\020\000\022\010\n\004ROLE\020\001\022\020\n" + + "\014CLUSTER_ROLE\020\002\032\250\001\n\007Binding\022\n\n\002ns\030\001 \001(\t\022" + + "\014\n\004name\030\002 \001(\t\022=\n\004role\030\003 \001(\0132/.google.clo" + + "ud.securitycenter.v2.Kubernetes.Role\022D\n\010" + + "subjects\030\004 \003(\01322.google.cloud.securityce" + + "nter.v2.Kubernetes.Subject\032\276\001\n\007Subject\022I" + + "\n\004kind\030\001 \001(\0162;.google.cloud.securitycent" + + "er.v2.Kubernetes.Subject.AuthType\022\n\n\002ns\030" + + "\002 \001(\t\022\014\n\004name\030\003 \001(\t\"N\n\010AuthType\022\031\n\025AUTH_" + + "TYPE_UNSPECIFIED\020\000\022\010\n\004USER\020\001\022\022\n\016SERVICEA" + + "CCOUNT\020\002\022\t\n\005GROUP\020\003\032}\n\014AccessReview\022\r\n\005g" + + "roup\030\001 \001(\t\022\n\n\002ns\030\002 \001(\t\022\014\n\004name\030\003 \001(\t\022\020\n\010" + + "resource\030\004 \001(\t\022\023\n\013subresource\030\005 \001(\t\022\014\n\004v" + + "erb\030\006 \001(\t\022\017\n\007version\030\007 \001(\t\032~\n\006Object\022\r\n\005" + + "group\030\001 \001(\t\022\014\n\004kind\030\002 \001(\t\022\n\n\002ns\030\003 \001(\t\022\014\n" + + "\004name\030\004 \001(\t\022=\n\ncontainers\030\005 \003(\0132).google" + + ".cloud.securitycenter.v2.ContainerB\351\001\n\"c" + + "om.google.cloud.securitycenter.v2B\017Kuber" + + "netesProtoP\001ZJcloud.google.com/go/securi" + + "tycenter/apiv2/securitycenterpb;security" + + "centerpb\252\002\036Google.Cloud.SecurityCenter.V" + + "2\312\002\036Google\\Cloud\\SecurityCenter\\V2\352\002!Goo" + + "gle::Cloud::SecurityCenter::V2b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.cloud.securitycenter.v2.ContainerProto.getDescriptor(), + com.google.cloud.securitycenter.v2.LabelProto.getDescriptor(), + }); + internal_static_google_cloud_securitycenter_v2_Kubernetes_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_securitycenter_v2_Kubernetes_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_Kubernetes_descriptor, + new java.lang.String[] { + "Pods", "Nodes", "NodePools", "Roles", "Bindings", "AccessReviews", "Objects", + }); + internal_static_google_cloud_securitycenter_v2_Kubernetes_Pod_descriptor = + internal_static_google_cloud_securitycenter_v2_Kubernetes_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_securitycenter_v2_Kubernetes_Pod_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_Kubernetes_Pod_descriptor, + new java.lang.String[] { + "Ns", "Name", "Labels", "Containers", + }); + internal_static_google_cloud_securitycenter_v2_Kubernetes_Node_descriptor = + internal_static_google_cloud_securitycenter_v2_Kubernetes_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_securitycenter_v2_Kubernetes_Node_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_Kubernetes_Node_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_securitycenter_v2_Kubernetes_NodePool_descriptor = + internal_static_google_cloud_securitycenter_v2_Kubernetes_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_securitycenter_v2_Kubernetes_NodePool_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_Kubernetes_NodePool_descriptor, + new java.lang.String[] { + "Name", "Nodes", + }); + internal_static_google_cloud_securitycenter_v2_Kubernetes_Role_descriptor = + internal_static_google_cloud_securitycenter_v2_Kubernetes_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_securitycenter_v2_Kubernetes_Role_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_Kubernetes_Role_descriptor, + new java.lang.String[] { + "Kind", "Ns", "Name", + }); + internal_static_google_cloud_securitycenter_v2_Kubernetes_Binding_descriptor = + internal_static_google_cloud_securitycenter_v2_Kubernetes_descriptor + .getNestedTypes() + .get(4); + internal_static_google_cloud_securitycenter_v2_Kubernetes_Binding_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_Kubernetes_Binding_descriptor, + new java.lang.String[] { + "Ns", "Name", "Role", "Subjects", + }); + internal_static_google_cloud_securitycenter_v2_Kubernetes_Subject_descriptor = + internal_static_google_cloud_securitycenter_v2_Kubernetes_descriptor + .getNestedTypes() + .get(5); + internal_static_google_cloud_securitycenter_v2_Kubernetes_Subject_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_Kubernetes_Subject_descriptor, + new java.lang.String[] { + "Kind", "Ns", "Name", + }); + internal_static_google_cloud_securitycenter_v2_Kubernetes_AccessReview_descriptor = + internal_static_google_cloud_securitycenter_v2_Kubernetes_descriptor + .getNestedTypes() + .get(6); + internal_static_google_cloud_securitycenter_v2_Kubernetes_AccessReview_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_Kubernetes_AccessReview_descriptor, + new java.lang.String[] { + "Group", "Ns", "Name", "Resource", "Subresource", "Verb", "Version", + }); + internal_static_google_cloud_securitycenter_v2_Kubernetes_Object_descriptor = + internal_static_google_cloud_securitycenter_v2_Kubernetes_descriptor + .getNestedTypes() + .get(7); + internal_static_google_cloud_securitycenter_v2_Kubernetes_Object_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v2_Kubernetes_Object_descriptor, + new java.lang.String[] { + "Group", "Kind", "Ns", "Name", "Containers", + }); + com.google.cloud.securitycenter.v2.ContainerProto.getDescriptor(); + com.google.cloud.securitycenter.v2.LabelProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Label.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Label.java new file mode 100644 index 000000000000..8381097324b8 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/Label.java @@ -0,0 +1,811 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v2/label.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.securitycenter.v2; + +/** + * + * + *
+ * Represents a generic name-value label. A label has separate name and value
+ * fields to support filtering with the `contains()` function. For more
+ * information, see [Filtering on array-type
+ * fields](https://cloud.google.com/security-command-center/docs/how-to-api-list-findings#array-contains-filtering).
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Label} + */ +public final class Label extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.Label) + LabelOrBuilder { + private static final long serialVersionUID = 0L; + // Use Label.newBuilder() to construct. + private Label(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Label() { + name_ = ""; + value_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Label(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.LabelProto + .internal_static_google_cloud_securitycenter_v2_Label_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.LabelProto + .internal_static_google_cloud_securitycenter_v2_Label_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Label.class, + com.google.cloud.securitycenter.v2.Label.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Name of the label.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Name of the label.
+   * 
+ * + * 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 VALUE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object value_ = ""; + /** + * + * + *
+   * Value that corresponds to the label's name.
+   * 
+ * + * string value = 2; + * + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + 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(); + value_ = s; + return s; + } + } + /** + * + * + *
+   * Value that corresponds to the label's name.
+   * 
+ * + * string value = 2; + * + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = 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(value_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); + } + getUnknownFields().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(value_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); + } + size += getUnknownFields().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.v2.Label)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v2.Label other = (com.google.cloud.securitycenter.v2.Label) obj; + + if (!getName().equals(other.getName())) return false; + if (!getValue().equals(other.getValue())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v2.Label parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Label 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.v2.Label parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Label 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.v2.Label parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v2.Label parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v2.Label parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Label 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.v2.Label parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Label 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.v2.Label parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v2.Label 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.v2.Label 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; + } + /** + * + * + *
+   * Represents a generic name-value label. A label has separate name and value
+   * fields to support filtering with the `contains()` function. For more
+   * information, see [Filtering on array-type
+   * fields](https://cloud.google.com/security-command-center/docs/how-to-api-list-findings#array-contains-filtering).
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v2.Label} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.Label) + com.google.cloud.securitycenter.v2.LabelOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v2.LabelProto + .internal_static_google_cloud_securitycenter_v2_Label_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v2.LabelProto + .internal_static_google_cloud_securitycenter_v2_Label_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v2.Label.class, + com.google.cloud.securitycenter.v2.Label.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v2.Label.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + value_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v2.LabelProto + .internal_static_google_cloud_securitycenter_v2_Label_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Label getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v2.Label.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Label build() { + com.google.cloud.securitycenter.v2.Label result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v2.Label buildPartial() { + com.google.cloud.securitycenter.v2.Label result = + new com.google.cloud.securitycenter.v2.Label(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.securitycenter.v2.Label result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.value_ = value_; + } + } + + @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.v2.Label) { + return mergeFrom((com.google.cloud.securitycenter.v2.Label) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v2.Label other) { + if (other == com.google.cloud.securitycenter.v2.Label.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getValue().isEmpty()) { + value_ = other.value_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + value_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the label.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Name of the label.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Name of the label.
+     * 
+ * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the label.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the label.
+     * 
+ * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + /** + * + * + *
+     * Value that corresponds to the label's name.
+     * 
+ * + * string value = 2; + * + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Value that corresponds to the label's name.
+     * 
+ * + * string value = 2; + * + * @return The bytes for value. + */ + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Value that corresponds to the label's name.
+     * 
+ * + * string value = 2; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Value that corresponds to the label's name.
+     * 
+ * + * string value = 2; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + value_ = getDefaultInstance().getValue(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Value that corresponds to the label's name.
+     * 
+ * + * string value = 2; + * + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + value_ = value; + bitField0_ |= 0x00000002; + 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.v2.Label) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.Label) + private static final com.google.cloud.securitycenter.v2.Label DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.Label(); + } + + public static com.google.cloud.securitycenter.v2.Label getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser