diff --git a/google-api-grpc/grpc-google-cloud-securitycenter-v1/pom.xml b/google-api-grpc/grpc-google-cloud-securitycenter-v1/pom.xml
new file mode 100644
index 000000000000..00fd730790f3
--- /dev/null
+++ b/google-api-grpc/grpc-google-cloud-securitycenter-v1/pom.xml
@@ -0,0 +1,31 @@
+
+ * V1 APIs for Security Center service. + *+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.10.0)", + comments = "Source: google/cloud/securitycenter/v1/securitycenter_service.proto") +public final class SecurityCenterGrpc { + + private SecurityCenterGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.securitycenter.v1.SecurityCenter"; + + // Static method descriptors that strictly reflect the proto. + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getCreateSourceMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v1.CreateSourceRequest, + com.google.cloud.securitycenter.v1.Source> + METHOD_CREATE_SOURCE = getCreateSourceMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v1.CreateSourceRequest, + com.google.cloud.securitycenter.v1.Source> + getCreateSourceMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v1.CreateSourceRequest, + com.google.cloud.securitycenter.v1.Source> + getCreateSourceMethod() { + return getCreateSourceMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v1.CreateSourceRequest, + com.google.cloud.securitycenter.v1.Source> + getCreateSourceMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v1.CreateSourceRequest, + com.google.cloud.securitycenter.v1.Source> + getCreateSourceMethod; + if ((getCreateSourceMethod = SecurityCenterGrpc.getCreateSourceMethod) == null) { + synchronized (SecurityCenterGrpc.class) { + if ((getCreateSourceMethod = SecurityCenterGrpc.getCreateSourceMethod) == null) { + SecurityCenterGrpc.getCreateSourceMethod = + getCreateSourceMethod = + io.grpc.MethodDescriptor + .
+ * V1 APIs for Security Center service. + *+ */ + public abstract static class SecurityCenterImplBase implements io.grpc.BindableService { + + /** + * + * + *
+ * Creates a source. + *+ */ + public void createSource( + com.google.cloud.securitycenter.v1.CreateSourceRequest request, + io.grpc.stub.StreamObserver
+ * Creates a finding. The corresponding source must exist for finding creation + * to succeed. + *+ */ + public void createFinding( + com.google.cloud.securitycenter.v1.CreateFindingRequest request, + io.grpc.stub.StreamObserver
+ * Gets the access control policy on the specified Source. + *+ */ + public void getIamPolicy( + com.google.iam.v1.GetIamPolicyRequest request, + io.grpc.stub.StreamObserver
+ * Gets the settings for an organization. + *+ */ + public void getOrganizationSettings( + com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest request, + io.grpc.stub.StreamObserver
+ * Gets a source. + *+ */ + public void getSource( + com.google.cloud.securitycenter.v1.GetSourceRequest request, + io.grpc.stub.StreamObserver
+ * Filters an organization's assets and groups them by their specified + * properties. + *+ */ + public void groupAssets( + com.google.cloud.securitycenter.v1.GroupAssetsRequest request, + io.grpc.stub.StreamObserver
+ * Filters an organization or source's findings and groups them by their + * specified properties. + * To group across all sources provide a `-` as the source id. + * Example: /v1/organizations/123/sources/-/findings + *+ */ + public void groupFindings( + com.google.cloud.securitycenter.v1.GroupFindingsRequest request, + io.grpc.stub.StreamObserver
+ * Lists an organization's assets. + *+ */ + public void listAssets( + com.google.cloud.securitycenter.v1.ListAssetsRequest request, + io.grpc.stub.StreamObserver
+ * Lists an organization or source's findings. + * To list across all sources provide a `-` as the source id. + * Example: /v1/organizations/123/sources/-/findings + *+ */ + public void listFindings( + com.google.cloud.securitycenter.v1.ListFindingsRequest request, + io.grpc.stub.StreamObserver
+ * Lists all sources belonging to an organization. + *+ */ + public void listSources( + com.google.cloud.securitycenter.v1.ListSourcesRequest request, + io.grpc.stub.StreamObserver
+ * Runs asset discovery. The discovery is tracked with a long-running + * operation. + * This API can only be called with limited frequency for an organization. If + * it is called too frequently the caller will receive a TOO_MANY_REQUESTS + * error. + *+ */ + public void runAssetDiscovery( + com.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest request, + io.grpc.stub.StreamObserver
+ * Updates the state of a finding. + *+ */ + public void setFindingState( + com.google.cloud.securitycenter.v1.SetFindingStateRequest request, + io.grpc.stub.StreamObserver
+ * Sets the access control policy on the specified Source. + *+ */ + public void setIamPolicy( + com.google.iam.v1.SetIamPolicyRequest request, + io.grpc.stub.StreamObserver
+ * Returns the permissions that a caller has on the specified source. + *+ */ + public void testIamPermissions( + com.google.iam.v1.TestIamPermissionsRequest request, + io.grpc.stub.StreamObserver
+ * Creates or updates a finding. The corresponding source must exist for a + * finding creation to succeed. + *+ */ + public void updateFinding( + com.google.cloud.securitycenter.v1.UpdateFindingRequest request, + io.grpc.stub.StreamObserver
+ * Updates an organization's settings. + *+ */ + public void updateOrganizationSettings( + com.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest request, + io.grpc.stub.StreamObserver
+ * Updates a source. + *+ */ + public void updateSource( + com.google.cloud.securitycenter.v1.UpdateSourceRequest request, + io.grpc.stub.StreamObserver
+ * Updates security marks. + *+ */ + public void updateSecurityMarks( + com.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest request, + io.grpc.stub.StreamObserver
+ * V1 APIs for Security Center service. + *+ */ + public static final class SecurityCenterStub + extends io.grpc.stub.AbstractStub
+ * Creates a source. + *+ */ + public void createSource( + com.google.cloud.securitycenter.v1.CreateSourceRequest request, + io.grpc.stub.StreamObserver
+ * Creates a finding. The corresponding source must exist for finding creation + * to succeed. + *+ */ + public void createFinding( + com.google.cloud.securitycenter.v1.CreateFindingRequest request, + io.grpc.stub.StreamObserver
+ * Gets the access control policy on the specified Source. + *+ */ + public void getIamPolicy( + com.google.iam.v1.GetIamPolicyRequest request, + io.grpc.stub.StreamObserver
+ * Gets the settings for an organization. + *+ */ + public void getOrganizationSettings( + com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest request, + io.grpc.stub.StreamObserver
+ * Gets a source. + *+ */ + public void getSource( + com.google.cloud.securitycenter.v1.GetSourceRequest request, + io.grpc.stub.StreamObserver
+ * Filters an organization's assets and groups them by their specified + * properties. + *+ */ + public void groupAssets( + com.google.cloud.securitycenter.v1.GroupAssetsRequest request, + io.grpc.stub.StreamObserver
+ * Filters an organization or source's findings and groups them by their + * specified properties. + * To group across all sources provide a `-` as the source id. + * Example: /v1/organizations/123/sources/-/findings + *+ */ + public void groupFindings( + com.google.cloud.securitycenter.v1.GroupFindingsRequest request, + io.grpc.stub.StreamObserver
+ * Lists an organization's assets. + *+ */ + public void listAssets( + com.google.cloud.securitycenter.v1.ListAssetsRequest request, + io.grpc.stub.StreamObserver
+ * Lists an organization or source's findings. + * To list across all sources provide a `-` as the source id. + * Example: /v1/organizations/123/sources/-/findings + *+ */ + public void listFindings( + com.google.cloud.securitycenter.v1.ListFindingsRequest request, + io.grpc.stub.StreamObserver
+ * Lists all sources belonging to an organization. + *+ */ + public void listSources( + com.google.cloud.securitycenter.v1.ListSourcesRequest request, + io.grpc.stub.StreamObserver
+ * Runs asset discovery. The discovery is tracked with a long-running + * operation. + * This API can only be called with limited frequency for an organization. If + * it is called too frequently the caller will receive a TOO_MANY_REQUESTS + * error. + *+ */ + public void runAssetDiscovery( + com.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest request, + io.grpc.stub.StreamObserver
+ * Updates the state of a finding. + *+ */ + public void setFindingState( + com.google.cloud.securitycenter.v1.SetFindingStateRequest request, + io.grpc.stub.StreamObserver
+ * Sets the access control policy on the specified Source. + *+ */ + public void setIamPolicy( + com.google.iam.v1.SetIamPolicyRequest request, + io.grpc.stub.StreamObserver
+ * Returns the permissions that a caller has on the specified source. + *+ */ + public void testIamPermissions( + com.google.iam.v1.TestIamPermissionsRequest request, + io.grpc.stub.StreamObserver
+ * Creates or updates a finding. The corresponding source must exist for a + * finding creation to succeed. + *+ */ + public void updateFinding( + com.google.cloud.securitycenter.v1.UpdateFindingRequest request, + io.grpc.stub.StreamObserver
+ * Updates an organization's settings. + *+ */ + public void updateOrganizationSettings( + com.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest request, + io.grpc.stub.StreamObserver
+ * Updates a source. + *+ */ + public void updateSource( + com.google.cloud.securitycenter.v1.UpdateSourceRequest request, + io.grpc.stub.StreamObserver
+ * Updates security marks. + *+ */ + public void updateSecurityMarks( + com.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest request, + io.grpc.stub.StreamObserver
+ * V1 APIs for Security Center service. + *+ */ + public static final class SecurityCenterBlockingStub + extends io.grpc.stub.AbstractStub
+ * Creates a source. + *+ */ + public com.google.cloud.securitycenter.v1.Source createSource( + com.google.cloud.securitycenter.v1.CreateSourceRequest request) { + return blockingUnaryCall( + getChannel(), getCreateSourceMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Creates a finding. The corresponding source must exist for finding creation + * to succeed. + *+ */ + public com.google.cloud.securitycenter.v1.Finding createFinding( + com.google.cloud.securitycenter.v1.CreateFindingRequest request) { + return blockingUnaryCall( + getChannel(), getCreateFindingMethodHelper(), 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 blockingUnaryCall( + getChannel(), getGetIamPolicyMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Gets the settings for an organization. + *+ */ + public com.google.cloud.securitycenter.v1.OrganizationSettings getOrganizationSettings( + com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest request) { + return blockingUnaryCall( + getChannel(), getGetOrganizationSettingsMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Gets a source. + *+ */ + public com.google.cloud.securitycenter.v1.Source getSource( + com.google.cloud.securitycenter.v1.GetSourceRequest request) { + return blockingUnaryCall(getChannel(), getGetSourceMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Filters an organization's assets and groups them by their specified + * properties. + *+ */ + public com.google.cloud.securitycenter.v1.GroupAssetsResponse groupAssets( + com.google.cloud.securitycenter.v1.GroupAssetsRequest request) { + return blockingUnaryCall( + getChannel(), getGroupAssetsMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Filters an organization or source's findings and groups them by their + * specified properties. + * To group across all sources provide a `-` as the source id. + * Example: /v1/organizations/123/sources/-/findings + *+ */ + public com.google.cloud.securitycenter.v1.GroupFindingsResponse groupFindings( + com.google.cloud.securitycenter.v1.GroupFindingsRequest request) { + return blockingUnaryCall( + getChannel(), getGroupFindingsMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Lists an organization's assets. + *+ */ + public com.google.cloud.securitycenter.v1.ListAssetsResponse listAssets( + com.google.cloud.securitycenter.v1.ListAssetsRequest request) { + return blockingUnaryCall( + getChannel(), getListAssetsMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Lists an organization or source's findings. + * To list across all sources provide a `-` as the source id. + * Example: /v1/organizations/123/sources/-/findings + *+ */ + public com.google.cloud.securitycenter.v1.ListFindingsResponse listFindings( + com.google.cloud.securitycenter.v1.ListFindingsRequest request) { + return blockingUnaryCall( + getChannel(), getListFindingsMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Lists all sources belonging to an organization. + *+ */ + public com.google.cloud.securitycenter.v1.ListSourcesResponse listSources( + com.google.cloud.securitycenter.v1.ListSourcesRequest request) { + return blockingUnaryCall( + getChannel(), getListSourcesMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Runs asset discovery. The discovery is tracked with a long-running + * operation. + * This API can only be called with limited frequency for an organization. If + * it is called too frequently the caller will receive a TOO_MANY_REQUESTS + * error. + *+ */ + public com.google.longrunning.Operation runAssetDiscovery( + com.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest request) { + return blockingUnaryCall( + getChannel(), getRunAssetDiscoveryMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Updates the state of a finding. + *+ */ + public com.google.cloud.securitycenter.v1.Finding setFindingState( + com.google.cloud.securitycenter.v1.SetFindingStateRequest request) { + return blockingUnaryCall( + getChannel(), getSetFindingStateMethodHelper(), 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 blockingUnaryCall( + getChannel(), getSetIamPolicyMethodHelper(), 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 blockingUnaryCall( + getChannel(), getTestIamPermissionsMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Creates or updates a finding. The corresponding source must exist for a + * finding creation to succeed. + *+ */ + public com.google.cloud.securitycenter.v1.Finding updateFinding( + com.google.cloud.securitycenter.v1.UpdateFindingRequest request) { + return blockingUnaryCall( + getChannel(), getUpdateFindingMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Updates an organization's settings. + *+ */ + public com.google.cloud.securitycenter.v1.OrganizationSettings updateOrganizationSettings( + com.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest request) { + return blockingUnaryCall( + getChannel(), getUpdateOrganizationSettingsMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Updates a source. + *+ */ + public com.google.cloud.securitycenter.v1.Source updateSource( + com.google.cloud.securitycenter.v1.UpdateSourceRequest request) { + return blockingUnaryCall( + getChannel(), getUpdateSourceMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Updates security marks. + *+ */ + public com.google.cloud.securitycenter.v1.SecurityMarks updateSecurityMarks( + com.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest request) { + return blockingUnaryCall( + getChannel(), getUpdateSecurityMarksMethodHelper(), getCallOptions(), request); + } + } + + /** + * + * + *
+ * V1 APIs for Security Center service. + *+ */ + public static final class SecurityCenterFutureStub + extends io.grpc.stub.AbstractStub
+ * Creates a source. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v1.Source> + createSource(com.google.cloud.securitycenter.v1.CreateSourceRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateSourceMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Creates a finding. The corresponding source must exist for finding creation + * to succeed. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v1.Finding> + createFinding(com.google.cloud.securitycenter.v1.CreateFindingRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateFindingMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Gets the access control policy on the specified Source. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Gets the settings for an organization. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v1.OrganizationSettings> + getOrganizationSettings( + com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetOrganizationSettingsMethodHelper(), getCallOptions()), + request); + } + + /** + * + * + *
+ * Gets a source. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v1.Source> + getSource(com.google.cloud.securitycenter.v1.GetSourceRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetSourceMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Filters an organization's assets and groups them by their specified + * properties. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v1.GroupAssetsResponse> + groupAssets(com.google.cloud.securitycenter.v1.GroupAssetsRequest request) { + return futureUnaryCall( + getChannel().newCall(getGroupAssetsMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Filters an organization or source's findings and groups them by their + * specified properties. + * To group across all sources provide a `-` as the source id. + * Example: /v1/organizations/123/sources/-/findings + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v1.GroupFindingsResponse> + groupFindings(com.google.cloud.securitycenter.v1.GroupFindingsRequest request) { + return futureUnaryCall( + getChannel().newCall(getGroupFindingsMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Lists an organization's assets. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v1.ListAssetsResponse> + listAssets(com.google.cloud.securitycenter.v1.ListAssetsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListAssetsMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Lists an organization or source's findings. + * To list across all sources provide a `-` as the source id. + * Example: /v1/organizations/123/sources/-/findings + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v1.ListFindingsResponse> + listFindings(com.google.cloud.securitycenter.v1.ListFindingsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListFindingsMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Lists all sources belonging to an organization. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v1.ListSourcesResponse> + listSources(com.google.cloud.securitycenter.v1.ListSourcesRequest request) { + return futureUnaryCall( + getChannel().newCall(getListSourcesMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Runs asset discovery. The discovery is tracked with a long-running + * operation. + * This API can only be called with limited frequency for an organization. If + * it is called too frequently the caller will receive a TOO_MANY_REQUESTS + * error. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Updates the state of a finding. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v1.Finding> + setFindingState(com.google.cloud.securitycenter.v1.SetFindingStateRequest request) { + return futureUnaryCall( + getChannel().newCall(getSetFindingStateMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Sets the access control policy on the specified Source. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * 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 futureUnaryCall( + getChannel().newCall(getTestIamPermissionsMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Creates or updates a finding. The corresponding source must exist for a + * finding creation to succeed. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v1.Finding> + updateFinding(com.google.cloud.securitycenter.v1.UpdateFindingRequest request) { + return futureUnaryCall( + getChannel().newCall(getUpdateFindingMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Updates an organization's settings. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v1.OrganizationSettings> + updateOrganizationSettings( + com.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest request) { + return futureUnaryCall( + getChannel().newCall(getUpdateOrganizationSettingsMethodHelper(), getCallOptions()), + request); + } + + /** + * + * + *
+ * Updates a source. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v1.Source> + updateSource(com.google.cloud.securitycenter.v1.UpdateSourceRequest request) { + return futureUnaryCall( + getChannel().newCall(getUpdateSourceMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Updates security marks. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v1.SecurityMarks> + updateSecurityMarks(com.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest request) { + return futureUnaryCall( + getChannel().newCall(getUpdateSecurityMarksMethodHelper(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_SOURCE = 0; + private static final int METHODID_CREATE_FINDING = 1; + private static final int METHODID_GET_IAM_POLICY = 2; + private static final int METHODID_GET_ORGANIZATION_SETTINGS = 3; + private static final int METHODID_GET_SOURCE = 4; + private static final int METHODID_GROUP_ASSETS = 5; + private static final int METHODID_GROUP_FINDINGS = 6; + private static final int METHODID_LIST_ASSETS = 7; + private static final int METHODID_LIST_FINDINGS = 8; + private static final int METHODID_LIST_SOURCES = 9; + private static final int METHODID_RUN_ASSET_DISCOVERY = 10; + private static final int METHODID_SET_FINDING_STATE = 11; + private static final int METHODID_SET_IAM_POLICY = 12; + private static final int METHODID_TEST_IAM_PERMISSIONS = 13; + private static final int METHODID_UPDATE_FINDING = 14; + private static final int METHODID_UPDATE_ORGANIZATION_SETTINGS = 15; + private static final int METHODID_UPDATE_SOURCE = 16; + private static final int METHODID_UPDATE_SECURITY_MARKS = 17; + + private static final class MethodHandlers
+ * Cloud Security Command Center's (Cloud SCC) representation of a Google Cloud + * Platform (GCP) resource. + * The Asset is a Cloud SCC resource that captures information about a single + * GCP resource. All modifications to an Asset are only within the context of + * Cloud SCC and don't affect the referenced GCP resource. + *+ * + * Protobuf type {@code google.cloud.securitycenter.v1.Asset} + */ +public final class Asset extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Asset) + AssetOrBuilder { + private static final long serialVersionUID = 0L; + // Use Asset.newBuilder() to construct. + private Asset(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private Asset() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Asset( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.Builder subBuilder = + null; + if (securityCenterProperties_ != null) { + subBuilder = securityCenterProperties_.toBuilder(); + } + securityCenterProperties_ = + input.readMessage( + com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(securityCenterProperties_); + securityCenterProperties_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + resourceProperties_ = + com.google.protobuf.MapField.newMapField( + ResourcePropertiesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000004; + } + com.google.protobuf.MapEntry
+ * The full resource name of the GCP resource this asset + * represents. This field is immutable after create time. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + *+ * + *
string resource_name = 1;
+ */
+ java.lang.String getResourceName();
+ /**
+ *
+ *
+ * + * The full resource name of the GCP resource this asset + * represents. This field is immutable after create time. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + *+ * + *
string resource_name = 1;
+ */
+ com.google.protobuf.ByteString getResourceNameBytes();
+
+ /**
+ *
+ *
+ * + * The type of the GCP resource. Examples include: APPLICATION, + * PROJECT, and ORGANIZATION. This is a case insensitive field defined by + * Cloud SCC and/or the producer of the resource and is immutable + * after create time. + *+ * + *
string resource_type = 2;
+ */
+ java.lang.String getResourceType();
+ /**
+ *
+ *
+ * + * The type of the GCP resource. Examples include: APPLICATION, + * PROJECT, and ORGANIZATION. This is a case insensitive field defined by + * Cloud SCC and/or the producer of the resource and is immutable + * after create time. + *+ * + *
string resource_type = 2;
+ */
+ com.google.protobuf.ByteString getResourceTypeBytes();
+
+ /**
+ *
+ *
+ * + * The full resource name of the immediate parent of the resource. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + *+ * + *
string resource_parent = 3;
+ */
+ java.lang.String getResourceParent();
+ /**
+ *
+ *
+ * + * The full resource name of the immediate parent of the resource. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + *+ * + *
string resource_parent = 3;
+ */
+ com.google.protobuf.ByteString getResourceParentBytes();
+
+ /**
+ *
+ *
+ * + * The full resource name of the project the resource belongs to. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + *+ * + *
string resource_project = 4;
+ */
+ java.lang.String getResourceProject();
+ /**
+ *
+ *
+ * + * The full resource name of the project the resource belongs to. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + *+ * + *
string resource_project = 4;
+ */
+ com.google.protobuf.ByteString getResourceProjectBytes();
+
+ /**
+ *
+ *
+ * + * Owners of the Google Cloud resource. + *+ * + *
repeated string resource_owners = 5;
+ */
+ java.util.List+ * Owners of the Google Cloud resource. + *+ * + *
repeated string resource_owners = 5;
+ */
+ int getResourceOwnersCount();
+ /**
+ *
+ *
+ * + * Owners of the Google Cloud resource. + *+ * + *
repeated string resource_owners = 5;
+ */
+ java.lang.String getResourceOwners(int index);
+ /**
+ *
+ *
+ * + * Owners of the Google Cloud resource. + *+ * + *
repeated string resource_owners = 5;
+ */
+ com.google.protobuf.ByteString getResourceOwnersBytes(int index);
+ }
+ /**
+ *
+ *
+ * + * Cloud SCC managed properties. These properties are managed by Cloud SCC and + * cannot be modified by the user. + *+ * + * Protobuf type {@code google.cloud.securitycenter.v1.Asset.SecurityCenterProperties} + */ + public static final class SecurityCenterProperties extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Asset.SecurityCenterProperties) + SecurityCenterPropertiesOrBuilder { + private static final long serialVersionUID = 0L; + // Use SecurityCenterProperties.newBuilder() to construct. + private SecurityCenterProperties(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private SecurityCenterProperties() { + resourceName_ = ""; + resourceType_ = ""; + resourceParent_ = ""; + resourceProject_ = ""; + resourceOwners_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SecurityCenterProperties( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + resourceName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + resourceType_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + resourceParent_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + resourceProject_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + resourceOwners_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000010; + } + resourceOwners_.add(s); + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + resourceOwners_ = resourceOwners_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.AssetOuterClass + .internal_static_google_cloud_securitycenter_v1_Asset_SecurityCenterProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.AssetOuterClass + .internal_static_google_cloud_securitycenter_v1_Asset_SecurityCenterProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.class, + com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.Builder.class); + } + + private int bitField0_; + public static final int RESOURCE_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object resourceName_; + /** + * + * + *
+ * The full resource name of the GCP resource this asset + * represents. This field is immutable after create time. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + *+ * + *
string resource_name = 1;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * The full resource name of the GCP resource this asset + * represents. This field is immutable after create time. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + *+ * + *
string resource_name = 1;
+ */
+ 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 RESOURCE_TYPE_FIELD_NUMBER = 2;
+ private volatile java.lang.Object resourceType_;
+ /**
+ *
+ *
+ * + * The type of the GCP resource. Examples include: APPLICATION, + * PROJECT, and ORGANIZATION. This is a case insensitive field defined by + * Cloud SCC and/or the producer of the resource and is immutable + * after create time. + *+ * + *
string resource_type = 2;
+ */
+ 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 type of the GCP resource. Examples include: APPLICATION, + * PROJECT, and ORGANIZATION. This is a case insensitive field defined by + * Cloud SCC and/or the producer of the resource and is immutable + * after create time. + *+ * + *
string resource_type = 2;
+ */
+ 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 RESOURCE_PARENT_FIELD_NUMBER = 3;
+ private volatile java.lang.Object resourceParent_;
+ /**
+ *
+ *
+ * + * The full resource name of the immediate parent of the resource. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + *+ * + *
string resource_parent = 3;
+ */
+ public java.lang.String getResourceParent() {
+ java.lang.Object ref = resourceParent_;
+ 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();
+ resourceParent_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The full resource name of the immediate parent of the resource. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + *+ * + *
string resource_parent = 3;
+ */
+ public com.google.protobuf.ByteString getResourceParentBytes() {
+ java.lang.Object ref = resourceParent_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ resourceParent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int RESOURCE_PROJECT_FIELD_NUMBER = 4;
+ private volatile java.lang.Object resourceProject_;
+ /**
+ *
+ *
+ * + * The full resource name of the project the resource belongs to. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + *+ * + *
string resource_project = 4;
+ */
+ public java.lang.String getResourceProject() {
+ java.lang.Object ref = resourceProject_;
+ 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();
+ resourceProject_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The full resource name of the project the resource belongs to. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + *+ * + *
string resource_project = 4;
+ */
+ public com.google.protobuf.ByteString getResourceProjectBytes() {
+ java.lang.Object ref = resourceProject_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ resourceProject_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int RESOURCE_OWNERS_FIELD_NUMBER = 5;
+ private com.google.protobuf.LazyStringList resourceOwners_;
+ /**
+ *
+ *
+ * + * Owners of the Google Cloud resource. + *+ * + *
repeated string resource_owners = 5;
+ */
+ public com.google.protobuf.ProtocolStringList getResourceOwnersList() {
+ return resourceOwners_;
+ }
+ /**
+ *
+ *
+ * + * Owners of the Google Cloud resource. + *+ * + *
repeated string resource_owners = 5;
+ */
+ public int getResourceOwnersCount() {
+ return resourceOwners_.size();
+ }
+ /**
+ *
+ *
+ * + * Owners of the Google Cloud resource. + *+ * + *
repeated string resource_owners = 5;
+ */
+ public java.lang.String getResourceOwners(int index) {
+ return resourceOwners_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Owners of the Google Cloud resource. + *+ * + *
repeated string resource_owners = 5;
+ */
+ public com.google.protobuf.ByteString getResourceOwnersBytes(int index) {
+ return resourceOwners_.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 (!getResourceNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resourceName_);
+ }
+ if (!getResourceTypeBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceType_);
+ }
+ if (!getResourceParentBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, resourceParent_);
+ }
+ if (!getResourceProjectBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, resourceProject_);
+ }
+ for (int i = 0; i < resourceOwners_.size(); i++) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 5, resourceOwners_.getRaw(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getResourceNameBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resourceName_);
+ }
+ if (!getResourceTypeBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceType_);
+ }
+ if (!getResourceParentBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, resourceParent_);
+ }
+ if (!getResourceProjectBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, resourceProject_);
+ }
+ {
+ int dataSize = 0;
+ for (int i = 0; i < resourceOwners_.size(); i++) {
+ dataSize += computeStringSizeNoTag(resourceOwners_.getRaw(i));
+ }
+ size += dataSize;
+ size += 1 * getResourceOwnersList().size();
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties other =
+ (com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties) obj;
+
+ boolean result = true;
+ result = result && getResourceName().equals(other.getResourceName());
+ result = result && getResourceType().equals(other.getResourceType());
+ result = result && getResourceParent().equals(other.getResourceParent());
+ result = result && getResourceProject().equals(other.getResourceProject());
+ result = result && getResourceOwnersList().equals(other.getResourceOwnersList());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + RESOURCE_NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getResourceName().hashCode();
+ hash = (37 * hash) + RESOURCE_TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + getResourceType().hashCode();
+ hash = (37 * hash) + RESOURCE_PARENT_FIELD_NUMBER;
+ hash = (53 * hash) + getResourceParent().hashCode();
+ hash = (37 * hash) + RESOURCE_PROJECT_FIELD_NUMBER;
+ hash = (53 * hash) + getResourceProject().hashCode();
+ if (getResourceOwnersCount() > 0) {
+ hash = (37 * hash) + RESOURCE_OWNERS_FIELD_NUMBER;
+ hash = (53 * hash) + getResourceOwnersList().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties parseFrom(
+ byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties
+ parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties 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;
+ }
+ /**
+ *
+ *
+ * + * Cloud SCC managed properties. These properties are managed by Cloud SCC and + * cannot be modified by the user. + *+ * + * Protobuf type {@code google.cloud.securitycenter.v1.Asset.SecurityCenterProperties} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The full resource name of the GCP resource this asset + * represents. This field is immutable after create time. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + *+ * + *
string resource_name = 1;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * The full resource name of the GCP resource this asset + * represents. This field is immutable after create time. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + *+ * + *
string resource_name = 1;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * The full resource name of the GCP resource this asset + * represents. This field is immutable after create time. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + *+ * + *
string resource_name = 1;
+ */
+ public Builder setResourceName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ resourceName_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The full resource name of the GCP resource this asset + * represents. This field is immutable after create time. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + *+ * + *
string resource_name = 1;
+ */
+ public Builder clearResourceName() {
+
+ resourceName_ = getDefaultInstance().getResourceName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The full resource name of the GCP resource this asset + * represents. This field is immutable after create time. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + *+ * + *
string resource_name = 1;
+ */
+ public Builder setResourceNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ resourceName_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object resourceType_ = "";
+ /**
+ *
+ *
+ * + * The type of the GCP resource. Examples include: APPLICATION, + * PROJECT, and ORGANIZATION. This is a case insensitive field defined by + * Cloud SCC and/or the producer of the resource and is immutable + * after create time. + *+ * + *
string resource_type = 2;
+ */
+ 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 type of the GCP resource. Examples include: APPLICATION, + * PROJECT, and ORGANIZATION. This is a case insensitive field defined by + * Cloud SCC and/or the producer of the resource and is immutable + * after create time. + *+ * + *
string resource_type = 2;
+ */
+ 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 type of the GCP resource. Examples include: APPLICATION, + * PROJECT, and ORGANIZATION. This is a case insensitive field defined by + * Cloud SCC and/or the producer of the resource and is immutable + * after create time. + *+ * + *
string resource_type = 2;
+ */
+ public Builder setResourceType(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ resourceType_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The type of the GCP resource. Examples include: APPLICATION, + * PROJECT, and ORGANIZATION. This is a case insensitive field defined by + * Cloud SCC and/or the producer of the resource and is immutable + * after create time. + *+ * + *
string resource_type = 2;
+ */
+ public Builder clearResourceType() {
+
+ resourceType_ = getDefaultInstance().getResourceType();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The type of the GCP resource. Examples include: APPLICATION, + * PROJECT, and ORGANIZATION. This is a case insensitive field defined by + * Cloud SCC and/or the producer of the resource and is immutable + * after create time. + *+ * + *
string resource_type = 2;
+ */
+ public Builder setResourceTypeBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ resourceType_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object resourceParent_ = "";
+ /**
+ *
+ *
+ * + * The full resource name of the immediate parent of the resource. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + *+ * + *
string resource_parent = 3;
+ */
+ public java.lang.String getResourceParent() {
+ java.lang.Object ref = resourceParent_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ resourceParent_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The full resource name of the immediate parent of the resource. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + *+ * + *
string resource_parent = 3;
+ */
+ public com.google.protobuf.ByteString getResourceParentBytes() {
+ java.lang.Object ref = resourceParent_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ resourceParent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The full resource name of the immediate parent of the resource. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + *+ * + *
string resource_parent = 3;
+ */
+ public Builder setResourceParent(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ resourceParent_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The full resource name of the immediate parent of the resource. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + *+ * + *
string resource_parent = 3;
+ */
+ public Builder clearResourceParent() {
+
+ resourceParent_ = getDefaultInstance().getResourceParent();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The full resource name of the immediate parent of the resource. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + *+ * + *
string resource_parent = 3;
+ */
+ public Builder setResourceParentBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ resourceParent_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object resourceProject_ = "";
+ /**
+ *
+ *
+ * + * The full resource name of the project the resource belongs to. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + *+ * + *
string resource_project = 4;
+ */
+ public java.lang.String getResourceProject() {
+ java.lang.Object ref = resourceProject_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ resourceProject_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The full resource name of the project the resource belongs to. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + *+ * + *
string resource_project = 4;
+ */
+ public com.google.protobuf.ByteString getResourceProjectBytes() {
+ java.lang.Object ref = resourceProject_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ resourceProject_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The full resource name of the project the resource belongs to. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + *+ * + *
string resource_project = 4;
+ */
+ public Builder setResourceProject(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ resourceProject_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The full resource name of the project the resource belongs to. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + *+ * + *
string resource_project = 4;
+ */
+ public Builder clearResourceProject() {
+
+ resourceProject_ = getDefaultInstance().getResourceProject();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The full resource name of the project the resource belongs to. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + *+ * + *
string resource_project = 4;
+ */
+ public Builder setResourceProjectBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ resourceProject_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.LazyStringList resourceOwners_ =
+ com.google.protobuf.LazyStringArrayList.EMPTY;
+
+ private void ensureResourceOwnersIsMutable() {
+ if (!((bitField0_ & 0x00000010) == 0x00000010)) {
+ resourceOwners_ = new com.google.protobuf.LazyStringArrayList(resourceOwners_);
+ bitField0_ |= 0x00000010;
+ }
+ }
+ /**
+ *
+ *
+ * + * Owners of the Google Cloud resource. + *+ * + *
repeated string resource_owners = 5;
+ */
+ public com.google.protobuf.ProtocolStringList getResourceOwnersList() {
+ return resourceOwners_.getUnmodifiableView();
+ }
+ /**
+ *
+ *
+ * + * Owners of the Google Cloud resource. + *+ * + *
repeated string resource_owners = 5;
+ */
+ public int getResourceOwnersCount() {
+ return resourceOwners_.size();
+ }
+ /**
+ *
+ *
+ * + * Owners of the Google Cloud resource. + *+ * + *
repeated string resource_owners = 5;
+ */
+ public java.lang.String getResourceOwners(int index) {
+ return resourceOwners_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Owners of the Google Cloud resource. + *+ * + *
repeated string resource_owners = 5;
+ */
+ public com.google.protobuf.ByteString getResourceOwnersBytes(int index) {
+ return resourceOwners_.getByteString(index);
+ }
+ /**
+ *
+ *
+ * + * Owners of the Google Cloud resource. + *+ * + *
repeated string resource_owners = 5;
+ */
+ public Builder setResourceOwners(int index, java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResourceOwnersIsMutable();
+ resourceOwners_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Owners of the Google Cloud resource. + *+ * + *
repeated string resource_owners = 5;
+ */
+ public Builder addResourceOwners(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResourceOwnersIsMutable();
+ resourceOwners_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Owners of the Google Cloud resource. + *+ * + *
repeated string resource_owners = 5;
+ */
+ public Builder addAllResourceOwners(java.lang.Iterable+ * Owners of the Google Cloud resource. + *+ * + *
repeated string resource_owners = 5;
+ */
+ public Builder clearResourceOwners() {
+ resourceOwners_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ bitField0_ = (bitField0_ & ~0x00000010);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Owners of the Google Cloud resource. + *+ * + *
repeated string resource_owners = 5;
+ */
+ public Builder addResourceOwnersBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ ensureResourceOwnersIsMutable();
+ resourceOwners_.add(value);
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Asset.SecurityCenterProperties)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Asset.SecurityCenterProperties)
+ private static final com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties();
+ }
+
+ public static com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The JSON representation of the Policy associated with the asset. + * See https://cloud.google.com/iam/reference/rest/v1/Policy for format + * details. + *+ * + *
string policy_blob = 1;
+ */
+ java.lang.String getPolicyBlob();
+ /**
+ *
+ *
+ * + * The JSON representation of the Policy associated with the asset. + * See https://cloud.google.com/iam/reference/rest/v1/Policy for format + * details. + *+ * + *
string policy_blob = 1;
+ */
+ com.google.protobuf.ByteString getPolicyBlobBytes();
+ }
+ /**
+ *
+ *
+ * + * IAM Policy information associated with the GCP resource described by the + * Cloud SCC asset. This information is managed and defined by the GCP + * resource and cannot be modified by the user. + *+ * + * Protobuf type {@code google.cloud.securitycenter.v1.Asset.IamPolicy} + */ + public static final class IamPolicy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Asset.IamPolicy) + IamPolicyOrBuilder { + private static final long serialVersionUID = 0L; + // Use IamPolicy.newBuilder() to construct. + private IamPolicy(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private IamPolicy() { + policyBlob_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private IamPolicy( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + policyBlob_ = s; + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.AssetOuterClass + .internal_static_google_cloud_securitycenter_v1_Asset_IamPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.AssetOuterClass + .internal_static_google_cloud_securitycenter_v1_Asset_IamPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.Asset.IamPolicy.class, + com.google.cloud.securitycenter.v1.Asset.IamPolicy.Builder.class); + } + + public static final int POLICY_BLOB_FIELD_NUMBER = 1; + private volatile java.lang.Object policyBlob_; + /** + * + * + *
+ * The JSON representation of the Policy associated with the asset. + * See https://cloud.google.com/iam/reference/rest/v1/Policy for format + * details. + *+ * + *
string policy_blob = 1;
+ */
+ public java.lang.String getPolicyBlob() {
+ java.lang.Object ref = policyBlob_;
+ 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();
+ policyBlob_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The JSON representation of the Policy associated with the asset. + * See https://cloud.google.com/iam/reference/rest/v1/Policy for format + * details. + *+ * + *
string policy_blob = 1;
+ */
+ public com.google.protobuf.ByteString getPolicyBlobBytes() {
+ java.lang.Object ref = policyBlob_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ policyBlob_ = 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 (!getPolicyBlobBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, policyBlob_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getPolicyBlobBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, policyBlob_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.securitycenter.v1.Asset.IamPolicy)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.securitycenter.v1.Asset.IamPolicy other =
+ (com.google.cloud.securitycenter.v1.Asset.IamPolicy) obj;
+
+ boolean result = true;
+ result = result && getPolicyBlob().equals(other.getPolicyBlob());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + POLICY_BLOB_FIELD_NUMBER;
+ hash = (53 * hash) + getPolicyBlob().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.securitycenter.v1.Asset.IamPolicy parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.securitycenter.v1.Asset.IamPolicy parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.securitycenter.v1.Asset.IamPolicy parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.securitycenter.v1.Asset.IamPolicy parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.securitycenter.v1.Asset.IamPolicy parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.securitycenter.v1.Asset.IamPolicy parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.securitycenter.v1.Asset.IamPolicy parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.securitycenter.v1.Asset.IamPolicy parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.securitycenter.v1.Asset.IamPolicy parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.securitycenter.v1.Asset.IamPolicy parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.securitycenter.v1.Asset.IamPolicy parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.securitycenter.v1.Asset.IamPolicy parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.cloud.securitycenter.v1.Asset.IamPolicy 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;
+ }
+ /**
+ *
+ *
+ * + * IAM Policy information associated with the GCP resource described by the + * Cloud SCC asset. This information is managed and defined by the GCP + * resource and cannot be modified by the user. + *+ * + * Protobuf type {@code google.cloud.securitycenter.v1.Asset.IamPolicy} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The JSON representation of the Policy associated with the asset. + * See https://cloud.google.com/iam/reference/rest/v1/Policy for format + * details. + *+ * + *
string policy_blob = 1;
+ */
+ public java.lang.String getPolicyBlob() {
+ java.lang.Object ref = policyBlob_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ policyBlob_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The JSON representation of the Policy associated with the asset. + * See https://cloud.google.com/iam/reference/rest/v1/Policy for format + * details. + *+ * + *
string policy_blob = 1;
+ */
+ public com.google.protobuf.ByteString getPolicyBlobBytes() {
+ java.lang.Object ref = policyBlob_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ policyBlob_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The JSON representation of the Policy associated with the asset. + * See https://cloud.google.com/iam/reference/rest/v1/Policy for format + * details. + *+ * + *
string policy_blob = 1;
+ */
+ public Builder setPolicyBlob(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ policyBlob_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The JSON representation of the Policy associated with the asset. + * See https://cloud.google.com/iam/reference/rest/v1/Policy for format + * details. + *+ * + *
string policy_blob = 1;
+ */
+ public Builder clearPolicyBlob() {
+
+ policyBlob_ = getDefaultInstance().getPolicyBlob();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The JSON representation of the Policy associated with the asset. + * See https://cloud.google.com/iam/reference/rest/v1/Policy for format + * details. + *+ * + *
string policy_blob = 1;
+ */
+ public Builder setPolicyBlobBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ policyBlob_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Asset.IamPolicy)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Asset.IamPolicy)
+ private static final com.google.cloud.securitycenter.v1.Asset.IamPolicy DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Asset.IamPolicy();
+ }
+
+ public static com.google.cloud.securitycenter.v1.Asset.IamPolicy getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The relative resource name of this asset. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/123/assets/456". + *+ * + *
string name = 1;
+ */
+ 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 asset. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/123/assets/456". + *+ * + *
string name = 1;
+ */
+ 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 SECURITY_CENTER_PROPERTIES_FIELD_NUMBER = 2;
+ private com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties
+ securityCenterProperties_;
+ /**
+ *
+ *
+ * + * Cloud SCC managed properties. These properties are managed by + * Cloud SCC and cannot be modified by the user. + *+ * + *
+ * .google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2;
+ *
+ */
+ public boolean hasSecurityCenterProperties() {
+ return securityCenterProperties_ != null;
+ }
+ /**
+ *
+ *
+ * + * Cloud SCC managed properties. These properties are managed by + * Cloud SCC and cannot be modified by the user. + *+ * + *
+ * .google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2;
+ *
+ */
+ public com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties
+ getSecurityCenterProperties() {
+ return securityCenterProperties_ == null
+ ? com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.getDefaultInstance()
+ : securityCenterProperties_;
+ }
+ /**
+ *
+ *
+ * + * Cloud SCC managed properties. These properties are managed by + * Cloud SCC and cannot be modified by the user. + *+ * + *
+ * .google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2;
+ *
+ */
+ public com.google.cloud.securitycenter.v1.Asset.SecurityCenterPropertiesOrBuilder
+ getSecurityCenterPropertiesOrBuilder() {
+ return getSecurityCenterProperties();
+ }
+
+ public static final int RESOURCE_PROPERTIES_FIELD_NUMBER = 7;
+
+ private static final class ResourcePropertiesDefaultEntryHolder {
+ static final com.google.protobuf.MapEntry+ * Resource managed properties. These properties are managed and defined by + * the GCP resource and cannot be modified by the user. + *+ * + *
map<string, .google.protobuf.Value> resource_properties = 7;
+ */
+ public boolean containsResourceProperties(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ return internalGetResourceProperties().getMap().containsKey(key);
+ }
+ /** Use {@link #getResourcePropertiesMap()} instead. */
+ @java.lang.Deprecated
+ public java.util.Map+ * Resource managed properties. These properties are managed and defined by + * the GCP resource and cannot be modified by the user. + *+ * + *
map<string, .google.protobuf.Value> resource_properties = 7;
+ */
+ public java.util.Map+ * Resource managed properties. These properties are managed and defined by + * the GCP resource and cannot be modified by the user. + *+ * + *
map<string, .google.protobuf.Value> resource_properties = 7;
+ */
+ public com.google.protobuf.Value getResourcePropertiesOrDefault(
+ java.lang.String key, com.google.protobuf.Value defaultValue) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map+ * Resource managed properties. These properties are managed and defined by + * the GCP resource and cannot be modified by the user. + *+ * + *
map<string, .google.protobuf.Value> resource_properties = 7;
+ */
+ public com.google.protobuf.Value getResourcePropertiesOrThrow(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map+ * User specified security marks. These marks are entirely managed by the user + * and come from the SecurityMarks resource that belongs to the asset. + *+ * + *
.google.cloud.securitycenter.v1.SecurityMarks security_marks = 8;
+ */
+ public boolean hasSecurityMarks() {
+ return securityMarks_ != null;
+ }
+ /**
+ *
+ *
+ * + * User specified security marks. These marks are entirely managed by the user + * and come from the SecurityMarks resource that belongs to the asset. + *+ * + *
.google.cloud.securitycenter.v1.SecurityMarks security_marks = 8;
+ */
+ public com.google.cloud.securitycenter.v1.SecurityMarks getSecurityMarks() {
+ return securityMarks_ == null
+ ? com.google.cloud.securitycenter.v1.SecurityMarks.getDefaultInstance()
+ : securityMarks_;
+ }
+ /**
+ *
+ *
+ * + * User specified security marks. These marks are entirely managed by the user + * and come from the SecurityMarks resource that belongs to the asset. + *+ * + *
.google.cloud.securitycenter.v1.SecurityMarks security_marks = 8;
+ */
+ public com.google.cloud.securitycenter.v1.SecurityMarksOrBuilder getSecurityMarksOrBuilder() {
+ return getSecurityMarks();
+ }
+
+ public static final int CREATE_TIME_FIELD_NUMBER = 9;
+ private com.google.protobuf.Timestamp createTime_;
+ /**
+ *
+ *
+ * + * The time at which the asset was created in Cloud SCC. + *+ * + *
.google.protobuf.Timestamp create_time = 9;
+ */
+ public boolean hasCreateTime() {
+ return createTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The time at which the asset was created in Cloud SCC. + *+ * + *
.google.protobuf.Timestamp create_time = 9;
+ */
+ public com.google.protobuf.Timestamp getCreateTime() {
+ return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
+ }
+ /**
+ *
+ *
+ * + * The time at which the asset was created in Cloud SCC. + *+ * + *
.google.protobuf.Timestamp create_time = 9;
+ */
+ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
+ return getCreateTime();
+ }
+
+ public static final int UPDATE_TIME_FIELD_NUMBER = 10;
+ private com.google.protobuf.Timestamp updateTime_;
+ /**
+ *
+ *
+ * + * The time at which the asset was last updated, added, or deleted in Cloud + * SCC. + *+ * + *
.google.protobuf.Timestamp update_time = 10;
+ */
+ public boolean hasUpdateTime() {
+ return updateTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The time at which the asset was last updated, added, or deleted in Cloud + * SCC. + *+ * + *
.google.protobuf.Timestamp update_time = 10;
+ */
+ public com.google.protobuf.Timestamp getUpdateTime() {
+ return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
+ }
+ /**
+ *
+ *
+ * + * The time at which the asset was last updated, added, or deleted in Cloud + * SCC. + *+ * + *
.google.protobuf.Timestamp update_time = 10;
+ */
+ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
+ return getUpdateTime();
+ }
+
+ public static final int IAM_POLICY_FIELD_NUMBER = 11;
+ private com.google.cloud.securitycenter.v1.Asset.IamPolicy iamPolicy_;
+ /**
+ *
+ *
+ * + * IAM Policy information associated with the GCP resource described by the + * Cloud SCC asset. This information is managed and defined by the GCP + * resource and cannot be modified by the user. + *+ * + *
.google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11;
+ */
+ public boolean hasIamPolicy() {
+ return iamPolicy_ != null;
+ }
+ /**
+ *
+ *
+ * + * IAM Policy information associated with the GCP resource described by the + * Cloud SCC asset. This information is managed and defined by the GCP + * resource and cannot be modified by the user. + *+ * + *
.google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11;
+ */
+ public com.google.cloud.securitycenter.v1.Asset.IamPolicy getIamPolicy() {
+ return iamPolicy_ == null
+ ? com.google.cloud.securitycenter.v1.Asset.IamPolicy.getDefaultInstance()
+ : iamPolicy_;
+ }
+ /**
+ *
+ *
+ * + * IAM Policy information associated with the GCP resource described by the + * Cloud SCC asset. This information is managed and defined by the GCP + * resource and cannot be modified by the user. + *+ * + *
.google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11;
+ */
+ public com.google.cloud.securitycenter.v1.Asset.IamPolicyOrBuilder getIamPolicyOrBuilder() {
+ return getIamPolicy();
+ }
+
+ 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 (!getNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
+ }
+ if (securityCenterProperties_ != null) {
+ output.writeMessage(2, getSecurityCenterProperties());
+ }
+ com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
+ output,
+ internalGetResourceProperties(),
+ ResourcePropertiesDefaultEntryHolder.defaultEntry,
+ 7);
+ if (securityMarks_ != null) {
+ output.writeMessage(8, getSecurityMarks());
+ }
+ if (createTime_ != null) {
+ output.writeMessage(9, getCreateTime());
+ }
+ if (updateTime_ != null) {
+ output.writeMessage(10, getUpdateTime());
+ }
+ if (iamPolicy_ != null) {
+ output.writeMessage(11, getIamPolicy());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getNameBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
+ }
+ if (securityCenterProperties_ != null) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 2, getSecurityCenterProperties());
+ }
+ for (java.util.Map.Entry+ * Cloud Security Command Center's (Cloud SCC) representation of a Google Cloud + * Platform (GCP) resource. + * The Asset is a Cloud SCC resource that captures information about a single + * GCP resource. All modifications to an Asset are only within the context of + * Cloud SCC and don't affect the referenced GCP resource. + *+ * + * Protobuf type {@code google.cloud.securitycenter.v1.Asset} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The relative resource name of this asset. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/123/assets/456". + *+ * + *
string name = 1;
+ */
+ 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 asset. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/123/assets/456". + *+ * + *
string name = 1;
+ */
+ 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 asset. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/123/assets/456". + *+ * + *
string name = 1;
+ */
+ public Builder setName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The relative resource name of this asset. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/123/assets/456". + *+ * + *
string name = 1;
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The relative resource name of this asset. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/123/assets/456". + *+ * + *
string name = 1;
+ */
+ public Builder setNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties
+ securityCenterProperties_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties,
+ com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.Builder,
+ com.google.cloud.securitycenter.v1.Asset.SecurityCenterPropertiesOrBuilder>
+ securityCenterPropertiesBuilder_;
+ /**
+ *
+ *
+ * + * Cloud SCC managed properties. These properties are managed by + * Cloud SCC and cannot be modified by the user. + *+ * + *
+ * .google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2;
+ *
+ */
+ public boolean hasSecurityCenterProperties() {
+ return securityCenterPropertiesBuilder_ != null || securityCenterProperties_ != null;
+ }
+ /**
+ *
+ *
+ * + * Cloud SCC managed properties. These properties are managed by + * Cloud SCC and cannot be modified by the user. + *+ * + *
+ * .google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2;
+ *
+ */
+ public com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties
+ getSecurityCenterProperties() {
+ if (securityCenterPropertiesBuilder_ == null) {
+ return securityCenterProperties_ == null
+ ? com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.getDefaultInstance()
+ : securityCenterProperties_;
+ } else {
+ return securityCenterPropertiesBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Cloud SCC managed properties. These properties are managed by + * Cloud SCC and cannot be modified by the user. + *+ * + *
+ * .google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2;
+ *
+ */
+ public Builder setSecurityCenterProperties(
+ com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties value) {
+ if (securityCenterPropertiesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ securityCenterProperties_ = value;
+ onChanged();
+ } else {
+ securityCenterPropertiesBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Cloud SCC managed properties. These properties are managed by + * Cloud SCC and cannot be modified by the user. + *+ * + *
+ * .google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2;
+ *
+ */
+ public Builder setSecurityCenterProperties(
+ com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.Builder builderForValue) {
+ if (securityCenterPropertiesBuilder_ == null) {
+ securityCenterProperties_ = builderForValue.build();
+ onChanged();
+ } else {
+ securityCenterPropertiesBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Cloud SCC managed properties. These properties are managed by + * Cloud SCC and cannot be modified by the user. + *+ * + *
+ * .google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2;
+ *
+ */
+ public Builder mergeSecurityCenterProperties(
+ com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties value) {
+ if (securityCenterPropertiesBuilder_ == null) {
+ if (securityCenterProperties_ != null) {
+ securityCenterProperties_ =
+ com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.newBuilder(
+ securityCenterProperties_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ securityCenterProperties_ = value;
+ }
+ onChanged();
+ } else {
+ securityCenterPropertiesBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Cloud SCC managed properties. These properties are managed by + * Cloud SCC and cannot be modified by the user. + *+ * + *
+ * .google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2;
+ *
+ */
+ public Builder clearSecurityCenterProperties() {
+ if (securityCenterPropertiesBuilder_ == null) {
+ securityCenterProperties_ = null;
+ onChanged();
+ } else {
+ securityCenterProperties_ = null;
+ securityCenterPropertiesBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Cloud SCC managed properties. These properties are managed by + * Cloud SCC and cannot be modified by the user. + *+ * + *
+ * .google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2;
+ *
+ */
+ public com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.Builder
+ getSecurityCenterPropertiesBuilder() {
+
+ onChanged();
+ return getSecurityCenterPropertiesFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Cloud SCC managed properties. These properties are managed by + * Cloud SCC and cannot be modified by the user. + *+ * + *
+ * .google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2;
+ *
+ */
+ public com.google.cloud.securitycenter.v1.Asset.SecurityCenterPropertiesOrBuilder
+ getSecurityCenterPropertiesOrBuilder() {
+ if (securityCenterPropertiesBuilder_ != null) {
+ return securityCenterPropertiesBuilder_.getMessageOrBuilder();
+ } else {
+ return securityCenterProperties_ == null
+ ? com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.getDefaultInstance()
+ : securityCenterProperties_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Cloud SCC managed properties. These properties are managed by + * Cloud SCC and cannot be modified by the user. + *+ * + *
+ * .google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2;
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties,
+ com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.Builder,
+ com.google.cloud.securitycenter.v1.Asset.SecurityCenterPropertiesOrBuilder>
+ getSecurityCenterPropertiesFieldBuilder() {
+ if (securityCenterPropertiesBuilder_ == null) {
+ securityCenterPropertiesBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties,
+ com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.Builder,
+ com.google.cloud.securitycenter.v1.Asset.SecurityCenterPropertiesOrBuilder>(
+ getSecurityCenterProperties(), getParentForChildren(), isClean());
+ securityCenterProperties_ = null;
+ }
+ return securityCenterPropertiesBuilder_;
+ }
+
+ private com.google.protobuf.MapField+ * Resource managed properties. These properties are managed and defined by + * the GCP resource and cannot be modified by the user. + *+ * + *
map<string, .google.protobuf.Value> resource_properties = 7;
+ */
+ public boolean containsResourceProperties(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ return internalGetResourceProperties().getMap().containsKey(key);
+ }
+ /** Use {@link #getResourcePropertiesMap()} instead. */
+ @java.lang.Deprecated
+ public java.util.Map+ * Resource managed properties. These properties are managed and defined by + * the GCP resource and cannot be modified by the user. + *+ * + *
map<string, .google.protobuf.Value> resource_properties = 7;
+ */
+ public java.util.Map+ * Resource managed properties. These properties are managed and defined by + * the GCP resource and cannot be modified by the user. + *+ * + *
map<string, .google.protobuf.Value> resource_properties = 7;
+ */
+ public com.google.protobuf.Value getResourcePropertiesOrDefault(
+ java.lang.String key, com.google.protobuf.Value defaultValue) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map+ * Resource managed properties. These properties are managed and defined by + * the GCP resource and cannot be modified by the user. + *+ * + *
map<string, .google.protobuf.Value> resource_properties = 7;
+ */
+ public com.google.protobuf.Value getResourcePropertiesOrThrow(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map+ * Resource managed properties. These properties are managed and defined by + * the GCP resource and cannot be modified by the user. + *+ * + *
map<string, .google.protobuf.Value> resource_properties = 7;
+ */
+ public Builder removeResourceProperties(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ internalGetMutableResourceProperties().getMutableMap().remove(key);
+ return this;
+ }
+ /** Use alternate mutation accessors instead. */
+ @java.lang.Deprecated
+ public java.util.Map+ * Resource managed properties. These properties are managed and defined by + * the GCP resource and cannot be modified by the user. + *+ * + *
map<string, .google.protobuf.Value> resource_properties = 7;
+ */
+ public Builder putResourceProperties(java.lang.String key, com.google.protobuf.Value value) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ if (value == null) {
+ throw new java.lang.NullPointerException();
+ }
+ internalGetMutableResourceProperties().getMutableMap().put(key, value);
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Resource managed properties. These properties are managed and defined by + * the GCP resource and cannot be modified by the user. + *+ * + *
map<string, .google.protobuf.Value> resource_properties = 7;
+ */
+ public Builder putAllResourceProperties(
+ java.util.Map+ * User specified security marks. These marks are entirely managed by the user + * and come from the SecurityMarks resource that belongs to the asset. + *+ * + *
.google.cloud.securitycenter.v1.SecurityMarks security_marks = 8;
+ */
+ public boolean hasSecurityMarks() {
+ return securityMarksBuilder_ != null || securityMarks_ != null;
+ }
+ /**
+ *
+ *
+ * + * User specified security marks. These marks are entirely managed by the user + * and come from the SecurityMarks resource that belongs to the asset. + *+ * + *
.google.cloud.securitycenter.v1.SecurityMarks security_marks = 8;
+ */
+ public com.google.cloud.securitycenter.v1.SecurityMarks getSecurityMarks() {
+ if (securityMarksBuilder_ == null) {
+ return securityMarks_ == null
+ ? com.google.cloud.securitycenter.v1.SecurityMarks.getDefaultInstance()
+ : securityMarks_;
+ } else {
+ return securityMarksBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * User specified security marks. These marks are entirely managed by the user + * and come from the SecurityMarks resource that belongs to the asset. + *+ * + *
.google.cloud.securitycenter.v1.SecurityMarks security_marks = 8;
+ */
+ public Builder setSecurityMarks(com.google.cloud.securitycenter.v1.SecurityMarks value) {
+ if (securityMarksBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ securityMarks_ = value;
+ onChanged();
+ } else {
+ securityMarksBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * User specified security marks. These marks are entirely managed by the user + * and come from the SecurityMarks resource that belongs to the asset. + *+ * + *
.google.cloud.securitycenter.v1.SecurityMarks security_marks = 8;
+ */
+ public Builder setSecurityMarks(
+ com.google.cloud.securitycenter.v1.SecurityMarks.Builder builderForValue) {
+ if (securityMarksBuilder_ == null) {
+ securityMarks_ = builderForValue.build();
+ onChanged();
+ } else {
+ securityMarksBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * User specified security marks. These marks are entirely managed by the user + * and come from the SecurityMarks resource that belongs to the asset. + *+ * + *
.google.cloud.securitycenter.v1.SecurityMarks security_marks = 8;
+ */
+ public Builder mergeSecurityMarks(com.google.cloud.securitycenter.v1.SecurityMarks value) {
+ if (securityMarksBuilder_ == null) {
+ if (securityMarks_ != null) {
+ securityMarks_ =
+ com.google.cloud.securitycenter.v1.SecurityMarks.newBuilder(securityMarks_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ securityMarks_ = value;
+ }
+ onChanged();
+ } else {
+ securityMarksBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * User specified security marks. These marks are entirely managed by the user + * and come from the SecurityMarks resource that belongs to the asset. + *+ * + *
.google.cloud.securitycenter.v1.SecurityMarks security_marks = 8;
+ */
+ public Builder clearSecurityMarks() {
+ if (securityMarksBuilder_ == null) {
+ securityMarks_ = null;
+ onChanged();
+ } else {
+ securityMarks_ = null;
+ securityMarksBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * User specified security marks. These marks are entirely managed by the user + * and come from the SecurityMarks resource that belongs to the asset. + *+ * + *
.google.cloud.securitycenter.v1.SecurityMarks security_marks = 8;
+ */
+ public com.google.cloud.securitycenter.v1.SecurityMarks.Builder getSecurityMarksBuilder() {
+
+ onChanged();
+ return getSecurityMarksFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * User specified security marks. These marks are entirely managed by the user + * and come from the SecurityMarks resource that belongs to the asset. + *+ * + *
.google.cloud.securitycenter.v1.SecurityMarks security_marks = 8;
+ */
+ public com.google.cloud.securitycenter.v1.SecurityMarksOrBuilder getSecurityMarksOrBuilder() {
+ if (securityMarksBuilder_ != null) {
+ return securityMarksBuilder_.getMessageOrBuilder();
+ } else {
+ return securityMarks_ == null
+ ? com.google.cloud.securitycenter.v1.SecurityMarks.getDefaultInstance()
+ : securityMarks_;
+ }
+ }
+ /**
+ *
+ *
+ * + * User specified security marks. These marks are entirely managed by the user + * and come from the SecurityMarks resource that belongs to the asset. + *+ * + *
.google.cloud.securitycenter.v1.SecurityMarks security_marks = 8;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.securitycenter.v1.SecurityMarks,
+ com.google.cloud.securitycenter.v1.SecurityMarks.Builder,
+ com.google.cloud.securitycenter.v1.SecurityMarksOrBuilder>
+ getSecurityMarksFieldBuilder() {
+ if (securityMarksBuilder_ == null) {
+ securityMarksBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.securitycenter.v1.SecurityMarks,
+ com.google.cloud.securitycenter.v1.SecurityMarks.Builder,
+ com.google.cloud.securitycenter.v1.SecurityMarksOrBuilder>(
+ getSecurityMarks(), getParentForChildren(), isClean());
+ securityMarks_ = null;
+ }
+ return securityMarksBuilder_;
+ }
+
+ private com.google.protobuf.Timestamp createTime_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ createTimeBuilder_;
+ /**
+ *
+ *
+ * + * The time at which the asset was created in Cloud SCC. + *+ * + *
.google.protobuf.Timestamp create_time = 9;
+ */
+ public boolean hasCreateTime() {
+ return createTimeBuilder_ != null || createTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The time at which the asset was created in Cloud SCC. + *+ * + *
.google.protobuf.Timestamp create_time = 9;
+ */
+ public com.google.protobuf.Timestamp getCreateTime() {
+ if (createTimeBuilder_ == null) {
+ return createTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : createTime_;
+ } else {
+ return createTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The time at which the asset was created in Cloud SCC. + *+ * + *
.google.protobuf.Timestamp create_time = 9;
+ */
+ public Builder setCreateTime(com.google.protobuf.Timestamp value) {
+ if (createTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ createTime_ = value;
+ onChanged();
+ } else {
+ createTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time at which the asset was created in Cloud SCC. + *+ * + *
.google.protobuf.Timestamp create_time = 9;
+ */
+ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (createTimeBuilder_ == null) {
+ createTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ createTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time at which the asset was created in Cloud SCC. + *+ * + *
.google.protobuf.Timestamp create_time = 9;
+ */
+ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) {
+ if (createTimeBuilder_ == null) {
+ if (createTime_ != null) {
+ createTime_ =
+ com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial();
+ } else {
+ createTime_ = value;
+ }
+ onChanged();
+ } else {
+ createTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time at which the asset was created in Cloud SCC. + *+ * + *
.google.protobuf.Timestamp create_time = 9;
+ */
+ public Builder clearCreateTime() {
+ if (createTimeBuilder_ == null) {
+ createTime_ = null;
+ onChanged();
+ } else {
+ createTime_ = null;
+ createTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time at which the asset was created in Cloud SCC. + *+ * + *
.google.protobuf.Timestamp create_time = 9;
+ */
+ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() {
+
+ onChanged();
+ return getCreateTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The time at which the asset was created in Cloud SCC. + *+ * + *
.google.protobuf.Timestamp create_time = 9;
+ */
+ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
+ if (createTimeBuilder_ != null) {
+ return createTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return createTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : createTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The time at which the asset was created in Cloud SCC. + *+ * + *
.google.protobuf.Timestamp create_time = 9;
+ */
+ 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_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ updateTimeBuilder_;
+ /**
+ *
+ *
+ * + * The time at which the asset was last updated, added, or deleted in Cloud + * SCC. + *+ * + *
.google.protobuf.Timestamp update_time = 10;
+ */
+ public boolean hasUpdateTime() {
+ return updateTimeBuilder_ != null || updateTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The time at which the asset was last updated, added, or deleted in Cloud + * SCC. + *+ * + *
.google.protobuf.Timestamp update_time = 10;
+ */
+ public com.google.protobuf.Timestamp getUpdateTime() {
+ if (updateTimeBuilder_ == null) {
+ return updateTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : updateTime_;
+ } else {
+ return updateTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The time at which the asset was last updated, added, or deleted in Cloud + * SCC. + *+ * + *
.google.protobuf.Timestamp update_time = 10;
+ */
+ public Builder setUpdateTime(com.google.protobuf.Timestamp value) {
+ if (updateTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ updateTime_ = value;
+ onChanged();
+ } else {
+ updateTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time at which the asset was last updated, added, or deleted in Cloud + * SCC. + *+ * + *
.google.protobuf.Timestamp update_time = 10;
+ */
+ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (updateTimeBuilder_ == null) {
+ updateTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ updateTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time at which the asset was last updated, added, or deleted in Cloud + * SCC. + *+ * + *
.google.protobuf.Timestamp update_time = 10;
+ */
+ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) {
+ if (updateTimeBuilder_ == null) {
+ if (updateTime_ != null) {
+ updateTime_ =
+ com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial();
+ } else {
+ updateTime_ = value;
+ }
+ onChanged();
+ } else {
+ updateTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time at which the asset was last updated, added, or deleted in Cloud + * SCC. + *+ * + *
.google.protobuf.Timestamp update_time = 10;
+ */
+ public Builder clearUpdateTime() {
+ if (updateTimeBuilder_ == null) {
+ updateTime_ = null;
+ onChanged();
+ } else {
+ updateTime_ = null;
+ updateTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time at which the asset was last updated, added, or deleted in Cloud + * SCC. + *+ * + *
.google.protobuf.Timestamp update_time = 10;
+ */
+ public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() {
+
+ onChanged();
+ return getUpdateTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The time at which the asset was last updated, added, or deleted in Cloud + * SCC. + *+ * + *
.google.protobuf.Timestamp update_time = 10;
+ */
+ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
+ if (updateTimeBuilder_ != null) {
+ return updateTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return updateTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : updateTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The time at which the asset was last updated, added, or deleted in Cloud + * SCC. + *+ * + *
.google.protobuf.Timestamp update_time = 10;
+ */
+ 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 com.google.cloud.securitycenter.v1.Asset.IamPolicy iamPolicy_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.securitycenter.v1.Asset.IamPolicy,
+ com.google.cloud.securitycenter.v1.Asset.IamPolicy.Builder,
+ com.google.cloud.securitycenter.v1.Asset.IamPolicyOrBuilder>
+ iamPolicyBuilder_;
+ /**
+ *
+ *
+ * + * IAM Policy information associated with the GCP resource described by the + * Cloud SCC asset. This information is managed and defined by the GCP + * resource and cannot be modified by the user. + *+ * + *
.google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11;
+ */
+ public boolean hasIamPolicy() {
+ return iamPolicyBuilder_ != null || iamPolicy_ != null;
+ }
+ /**
+ *
+ *
+ * + * IAM Policy information associated with the GCP resource described by the + * Cloud SCC asset. This information is managed and defined by the GCP + * resource and cannot be modified by the user. + *+ * + *
.google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11;
+ */
+ public com.google.cloud.securitycenter.v1.Asset.IamPolicy getIamPolicy() {
+ if (iamPolicyBuilder_ == null) {
+ return iamPolicy_ == null
+ ? com.google.cloud.securitycenter.v1.Asset.IamPolicy.getDefaultInstance()
+ : iamPolicy_;
+ } else {
+ return iamPolicyBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * IAM Policy information associated with the GCP resource described by the + * Cloud SCC asset. This information is managed and defined by the GCP + * resource and cannot be modified by the user. + *+ * + *
.google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11;
+ */
+ public Builder setIamPolicy(com.google.cloud.securitycenter.v1.Asset.IamPolicy value) {
+ if (iamPolicyBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ iamPolicy_ = value;
+ onChanged();
+ } else {
+ iamPolicyBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * IAM Policy information associated with the GCP resource described by the + * Cloud SCC asset. This information is managed and defined by the GCP + * resource and cannot be modified by the user. + *+ * + *
.google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11;
+ */
+ public Builder setIamPolicy(
+ com.google.cloud.securitycenter.v1.Asset.IamPolicy.Builder builderForValue) {
+ if (iamPolicyBuilder_ == null) {
+ iamPolicy_ = builderForValue.build();
+ onChanged();
+ } else {
+ iamPolicyBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * IAM Policy information associated with the GCP resource described by the + * Cloud SCC asset. This information is managed and defined by the GCP + * resource and cannot be modified by the user. + *+ * + *
.google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11;
+ */
+ public Builder mergeIamPolicy(com.google.cloud.securitycenter.v1.Asset.IamPolicy value) {
+ if (iamPolicyBuilder_ == null) {
+ if (iamPolicy_ != null) {
+ iamPolicy_ =
+ com.google.cloud.securitycenter.v1.Asset.IamPolicy.newBuilder(iamPolicy_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ iamPolicy_ = value;
+ }
+ onChanged();
+ } else {
+ iamPolicyBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * IAM Policy information associated with the GCP resource described by the + * Cloud SCC asset. This information is managed and defined by the GCP + * resource and cannot be modified by the user. + *+ * + *
.google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11;
+ */
+ public Builder clearIamPolicy() {
+ if (iamPolicyBuilder_ == null) {
+ iamPolicy_ = null;
+ onChanged();
+ } else {
+ iamPolicy_ = null;
+ iamPolicyBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * IAM Policy information associated with the GCP resource described by the + * Cloud SCC asset. This information is managed and defined by the GCP + * resource and cannot be modified by the user. + *+ * + *
.google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11;
+ */
+ public com.google.cloud.securitycenter.v1.Asset.IamPolicy.Builder getIamPolicyBuilder() {
+
+ onChanged();
+ return getIamPolicyFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * IAM Policy information associated with the GCP resource described by the + * Cloud SCC asset. This information is managed and defined by the GCP + * resource and cannot be modified by the user. + *+ * + *
.google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11;
+ */
+ public com.google.cloud.securitycenter.v1.Asset.IamPolicyOrBuilder getIamPolicyOrBuilder() {
+ if (iamPolicyBuilder_ != null) {
+ return iamPolicyBuilder_.getMessageOrBuilder();
+ } else {
+ return iamPolicy_ == null
+ ? com.google.cloud.securitycenter.v1.Asset.IamPolicy.getDefaultInstance()
+ : iamPolicy_;
+ }
+ }
+ /**
+ *
+ *
+ * + * IAM Policy information associated with the GCP resource described by the + * Cloud SCC asset. This information is managed and defined by the GCP + * resource and cannot be modified by the user. + *+ * + *
.google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.securitycenter.v1.Asset.IamPolicy,
+ com.google.cloud.securitycenter.v1.Asset.IamPolicy.Builder,
+ com.google.cloud.securitycenter.v1.Asset.IamPolicyOrBuilder>
+ getIamPolicyFieldBuilder() {
+ if (iamPolicyBuilder_ == null) {
+ iamPolicyBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.securitycenter.v1.Asset.IamPolicy,
+ com.google.cloud.securitycenter.v1.Asset.IamPolicy.Builder,
+ com.google.cloud.securitycenter.v1.Asset.IamPolicyOrBuilder>(
+ getIamPolicy(), getParentForChildren(), isClean());
+ iamPolicy_ = null;
+ }
+ return iamPolicyBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Asset)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Asset)
+ private static final com.google.cloud.securitycenter.v1.Asset DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Asset();
+ }
+
+ public static com.google.cloud.securitycenter.v1.Asset getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The relative resource name of this asset. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/123/assets/456". + *+ * + *
string name = 1;
+ */
+ java.lang.String getName();
+ /**
+ *
+ *
+ * + * The relative resource name of this asset. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/123/assets/456". + *+ * + *
string name = 1;
+ */
+ com.google.protobuf.ByteString getNameBytes();
+
+ /**
+ *
+ *
+ * + * Cloud SCC managed properties. These properties are managed by + * Cloud SCC and cannot be modified by the user. + *+ * + *
+ * .google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2;
+ *
+ */
+ boolean hasSecurityCenterProperties();
+ /**
+ *
+ *
+ * + * Cloud SCC managed properties. These properties are managed by + * Cloud SCC and cannot be modified by the user. + *+ * + *
+ * .google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2;
+ *
+ */
+ com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties getSecurityCenterProperties();
+ /**
+ *
+ *
+ * + * Cloud SCC managed properties. These properties are managed by + * Cloud SCC and cannot be modified by the user. + *+ * + *
+ * .google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2;
+ *
+ */
+ com.google.cloud.securitycenter.v1.Asset.SecurityCenterPropertiesOrBuilder
+ getSecurityCenterPropertiesOrBuilder();
+
+ /**
+ *
+ *
+ * + * Resource managed properties. These properties are managed and defined by + * the GCP resource and cannot be modified by the user. + *+ * + *
map<string, .google.protobuf.Value> resource_properties = 7;
+ */
+ int getResourcePropertiesCount();
+ /**
+ *
+ *
+ * + * Resource managed properties. These properties are managed and defined by + * the GCP resource and cannot be modified by the user. + *+ * + *
map<string, .google.protobuf.Value> resource_properties = 7;
+ */
+ boolean containsResourceProperties(java.lang.String key);
+ /** Use {@link #getResourcePropertiesMap()} instead. */
+ @java.lang.Deprecated
+ java.util.Map+ * Resource managed properties. These properties are managed and defined by + * the GCP resource and cannot be modified by the user. + *+ * + *
map<string, .google.protobuf.Value> resource_properties = 7;
+ */
+ java.util.Map+ * Resource managed properties. These properties are managed and defined by + * the GCP resource and cannot be modified by the user. + *+ * + *
map<string, .google.protobuf.Value> resource_properties = 7;
+ */
+ com.google.protobuf.Value getResourcePropertiesOrDefault(
+ java.lang.String key, com.google.protobuf.Value defaultValue);
+ /**
+ *
+ *
+ * + * Resource managed properties. These properties are managed and defined by + * the GCP resource and cannot be modified by the user. + *+ * + *
map<string, .google.protobuf.Value> resource_properties = 7;
+ */
+ com.google.protobuf.Value getResourcePropertiesOrThrow(java.lang.String key);
+
+ /**
+ *
+ *
+ * + * User specified security marks. These marks are entirely managed by the user + * and come from the SecurityMarks resource that belongs to the asset. + *+ * + *
.google.cloud.securitycenter.v1.SecurityMarks security_marks = 8;
+ */
+ boolean hasSecurityMarks();
+ /**
+ *
+ *
+ * + * User specified security marks. These marks are entirely managed by the user + * and come from the SecurityMarks resource that belongs to the asset. + *+ * + *
.google.cloud.securitycenter.v1.SecurityMarks security_marks = 8;
+ */
+ com.google.cloud.securitycenter.v1.SecurityMarks getSecurityMarks();
+ /**
+ *
+ *
+ * + * User specified security marks. These marks are entirely managed by the user + * and come from the SecurityMarks resource that belongs to the asset. + *+ * + *
.google.cloud.securitycenter.v1.SecurityMarks security_marks = 8;
+ */
+ com.google.cloud.securitycenter.v1.SecurityMarksOrBuilder getSecurityMarksOrBuilder();
+
+ /**
+ *
+ *
+ * + * The time at which the asset was created in Cloud SCC. + *+ * + *
.google.protobuf.Timestamp create_time = 9;
+ */
+ boolean hasCreateTime();
+ /**
+ *
+ *
+ * + * The time at which the asset was created in Cloud SCC. + *+ * + *
.google.protobuf.Timestamp create_time = 9;
+ */
+ com.google.protobuf.Timestamp getCreateTime();
+ /**
+ *
+ *
+ * + * The time at which the asset was created in Cloud SCC. + *+ * + *
.google.protobuf.Timestamp create_time = 9;
+ */
+ com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder();
+
+ /**
+ *
+ *
+ * + * The time at which the asset was last updated, added, or deleted in Cloud + * SCC. + *+ * + *
.google.protobuf.Timestamp update_time = 10;
+ */
+ boolean hasUpdateTime();
+ /**
+ *
+ *
+ * + * The time at which the asset was last updated, added, or deleted in Cloud + * SCC. + *+ * + *
.google.protobuf.Timestamp update_time = 10;
+ */
+ com.google.protobuf.Timestamp getUpdateTime();
+ /**
+ *
+ *
+ * + * The time at which the asset was last updated, added, or deleted in Cloud + * SCC. + *+ * + *
.google.protobuf.Timestamp update_time = 10;
+ */
+ com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder();
+
+ /**
+ *
+ *
+ * + * IAM Policy information associated with the GCP resource described by the + * Cloud SCC asset. This information is managed and defined by the GCP + * resource and cannot be modified by the user. + *+ * + *
.google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11;
+ */
+ boolean hasIamPolicy();
+ /**
+ *
+ *
+ * + * IAM Policy information associated with the GCP resource described by the + * Cloud SCC asset. This information is managed and defined by the GCP + * resource and cannot be modified by the user. + *+ * + *
.google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11;
+ */
+ com.google.cloud.securitycenter.v1.Asset.IamPolicy getIamPolicy();
+ /**
+ *
+ *
+ * + * IAM Policy information associated with the GCP resource described by the + * Cloud SCC asset. This information is managed and defined by the GCP + * resource and cannot be modified by the user. + *+ * + *
.google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11;
+ */
+ com.google.cloud.securitycenter.v1.Asset.IamPolicyOrBuilder getIamPolicyOrBuilder();
+}
diff --git a/google-api-grpc/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AssetOuterClass.java b/google-api-grpc/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AssetOuterClass.java
new file mode 100644
index 000000000000..c60e79cade03
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AssetOuterClass.java
@@ -0,0 +1,130 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/securitycenter/v1/asset.proto
+
+package com.google.cloud.securitycenter.v1;
+
+public final class AssetOuterClass {
+ private AssetOuterClass() {}
+
+ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {}
+
+ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) {
+ registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry);
+ }
+
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_securitycenter_v1_Asset_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_securitycenter_v1_Asset_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_securitycenter_v1_Asset_SecurityCenterProperties_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_securitycenter_v1_Asset_SecurityCenterProperties_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_securitycenter_v1_Asset_IamPolicy_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_securitycenter_v1_Asset_IamPolicy_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_securitycenter_v1_Asset_ResourcePropertiesEntry_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_securitycenter_v1_Asset_ResourcePropertiesEntry_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/v1/asset.p"
+ + "roto\022\036google.cloud.securitycenter.v1\032\034go"
+ + "ogle/api/annotations.proto\0323google/cloud"
+ + "/securitycenter/v1/security_marks.proto\032"
+ + "\034google/protobuf/struct.proto\032\037google/pr"
+ + "otobuf/timestamp.proto\"\317\005\n\005Asset\022\014\n\004name"
+ + "\030\001 \001(\t\022b\n\032security_center_properties\030\002 \001"
+ + "(\0132>.google.cloud.securitycenter.v1.Asse"
+ + "t.SecurityCenterProperties\022Z\n\023resource_p"
+ + "roperties\030\007 \003(\0132=.google.cloud.securityc"
+ + "enter.v1.Asset.ResourcePropertiesEntry\022E"
+ + "\n\016security_marks\030\010 \001(\0132-.google.cloud.se"
+ + "curitycenter.v1.SecurityMarks\022/\n\013create_"
+ + "time\030\t \001(\0132\032.google.protobuf.Timestamp\022/"
+ + "\n\013update_time\030\n \001(\0132\032.google.protobuf.Ti"
+ + "mestamp\022C\n\niam_policy\030\013 \001(\0132/.google.clo"
+ + "ud.securitycenter.v1.Asset.IamPolicy\032\224\001\n"
+ + "\030SecurityCenterProperties\022\025\n\rresource_na"
+ + "me\030\001 \001(\t\022\025\n\rresource_type\030\002 \001(\t\022\027\n\017resou"
+ + "rce_parent\030\003 \001(\t\022\030\n\020resource_project\030\004 \001"
+ + "(\t\022\027\n\017resource_owners\030\005 \003(\t\032 \n\tIamPolicy"
+ + "\022\023\n\013policy_blob\030\001 \001(\t\032Q\n\027ResourcePropert"
+ + "iesEntry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.g"
+ + "oogle.protobuf.Value:\0028\001Bt\n\"com.google.c"
+ + "loud.securitycenter.v1P\001ZLgoogle.golang."
+ + "org/genproto/googleapis/cloud/securityce"
+ + "nter/v1;securitycenterb\006proto3"
+ };
+ com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
+ new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
+ public com.google.protobuf.ExtensionRegistry assignDescriptors(
+ com.google.protobuf.Descriptors.FileDescriptor root) {
+ descriptor = root;
+ return null;
+ }
+ };
+ com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
+ descriptorData,
+ new com.google.protobuf.Descriptors.FileDescriptor[] {
+ com.google.api.AnnotationsProto.getDescriptor(),
+ com.google.cloud.securitycenter.v1.SecurityMarksOuterClass.getDescriptor(),
+ com.google.protobuf.StructProto.getDescriptor(),
+ com.google.protobuf.TimestampProto.getDescriptor(),
+ },
+ assigner);
+ internal_static_google_cloud_securitycenter_v1_Asset_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_google_cloud_securitycenter_v1_Asset_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_securitycenter_v1_Asset_descriptor,
+ new java.lang.String[] {
+ "Name",
+ "SecurityCenterProperties",
+ "ResourceProperties",
+ "SecurityMarks",
+ "CreateTime",
+ "UpdateTime",
+ "IamPolicy",
+ });
+ internal_static_google_cloud_securitycenter_v1_Asset_SecurityCenterProperties_descriptor =
+ internal_static_google_cloud_securitycenter_v1_Asset_descriptor.getNestedTypes().get(0);
+ internal_static_google_cloud_securitycenter_v1_Asset_SecurityCenterProperties_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_securitycenter_v1_Asset_SecurityCenterProperties_descriptor,
+ new java.lang.String[] {
+ "ResourceName", "ResourceType", "ResourceParent", "ResourceProject", "ResourceOwners",
+ });
+ internal_static_google_cloud_securitycenter_v1_Asset_IamPolicy_descriptor =
+ internal_static_google_cloud_securitycenter_v1_Asset_descriptor.getNestedTypes().get(1);
+ internal_static_google_cloud_securitycenter_v1_Asset_IamPolicy_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_securitycenter_v1_Asset_IamPolicy_descriptor,
+ new java.lang.String[] {
+ "PolicyBlob",
+ });
+ internal_static_google_cloud_securitycenter_v1_Asset_ResourcePropertiesEntry_descriptor =
+ internal_static_google_cloud_securitycenter_v1_Asset_descriptor.getNestedTypes().get(2);
+ internal_static_google_cloud_securitycenter_v1_Asset_ResourcePropertiesEntry_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_securitycenter_v1_Asset_ResourcePropertiesEntry_descriptor,
+ new java.lang.String[] {
+ "Key", "Value",
+ });
+ com.google.api.AnnotationsProto.getDescriptor();
+ com.google.cloud.securitycenter.v1.SecurityMarksOuterClass.getDescriptor();
+ com.google.protobuf.StructProto.getDescriptor();
+ com.google.protobuf.TimestampProto.getDescriptor();
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
diff --git a/google-api-grpc/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AssetSecurityMarksName.java b/google-api-grpc/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AssetSecurityMarksName.java
new file mode 100644
index 000000000000..5fe396f068a3
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AssetSecurityMarksName.java
@@ -0,0 +1,180 @@
+/*
+ * Copyright 2018 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.google.cloud.securitycenter.v1;
+
+import com.google.api.pathtemplate.PathTemplate;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.ImmutableMap;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS
+@javax.annotation.Generated("by GAPIC protoc plugin")
+public class AssetSecurityMarksName extends SecuritymarksName {
+
+ private static final PathTemplate PATH_TEMPLATE =
+ PathTemplate.createWithoutUrlEncoding(
+ "organizations/{organization}/assets/{asset}/securityMarks");
+
+ private volatile Map+ * Request message for creating a finding. + *+ * + * Protobuf type {@code google.cloud.securitycenter.v1.CreateFindingRequest} + */ +public final class CreateFindingRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.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 + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateFindingRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + findingId_ = s; + break; + } + case 26: + { + com.google.cloud.securitycenter.v1.Finding.Builder subBuilder = null; + if (finding_ != null) { + subBuilder = finding_.toBuilder(); + } + finding_ = + input.readMessage( + com.google.cloud.securitycenter.v1.Finding.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(finding_); + finding_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_CreateFindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_CreateFindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.CreateFindingRequest.class, + com.google.cloud.securitycenter.v1.CreateFindingRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+ * Resource name of the new finding's parent. Its format should be + * "organizations/[organization_id]/sources/[source_id]". + *+ * + *
string parent = 1;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * Resource name of the new finding's parent. Its format should be + * "organizations/[organization_id]/sources/[source_id]". + *+ * + *
string parent = 1;
+ */
+ 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;
+ private volatile java.lang.Object findingId_;
+ /**
+ *
+ *
+ * + * 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;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * 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;
+ */
+ 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.v1.Finding finding_;
+ /**
+ *
+ *
+ * + * 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.v1.Finding finding = 3;
+ */
+ public boolean hasFinding() {
+ return finding_ != null;
+ }
+ /**
+ *
+ *
+ * + * 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.v1.Finding finding = 3;
+ */
+ public com.google.cloud.securitycenter.v1.Finding getFinding() {
+ return finding_ == null
+ ? com.google.cloud.securitycenter.v1.Finding.getDefaultInstance()
+ : finding_;
+ }
+ /**
+ *
+ *
+ * + * 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.v1.Finding finding = 3;
+ */
+ public com.google.cloud.securitycenter.v1.FindingOrBuilder getFindingOrBuilder() {
+ return getFinding();
+ }
+
+ 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 (!getParentBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
+ }
+ if (!getFindingIdBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, findingId_);
+ }
+ if (finding_ != null) {
+ output.writeMessage(3, getFinding());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getParentBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
+ }
+ if (!getFindingIdBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, findingId_);
+ }
+ if (finding_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getFinding());
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.securitycenter.v1.CreateFindingRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.securitycenter.v1.CreateFindingRequest other =
+ (com.google.cloud.securitycenter.v1.CreateFindingRequest) obj;
+
+ boolean result = true;
+ result = result && getParent().equals(other.getParent());
+ result = result && getFindingId().equals(other.getFindingId());
+ result = result && (hasFinding() == other.hasFinding());
+ if (hasFinding()) {
+ result = result && getFinding().equals(other.getFinding());
+ }
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @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) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.securitycenter.v1.CreateFindingRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.securitycenter.v1.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.v1.CreateFindingRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.securitycenter.v1.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.v1.CreateFindingRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.securitycenter.v1.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.v1.CreateFindingRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.securitycenter.v1.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.v1.CreateFindingRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.securitycenter.v1.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.v1.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.v1.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.v1.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.v1.CreateFindingRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Resource name of the new finding's parent. Its format should be + * "organizations/[organization_id]/sources/[source_id]". + *+ * + *
string parent = 1;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * Resource name of the new finding's parent. Its format should be + * "organizations/[organization_id]/sources/[source_id]". + *+ * + *
string parent = 1;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * Resource name of the new finding's parent. Its format should be + * "organizations/[organization_id]/sources/[source_id]". + *+ * + *
string parent = 1;
+ */
+ public Builder setParent(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Resource name of the new finding's parent. Its format should be + * "organizations/[organization_id]/sources/[source_id]". + *+ * + *
string parent = 1;
+ */
+ public Builder clearParent() {
+
+ parent_ = getDefaultInstance().getParent();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Resource name of the new finding's parent. Its format should be + * "organizations/[organization_id]/sources/[source_id]". + *+ * + *
string parent = 1;
+ */
+ public Builder setParentBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object findingId_ = "";
+ /**
+ *
+ *
+ * + * 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;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * 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;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * 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;
+ */
+ public Builder setFindingId(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ findingId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * 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;
+ */
+ public Builder clearFindingId() {
+
+ findingId_ = getDefaultInstance().getFindingId();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * 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;
+ */
+ public Builder setFindingIdBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ findingId_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.cloud.securitycenter.v1.Finding finding_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.securitycenter.v1.Finding,
+ com.google.cloud.securitycenter.v1.Finding.Builder,
+ com.google.cloud.securitycenter.v1.FindingOrBuilder>
+ findingBuilder_;
+ /**
+ *
+ *
+ * + * 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.v1.Finding finding = 3;
+ */
+ public boolean hasFinding() {
+ return findingBuilder_ != null || finding_ != null;
+ }
+ /**
+ *
+ *
+ * + * 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.v1.Finding finding = 3;
+ */
+ public com.google.cloud.securitycenter.v1.Finding getFinding() {
+ if (findingBuilder_ == null) {
+ return finding_ == null
+ ? com.google.cloud.securitycenter.v1.Finding.getDefaultInstance()
+ : finding_;
+ } else {
+ return findingBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * 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.v1.Finding finding = 3;
+ */
+ public Builder setFinding(com.google.cloud.securitycenter.v1.Finding value) {
+ if (findingBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ finding_ = value;
+ onChanged();
+ } else {
+ findingBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * 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.v1.Finding finding = 3;
+ */
+ public Builder setFinding(com.google.cloud.securitycenter.v1.Finding.Builder builderForValue) {
+ if (findingBuilder_ == null) {
+ finding_ = builderForValue.build();
+ onChanged();
+ } else {
+ findingBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * 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.v1.Finding finding = 3;
+ */
+ public Builder mergeFinding(com.google.cloud.securitycenter.v1.Finding value) {
+ if (findingBuilder_ == null) {
+ if (finding_ != null) {
+ finding_ =
+ com.google.cloud.securitycenter.v1.Finding.newBuilder(finding_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ finding_ = value;
+ }
+ onChanged();
+ } else {
+ findingBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * 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.v1.Finding finding = 3;
+ */
+ public Builder clearFinding() {
+ if (findingBuilder_ == null) {
+ finding_ = null;
+ onChanged();
+ } else {
+ finding_ = null;
+ findingBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * 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.v1.Finding finding = 3;
+ */
+ public com.google.cloud.securitycenter.v1.Finding.Builder getFindingBuilder() {
+
+ onChanged();
+ return getFindingFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * 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.v1.Finding finding = 3;
+ */
+ public com.google.cloud.securitycenter.v1.FindingOrBuilder getFindingOrBuilder() {
+ if (findingBuilder_ != null) {
+ return findingBuilder_.getMessageOrBuilder();
+ } else {
+ return finding_ == null
+ ? com.google.cloud.securitycenter.v1.Finding.getDefaultInstance()
+ : finding_;
+ }
+ }
+ /**
+ *
+ *
+ * + * 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.v1.Finding finding = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.securitycenter.v1.Finding,
+ com.google.cloud.securitycenter.v1.Finding.Builder,
+ com.google.cloud.securitycenter.v1.FindingOrBuilder>
+ getFindingFieldBuilder() {
+ if (findingBuilder_ == null) {
+ findingBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.securitycenter.v1.Finding,
+ com.google.cloud.securitycenter.v1.Finding.Builder,
+ com.google.cloud.securitycenter.v1.FindingOrBuilder>(
+ getFinding(), getParentForChildren(), isClean());
+ finding_ = null;
+ }
+ return findingBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.CreateFindingRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.CreateFindingRequest)
+ private static final com.google.cloud.securitycenter.v1.CreateFindingRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.CreateFindingRequest();
+ }
+
+ public static com.google.cloud.securitycenter.v1.CreateFindingRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Resource name of the new finding's parent. Its format should be + * "organizations/[organization_id]/sources/[source_id]". + *+ * + *
string parent = 1;
+ */
+ java.lang.String getParent();
+ /**
+ *
+ *
+ * + * Resource name of the new finding's parent. Its format should be + * "organizations/[organization_id]/sources/[source_id]". + *+ * + *
string parent = 1;
+ */
+ com.google.protobuf.ByteString getParentBytes();
+
+ /**
+ *
+ *
+ * + * 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;
+ */
+ java.lang.String getFindingId();
+ /**
+ *
+ *
+ * + * 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;
+ */
+ com.google.protobuf.ByteString getFindingIdBytes();
+
+ /**
+ *
+ *
+ * + * 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.v1.Finding finding = 3;
+ */
+ boolean hasFinding();
+ /**
+ *
+ *
+ * + * 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.v1.Finding finding = 3;
+ */
+ com.google.cloud.securitycenter.v1.Finding getFinding();
+ /**
+ *
+ *
+ * + * 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.v1.Finding finding = 3;
+ */
+ com.google.cloud.securitycenter.v1.FindingOrBuilder getFindingOrBuilder();
+}
diff --git a/google-api-grpc/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateSourceRequest.java b/google-api-grpc/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateSourceRequest.java
new file mode 100644
index 000000000000..a16d5f6679f9
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateSourceRequest.java
@@ -0,0 +1,885 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/securitycenter/v1/securitycenter_service.proto
+
+package com.google.cloud.securitycenter.v1;
+
+/**
+ *
+ *
+ * + * Request message for creating a source. + *+ * + * Protobuf type {@code google.cloud.securitycenter.v1.CreateSourceRequest} + */ +public final class CreateSourceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.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 + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateSourceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.securitycenter.v1.Source.Builder subBuilder = null; + if (source_ != null) { + subBuilder = source_.toBuilder(); + } + source_ = + input.readMessage( + com.google.cloud.securitycenter.v1.Source.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(source_); + source_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_CreateSourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_CreateSourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.CreateSourceRequest.class, + com.google.cloud.securitycenter.v1.CreateSourceRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+ * Resource name of the new source's parent. Its format should be + * "organizations/[organization_id]". + *+ * + *
string parent = 1;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * Resource name of the new source's parent. Its format should be + * "organizations/[organization_id]". + *+ * + *
string parent = 1;
+ */
+ 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.v1.Source source_;
+ /**
+ *
+ *
+ * + * The Source being created, only the display_name and description will be + * used. All other fields will be ignored. + *+ * + *
.google.cloud.securitycenter.v1.Source source = 2;
+ */
+ public boolean hasSource() {
+ return source_ != null;
+ }
+ /**
+ *
+ *
+ * + * The Source being created, only the display_name and description will be + * used. All other fields will be ignored. + *+ * + *
.google.cloud.securitycenter.v1.Source source = 2;
+ */
+ public com.google.cloud.securitycenter.v1.Source getSource() {
+ return source_ == null
+ ? com.google.cloud.securitycenter.v1.Source.getDefaultInstance()
+ : source_;
+ }
+ /**
+ *
+ *
+ * + * The Source being created, only the display_name and description will be + * used. All other fields will be ignored. + *+ * + *
.google.cloud.securitycenter.v1.Source source = 2;
+ */
+ public com.google.cloud.securitycenter.v1.SourceOrBuilder getSourceOrBuilder() {
+ return getSource();
+ }
+
+ 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 (!getParentBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
+ }
+ if (source_ != null) {
+ output.writeMessage(2, getSource());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getParentBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
+ }
+ if (source_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSource());
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.securitycenter.v1.CreateSourceRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.securitycenter.v1.CreateSourceRequest other =
+ (com.google.cloud.securitycenter.v1.CreateSourceRequest) obj;
+
+ boolean result = true;
+ result = result && getParent().equals(other.getParent());
+ result = result && (hasSource() == other.hasSource());
+ if (hasSource()) {
+ result = result && getSource().equals(other.getSource());
+ }
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @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) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.securitycenter.v1.CreateSourceRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.securitycenter.v1.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.v1.CreateSourceRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.securitycenter.v1.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.v1.CreateSourceRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.securitycenter.v1.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.v1.CreateSourceRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.securitycenter.v1.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.v1.CreateSourceRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.securitycenter.v1.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.v1.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.v1.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.v1.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.v1.CreateSourceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Resource name of the new source's parent. Its format should be + * "organizations/[organization_id]". + *+ * + *
string parent = 1;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * Resource name of the new source's parent. Its format should be + * "organizations/[organization_id]". + *+ * + *
string parent = 1;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * Resource name of the new source's parent. Its format should be + * "organizations/[organization_id]". + *+ * + *
string parent = 1;
+ */
+ public Builder setParent(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Resource name of the new source's parent. Its format should be + * "organizations/[organization_id]". + *+ * + *
string parent = 1;
+ */
+ public Builder clearParent() {
+
+ parent_ = getDefaultInstance().getParent();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Resource name of the new source's parent. Its format should be + * "organizations/[organization_id]". + *+ * + *
string parent = 1;
+ */
+ public Builder setParentBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.cloud.securitycenter.v1.Source source_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.securitycenter.v1.Source,
+ com.google.cloud.securitycenter.v1.Source.Builder,
+ com.google.cloud.securitycenter.v1.SourceOrBuilder>
+ sourceBuilder_;
+ /**
+ *
+ *
+ * + * The Source being created, only the display_name and description will be + * used. All other fields will be ignored. + *+ * + *
.google.cloud.securitycenter.v1.Source source = 2;
+ */
+ public boolean hasSource() {
+ return sourceBuilder_ != null || source_ != null;
+ }
+ /**
+ *
+ *
+ * + * The Source being created, only the display_name and description will be + * used. All other fields will be ignored. + *+ * + *
.google.cloud.securitycenter.v1.Source source = 2;
+ */
+ public com.google.cloud.securitycenter.v1.Source getSource() {
+ if (sourceBuilder_ == null) {
+ return source_ == null
+ ? com.google.cloud.securitycenter.v1.Source.getDefaultInstance()
+ : source_;
+ } else {
+ return sourceBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The Source being created, only the display_name and description will be + * used. All other fields will be ignored. + *+ * + *
.google.cloud.securitycenter.v1.Source source = 2;
+ */
+ public Builder setSource(com.google.cloud.securitycenter.v1.Source value) {
+ if (sourceBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ source_ = value;
+ onChanged();
+ } else {
+ sourceBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The Source being created, only the display_name and description will be + * used. All other fields will be ignored. + *+ * + *
.google.cloud.securitycenter.v1.Source source = 2;
+ */
+ public Builder setSource(com.google.cloud.securitycenter.v1.Source.Builder builderForValue) {
+ if (sourceBuilder_ == null) {
+ source_ = builderForValue.build();
+ onChanged();
+ } else {
+ sourceBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The Source being created, only the display_name and description will be + * used. All other fields will be ignored. + *+ * + *
.google.cloud.securitycenter.v1.Source source = 2;
+ */
+ public Builder mergeSource(com.google.cloud.securitycenter.v1.Source value) {
+ if (sourceBuilder_ == null) {
+ if (source_ != null) {
+ source_ =
+ com.google.cloud.securitycenter.v1.Source.newBuilder(source_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ source_ = value;
+ }
+ onChanged();
+ } else {
+ sourceBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The Source being created, only the display_name and description will be + * used. All other fields will be ignored. + *+ * + *
.google.cloud.securitycenter.v1.Source source = 2;
+ */
+ public Builder clearSource() {
+ if (sourceBuilder_ == null) {
+ source_ = null;
+ onChanged();
+ } else {
+ source_ = null;
+ sourceBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The Source being created, only the display_name and description will be + * used. All other fields will be ignored. + *+ * + *
.google.cloud.securitycenter.v1.Source source = 2;
+ */
+ public com.google.cloud.securitycenter.v1.Source.Builder getSourceBuilder() {
+
+ onChanged();
+ return getSourceFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The Source being created, only the display_name and description will be + * used. All other fields will be ignored. + *+ * + *
.google.cloud.securitycenter.v1.Source source = 2;
+ */
+ public com.google.cloud.securitycenter.v1.SourceOrBuilder getSourceOrBuilder() {
+ if (sourceBuilder_ != null) {
+ return sourceBuilder_.getMessageOrBuilder();
+ } else {
+ return source_ == null
+ ? com.google.cloud.securitycenter.v1.Source.getDefaultInstance()
+ : source_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The Source being created, only the display_name and description will be + * used. All other fields will be ignored. + *+ * + *
.google.cloud.securitycenter.v1.Source source = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.securitycenter.v1.Source,
+ com.google.cloud.securitycenter.v1.Source.Builder,
+ com.google.cloud.securitycenter.v1.SourceOrBuilder>
+ getSourceFieldBuilder() {
+ if (sourceBuilder_ == null) {
+ sourceBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.securitycenter.v1.Source,
+ com.google.cloud.securitycenter.v1.Source.Builder,
+ com.google.cloud.securitycenter.v1.SourceOrBuilder>(
+ getSource(), getParentForChildren(), isClean());
+ source_ = null;
+ }
+ return sourceBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.CreateSourceRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.CreateSourceRequest)
+ private static final com.google.cloud.securitycenter.v1.CreateSourceRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.CreateSourceRequest();
+ }
+
+ public static com.google.cloud.securitycenter.v1.CreateSourceRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Resource name of the new source's parent. Its format should be + * "organizations/[organization_id]". + *+ * + *
string parent = 1;
+ */
+ java.lang.String getParent();
+ /**
+ *
+ *
+ * + * Resource name of the new source's parent. Its format should be + * "organizations/[organization_id]". + *+ * + *
string parent = 1;
+ */
+ com.google.protobuf.ByteString getParentBytes();
+
+ /**
+ *
+ *
+ * + * The Source being created, only the display_name and description will be + * used. All other fields will be ignored. + *+ * + *
.google.cloud.securitycenter.v1.Source source = 2;
+ */
+ boolean hasSource();
+ /**
+ *
+ *
+ * + * The Source being created, only the display_name and description will be + * used. All other fields will be ignored. + *+ * + *
.google.cloud.securitycenter.v1.Source source = 2;
+ */
+ com.google.cloud.securitycenter.v1.Source getSource();
+ /**
+ *
+ *
+ * + * The Source being created, only the display_name and description will be + * used. All other fields will be ignored. + *+ * + *
.google.cloud.securitycenter.v1.Source source = 2;
+ */
+ com.google.cloud.securitycenter.v1.SourceOrBuilder getSourceOrBuilder();
+}
diff --git a/google-api-grpc/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Finding.java b/google-api-grpc/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Finding.java
new file mode 100644
index 000000000000..5a46dc0570b1
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Finding.java
@@ -0,0 +1,2828 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/securitycenter/v1/finding.proto
+
+package com.google.cloud.securitycenter.v1;
+
+/**
+ *
+ *
+ * + * Cloud Security Command Center (Cloud SCC) finding. + * A finding is a record of assessment data (security, risk, health or privacy) + * ingested into Cloud SCC for presentation, notification, analysis, + * policy testing, and enforcement. For example, an XSS vulnerability in an + * App Engine application is a finding. + *+ * + * Protobuf type {@code google.cloud.securitycenter.v1.Finding} + */ +public final class Finding extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.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_ = ""; + parent_ = ""; + resourceName_ = ""; + state_ = 0; + category_ = ""; + externalUri_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Finding( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + resourceName_ = s; + break; + } + case 32: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + category_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + externalUri_ = s; + break; + } + case 58: + { + if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) { + sourceProperties_ = + com.google.protobuf.MapField.newMapField( + SourcePropertiesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000040; + } + com.google.protobuf.MapEntry
+ * The state of the finding. + *+ * + * Protobuf enum {@code google.cloud.securitycenter.v1.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;
+ }
+
+ /** @deprecated Use {@link #forNumber(int)} instead. */
+ @java.lang.Deprecated
+ public static State valueOf(int value) {
+ return forNumber(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+ * The relative resource name of this finding. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/123/sources/456/findings/789" + *+ * + *
string name = 1;
+ */
+ 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 finding. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/123/sources/456/findings/789" + *+ * + *
string name = 1;
+ */
+ 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 PARENT_FIELD_NUMBER = 2;
+ private volatile java.lang.Object parent_;
+ /**
+ *
+ *
+ * + * The relative resource name of the source the finding belongs to. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * This field is immutable after creation time. + * For example: + * "organizations/123/sources/456" + *+ * + *
string parent = 2;
+ */
+ 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 the finding belongs to. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * This field is immutable after creation time. + * For example: + * "organizations/123/sources/456" + *+ * + *
string parent = 2;
+ */
+ 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 = 3;
+ private volatile java.lang.Object resourceName_;
+ /**
+ *
+ *
+ * + * The full resource name of the Google Cloud Platform (GCP) resource this + * finding is for. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * This field is immutable after creation time. + *+ * + *
string resource_name = 3;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * The full resource name of the Google Cloud Platform (GCP) resource this + * finding is for. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * This field is immutable after creation time. + *+ * + *
string resource_name = 3;
+ */
+ 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 = 4;
+ private int state_;
+ /**
+ *
+ *
+ * + * The state of the finding. + *+ * + *
.google.cloud.securitycenter.v1.Finding.State state = 4;
+ */
+ public int getStateValue() {
+ return state_;
+ }
+ /**
+ *
+ *
+ * + * The state of the finding. + *+ * + *
.google.cloud.securitycenter.v1.Finding.State state = 4;
+ */
+ public com.google.cloud.securitycenter.v1.Finding.State getState() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.securitycenter.v1.Finding.State result =
+ com.google.cloud.securitycenter.v1.Finding.State.valueOf(state_);
+ return result == null ? com.google.cloud.securitycenter.v1.Finding.State.UNRECOGNIZED : result;
+ }
+
+ public static final int CATEGORY_FIELD_NUMBER = 5;
+ private volatile java.lang.Object category_;
+ /**
+ *
+ *
+ * + * The additional taxonomy group within findings from a given source. + * This field is immutable after creation time. + * Example: "XSS_FLASH_INJECTION" + *+ * + *
string category = 5;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * The additional taxonomy group within findings from a given source. + * This field is immutable after creation time. + * Example: "XSS_FLASH_INJECTION" + *+ * + *
string category = 5;
+ */
+ 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 = 6;
+ private volatile java.lang.Object externalUri_;
+ /**
+ *
+ *
+ * + * The URI that, if available, points to a web page outside of Cloud SCC + * where additional information about the finding can be found. This field is + * guaranteed to be either empty or a well formed URL. + *+ * + *
string external_uri = 6;
+ */
+ 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 Cloud SCC + * where additional information about the finding can be found. This field is + * guaranteed to be either empty or a well formed URL. + *+ * + *
string external_uri = 6;
+ */
+ 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 = 7;
+
+ private static final class SourcePropertiesDefaultEntryHolder {
+ static final com.google.protobuf.MapEntry+ * 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 = 7;
+ */
+ public boolean containsSourceProperties(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ return internalGetSourceProperties().getMap().containsKey(key);
+ }
+ /** Use {@link #getSourcePropertiesMap()} instead. */
+ @java.lang.Deprecated
+ public java.util.Map+ * 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 = 7;
+ */
+ public java.util.Map+ * 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 = 7;
+ */
+ public com.google.protobuf.Value getSourcePropertiesOrDefault(
+ java.lang.String key, com.google.protobuf.Value defaultValue) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map+ * 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 = 7;
+ */
+ public com.google.protobuf.Value getSourcePropertiesOrThrow(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map+ * 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.v1.SecurityMarks security_marks = 8;
+ */
+ public boolean hasSecurityMarks() {
+ return securityMarks_ != null;
+ }
+ /**
+ *
+ *
+ * + * 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.v1.SecurityMarks security_marks = 8;
+ */
+ public com.google.cloud.securitycenter.v1.SecurityMarks getSecurityMarks() {
+ return securityMarks_ == null
+ ? com.google.cloud.securitycenter.v1.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.v1.SecurityMarks security_marks = 8;
+ */
+ public com.google.cloud.securitycenter.v1.SecurityMarksOrBuilder getSecurityMarksOrBuilder() {
+ return getSecurityMarks();
+ }
+
+ public static final int EVENT_TIME_FIELD_NUMBER = 9;
+ private com.google.protobuf.Timestamp eventTime_;
+ /**
+ *
+ *
+ * + * The time at which the event took place. For example, if the finding + * represents an open firewall it would capture the time the open firewall was + * detected. + *+ * + *
.google.protobuf.Timestamp event_time = 9;
+ */
+ public boolean hasEventTime() {
+ return eventTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The time at which the event took place. For example, if the finding + * represents an open firewall it would capture the time the open firewall was + * detected. + *+ * + *
.google.protobuf.Timestamp event_time = 9;
+ */
+ public com.google.protobuf.Timestamp getEventTime() {
+ return eventTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : eventTime_;
+ }
+ /**
+ *
+ *
+ * + * The time at which the event took place. For example, if the finding + * represents an open firewall it would capture the time the open firewall was + * detected. + *+ * + *
.google.protobuf.Timestamp event_time = 9;
+ */
+ public com.google.protobuf.TimestampOrBuilder getEventTimeOrBuilder() {
+ return getEventTime();
+ }
+
+ public static final int CREATE_TIME_FIELD_NUMBER = 10;
+ private com.google.protobuf.Timestamp createTime_;
+ /**
+ *
+ *
+ * + * The time at which the finding was created in Cloud SCC. + *+ * + *
.google.protobuf.Timestamp create_time = 10;
+ */
+ public boolean hasCreateTime() {
+ return createTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The time at which the finding was created in Cloud SCC. + *+ * + *
.google.protobuf.Timestamp create_time = 10;
+ */
+ public com.google.protobuf.Timestamp getCreateTime() {
+ return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
+ }
+ /**
+ *
+ *
+ * + * The time at which the finding was created in Cloud SCC. + *+ * + *
.google.protobuf.Timestamp create_time = 10;
+ */
+ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
+ return getCreateTime();
+ }
+
+ 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 (!getNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
+ }
+ if (!getParentBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, parent_);
+ }
+ if (!getResourceNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, resourceName_);
+ }
+ if (state_ != com.google.cloud.securitycenter.v1.Finding.State.STATE_UNSPECIFIED.getNumber()) {
+ output.writeEnum(4, state_);
+ }
+ if (!getCategoryBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 5, category_);
+ }
+ if (!getExternalUriBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 6, externalUri_);
+ }
+ com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
+ output, internalGetSourceProperties(), SourcePropertiesDefaultEntryHolder.defaultEntry, 7);
+ if (securityMarks_ != null) {
+ output.writeMessage(8, getSecurityMarks());
+ }
+ if (eventTime_ != null) {
+ output.writeMessage(9, getEventTime());
+ }
+ if (createTime_ != null) {
+ output.writeMessage(10, getCreateTime());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getNameBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
+ }
+ if (!getParentBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, parent_);
+ }
+ if (!getResourceNameBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, resourceName_);
+ }
+ if (state_ != com.google.cloud.securitycenter.v1.Finding.State.STATE_UNSPECIFIED.getNumber()) {
+ size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_);
+ }
+ if (!getCategoryBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, category_);
+ }
+ if (!getExternalUriBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, externalUri_);
+ }
+ for (java.util.Map.Entry+ * Cloud Security Command Center (Cloud SCC) finding. + * A finding is a record of assessment data (security, risk, health or privacy) + * ingested into Cloud SCC for presentation, notification, analysis, + * policy testing, and enforcement. For example, an XSS vulnerability in an + * App Engine application is a finding. + *+ * + * Protobuf type {@code google.cloud.securitycenter.v1.Finding} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The relative resource name of this finding. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/123/sources/456/findings/789" + *+ * + *
string name = 1;
+ */
+ 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 finding. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/123/sources/456/findings/789" + *+ * + *
string name = 1;
+ */
+ 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 finding. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/123/sources/456/findings/789" + *+ * + *
string name = 1;
+ */
+ public Builder setName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The relative resource name of this finding. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/123/sources/456/findings/789" + *+ * + *
string name = 1;
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The relative resource name of this finding. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/123/sources/456/findings/789" + *+ * + *
string name = 1;
+ */
+ public Builder setNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object parent_ = "";
+ /**
+ *
+ *
+ * + * The relative resource name of the source the finding belongs to. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * This field is immutable after creation time. + * For example: + * "organizations/123/sources/456" + *+ * + *
string parent = 2;
+ */
+ 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 the finding belongs to. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * This field is immutable after creation time. + * For example: + * "organizations/123/sources/456" + *+ * + *
string parent = 2;
+ */
+ 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 the finding belongs to. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * This field is immutable after creation time. + * For example: + * "organizations/123/sources/456" + *+ * + *
string parent = 2;
+ */
+ public Builder setParent(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The relative resource name of the source the finding belongs to. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * This field is immutable after creation time. + * For example: + * "organizations/123/sources/456" + *+ * + *
string parent = 2;
+ */
+ public Builder clearParent() {
+
+ parent_ = getDefaultInstance().getParent();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The relative resource name of the source the finding belongs to. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * This field is immutable after creation time. + * For example: + * "organizations/123/sources/456" + *+ * + *
string parent = 2;
+ */
+ public Builder setParentBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object resourceName_ = "";
+ /**
+ *
+ *
+ * + * The full resource name of the Google Cloud Platform (GCP) resource this + * finding is for. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * This field is immutable after creation time. + *+ * + *
string resource_name = 3;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * The full resource name of the Google Cloud Platform (GCP) resource this + * finding is for. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * This field is immutable after creation time. + *+ * + *
string resource_name = 3;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * The full resource name of the Google Cloud Platform (GCP) resource this + * finding is for. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * This field is immutable after creation time. + *+ * + *
string resource_name = 3;
+ */
+ public Builder setResourceName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ resourceName_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The full resource name of the Google Cloud Platform (GCP) resource this + * finding is for. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * This field is immutable after creation time. + *+ * + *
string resource_name = 3;
+ */
+ public Builder clearResourceName() {
+
+ resourceName_ = getDefaultInstance().getResourceName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The full resource name of the Google Cloud Platform (GCP) resource this + * finding is for. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * This field is immutable after creation time. + *+ * + *
string resource_name = 3;
+ */
+ public Builder setResourceNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ resourceName_ = value;
+ onChanged();
+ return this;
+ }
+
+ private int state_ = 0;
+ /**
+ *
+ *
+ * + * The state of the finding. + *+ * + *
.google.cloud.securitycenter.v1.Finding.State state = 4;
+ */
+ public int getStateValue() {
+ return state_;
+ }
+ /**
+ *
+ *
+ * + * The state of the finding. + *+ * + *
.google.cloud.securitycenter.v1.Finding.State state = 4;
+ */
+ public Builder setStateValue(int value) {
+ state_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The state of the finding. + *+ * + *
.google.cloud.securitycenter.v1.Finding.State state = 4;
+ */
+ public com.google.cloud.securitycenter.v1.Finding.State getState() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.securitycenter.v1.Finding.State result =
+ com.google.cloud.securitycenter.v1.Finding.State.valueOf(state_);
+ return result == null
+ ? com.google.cloud.securitycenter.v1.Finding.State.UNRECOGNIZED
+ : result;
+ }
+ /**
+ *
+ *
+ * + * The state of the finding. + *+ * + *
.google.cloud.securitycenter.v1.Finding.State state = 4;
+ */
+ public Builder setState(com.google.cloud.securitycenter.v1.Finding.State value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ state_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The state of the finding. + *+ * + *
.google.cloud.securitycenter.v1.Finding.State state = 4;
+ */
+ public Builder clearState() {
+
+ state_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object category_ = "";
+ /**
+ *
+ *
+ * + * The additional taxonomy group within findings from a given source. + * This field is immutable after creation time. + * Example: "XSS_FLASH_INJECTION" + *+ * + *
string category = 5;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * The additional taxonomy group within findings from a given source. + * This field is immutable after creation time. + * Example: "XSS_FLASH_INJECTION" + *+ * + *
string category = 5;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * The additional taxonomy group within findings from a given source. + * This field is immutable after creation time. + * Example: "XSS_FLASH_INJECTION" + *+ * + *
string category = 5;
+ */
+ public Builder setCategory(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ category_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The additional taxonomy group within findings from a given source. + * This field is immutable after creation time. + * Example: "XSS_FLASH_INJECTION" + *+ * + *
string category = 5;
+ */
+ public Builder clearCategory() {
+
+ category_ = getDefaultInstance().getCategory();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The additional taxonomy group within findings from a given source. + * This field is immutable after creation time. + * Example: "XSS_FLASH_INJECTION" + *+ * + *
string category = 5;
+ */
+ public Builder setCategoryBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ category_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object externalUri_ = "";
+ /**
+ *
+ *
+ * + * The URI that, if available, points to a web page outside of Cloud SCC + * where additional information about the finding can be found. This field is + * guaranteed to be either empty or a well formed URL. + *+ * + *
string external_uri = 6;
+ */
+ 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 Cloud SCC + * where additional information about the finding can be found. This field is + * guaranteed to be either empty or a well formed URL. + *+ * + *
string external_uri = 6;
+ */
+ 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 Cloud SCC + * where additional information about the finding can be found. This field is + * guaranteed to be either empty or a well formed URL. + *+ * + *
string external_uri = 6;
+ */
+ public Builder setExternalUri(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ externalUri_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The URI that, if available, points to a web page outside of Cloud SCC + * where additional information about the finding can be found. This field is + * guaranteed to be either empty or a well formed URL. + *+ * + *
string external_uri = 6;
+ */
+ public Builder clearExternalUri() {
+
+ externalUri_ = getDefaultInstance().getExternalUri();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The URI that, if available, points to a web page outside of Cloud SCC + * where additional information about the finding can be found. This field is + * guaranteed to be either empty or a well formed URL. + *+ * + *
string external_uri = 6;
+ */
+ public Builder setExternalUriBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ externalUri_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.MapField+ * 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 = 7;
+ */
+ public boolean containsSourceProperties(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ return internalGetSourceProperties().getMap().containsKey(key);
+ }
+ /** Use {@link #getSourcePropertiesMap()} instead. */
+ @java.lang.Deprecated
+ public java.util.Map+ * 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 = 7;
+ */
+ public java.util.Map+ * 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 = 7;
+ */
+ public com.google.protobuf.Value getSourcePropertiesOrDefault(
+ java.lang.String key, com.google.protobuf.Value defaultValue) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map+ * 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 = 7;
+ */
+ public com.google.protobuf.Value getSourcePropertiesOrThrow(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map+ * 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 = 7;
+ */
+ public Builder removeSourceProperties(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ internalGetMutableSourceProperties().getMutableMap().remove(key);
+ return this;
+ }
+ /** Use alternate mutation accessors instead. */
+ @java.lang.Deprecated
+ public java.util.Map+ * 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 = 7;
+ */
+ public Builder putSourceProperties(java.lang.String key, com.google.protobuf.Value value) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ if (value == null) {
+ throw new java.lang.NullPointerException();
+ }
+ internalGetMutableSourceProperties().getMutableMap().put(key, value);
+ 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 = 7;
+ */
+ public Builder putAllSourceProperties(
+ java.util.Map+ * 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.v1.SecurityMarks security_marks = 8;
+ */
+ public boolean hasSecurityMarks() {
+ return securityMarksBuilder_ != null || securityMarks_ != null;
+ }
+ /**
+ *
+ *
+ * + * 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.v1.SecurityMarks security_marks = 8;
+ */
+ public com.google.cloud.securitycenter.v1.SecurityMarks getSecurityMarks() {
+ if (securityMarksBuilder_ == null) {
+ return securityMarks_ == null
+ ? com.google.cloud.securitycenter.v1.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.v1.SecurityMarks security_marks = 8;
+ */
+ public Builder setSecurityMarks(com.google.cloud.securitycenter.v1.SecurityMarks value) {
+ if (securityMarksBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ securityMarks_ = value;
+ onChanged();
+ } else {
+ securityMarksBuilder_.setMessage(value);
+ }
+
+ 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.v1.SecurityMarks security_marks = 8;
+ */
+ public Builder setSecurityMarks(
+ com.google.cloud.securitycenter.v1.SecurityMarks.Builder builderForValue) {
+ if (securityMarksBuilder_ == null) {
+ securityMarks_ = builderForValue.build();
+ onChanged();
+ } else {
+ securityMarksBuilder_.setMessage(builderForValue.build());
+ }
+
+ 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.v1.SecurityMarks security_marks = 8;
+ */
+ public Builder mergeSecurityMarks(com.google.cloud.securitycenter.v1.SecurityMarks value) {
+ if (securityMarksBuilder_ == null) {
+ if (securityMarks_ != null) {
+ securityMarks_ =
+ com.google.cloud.securitycenter.v1.SecurityMarks.newBuilder(securityMarks_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ securityMarks_ = value;
+ }
+ onChanged();
+ } else {
+ securityMarksBuilder_.mergeFrom(value);
+ }
+
+ 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.v1.SecurityMarks security_marks = 8;
+ */
+ public Builder clearSecurityMarks() {
+ if (securityMarksBuilder_ == null) {
+ securityMarks_ = null;
+ onChanged();
+ } else {
+ securityMarks_ = null;
+ securityMarksBuilder_ = null;
+ }
+
+ 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.v1.SecurityMarks security_marks = 8;
+ */
+ public com.google.cloud.securitycenter.v1.SecurityMarks.Builder getSecurityMarksBuilder() {
+
+ 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.v1.SecurityMarks security_marks = 8;
+ */
+ public com.google.cloud.securitycenter.v1.SecurityMarksOrBuilder getSecurityMarksOrBuilder() {
+ if (securityMarksBuilder_ != null) {
+ return securityMarksBuilder_.getMessageOrBuilder();
+ } else {
+ return securityMarks_ == null
+ ? com.google.cloud.securitycenter.v1.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.v1.SecurityMarks security_marks = 8;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.securitycenter.v1.SecurityMarks,
+ com.google.cloud.securitycenter.v1.SecurityMarks.Builder,
+ com.google.cloud.securitycenter.v1.SecurityMarksOrBuilder>
+ getSecurityMarksFieldBuilder() {
+ if (securityMarksBuilder_ == null) {
+ securityMarksBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.securitycenter.v1.SecurityMarks,
+ com.google.cloud.securitycenter.v1.SecurityMarks.Builder,
+ com.google.cloud.securitycenter.v1.SecurityMarksOrBuilder>(
+ getSecurityMarks(), getParentForChildren(), isClean());
+ securityMarks_ = null;
+ }
+ return securityMarksBuilder_;
+ }
+
+ private com.google.protobuf.Timestamp eventTime_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ eventTimeBuilder_;
+ /**
+ *
+ *
+ * + * The time at which the event took place. For example, if the finding + * represents an open firewall it would capture the time the open firewall was + * detected. + *+ * + *
.google.protobuf.Timestamp event_time = 9;
+ */
+ public boolean hasEventTime() {
+ return eventTimeBuilder_ != null || eventTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The time at which the event took place. For example, if the finding + * represents an open firewall it would capture the time the open firewall was + * detected. + *+ * + *
.google.protobuf.Timestamp event_time = 9;
+ */
+ public com.google.protobuf.Timestamp getEventTime() {
+ if (eventTimeBuilder_ == null) {
+ return eventTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : eventTime_;
+ } else {
+ return eventTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The time at which the event took place. For example, if the finding + * represents an open firewall it would capture the time the open firewall was + * detected. + *+ * + *
.google.protobuf.Timestamp event_time = 9;
+ */
+ public Builder setEventTime(com.google.protobuf.Timestamp value) {
+ if (eventTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ eventTime_ = value;
+ onChanged();
+ } else {
+ eventTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time at which the event took place. For example, if the finding + * represents an open firewall it would capture the time the open firewall was + * detected. + *+ * + *
.google.protobuf.Timestamp event_time = 9;
+ */
+ public Builder setEventTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (eventTimeBuilder_ == null) {
+ eventTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ eventTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time at which the event took place. For example, if the finding + * represents an open firewall it would capture the time the open firewall was + * detected. + *+ * + *
.google.protobuf.Timestamp event_time = 9;
+ */
+ public Builder mergeEventTime(com.google.protobuf.Timestamp value) {
+ if (eventTimeBuilder_ == null) {
+ if (eventTime_ != null) {
+ eventTime_ =
+ com.google.protobuf.Timestamp.newBuilder(eventTime_).mergeFrom(value).buildPartial();
+ } else {
+ eventTime_ = value;
+ }
+ onChanged();
+ } else {
+ eventTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time at which the event took place. For example, if the finding + * represents an open firewall it would capture the time the open firewall was + * detected. + *+ * + *
.google.protobuf.Timestamp event_time = 9;
+ */
+ public Builder clearEventTime() {
+ if (eventTimeBuilder_ == null) {
+ eventTime_ = null;
+ onChanged();
+ } else {
+ eventTime_ = null;
+ eventTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time at which the event took place. For example, if the finding + * represents an open firewall it would capture the time the open firewall was + * detected. + *+ * + *
.google.protobuf.Timestamp event_time = 9;
+ */
+ public com.google.protobuf.Timestamp.Builder getEventTimeBuilder() {
+
+ onChanged();
+ return getEventTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The time at which the event took place. For example, if the finding + * represents an open firewall it would capture the time the open firewall was + * detected. + *+ * + *
.google.protobuf.Timestamp event_time = 9;
+ */
+ public com.google.protobuf.TimestampOrBuilder getEventTimeOrBuilder() {
+ if (eventTimeBuilder_ != null) {
+ return eventTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return eventTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : eventTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The time at which the event took place. For example, if the finding + * represents an open firewall it would capture the time the open firewall was + * detected. + *+ * + *
.google.protobuf.Timestamp event_time = 9;
+ */
+ 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_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ createTimeBuilder_;
+ /**
+ *
+ *
+ * + * The time at which the finding was created in Cloud SCC. + *+ * + *
.google.protobuf.Timestamp create_time = 10;
+ */
+ public boolean hasCreateTime() {
+ return createTimeBuilder_ != null || createTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The time at which the finding was created in Cloud SCC. + *+ * + *
.google.protobuf.Timestamp create_time = 10;
+ */
+ public com.google.protobuf.Timestamp getCreateTime() {
+ if (createTimeBuilder_ == null) {
+ return createTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : createTime_;
+ } else {
+ return createTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The time at which the finding was created in Cloud SCC. + *+ * + *
.google.protobuf.Timestamp create_time = 10;
+ */
+ public Builder setCreateTime(com.google.protobuf.Timestamp value) {
+ if (createTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ createTime_ = value;
+ onChanged();
+ } else {
+ createTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time at which the finding was created in Cloud SCC. + *+ * + *
.google.protobuf.Timestamp create_time = 10;
+ */
+ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (createTimeBuilder_ == null) {
+ createTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ createTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time at which the finding was created in Cloud SCC. + *+ * + *
.google.protobuf.Timestamp create_time = 10;
+ */
+ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) {
+ if (createTimeBuilder_ == null) {
+ if (createTime_ != null) {
+ createTime_ =
+ com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial();
+ } else {
+ createTime_ = value;
+ }
+ onChanged();
+ } else {
+ createTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time at which the finding was created in Cloud SCC. + *+ * + *
.google.protobuf.Timestamp create_time = 10;
+ */
+ public Builder clearCreateTime() {
+ if (createTimeBuilder_ == null) {
+ createTime_ = null;
+ onChanged();
+ } else {
+ createTime_ = null;
+ createTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time at which the finding was created in Cloud SCC. + *+ * + *
.google.protobuf.Timestamp create_time = 10;
+ */
+ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() {
+
+ onChanged();
+ return getCreateTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The time at which the finding was created in Cloud SCC. + *+ * + *
.google.protobuf.Timestamp create_time = 10;
+ */
+ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
+ if (createTimeBuilder_ != null) {
+ return createTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return createTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : createTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The time at which the finding was created in Cloud SCC. + *+ * + *
.google.protobuf.Timestamp create_time = 10;
+ */
+ 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.setUnknownFieldsProto3(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Finding)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Finding)
+ private static final com.google.cloud.securitycenter.v1.Finding DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Finding();
+ }
+
+ public static com.google.cloud.securitycenter.v1.Finding getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The relative resource name of this finding. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/123/sources/456/findings/789" + *+ * + *
string name = 1;
+ */
+ java.lang.String getName();
+ /**
+ *
+ *
+ * + * The relative resource name of this finding. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/123/sources/456/findings/789" + *+ * + *
string name = 1;
+ */
+ com.google.protobuf.ByteString getNameBytes();
+
+ /**
+ *
+ *
+ * + * The relative resource name of the source the finding belongs to. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * This field is immutable after creation time. + * For example: + * "organizations/123/sources/456" + *+ * + *
string parent = 2;
+ */
+ java.lang.String getParent();
+ /**
+ *
+ *
+ * + * The relative resource name of the source the finding belongs to. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * This field is immutable after creation time. + * For example: + * "organizations/123/sources/456" + *+ * + *
string parent = 2;
+ */
+ com.google.protobuf.ByteString getParentBytes();
+
+ /**
+ *
+ *
+ * + * The full resource name of the Google Cloud Platform (GCP) resource this + * finding is for. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * This field is immutable after creation time. + *+ * + *
string resource_name = 3;
+ */
+ java.lang.String getResourceName();
+ /**
+ *
+ *
+ * + * The full resource name of the Google Cloud Platform (GCP) resource this + * finding is for. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * This field is immutable after creation time. + *+ * + *
string resource_name = 3;
+ */
+ com.google.protobuf.ByteString getResourceNameBytes();
+
+ /**
+ *
+ *
+ * + * The state of the finding. + *+ * + *
.google.cloud.securitycenter.v1.Finding.State state = 4;
+ */
+ int getStateValue();
+ /**
+ *
+ *
+ * + * The state of the finding. + *+ * + *
.google.cloud.securitycenter.v1.Finding.State state = 4;
+ */
+ com.google.cloud.securitycenter.v1.Finding.State getState();
+
+ /**
+ *
+ *
+ * + * The additional taxonomy group within findings from a given source. + * This field is immutable after creation time. + * Example: "XSS_FLASH_INJECTION" + *+ * + *
string category = 5;
+ */
+ java.lang.String getCategory();
+ /**
+ *
+ *
+ * + * The additional taxonomy group within findings from a given source. + * This field is immutable after creation time. + * Example: "XSS_FLASH_INJECTION" + *+ * + *
string category = 5;
+ */
+ com.google.protobuf.ByteString getCategoryBytes();
+
+ /**
+ *
+ *
+ * + * The URI that, if available, points to a web page outside of Cloud SCC + * where additional information about the finding can be found. This field is + * guaranteed to be either empty or a well formed URL. + *+ * + *
string external_uri = 6;
+ */
+ java.lang.String getExternalUri();
+ /**
+ *
+ *
+ * + * The URI that, if available, points to a web page outside of Cloud SCC + * where additional information about the finding can be found. This field is + * guaranteed to be either empty or a well formed URL. + *+ * + *
string external_uri = 6;
+ */
+ 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 = 7;
+ */
+ 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 = 7;
+ */
+ boolean containsSourceProperties(java.lang.String key);
+ /** Use {@link #getSourcePropertiesMap()} instead. */
+ @java.lang.Deprecated
+ java.util.Map+ * 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 = 7;
+ */
+ java.util.Map+ * 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 = 7;
+ */
+ com.google.protobuf.Value getSourcePropertiesOrDefault(
+ java.lang.String key, 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 = 7;
+ */
+ 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.v1.SecurityMarks security_marks = 8;
+ */
+ 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.v1.SecurityMarks security_marks = 8;
+ */
+ com.google.cloud.securitycenter.v1.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.v1.SecurityMarks security_marks = 8;
+ */
+ com.google.cloud.securitycenter.v1.SecurityMarksOrBuilder getSecurityMarksOrBuilder();
+
+ /**
+ *
+ *
+ * + * The time at which the event took place. For example, if the finding + * represents an open firewall it would capture the time the open firewall was + * detected. + *+ * + *
.google.protobuf.Timestamp event_time = 9;
+ */
+ boolean hasEventTime();
+ /**
+ *
+ *
+ * + * The time at which the event took place. For example, if the finding + * represents an open firewall it would capture the time the open firewall was + * detected. + *+ * + *
.google.protobuf.Timestamp event_time = 9;
+ */
+ com.google.protobuf.Timestamp getEventTime();
+ /**
+ *
+ *
+ * + * The time at which the event took place. For example, if the finding + * represents an open firewall it would capture the time the open firewall was + * detected. + *+ * + *
.google.protobuf.Timestamp event_time = 9;
+ */
+ com.google.protobuf.TimestampOrBuilder getEventTimeOrBuilder();
+
+ /**
+ *
+ *
+ * + * The time at which the finding was created in Cloud SCC. + *+ * + *
.google.protobuf.Timestamp create_time = 10;
+ */
+ boolean hasCreateTime();
+ /**
+ *
+ *
+ * + * The time at which the finding was created in Cloud SCC. + *+ * + *
.google.protobuf.Timestamp create_time = 10;
+ */
+ com.google.protobuf.Timestamp getCreateTime();
+ /**
+ *
+ *
+ * + * The time at which the finding was created in Cloud SCC. + *+ * + *
.google.protobuf.Timestamp create_time = 10;
+ */
+ com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder();
+}
diff --git a/google-api-grpc/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOuterClass.java b/google-api-grpc/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOuterClass.java
new file mode 100644
index 000000000000..18990019673b
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOuterClass.java
@@ -0,0 +1,105 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/securitycenter/v1/finding.proto
+
+package com.google.cloud.securitycenter.v1;
+
+public final class FindingOuterClass {
+ private FindingOuterClass() {}
+
+ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {}
+
+ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) {
+ registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry);
+ }
+
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_securitycenter_v1_Finding_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_securitycenter_v1_Finding_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_securitycenter_v1_Finding_SourcePropertiesEntry_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_securitycenter_v1_Finding_SourcePropertiesEntry_fieldAccessorTable;
+
+ 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/v1/finding"
+ + ".proto\022\036google.cloud.securitycenter.v1\032\034"
+ + "google/api/annotations.proto\0323google/clo"
+ + "ud/securitycenter/v1/security_marks.prot"
+ + "o\032\034google/protobuf/struct.proto\032\037google/"
+ + "protobuf/timestamp.proto\"\261\004\n\007Finding\022\014\n\004"
+ + "name\030\001 \001(\t\022\016\n\006parent\030\002 \001(\t\022\025\n\rresource_n"
+ + "ame\030\003 \001(\t\022<\n\005state\030\004 \001(\0162-.google.cloud."
+ + "securitycenter.v1.Finding.State\022\020\n\010categ"
+ + "ory\030\005 \001(\t\022\024\n\014external_uri\030\006 \001(\t\022X\n\021sourc"
+ + "e_properties\030\007 \003(\0132=.google.cloud.securi"
+ + "tycenter.v1.Finding.SourcePropertiesEntr"
+ + "y\022E\n\016security_marks\030\010 \001(\0132-.google.cloud"
+ + ".securitycenter.v1.SecurityMarks\022.\n\neven"
+ + "t_time\030\t \001(\0132\032.google.protobuf.Timestamp"
+ + "\022/\n\013create_time\030\n \001(\0132\032.google.protobuf."
+ + "Timestamp\032O\n\025SourcePropertiesEntry\022\013\n\003ke"
+ + "y\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.google.protobuf"
+ + ".Value:\0028\001\"8\n\005State\022\025\n\021STATE_UNSPECIFIED"
+ + "\020\000\022\n\n\006ACTIVE\020\001\022\014\n\010INACTIVE\020\002Bt\n\"com.goog"
+ + "le.cloud.securitycenter.v1P\001ZLgoogle.gol"
+ + "ang.org/genproto/googleapis/cloud/securi"
+ + "tycenter/v1;securitycenterb\006proto3"
+ };
+ com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
+ new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
+ public com.google.protobuf.ExtensionRegistry assignDescriptors(
+ com.google.protobuf.Descriptors.FileDescriptor root) {
+ descriptor = root;
+ return null;
+ }
+ };
+ com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
+ descriptorData,
+ new com.google.protobuf.Descriptors.FileDescriptor[] {
+ com.google.api.AnnotationsProto.getDescriptor(),
+ com.google.cloud.securitycenter.v1.SecurityMarksOuterClass.getDescriptor(),
+ com.google.protobuf.StructProto.getDescriptor(),
+ com.google.protobuf.TimestampProto.getDescriptor(),
+ },
+ assigner);
+ internal_static_google_cloud_securitycenter_v1_Finding_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_google_cloud_securitycenter_v1_Finding_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_securitycenter_v1_Finding_descriptor,
+ new java.lang.String[] {
+ "Name",
+ "Parent",
+ "ResourceName",
+ "State",
+ "Category",
+ "ExternalUri",
+ "SourceProperties",
+ "SecurityMarks",
+ "EventTime",
+ "CreateTime",
+ });
+ internal_static_google_cloud_securitycenter_v1_Finding_SourcePropertiesEntry_descriptor =
+ internal_static_google_cloud_securitycenter_v1_Finding_descriptor.getNestedTypes().get(0);
+ internal_static_google_cloud_securitycenter_v1_Finding_SourcePropertiesEntry_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_securitycenter_v1_Finding_SourcePropertiesEntry_descriptor,
+ new java.lang.String[] {
+ "Key", "Value",
+ });
+ com.google.api.AnnotationsProto.getDescriptor();
+ com.google.cloud.securitycenter.v1.SecurityMarksOuterClass.getDescriptor();
+ com.google.protobuf.StructProto.getDescriptor();
+ com.google.protobuf.TimestampProto.getDescriptor();
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
diff --git a/google-api-grpc/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingSecurityMarksName.java b/google-api-grpc/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingSecurityMarksName.java
new file mode 100644
index 000000000000..a644f8166514
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingSecurityMarksName.java
@@ -0,0 +1,208 @@
+/*
+ * Copyright 2018 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.google.cloud.securitycenter.v1;
+
+import com.google.api.pathtemplate.PathTemplate;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.ImmutableMap;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS
+@javax.annotation.Generated("by GAPIC protoc plugin")
+public class FindingSecurityMarksName extends SecuritymarksName {
+
+ private static final PathTemplate PATH_TEMPLATE =
+ PathTemplate.createWithoutUrlEncoding(
+ "organizations/{organization}/sources/{source}/findings/{finding}/securityMarks");
+
+ private volatile Map+ * Request message for getting organization settings. + *+ * + * Protobuf type {@code google.cloud.securitycenter.v1.GetOrganizationSettingsRequest} + */ +public final class GetOrganizationSettingsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.GetOrganizationSettingsRequest) + GetOrganizationSettingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetOrganizationSettingsRequest.newBuilder() to construct. + private GetOrganizationSettingsRequest( + com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private GetOrganizationSettingsRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetOrganizationSettingsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_GetOrganizationSettingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_GetOrganizationSettingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest.class, + com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+ * Name of the organization to get organization settings for. Its format is + * "organizations/[organization_id]/organizationSettings". + *+ * + *
string name = 1;
+ */
+ 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 organization to get organization settings for. Its format is + * "organizations/[organization_id]/organizationSettings". + *+ * + *
string name = 1;
+ */
+ 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 (!getNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getNameBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest other =
+ (com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest) obj;
+
+ boolean result = true;
+ result = result && getName().equals(other.getName());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getName().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest parseFrom(
+ byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest
+ parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest 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 organization settings. + *+ * + * Protobuf type {@code google.cloud.securitycenter.v1.GetOrganizationSettingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Name of the organization to get organization settings for. Its format is + * "organizations/[organization_id]/organizationSettings". + *+ * + *
string name = 1;
+ */
+ 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 organization to get organization settings for. Its format is + * "organizations/[organization_id]/organizationSettings". + *+ * + *
string name = 1;
+ */
+ 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 organization to get organization settings for. Its format is + * "organizations/[organization_id]/organizationSettings". + *+ * + *
string name = 1;
+ */
+ public Builder setName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Name of the organization to get organization settings for. Its format is + * "organizations/[organization_id]/organizationSettings". + *+ * + *
string name = 1;
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Name of the organization to get organization settings for. Its format is + * "organizations/[organization_id]/organizationSettings". + *+ * + *
string name = 1;
+ */
+ public Builder setNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.GetOrganizationSettingsRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.GetOrganizationSettingsRequest)
+ private static final com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest();
+ }
+
+ public static com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Name of the organization to get organization settings for. Its format is + * "organizations/[organization_id]/organizationSettings". + *+ * + *
string name = 1;
+ */
+ java.lang.String getName();
+ /**
+ *
+ *
+ * + * Name of the organization to get organization settings for. Its format is + * "organizations/[organization_id]/organizationSettings". + *+ * + *
string name = 1;
+ */
+ com.google.protobuf.ByteString getNameBytes();
+}
diff --git a/google-api-grpc/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetSourceRequest.java b/google-api-grpc/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetSourceRequest.java
new file mode 100644
index 000000000000..917d5477ce60
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetSourceRequest.java
@@ -0,0 +1,606 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/securitycenter/v1/securitycenter_service.proto
+
+package com.google.cloud.securitycenter.v1;
+
+/**
+ *
+ *
+ * + * Request message for getting a source. + *+ * + * Protobuf type {@code google.cloud.securitycenter.v1.GetSourceRequest} + */ +public final class GetSourceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.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 + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetSourceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_GetSourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_GetSourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.GetSourceRequest.class, + com.google.cloud.securitycenter.v1.GetSourceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+ * Relative resource name of the source. Its format is + * "organizations/[organization_id]/source/[source_id]". + *+ * + *
string name = 1;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * Relative resource name of the source. Its format is + * "organizations/[organization_id]/source/[source_id]". + *+ * + *
string name = 1;
+ */
+ 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 (!getNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getNameBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.securitycenter.v1.GetSourceRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.securitycenter.v1.GetSourceRequest other =
+ (com.google.cloud.securitycenter.v1.GetSourceRequest) obj;
+
+ boolean result = true;
+ result = result && getName().equals(other.getName());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getName().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.securitycenter.v1.GetSourceRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.securitycenter.v1.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.v1.GetSourceRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.securitycenter.v1.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.v1.GetSourceRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.securitycenter.v1.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.v1.GetSourceRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.securitycenter.v1.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.v1.GetSourceRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.securitycenter.v1.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.v1.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.v1.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.v1.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.v1.GetSourceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Relative resource name of the source. Its format is + * "organizations/[organization_id]/source/[source_id]". + *+ * + *
string name = 1;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * Relative resource name of the source. Its format is + * "organizations/[organization_id]/source/[source_id]". + *+ * + *
string name = 1;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * Relative resource name of the source. Its format is + * "organizations/[organization_id]/source/[source_id]". + *+ * + *
string name = 1;
+ */
+ public Builder setName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Relative resource name of the source. Its format is + * "organizations/[organization_id]/source/[source_id]". + *+ * + *
string name = 1;
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Relative resource name of the source. Its format is + * "organizations/[organization_id]/source/[source_id]". + *+ * + *
string name = 1;
+ */
+ public Builder setNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.GetSourceRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.GetSourceRequest)
+ private static final com.google.cloud.securitycenter.v1.GetSourceRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.GetSourceRequest();
+ }
+
+ public static com.google.cloud.securitycenter.v1.GetSourceRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Relative resource name of the source. Its format is + * "organizations/[organization_id]/source/[source_id]". + *+ * + *
string name = 1;
+ */
+ java.lang.String getName();
+ /**
+ *
+ *
+ * + * Relative resource name of the source. Its format is + * "organizations/[organization_id]/source/[source_id]". + *+ * + *
string name = 1;
+ */
+ com.google.protobuf.ByteString getNameBytes();
+}
diff --git a/google-api-grpc/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupAssetsRequest.java b/google-api-grpc/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupAssetsRequest.java
new file mode 100644
index 000000000000..a6cb10133240
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupAssetsRequest.java
@@ -0,0 +1,2369 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/securitycenter/v1/securitycenter_service.proto
+
+package com.google.cloud.securitycenter.v1;
+
+/**
+ *
+ *
+ * + * Request message for grouping by assets. + *+ * + * Protobuf type {@code google.cloud.securitycenter.v1.GroupAssetsRequest} + */ +public final class GroupAssetsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.GroupAssetsRequest) + GroupAssetsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GroupAssetsRequest.newBuilder() to construct. + private GroupAssetsRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private GroupAssetsRequest() { + parent_ = ""; + filter_ = ""; + groupBy_ = ""; + having_ = ""; + pageToken_ = ""; + pageSize_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GroupAssetsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + groupBy_ = s; + break; + } + case 34: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (compareDuration_ != null) { + subBuilder = compareDuration_.toBuilder(); + } + compareDuration_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(compareDuration_); + compareDuration_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (readTime_ != null) { + subBuilder = readTime_.toBuilder(); + } + readTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readTime_); + readTime_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + having_ = s; + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 64: + { + pageSize_ = input.readInt32(); + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_GroupAssetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_GroupAssetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.GroupAssetsRequest.class, + com.google.cloud.securitycenter.v1.GroupAssetsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+ * Name of the organization to groupBy. Its format is + * "organizations/[organization_id]". + *+ * + *
string parent = 1;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * Name of the organization to groupBy. Its format is + * "organizations/[organization_id]". + *+ * + *
string parent = 1;
+ */
+ public com.google.protobuf.ByteString getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int FILTER_FIELD_NUMBER = 2;
+ private volatile java.lang.Object filter_;
+ /**
+ *
+ *
+ * + * Expression that defines the filter to apply across assets. + * 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 Asset resource. Examples include: + * * name + * * security_center_properties.resource_name + * * resource_properties.a_property + * * 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. + * For example, `resource_properties.size = 100` is a valid filter string. + *+ * + *
string filter = 2;
+ */
+ 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 assets. + * 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 Asset resource. Examples include: + * * name + * * security_center_properties.resource_name + * * resource_properties.a_property + * * 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. + * For example, `resource_properties.size = 100` is a valid filter string. + *+ * + *
string filter = 2;
+ */
+ 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;
+ private volatile java.lang.Object groupBy_;
+ /**
+ *
+ *
+ * + * Expression that defines what assets fields to use for grouping. The string + * value should follow SQL syntax: comma separated list of fields. For + * example: + * "security_center_properties.resource_project,security_center_properties.project". + * The following fields are supported when compare_duration is not set: + * * security_center_properties.resource_project + * * security_center_properties.resource_type + * * security_center_properties.resource_parent + * The following fields are supported when compare_duration is set: + * * security_center_properties.resource_type + *+ * + *
string group_by = 3;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * Expression that defines what assets fields to use for grouping. The string + * value should follow SQL syntax: comma separated list of fields. For + * example: + * "security_center_properties.resource_project,security_center_properties.project". + * The following fields are supported when compare_duration is not set: + * * security_center_properties.resource_project + * * security_center_properties.resource_type + * * security_center_properties.resource_parent + * The following fields are supported when compare_duration is set: + * * security_center_properties.resource_type + *+ * + *
string group_by = 3;
+ */
+ 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 COMPARE_DURATION_FIELD_NUMBER = 4;
+ private com.google.protobuf.Duration compareDuration_;
+ /**
+ *
+ *
+ * + * When compare_duration is set, the GroupResult's "state_change" property is + * updated to indicate whether the asset was added, removed, or remained + * present during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * Possible "state_change" values when compare_duration is specified: + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at reference_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at reference_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and reference_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + *+ * + *
.google.protobuf.Duration compare_duration = 4;
+ */
+ public boolean hasCompareDuration() {
+ return compareDuration_ != null;
+ }
+ /**
+ *
+ *
+ * + * When compare_duration is set, the GroupResult's "state_change" property is + * updated to indicate whether the asset was added, removed, or remained + * present during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * Possible "state_change" values when compare_duration is specified: + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at reference_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at reference_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and reference_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + *+ * + *
.google.protobuf.Duration compare_duration = 4;
+ */
+ public com.google.protobuf.Duration getCompareDuration() {
+ return compareDuration_ == null
+ ? com.google.protobuf.Duration.getDefaultInstance()
+ : compareDuration_;
+ }
+ /**
+ *
+ *
+ * + * When compare_duration is set, the GroupResult's "state_change" property is + * updated to indicate whether the asset was added, removed, or remained + * present during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * Possible "state_change" values when compare_duration is specified: + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at reference_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at reference_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and reference_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + *+ * + *
.google.protobuf.Duration compare_duration = 4;
+ */
+ public com.google.protobuf.DurationOrBuilder getCompareDurationOrBuilder() {
+ return getCompareDuration();
+ }
+
+ public static final int READ_TIME_FIELD_NUMBER = 5;
+ private com.google.protobuf.Timestamp readTime_;
+ /**
+ *
+ *
+ * + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + *+ * + *
.google.protobuf.Timestamp read_time = 5;
+ */
+ public boolean hasReadTime() {
+ return readTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + *+ * + *
.google.protobuf.Timestamp read_time = 5;
+ */
+ public com.google.protobuf.Timestamp getReadTime() {
+ return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_;
+ }
+ /**
+ *
+ *
+ * + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + *+ * + *
.google.protobuf.Timestamp read_time = 5;
+ */
+ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() {
+ return getReadTime();
+ }
+
+ public static final int HAVING_FIELD_NUMBER = 6;
+ private volatile java.lang.Object having_;
+ /**
+ *
+ *
+ * + * Filter that specifies what fields to further filter on *after* the query + * filter has been executed. Currently only 'state_change' is supported and + * requires compare_duration to be specified. + *+ * + *
string having = 6;
+ */
+ public java.lang.String getHaving() {
+ java.lang.Object ref = having_;
+ 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();
+ having_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Filter that specifies what fields to further filter on *after* the query + * filter has been executed. Currently only 'state_change' is supported and + * requires compare_duration to be specified. + *+ * + *
string having = 6;
+ */
+ public com.google.protobuf.ByteString getHavingBytes() {
+ java.lang.Object ref = having_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ having_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PAGE_TOKEN_FIELD_NUMBER = 7;
+ private volatile java.lang.Object pageToken_;
+ /**
+ *
+ *
+ * + * The value returned by the last `GroupAssetsResponse`; indicates + * that this is a continuation of a prior `GroupAssets` call, and that the + * system should return the next page of data. + *+ * + *
string page_token = 7;
+ */
+ 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 `GroupAssetsResponse`; indicates + * that this is a continuation of a prior `GroupAssets` call, and that the + * system should return the next page of data. + *+ * + *
string page_token = 7;
+ */
+ 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_;
+ /**
+ *
+ *
+ * + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + *+ * + *
int32 page_size = 8;
+ */
+ 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 (!getParentBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
+ }
+ if (!getFilterBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_);
+ }
+ if (!getGroupByBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, groupBy_);
+ }
+ if (compareDuration_ != null) {
+ output.writeMessage(4, getCompareDuration());
+ }
+ if (readTime_ != null) {
+ output.writeMessage(5, getReadTime());
+ }
+ if (!getHavingBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 6, having_);
+ }
+ if (!getPageTokenBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 7, pageToken_);
+ }
+ if (pageSize_ != 0) {
+ output.writeInt32(8, pageSize_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getParentBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
+ }
+ if (!getFilterBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_);
+ }
+ if (!getGroupByBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, groupBy_);
+ }
+ if (compareDuration_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCompareDuration());
+ }
+ if (readTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getReadTime());
+ }
+ if (!getHavingBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, having_);
+ }
+ if (!getPageTokenBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, pageToken_);
+ }
+ if (pageSize_ != 0) {
+ size += com.google.protobuf.CodedOutputStream.computeInt32Size(8, pageSize_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.securitycenter.v1.GroupAssetsRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.securitycenter.v1.GroupAssetsRequest other =
+ (com.google.cloud.securitycenter.v1.GroupAssetsRequest) obj;
+
+ boolean result = true;
+ result = result && getParent().equals(other.getParent());
+ result = result && getFilter().equals(other.getFilter());
+ result = result && getGroupBy().equals(other.getGroupBy());
+ result = result && (hasCompareDuration() == other.hasCompareDuration());
+ if (hasCompareDuration()) {
+ result = result && getCompareDuration().equals(other.getCompareDuration());
+ }
+ result = result && (hasReadTime() == other.hasReadTime());
+ if (hasReadTime()) {
+ result = result && getReadTime().equals(other.getReadTime());
+ }
+ result = result && getHaving().equals(other.getHaving());
+ result = result && getPageToken().equals(other.getPageToken());
+ result = result && (getPageSize() == other.getPageSize());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @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();
+ if (hasCompareDuration()) {
+ hash = (37 * hash) + COMPARE_DURATION_FIELD_NUMBER;
+ hash = (53 * hash) + getCompareDuration().hashCode();
+ }
+ if (hasReadTime()) {
+ hash = (37 * hash) + READ_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getReadTime().hashCode();
+ }
+ hash = (37 * hash) + HAVING_FIELD_NUMBER;
+ hash = (53 * hash) + getHaving().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) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.securitycenter.v1.GroupAssetsRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.securitycenter.v1.GroupAssetsRequest parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.securitycenter.v1.GroupAssetsRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.securitycenter.v1.GroupAssetsRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.securitycenter.v1.GroupAssetsRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.securitycenter.v1.GroupAssetsRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.securitycenter.v1.GroupAssetsRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.securitycenter.v1.GroupAssetsRequest parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.securitycenter.v1.GroupAssetsRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.securitycenter.v1.GroupAssetsRequest parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.securitycenter.v1.GroupAssetsRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.securitycenter.v1.GroupAssetsRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.securitycenter.v1.GroupAssetsRequest 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 assets. + *+ * + * Protobuf type {@code google.cloud.securitycenter.v1.GroupAssetsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Name of the organization to groupBy. Its format is + * "organizations/[organization_id]". + *+ * + *
string parent = 1;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * Name of the organization to groupBy. Its format is + * "organizations/[organization_id]". + *+ * + *
string parent = 1;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * Name of the organization to groupBy. Its format is + * "organizations/[organization_id]". + *+ * + *
string parent = 1;
+ */
+ public Builder setParent(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Name of the organization to groupBy. Its format is + * "organizations/[organization_id]". + *+ * + *
string parent = 1;
+ */
+ public Builder clearParent() {
+
+ parent_ = getDefaultInstance().getParent();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Name of the organization to groupBy. Its format is + * "organizations/[organization_id]". + *+ * + *
string parent = 1;
+ */
+ public Builder setParentBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object filter_ = "";
+ /**
+ *
+ *
+ * + * Expression that defines the filter to apply across assets. + * 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 Asset resource. Examples include: + * * name + * * security_center_properties.resource_name + * * resource_properties.a_property + * * 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. + * For example, `resource_properties.size = 100` is a valid filter string. + *+ * + *
string filter = 2;
+ */
+ 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 assets. + * 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 Asset resource. Examples include: + * * name + * * security_center_properties.resource_name + * * resource_properties.a_property + * * 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. + * For example, `resource_properties.size = 100` is a valid filter string. + *+ * + *
string filter = 2;
+ */
+ 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 assets. + * 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 Asset resource. Examples include: + * * name + * * security_center_properties.resource_name + * * resource_properties.a_property + * * 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. + * For example, `resource_properties.size = 100` is a valid filter string. + *+ * + *
string filter = 2;
+ */
+ public Builder setFilter(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ filter_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Expression that defines the filter to apply across assets. + * 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 Asset resource. Examples include: + * * name + * * security_center_properties.resource_name + * * resource_properties.a_property + * * 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. + * For example, `resource_properties.size = 100` is a valid filter string. + *+ * + *
string filter = 2;
+ */
+ public Builder clearFilter() {
+
+ filter_ = getDefaultInstance().getFilter();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Expression that defines the filter to apply across assets. + * 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 Asset resource. Examples include: + * * name + * * security_center_properties.resource_name + * * resource_properties.a_property + * * 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. + * For example, `resource_properties.size = 100` is a valid filter string. + *+ * + *
string filter = 2;
+ */
+ public Builder setFilterBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ filter_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object groupBy_ = "";
+ /**
+ *
+ *
+ * + * Expression that defines what assets fields to use for grouping. The string + * value should follow SQL syntax: comma separated list of fields. For + * example: + * "security_center_properties.resource_project,security_center_properties.project". + * The following fields are supported when compare_duration is not set: + * * security_center_properties.resource_project + * * security_center_properties.resource_type + * * security_center_properties.resource_parent + * The following fields are supported when compare_duration is set: + * * security_center_properties.resource_type + *+ * + *
string group_by = 3;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * Expression that defines what assets fields to use for grouping. The string + * value should follow SQL syntax: comma separated list of fields. For + * example: + * "security_center_properties.resource_project,security_center_properties.project". + * The following fields are supported when compare_duration is not set: + * * security_center_properties.resource_project + * * security_center_properties.resource_type + * * security_center_properties.resource_parent + * The following fields are supported when compare_duration is set: + * * security_center_properties.resource_type + *+ * + *
string group_by = 3;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * Expression that defines what assets fields to use for grouping. The string + * value should follow SQL syntax: comma separated list of fields. For + * example: + * "security_center_properties.resource_project,security_center_properties.project". + * The following fields are supported when compare_duration is not set: + * * security_center_properties.resource_project + * * security_center_properties.resource_type + * * security_center_properties.resource_parent + * The following fields are supported when compare_duration is set: + * * security_center_properties.resource_type + *+ * + *
string group_by = 3;
+ */
+ public Builder setGroupBy(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ groupBy_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Expression that defines what assets fields to use for grouping. The string + * value should follow SQL syntax: comma separated list of fields. For + * example: + * "security_center_properties.resource_project,security_center_properties.project". + * The following fields are supported when compare_duration is not set: + * * security_center_properties.resource_project + * * security_center_properties.resource_type + * * security_center_properties.resource_parent + * The following fields are supported when compare_duration is set: + * * security_center_properties.resource_type + *+ * + *
string group_by = 3;
+ */
+ public Builder clearGroupBy() {
+
+ groupBy_ = getDefaultInstance().getGroupBy();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Expression that defines what assets fields to use for grouping. The string + * value should follow SQL syntax: comma separated list of fields. For + * example: + * "security_center_properties.resource_project,security_center_properties.project". + * The following fields are supported when compare_duration is not set: + * * security_center_properties.resource_project + * * security_center_properties.resource_type + * * security_center_properties.resource_parent + * The following fields are supported when compare_duration is set: + * * security_center_properties.resource_type + *+ * + *
string group_by = 3;
+ */
+ public Builder setGroupByBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ groupBy_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Duration compareDuration_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Duration,
+ com.google.protobuf.Duration.Builder,
+ com.google.protobuf.DurationOrBuilder>
+ compareDurationBuilder_;
+ /**
+ *
+ *
+ * + * When compare_duration is set, the GroupResult's "state_change" property is + * updated to indicate whether the asset was added, removed, or remained + * present during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * Possible "state_change" values when compare_duration is specified: + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at reference_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at reference_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and reference_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + *+ * + *
.google.protobuf.Duration compare_duration = 4;
+ */
+ public boolean hasCompareDuration() {
+ return compareDurationBuilder_ != null || compareDuration_ != null;
+ }
+ /**
+ *
+ *
+ * + * When compare_duration is set, the GroupResult's "state_change" property is + * updated to indicate whether the asset was added, removed, or remained + * present during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * Possible "state_change" values when compare_duration is specified: + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at reference_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at reference_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and reference_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + *+ * + *
.google.protobuf.Duration compare_duration = 4;
+ */
+ public com.google.protobuf.Duration getCompareDuration() {
+ if (compareDurationBuilder_ == null) {
+ return compareDuration_ == null
+ ? com.google.protobuf.Duration.getDefaultInstance()
+ : compareDuration_;
+ } else {
+ return compareDurationBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * When compare_duration is set, the GroupResult's "state_change" property is + * updated to indicate whether the asset was added, removed, or remained + * present during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * Possible "state_change" values when compare_duration is specified: + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at reference_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at reference_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and reference_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + *+ * + *
.google.protobuf.Duration compare_duration = 4;
+ */
+ public Builder setCompareDuration(com.google.protobuf.Duration value) {
+ if (compareDurationBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ compareDuration_ = value;
+ onChanged();
+ } else {
+ compareDurationBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * When compare_duration is set, the GroupResult's "state_change" property is + * updated to indicate whether the asset was added, removed, or remained + * present during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * Possible "state_change" values when compare_duration is specified: + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at reference_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at reference_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and reference_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + *+ * + *
.google.protobuf.Duration compare_duration = 4;
+ */
+ public Builder setCompareDuration(com.google.protobuf.Duration.Builder builderForValue) {
+ if (compareDurationBuilder_ == null) {
+ compareDuration_ = builderForValue.build();
+ onChanged();
+ } else {
+ compareDurationBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * When compare_duration is set, the GroupResult's "state_change" property is + * updated to indicate whether the asset was added, removed, or remained + * present during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * Possible "state_change" values when compare_duration is specified: + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at reference_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at reference_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and reference_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + *+ * + *
.google.protobuf.Duration compare_duration = 4;
+ */
+ public Builder mergeCompareDuration(com.google.protobuf.Duration value) {
+ if (compareDurationBuilder_ == null) {
+ if (compareDuration_ != null) {
+ compareDuration_ =
+ com.google.protobuf.Duration.newBuilder(compareDuration_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ compareDuration_ = value;
+ }
+ onChanged();
+ } else {
+ compareDurationBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * When compare_duration is set, the GroupResult's "state_change" property is + * updated to indicate whether the asset was added, removed, or remained + * present during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * Possible "state_change" values when compare_duration is specified: + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at reference_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at reference_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and reference_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + *+ * + *
.google.protobuf.Duration compare_duration = 4;
+ */
+ public Builder clearCompareDuration() {
+ if (compareDurationBuilder_ == null) {
+ compareDuration_ = null;
+ onChanged();
+ } else {
+ compareDuration_ = null;
+ compareDurationBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * When compare_duration is set, the GroupResult's "state_change" property is + * updated to indicate whether the asset was added, removed, or remained + * present during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * Possible "state_change" values when compare_duration is specified: + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at reference_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at reference_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and reference_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + *+ * + *
.google.protobuf.Duration compare_duration = 4;
+ */
+ public com.google.protobuf.Duration.Builder getCompareDurationBuilder() {
+
+ onChanged();
+ return getCompareDurationFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * When compare_duration is set, the GroupResult's "state_change" property is + * updated to indicate whether the asset was added, removed, or remained + * present during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * Possible "state_change" values when compare_duration is specified: + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at reference_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at reference_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and reference_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + *+ * + *
.google.protobuf.Duration compare_duration = 4;
+ */
+ public com.google.protobuf.DurationOrBuilder getCompareDurationOrBuilder() {
+ if (compareDurationBuilder_ != null) {
+ return compareDurationBuilder_.getMessageOrBuilder();
+ } else {
+ return compareDuration_ == null
+ ? com.google.protobuf.Duration.getDefaultInstance()
+ : compareDuration_;
+ }
+ }
+ /**
+ *
+ *
+ * + * When compare_duration is set, the GroupResult's "state_change" property is + * updated to indicate whether the asset was added, removed, or remained + * present during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * Possible "state_change" values when compare_duration is specified: + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at reference_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at reference_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and reference_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + *+ * + *
.google.protobuf.Duration compare_duration = 4;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Duration,
+ com.google.protobuf.Duration.Builder,
+ com.google.protobuf.DurationOrBuilder>
+ getCompareDurationFieldBuilder() {
+ if (compareDurationBuilder_ == null) {
+ compareDurationBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Duration,
+ com.google.protobuf.Duration.Builder,
+ com.google.protobuf.DurationOrBuilder>(
+ getCompareDuration(), getParentForChildren(), isClean());
+ compareDuration_ = null;
+ }
+ return compareDurationBuilder_;
+ }
+
+ private com.google.protobuf.Timestamp readTime_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ readTimeBuilder_;
+ /**
+ *
+ *
+ * + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + *+ * + *
.google.protobuf.Timestamp read_time = 5;
+ */
+ public boolean hasReadTime() {
+ return readTimeBuilder_ != null || readTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + *+ * + *
.google.protobuf.Timestamp read_time = 5;
+ */
+ public com.google.protobuf.Timestamp getReadTime() {
+ if (readTimeBuilder_ == null) {
+ return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_;
+ } else {
+ return readTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + *+ * + *
.google.protobuf.Timestamp read_time = 5;
+ */
+ public Builder setReadTime(com.google.protobuf.Timestamp value) {
+ if (readTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ readTime_ = value;
+ onChanged();
+ } else {
+ readTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + *+ * + *
.google.protobuf.Timestamp read_time = 5;
+ */
+ public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (readTimeBuilder_ == null) {
+ readTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ readTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + *+ * + *
.google.protobuf.Timestamp read_time = 5;
+ */
+ public Builder mergeReadTime(com.google.protobuf.Timestamp value) {
+ if (readTimeBuilder_ == null) {
+ if (readTime_ != null) {
+ readTime_ =
+ com.google.protobuf.Timestamp.newBuilder(readTime_).mergeFrom(value).buildPartial();
+ } else {
+ readTime_ = value;
+ }
+ onChanged();
+ } else {
+ readTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + *+ * + *
.google.protobuf.Timestamp read_time = 5;
+ */
+ public Builder clearReadTime() {
+ if (readTimeBuilder_ == null) {
+ readTime_ = null;
+ onChanged();
+ } else {
+ readTime_ = null;
+ readTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + *+ * + *
.google.protobuf.Timestamp read_time = 5;
+ */
+ public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() {
+
+ onChanged();
+ return getReadTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + *+ * + *
.google.protobuf.Timestamp read_time = 5;
+ */
+ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() {
+ if (readTimeBuilder_ != null) {
+ return readTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + *+ * + *
.google.protobuf.Timestamp read_time = 5;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getReadTimeFieldBuilder() {
+ if (readTimeBuilder_ == null) {
+ readTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getReadTime(), getParentForChildren(), isClean());
+ readTime_ = null;
+ }
+ return readTimeBuilder_;
+ }
+
+ private java.lang.Object having_ = "";
+ /**
+ *
+ *
+ * + * Filter that specifies what fields to further filter on *after* the query + * filter has been executed. Currently only 'state_change' is supported and + * requires compare_duration to be specified. + *+ * + *
string having = 6;
+ */
+ public java.lang.String getHaving() {
+ java.lang.Object ref = having_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ having_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Filter that specifies what fields to further filter on *after* the query + * filter has been executed. Currently only 'state_change' is supported and + * requires compare_duration to be specified. + *+ * + *
string having = 6;
+ */
+ public com.google.protobuf.ByteString getHavingBytes() {
+ java.lang.Object ref = having_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ having_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Filter that specifies what fields to further filter on *after* the query + * filter has been executed. Currently only 'state_change' is supported and + * requires compare_duration to be specified. + *+ * + *
string having = 6;
+ */
+ public Builder setHaving(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ having_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Filter that specifies what fields to further filter on *after* the query + * filter has been executed. Currently only 'state_change' is supported and + * requires compare_duration to be specified. + *+ * + *
string having = 6;
+ */
+ public Builder clearHaving() {
+
+ having_ = getDefaultInstance().getHaving();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Filter that specifies what fields to further filter on *after* the query + * filter has been executed. Currently only 'state_change' is supported and + * requires compare_duration to be specified. + *+ * + *
string having = 6;
+ */
+ public Builder setHavingBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ having_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object pageToken_ = "";
+ /**
+ *
+ *
+ * + * The value returned by the last `GroupAssetsResponse`; indicates + * that this is a continuation of a prior `GroupAssets` call, and that the + * system should return the next page of data. + *+ * + *
string page_token = 7;
+ */
+ 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 `GroupAssetsResponse`; indicates + * that this is a continuation of a prior `GroupAssets` call, and that the + * system should return the next page of data. + *+ * + *
string page_token = 7;
+ */
+ 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 `GroupAssetsResponse`; indicates + * that this is a continuation of a prior `GroupAssets` call, and that the + * system should return the next page of data. + *+ * + *
string page_token = 7;
+ */
+ public Builder setPageToken(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ pageToken_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The value returned by the last `GroupAssetsResponse`; indicates + * that this is a continuation of a prior `GroupAssets` call, and that the + * system should return the next page of data. + *+ * + *
string page_token = 7;
+ */
+ public Builder clearPageToken() {
+
+ pageToken_ = getDefaultInstance().getPageToken();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The value returned by the last `GroupAssetsResponse`; indicates + * that this is a continuation of a prior `GroupAssets` call, and that the + * system should return the next page of data. + *+ * + *
string page_token = 7;
+ */
+ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ pageToken_ = value;
+ 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;
+ */
+ 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;
+ */
+ public Builder setPageSize(int value) {
+
+ pageSize_ = value;
+ 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;
+ */
+ public Builder clearPageSize() {
+
+ pageSize_ = 0;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.GroupAssetsRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.GroupAssetsRequest)
+ private static final com.google.cloud.securitycenter.v1.GroupAssetsRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.GroupAssetsRequest();
+ }
+
+ public static com.google.cloud.securitycenter.v1.GroupAssetsRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Name of the organization to groupBy. Its format is + * "organizations/[organization_id]". + *+ * + *
string parent = 1;
+ */
+ java.lang.String getParent();
+ /**
+ *
+ *
+ * + * Name of the organization to groupBy. Its format is + * "organizations/[organization_id]". + *+ * + *
string parent = 1;
+ */
+ com.google.protobuf.ByteString getParentBytes();
+
+ /**
+ *
+ *
+ * + * Expression that defines the filter to apply across assets. + * 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 Asset resource. Examples include: + * * name + * * security_center_properties.resource_name + * * resource_properties.a_property + * * 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. + * For example, `resource_properties.size = 100` is a valid filter string. + *+ * + *
string filter = 2;
+ */
+ java.lang.String getFilter();
+ /**
+ *
+ *
+ * + * Expression that defines the filter to apply across assets. + * 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 Asset resource. Examples include: + * * name + * * security_center_properties.resource_name + * * resource_properties.a_property + * * 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. + * For example, `resource_properties.size = 100` is a valid filter string. + *+ * + *
string filter = 2;
+ */
+ com.google.protobuf.ByteString getFilterBytes();
+
+ /**
+ *
+ *
+ * + * Expression that defines what assets fields to use for grouping. The string + * value should follow SQL syntax: comma separated list of fields. For + * example: + * "security_center_properties.resource_project,security_center_properties.project". + * The following fields are supported when compare_duration is not set: + * * security_center_properties.resource_project + * * security_center_properties.resource_type + * * security_center_properties.resource_parent + * The following fields are supported when compare_duration is set: + * * security_center_properties.resource_type + *+ * + *
string group_by = 3;
+ */
+ java.lang.String getGroupBy();
+ /**
+ *
+ *
+ * + * Expression that defines what assets fields to use for grouping. The string + * value should follow SQL syntax: comma separated list of fields. For + * example: + * "security_center_properties.resource_project,security_center_properties.project". + * The following fields are supported when compare_duration is not set: + * * security_center_properties.resource_project + * * security_center_properties.resource_type + * * security_center_properties.resource_parent + * The following fields are supported when compare_duration is set: + * * security_center_properties.resource_type + *+ * + *
string group_by = 3;
+ */
+ com.google.protobuf.ByteString getGroupByBytes();
+
+ /**
+ *
+ *
+ * + * When compare_duration is set, the GroupResult's "state_change" property is + * updated to indicate whether the asset was added, removed, or remained + * present during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * Possible "state_change" values when compare_duration is specified: + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at reference_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at reference_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and reference_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + *+ * + *
.google.protobuf.Duration compare_duration = 4;
+ */
+ boolean hasCompareDuration();
+ /**
+ *
+ *
+ * + * When compare_duration is set, the GroupResult's "state_change" property is + * updated to indicate whether the asset was added, removed, or remained + * present during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * Possible "state_change" values when compare_duration is specified: + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at reference_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at reference_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and reference_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + *+ * + *
.google.protobuf.Duration compare_duration = 4;
+ */
+ com.google.protobuf.Duration getCompareDuration();
+ /**
+ *
+ *
+ * + * When compare_duration is set, the GroupResult's "state_change" property is + * updated to indicate whether the asset was added, removed, or remained + * present during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * Possible "state_change" values when compare_duration is specified: + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at reference_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at reference_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and reference_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + *+ * + *
.google.protobuf.Duration compare_duration = 4;
+ */
+ com.google.protobuf.DurationOrBuilder getCompareDurationOrBuilder();
+
+ /**
+ *
+ *
+ * + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + *+ * + *
.google.protobuf.Timestamp read_time = 5;
+ */
+ boolean hasReadTime();
+ /**
+ *
+ *
+ * + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + *+ * + *
.google.protobuf.Timestamp read_time = 5;
+ */
+ com.google.protobuf.Timestamp getReadTime();
+ /**
+ *
+ *
+ * + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + *+ * + *
.google.protobuf.Timestamp read_time = 5;
+ */
+ com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder();
+
+ /**
+ *
+ *
+ * + * Filter that specifies what fields to further filter on *after* the query + * filter has been executed. Currently only 'state_change' is supported and + * requires compare_duration to be specified. + *+ * + *
string having = 6;
+ */
+ java.lang.String getHaving();
+ /**
+ *
+ *
+ * + * Filter that specifies what fields to further filter on *after* the query + * filter has been executed. Currently only 'state_change' is supported and + * requires compare_duration to be specified. + *+ * + *
string having = 6;
+ */
+ com.google.protobuf.ByteString getHavingBytes();
+
+ /**
+ *
+ *
+ * + * The value returned by the last `GroupAssetsResponse`; indicates + * that this is a continuation of a prior `GroupAssets` call, and that the + * system should return the next page of data. + *+ * + *
string page_token = 7;
+ */
+ java.lang.String getPageToken();
+ /**
+ *
+ *
+ * + * The value returned by the last `GroupAssetsResponse`; indicates + * that this is a continuation of a prior `GroupAssets` call, and that the + * system should return the next page of data. + *+ * + *
string page_token = 7;
+ */
+ 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;
+ */
+ int getPageSize();
+}
diff --git a/google-api-grpc/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupAssetsResponse.java b/google-api-grpc/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupAssetsResponse.java
new file mode 100644
index 000000000000..f73e8559a7c0
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupAssetsResponse.java
@@ -0,0 +1,1492 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/securitycenter/v1/securitycenter_service.proto
+
+package com.google.cloud.securitycenter.v1;
+
+/**
+ *
+ *
+ * + * Response message for grouping by assets. + *+ * + * Protobuf type {@code google.cloud.securitycenter.v1.GroupAssetsResponse} + */ +public final class GroupAssetsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.GroupAssetsResponse) + GroupAssetsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use GroupAssetsResponse.newBuilder() to construct. + private GroupAssetsResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private GroupAssetsResponse() { + groupByResults_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + totalSize_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GroupAssetsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + groupByResults_ = + new java.util.ArrayList
+ * 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.v1.GroupResult group_by_results = 1;
+ */
+ public java.util.List+ * 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.v1.GroupResult group_by_results = 1;
+ */
+ public java.util.List extends com.google.cloud.securitycenter.v1.GroupResultOrBuilder>
+ 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.v1.GroupResult group_by_results = 1;
+ */
+ 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.v1.GroupResult group_by_results = 1;
+ */
+ public com.google.cloud.securitycenter.v1.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.v1.GroupResult group_by_results = 1;
+ */
+ public com.google.cloud.securitycenter.v1.GroupResultOrBuilder getGroupByResultsOrBuilder(
+ int index) {
+ return groupByResults_.get(index);
+ }
+
+ public static final int READ_TIME_FIELD_NUMBER = 2;
+ private com.google.protobuf.Timestamp readTime_;
+ /**
+ *
+ *
+ * + * Time used for executing the groupBy request. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ public boolean hasReadTime() {
+ return readTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * Time used for executing the groupBy request. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ public com.google.protobuf.Timestamp getReadTime() {
+ return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_;
+ }
+ /**
+ *
+ *
+ * + * Time used for executing the groupBy request. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() {
+ return getReadTime();
+ }
+
+ public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 3;
+ 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;
+ */
+ 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;
+ */
+ 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_;
+ /**
+ *
+ *
+ * + * The total number of results matching the query. + *+ * + *
int32 total_size = 4;
+ */
+ 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 (readTime_ != null) {
+ output.writeMessage(2, getReadTime());
+ }
+ if (!getNextPageTokenBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, nextPageToken_);
+ }
+ if (totalSize_ != 0) {
+ output.writeInt32(4, totalSize_);
+ }
+ unknownFields.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 (readTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getReadTime());
+ }
+ if (!getNextPageTokenBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nextPageToken_);
+ }
+ if (totalSize_ != 0) {
+ size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, totalSize_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.securitycenter.v1.GroupAssetsResponse)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.securitycenter.v1.GroupAssetsResponse other =
+ (com.google.cloud.securitycenter.v1.GroupAssetsResponse) obj;
+
+ boolean result = true;
+ result = result && getGroupByResultsList().equals(other.getGroupByResultsList());
+ result = result && (hasReadTime() == other.hasReadTime());
+ if (hasReadTime()) {
+ result = result && getReadTime().equals(other.getReadTime());
+ }
+ result = result && getNextPageToken().equals(other.getNextPageToken());
+ result = result && (getTotalSize() == other.getTotalSize());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @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();
+ }
+ if (hasReadTime()) {
+ hash = (37 * hash) + READ_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getReadTime().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) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.securitycenter.v1.GroupAssetsResponse parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.securitycenter.v1.GroupAssetsResponse parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.securitycenter.v1.GroupAssetsResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.securitycenter.v1.GroupAssetsResponse parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.securitycenter.v1.GroupAssetsResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.securitycenter.v1.GroupAssetsResponse parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.securitycenter.v1.GroupAssetsResponse parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.securitycenter.v1.GroupAssetsResponse parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.securitycenter.v1.GroupAssetsResponse parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.securitycenter.v1.GroupAssetsResponse parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.securitycenter.v1.GroupAssetsResponse parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.securitycenter.v1.GroupAssetsResponse parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.securitycenter.v1.GroupAssetsResponse 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 grouping by assets. + *+ * + * Protobuf type {@code google.cloud.securitycenter.v1.GroupAssetsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * 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.v1.GroupResult group_by_results = 1;
+ */
+ public java.util.List+ * 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.v1.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.v1.GroupResult group_by_results = 1;
+ */
+ public com.google.cloud.securitycenter.v1.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.v1.GroupResult group_by_results = 1;
+ */
+ public Builder setGroupByResults(
+ int index, com.google.cloud.securitycenter.v1.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.v1.GroupResult group_by_results = 1;
+ */
+ public Builder setGroupByResults(
+ int index, com.google.cloud.securitycenter.v1.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.v1.GroupResult group_by_results = 1;
+ */
+ public Builder addGroupByResults(com.google.cloud.securitycenter.v1.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.v1.GroupResult group_by_results = 1;
+ */
+ public Builder addGroupByResults(
+ int index, com.google.cloud.securitycenter.v1.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.v1.GroupResult group_by_results = 1;
+ */
+ public Builder addGroupByResults(
+ com.google.cloud.securitycenter.v1.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.v1.GroupResult group_by_results = 1;
+ */
+ public Builder addGroupByResults(
+ int index, com.google.cloud.securitycenter.v1.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.v1.GroupResult group_by_results = 1;
+ */
+ public Builder addAllGroupByResults(
+ java.lang.Iterable extends com.google.cloud.securitycenter.v1.GroupResult> 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.v1.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.v1.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.v1.GroupResult group_by_results = 1;
+ */
+ public com.google.cloud.securitycenter.v1.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.v1.GroupResult group_by_results = 1;
+ */
+ public com.google.cloud.securitycenter.v1.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.v1.GroupResult group_by_results = 1;
+ */
+ public java.util.List extends com.google.cloud.securitycenter.v1.GroupResultOrBuilder>
+ 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.v1.GroupResult group_by_results = 1;
+ */
+ public com.google.cloud.securitycenter.v1.GroupResult.Builder addGroupByResultsBuilder() {
+ return getGroupByResultsFieldBuilder()
+ .addBuilder(com.google.cloud.securitycenter.v1.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.v1.GroupResult group_by_results = 1;
+ */
+ public com.google.cloud.securitycenter.v1.GroupResult.Builder addGroupByResultsBuilder(
+ int index) {
+ return getGroupByResultsFieldBuilder()
+ .addBuilder(index, com.google.cloud.securitycenter.v1.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.v1.GroupResult group_by_results = 1;
+ */
+ public java.util.List+ * Time used for executing the groupBy request. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ public boolean hasReadTime() {
+ return readTimeBuilder_ != null || readTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * Time used for executing the groupBy request. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ public com.google.protobuf.Timestamp getReadTime() {
+ if (readTimeBuilder_ == null) {
+ return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_;
+ } else {
+ return readTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Time used for executing the groupBy request. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ public Builder setReadTime(com.google.protobuf.Timestamp value) {
+ if (readTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ readTime_ = value;
+ onChanged();
+ } else {
+ readTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Time used for executing the groupBy request. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (readTimeBuilder_ == null) {
+ readTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ readTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Time used for executing the groupBy request. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ public Builder mergeReadTime(com.google.protobuf.Timestamp value) {
+ if (readTimeBuilder_ == null) {
+ if (readTime_ != null) {
+ readTime_ =
+ com.google.protobuf.Timestamp.newBuilder(readTime_).mergeFrom(value).buildPartial();
+ } else {
+ readTime_ = value;
+ }
+ onChanged();
+ } else {
+ readTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Time used for executing the groupBy request. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ public Builder clearReadTime() {
+ if (readTimeBuilder_ == null) {
+ readTime_ = null;
+ onChanged();
+ } else {
+ readTime_ = null;
+ readTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Time used for executing the groupBy request. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() {
+
+ onChanged();
+ return getReadTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Time used for executing the groupBy request. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() {
+ if (readTimeBuilder_ != null) {
+ return readTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Time used for executing the groupBy request. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getReadTimeFieldBuilder() {
+ if (readTimeBuilder_ == null) {
+ readTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getReadTime(), getParentForChildren(), isClean());
+ readTime_ = null;
+ }
+ return readTimeBuilder_;
+ }
+
+ 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;
+ */
+ 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;
+ */
+ 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;
+ */
+ public Builder setNextPageToken(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ nextPageToken_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Token to retrieve the next page of results, or empty if there are no more + * results. + *+ * + *
string next_page_token = 3;
+ */
+ public Builder clearNextPageToken() {
+
+ nextPageToken_ = getDefaultInstance().getNextPageToken();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Token to retrieve the next page of results, or empty if there are no more + * results. + *+ * + *
string next_page_token = 3;
+ */
+ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ nextPageToken_ = value;
+ onChanged();
+ return this;
+ }
+
+ private int totalSize_;
+ /**
+ *
+ *
+ * + * The total number of results matching the query. + *+ * + *
int32 total_size = 4;
+ */
+ public int getTotalSize() {
+ return totalSize_;
+ }
+ /**
+ *
+ *
+ * + * The total number of results matching the query. + *+ * + *
int32 total_size = 4;
+ */
+ public Builder setTotalSize(int value) {
+
+ totalSize_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The total number of results matching the query. + *+ * + *
int32 total_size = 4;
+ */
+ public Builder clearTotalSize() {
+
+ totalSize_ = 0;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.GroupAssetsResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.GroupAssetsResponse)
+ private static final com.google.cloud.securitycenter.v1.GroupAssetsResponse DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.GroupAssetsResponse();
+ }
+
+ public static com.google.cloud.securitycenter.v1.GroupAssetsResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * 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.v1.GroupResult group_by_results = 1;
+ */
+ java.util.List+ * 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.v1.GroupResult group_by_results = 1;
+ */
+ com.google.cloud.securitycenter.v1.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.v1.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.v1.GroupResult group_by_results = 1;
+ */
+ java.util.List extends com.google.cloud.securitycenter.v1.GroupResultOrBuilder>
+ 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.v1.GroupResult group_by_results = 1;
+ */
+ com.google.cloud.securitycenter.v1.GroupResultOrBuilder getGroupByResultsOrBuilder(int index);
+
+ /**
+ *
+ *
+ * + * Time used for executing the groupBy request. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ boolean hasReadTime();
+ /**
+ *
+ *
+ * + * Time used for executing the groupBy request. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ com.google.protobuf.Timestamp getReadTime();
+ /**
+ *
+ *
+ * + * Time used for executing the groupBy request. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder();
+
+ /**
+ *
+ *
+ * + * Token to retrieve the next page of results, or empty if there are no more + * results. + *+ * + *
string next_page_token = 3;
+ */
+ 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;
+ */
+ com.google.protobuf.ByteString getNextPageTokenBytes();
+
+ /**
+ *
+ *
+ * + * The total number of results matching the query. + *+ * + *
int32 total_size = 4;
+ */
+ int getTotalSize();
+}
diff --git a/google-api-grpc/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupFindingsRequest.java b/google-api-grpc/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupFindingsRequest.java
new file mode 100644
index 000000000000..35bbf22866a8
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupFindingsRequest.java
@@ -0,0 +1,2350 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/securitycenter/v1/securitycenter_service.proto
+
+package com.google.cloud.securitycenter.v1;
+
+/**
+ *
+ *
+ * + * Request message for grouping by findings. + *+ * + * Protobuf type {@code google.cloud.securitycenter.v1.GroupFindingsRequest} + */ +public final class GroupFindingsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.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_ = ""; + having_ = ""; + pageToken_ = ""; + pageSize_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GroupFindingsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + groupBy_ = s; + break; + } + case 34: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (readTime_ != null) { + subBuilder = readTime_.toBuilder(); + } + readTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readTime_); + readTime_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (compareDuration_ != null) { + subBuilder = compareDuration_.toBuilder(); + } + compareDuration_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(compareDuration_); + compareDuration_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + having_ = s; + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 64: + { + pageSize_ = input.readInt32(); + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_GroupFindingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_GroupFindingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.GroupFindingsRequest.class, + com.google.cloud.securitycenter.v1.GroupFindingsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+ * Name of the source to groupBy. Its format is + * "organizations/[organization_id]/sources/[source_id]". To groupBy across + * all sources provide a source_id of `-`. For example: + * organizations/123/sources/- + *+ * + *
string parent = 1;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * Name of the source to groupBy. Its format is + * "organizations/[organization_id]/sources/[source_id]". To groupBy across + * all sources provide a source_id of `-`. For example: + * organizations/123/sources/- + *+ * + *
string parent = 1;
+ */
+ public com.google.protobuf.ByteString getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int FILTER_FIELD_NUMBER = 2;
+ private volatile java.lang.Object filter_;
+ /**
+ *
+ *
+ * + * Expression that 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 + * * source_properties.a_property + * * 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. + * For example, `source_properties.size = 100` is a valid filter string. + *+ * + *
string filter = 2;
+ */
+ 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 + * * source_properties.a_property + * * 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. + * For example, `source_properties.size = 100` is a valid filter string. + *+ * + *
string filter = 2;
+ */
+ 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;
+ private volatile java.lang.Object groupBy_;
+ /**
+ *
+ *
+ * + * Expression that defines what assets fields to use for grouping (including + * `state_change`). 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 + * * state_change + * * parent + *+ * + *
string group_by = 3;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * Expression that defines what assets fields to use for grouping (including + * `state_change`). 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 + * * state_change + * * parent + *+ * + *
string group_by = 3;
+ */
+ 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 READ_TIME_FIELD_NUMBER = 4;
+ private com.google.protobuf.Timestamp readTime_;
+ /**
+ *
+ *
+ * + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ */
+ public boolean hasReadTime() {
+ return readTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ */
+ public com.google.protobuf.Timestamp getReadTime() {
+ return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_;
+ }
+ /**
+ *
+ *
+ * + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ */
+ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() {
+ return getReadTime();
+ }
+
+ public static final int COMPARE_DURATION_FIELD_NUMBER = 5;
+ private com.google.protobuf.Duration compareDuration_;
+ /**
+ *
+ *
+ * + * When compare_duration is set, the GroupResult's "state_change" attribute is + * updated to indicate whether the finding had its state changed, the + * finding's state remained unchanged, or if the finding was added during the + * compare_duration period of time that precedes the read_time. This is the + * time between (read_time - compare_duration) and read_time. + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * Possible "state_change" values when compare_duration is specified: + * * "CHANGED": indicates that the finding was present at the start of + * compare_duration, but changed its state at read_time. + * * "UNCHANGED": indicates that the finding was present at the start of + * compare_duration and did not change state at read_time. + * * "ADDED": indicates that the finding was not present at the start + * of compare_duration, but was present at read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present + * at read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + *+ * + *
.google.protobuf.Duration compare_duration = 5;
+ */
+ public boolean hasCompareDuration() {
+ return compareDuration_ != null;
+ }
+ /**
+ *
+ *
+ * + * When compare_duration is set, the GroupResult's "state_change" attribute is + * updated to indicate whether the finding had its state changed, the + * finding's state remained unchanged, or if the finding was added during the + * compare_duration period of time that precedes the read_time. This is the + * time between (read_time - compare_duration) and read_time. + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * Possible "state_change" values when compare_duration is specified: + * * "CHANGED": indicates that the finding was present at the start of + * compare_duration, but changed its state at read_time. + * * "UNCHANGED": indicates that the finding was present at the start of + * compare_duration and did not change state at read_time. + * * "ADDED": indicates that the finding was not present at the start + * of compare_duration, but was present at read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present + * at read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + *+ * + *
.google.protobuf.Duration compare_duration = 5;
+ */
+ public com.google.protobuf.Duration getCompareDuration() {
+ return compareDuration_ == null
+ ? com.google.protobuf.Duration.getDefaultInstance()
+ : compareDuration_;
+ }
+ /**
+ *
+ *
+ * + * When compare_duration is set, the GroupResult's "state_change" attribute is + * updated to indicate whether the finding had its state changed, the + * finding's state remained unchanged, or if the finding was added during the + * compare_duration period of time that precedes the read_time. This is the + * time between (read_time - compare_duration) and read_time. + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * Possible "state_change" values when compare_duration is specified: + * * "CHANGED": indicates that the finding was present at the start of + * compare_duration, but changed its state at read_time. + * * "UNCHANGED": indicates that the finding was present at the start of + * compare_duration and did not change state at read_time. + * * "ADDED": indicates that the finding was not present at the start + * of compare_duration, but was present at read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present + * at read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + *+ * + *
.google.protobuf.Duration compare_duration = 5;
+ */
+ public com.google.protobuf.DurationOrBuilder getCompareDurationOrBuilder() {
+ return getCompareDuration();
+ }
+
+ public static final int HAVING_FIELD_NUMBER = 6;
+ private volatile java.lang.Object having_;
+ /**
+ *
+ *
+ * + * Filter that specifies what fields to further filter on *after* the query + * filter has been executed. Currently only 'finding.state' and 'state_change' + * are supported and requires compare_duration to be specified. + *+ * + *
string having = 6;
+ */
+ public java.lang.String getHaving() {
+ java.lang.Object ref = having_;
+ 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();
+ having_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Filter that specifies what fields to further filter on *after* the query + * filter has been executed. Currently only 'finding.state' and 'state_change' + * are supported and requires compare_duration to be specified. + *+ * + *
string having = 6;
+ */
+ public com.google.protobuf.ByteString getHavingBytes() {
+ java.lang.Object ref = having_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ having_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PAGE_TOKEN_FIELD_NUMBER = 7;
+ 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;
+ */
+ 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;
+ */
+ 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_;
+ /**
+ *
+ *
+ * + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + *+ * + *
int32 page_size = 8;
+ */
+ 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 (!getParentBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
+ }
+ if (!getFilterBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_);
+ }
+ if (!getGroupByBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, groupBy_);
+ }
+ if (readTime_ != null) {
+ output.writeMessage(4, getReadTime());
+ }
+ if (compareDuration_ != null) {
+ output.writeMessage(5, getCompareDuration());
+ }
+ if (!getHavingBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 6, having_);
+ }
+ if (!getPageTokenBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 7, pageToken_);
+ }
+ if (pageSize_ != 0) {
+ output.writeInt32(8, pageSize_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getParentBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
+ }
+ if (!getFilterBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_);
+ }
+ if (!getGroupByBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, groupBy_);
+ }
+ if (readTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getReadTime());
+ }
+ if (compareDuration_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCompareDuration());
+ }
+ if (!getHavingBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, having_);
+ }
+ if (!getPageTokenBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, pageToken_);
+ }
+ if (pageSize_ != 0) {
+ size += com.google.protobuf.CodedOutputStream.computeInt32Size(8, pageSize_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.securitycenter.v1.GroupFindingsRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.securitycenter.v1.GroupFindingsRequest other =
+ (com.google.cloud.securitycenter.v1.GroupFindingsRequest) obj;
+
+ boolean result = true;
+ result = result && getParent().equals(other.getParent());
+ result = result && getFilter().equals(other.getFilter());
+ result = result && getGroupBy().equals(other.getGroupBy());
+ result = result && (hasReadTime() == other.hasReadTime());
+ if (hasReadTime()) {
+ result = result && getReadTime().equals(other.getReadTime());
+ }
+ result = result && (hasCompareDuration() == other.hasCompareDuration());
+ if (hasCompareDuration()) {
+ result = result && getCompareDuration().equals(other.getCompareDuration());
+ }
+ result = result && getHaving().equals(other.getHaving());
+ result = result && getPageToken().equals(other.getPageToken());
+ result = result && (getPageSize() == other.getPageSize());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @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();
+ if (hasReadTime()) {
+ hash = (37 * hash) + READ_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getReadTime().hashCode();
+ }
+ if (hasCompareDuration()) {
+ hash = (37 * hash) + COMPARE_DURATION_FIELD_NUMBER;
+ hash = (53 * hash) + getCompareDuration().hashCode();
+ }
+ hash = (37 * hash) + HAVING_FIELD_NUMBER;
+ hash = (53 * hash) + getHaving().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) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.securitycenter.v1.GroupFindingsRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.securitycenter.v1.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.v1.GroupFindingsRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.securitycenter.v1.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.v1.GroupFindingsRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.securitycenter.v1.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.v1.GroupFindingsRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.securitycenter.v1.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.v1.GroupFindingsRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.securitycenter.v1.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.v1.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.v1.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.v1.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.v1.GroupFindingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Name of the source to groupBy. Its format is + * "organizations/[organization_id]/sources/[source_id]". To groupBy across + * all sources provide a source_id of `-`. For example: + * organizations/123/sources/- + *+ * + *
string parent = 1;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * Name of the source to groupBy. Its format is + * "organizations/[organization_id]/sources/[source_id]". To groupBy across + * all sources provide a source_id of `-`. For example: + * organizations/123/sources/- + *+ * + *
string parent = 1;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * Name of the source to groupBy. Its format is + * "organizations/[organization_id]/sources/[source_id]". To groupBy across + * all sources provide a source_id of `-`. For example: + * organizations/123/sources/- + *+ * + *
string parent = 1;
+ */
+ public Builder setParent(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Name of the source to groupBy. Its format is + * "organizations/[organization_id]/sources/[source_id]". To groupBy across + * all sources provide a source_id of `-`. For example: + * organizations/123/sources/- + *+ * + *
string parent = 1;
+ */
+ public Builder clearParent() {
+
+ parent_ = getDefaultInstance().getParent();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Name of the source to groupBy. Its format is + * "organizations/[organization_id]/sources/[source_id]". To groupBy across + * all sources provide a source_id of `-`. For example: + * organizations/123/sources/- + *+ * + *
string parent = 1;
+ */
+ public Builder setParentBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object filter_ = "";
+ /**
+ *
+ *
+ * + * Expression that 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 + * * source_properties.a_property + * * 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. + * For example, `source_properties.size = 100` is a valid filter string. + *+ * + *
string filter = 2;
+ */
+ 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 + * * source_properties.a_property + * * 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. + * For example, `source_properties.size = 100` is a valid filter string. + *+ * + *
string filter = 2;
+ */
+ 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 + * * source_properties.a_property + * * 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. + * For example, `source_properties.size = 100` is a valid filter string. + *+ * + *
string filter = 2;
+ */
+ public Builder setFilter(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ filter_ = value;
+ 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 + * * source_properties.a_property + * * 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. + * For example, `source_properties.size = 100` is a valid filter string. + *+ * + *
string filter = 2;
+ */
+ public Builder clearFilter() {
+
+ filter_ = getDefaultInstance().getFilter();
+ 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 + * * source_properties.a_property + * * 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. + * For example, `source_properties.size = 100` is a valid filter string. + *+ * + *
string filter = 2;
+ */
+ public Builder setFilterBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ filter_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object groupBy_ = "";
+ /**
+ *
+ *
+ * + * Expression that defines what assets fields to use for grouping (including + * `state_change`). 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 + * * state_change + * * parent + *+ * + *
string group_by = 3;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * Expression that defines what assets fields to use for grouping (including + * `state_change`). 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 + * * state_change + * * parent + *+ * + *
string group_by = 3;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * Expression that defines what assets fields to use for grouping (including + * `state_change`). 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 + * * state_change + * * parent + *+ * + *
string group_by = 3;
+ */
+ public Builder setGroupBy(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ groupBy_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Expression that defines what assets fields to use for grouping (including + * `state_change`). 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 + * * state_change + * * parent + *+ * + *
string group_by = 3;
+ */
+ public Builder clearGroupBy() {
+
+ groupBy_ = getDefaultInstance().getGroupBy();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Expression that defines what assets fields to use for grouping (including + * `state_change`). 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 + * * state_change + * * parent + *+ * + *
string group_by = 3;
+ */
+ public Builder setGroupByBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ groupBy_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Timestamp readTime_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ readTimeBuilder_;
+ /**
+ *
+ *
+ * + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ */
+ public boolean hasReadTime() {
+ return readTimeBuilder_ != null || readTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ */
+ public com.google.protobuf.Timestamp getReadTime() {
+ if (readTimeBuilder_ == null) {
+ return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_;
+ } else {
+ return readTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ */
+ public Builder setReadTime(com.google.protobuf.Timestamp value) {
+ if (readTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ readTime_ = value;
+ onChanged();
+ } else {
+ readTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ */
+ public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (readTimeBuilder_ == null) {
+ readTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ readTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ */
+ public Builder mergeReadTime(com.google.protobuf.Timestamp value) {
+ if (readTimeBuilder_ == null) {
+ if (readTime_ != null) {
+ readTime_ =
+ com.google.protobuf.Timestamp.newBuilder(readTime_).mergeFrom(value).buildPartial();
+ } else {
+ readTime_ = value;
+ }
+ onChanged();
+ } else {
+ readTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ */
+ public Builder clearReadTime() {
+ if (readTimeBuilder_ == null) {
+ readTime_ = null;
+ onChanged();
+ } else {
+ readTime_ = null;
+ readTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ */
+ public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() {
+
+ onChanged();
+ return getReadTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ */
+ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() {
+ if (readTimeBuilder_ != null) {
+ return readTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getReadTimeFieldBuilder() {
+ if (readTimeBuilder_ == null) {
+ readTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getReadTime(), getParentForChildren(), isClean());
+ readTime_ = null;
+ }
+ return readTimeBuilder_;
+ }
+
+ private com.google.protobuf.Duration compareDuration_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Duration,
+ com.google.protobuf.Duration.Builder,
+ com.google.protobuf.DurationOrBuilder>
+ compareDurationBuilder_;
+ /**
+ *
+ *
+ * + * When compare_duration is set, the GroupResult's "state_change" attribute is + * updated to indicate whether the finding had its state changed, the + * finding's state remained unchanged, or if the finding was added during the + * compare_duration period of time that precedes the read_time. This is the + * time between (read_time - compare_duration) and read_time. + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * Possible "state_change" values when compare_duration is specified: + * * "CHANGED": indicates that the finding was present at the start of + * compare_duration, but changed its state at read_time. + * * "UNCHANGED": indicates that the finding was present at the start of + * compare_duration and did not change state at read_time. + * * "ADDED": indicates that the finding was not present at the start + * of compare_duration, but was present at read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present + * at read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + *+ * + *
.google.protobuf.Duration compare_duration = 5;
+ */
+ public boolean hasCompareDuration() {
+ return compareDurationBuilder_ != null || compareDuration_ != null;
+ }
+ /**
+ *
+ *
+ * + * When compare_duration is set, the GroupResult's "state_change" attribute is + * updated to indicate whether the finding had its state changed, the + * finding's state remained unchanged, or if the finding was added during the + * compare_duration period of time that precedes the read_time. This is the + * time between (read_time - compare_duration) and read_time. + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * Possible "state_change" values when compare_duration is specified: + * * "CHANGED": indicates that the finding was present at the start of + * compare_duration, but changed its state at read_time. + * * "UNCHANGED": indicates that the finding was present at the start of + * compare_duration and did not change state at read_time. + * * "ADDED": indicates that the finding was not present at the start + * of compare_duration, but was present at read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present + * at read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + *+ * + *
.google.protobuf.Duration compare_duration = 5;
+ */
+ public com.google.protobuf.Duration getCompareDuration() {
+ if (compareDurationBuilder_ == null) {
+ return compareDuration_ == null
+ ? com.google.protobuf.Duration.getDefaultInstance()
+ : compareDuration_;
+ } else {
+ return compareDurationBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * When compare_duration is set, the GroupResult's "state_change" attribute is + * updated to indicate whether the finding had its state changed, the + * finding's state remained unchanged, or if the finding was added during the + * compare_duration period of time that precedes the read_time. This is the + * time between (read_time - compare_duration) and read_time. + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * Possible "state_change" values when compare_duration is specified: + * * "CHANGED": indicates that the finding was present at the start of + * compare_duration, but changed its state at read_time. + * * "UNCHANGED": indicates that the finding was present at the start of + * compare_duration and did not change state at read_time. + * * "ADDED": indicates that the finding was not present at the start + * of compare_duration, but was present at read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present + * at read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + *+ * + *
.google.protobuf.Duration compare_duration = 5;
+ */
+ public Builder setCompareDuration(com.google.protobuf.Duration value) {
+ if (compareDurationBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ compareDuration_ = value;
+ onChanged();
+ } else {
+ compareDurationBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * When compare_duration is set, the GroupResult's "state_change" attribute is + * updated to indicate whether the finding had its state changed, the + * finding's state remained unchanged, or if the finding was added during the + * compare_duration period of time that precedes the read_time. This is the + * time between (read_time - compare_duration) and read_time. + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * Possible "state_change" values when compare_duration is specified: + * * "CHANGED": indicates that the finding was present at the start of + * compare_duration, but changed its state at read_time. + * * "UNCHANGED": indicates that the finding was present at the start of + * compare_duration and did not change state at read_time. + * * "ADDED": indicates that the finding was not present at the start + * of compare_duration, but was present at read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present + * at read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + *+ * + *
.google.protobuf.Duration compare_duration = 5;
+ */
+ public Builder setCompareDuration(com.google.protobuf.Duration.Builder builderForValue) {
+ if (compareDurationBuilder_ == null) {
+ compareDuration_ = builderForValue.build();
+ onChanged();
+ } else {
+ compareDurationBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * When compare_duration is set, the GroupResult's "state_change" attribute is + * updated to indicate whether the finding had its state changed, the + * finding's state remained unchanged, or if the finding was added during the + * compare_duration period of time that precedes the read_time. This is the + * time between (read_time - compare_duration) and read_time. + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * Possible "state_change" values when compare_duration is specified: + * * "CHANGED": indicates that the finding was present at the start of + * compare_duration, but changed its state at read_time. + * * "UNCHANGED": indicates that the finding was present at the start of + * compare_duration and did not change state at read_time. + * * "ADDED": indicates that the finding was not present at the start + * of compare_duration, but was present at read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present + * at read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + *+ * + *
.google.protobuf.Duration compare_duration = 5;
+ */
+ public Builder mergeCompareDuration(com.google.protobuf.Duration value) {
+ if (compareDurationBuilder_ == null) {
+ if (compareDuration_ != null) {
+ compareDuration_ =
+ com.google.protobuf.Duration.newBuilder(compareDuration_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ compareDuration_ = value;
+ }
+ onChanged();
+ } else {
+ compareDurationBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * When compare_duration is set, the GroupResult's "state_change" attribute is + * updated to indicate whether the finding had its state changed, the + * finding's state remained unchanged, or if the finding was added during the + * compare_duration period of time that precedes the read_time. This is the + * time between (read_time - compare_duration) and read_time. + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * Possible "state_change" values when compare_duration is specified: + * * "CHANGED": indicates that the finding was present at the start of + * compare_duration, but changed its state at read_time. + * * "UNCHANGED": indicates that the finding was present at the start of + * compare_duration and did not change state at read_time. + * * "ADDED": indicates that the finding was not present at the start + * of compare_duration, but was present at read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present + * at read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + *+ * + *
.google.protobuf.Duration compare_duration = 5;
+ */
+ public Builder clearCompareDuration() {
+ if (compareDurationBuilder_ == null) {
+ compareDuration_ = null;
+ onChanged();
+ } else {
+ compareDuration_ = null;
+ compareDurationBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * When compare_duration is set, the GroupResult's "state_change" attribute is + * updated to indicate whether the finding had its state changed, the + * finding's state remained unchanged, or if the finding was added during the + * compare_duration period of time that precedes the read_time. This is the + * time between (read_time - compare_duration) and read_time. + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * Possible "state_change" values when compare_duration is specified: + * * "CHANGED": indicates that the finding was present at the start of + * compare_duration, but changed its state at read_time. + * * "UNCHANGED": indicates that the finding was present at the start of + * compare_duration and did not change state at read_time. + * * "ADDED": indicates that the finding was not present at the start + * of compare_duration, but was present at read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present + * at read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + *+ * + *
.google.protobuf.Duration compare_duration = 5;
+ */
+ public com.google.protobuf.Duration.Builder getCompareDurationBuilder() {
+
+ onChanged();
+ return getCompareDurationFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * When compare_duration is set, the GroupResult's "state_change" attribute is + * updated to indicate whether the finding had its state changed, the + * finding's state remained unchanged, or if the finding was added during the + * compare_duration period of time that precedes the read_time. This is the + * time between (read_time - compare_duration) and read_time. + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * Possible "state_change" values when compare_duration is specified: + * * "CHANGED": indicates that the finding was present at the start of + * compare_duration, but changed its state at read_time. + * * "UNCHANGED": indicates that the finding was present at the start of + * compare_duration and did not change state at read_time. + * * "ADDED": indicates that the finding was not present at the start + * of compare_duration, but was present at read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present + * at read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + *+ * + *
.google.protobuf.Duration compare_duration = 5;
+ */
+ public com.google.protobuf.DurationOrBuilder getCompareDurationOrBuilder() {
+ if (compareDurationBuilder_ != null) {
+ return compareDurationBuilder_.getMessageOrBuilder();
+ } else {
+ return compareDuration_ == null
+ ? com.google.protobuf.Duration.getDefaultInstance()
+ : compareDuration_;
+ }
+ }
+ /**
+ *
+ *
+ * + * When compare_duration is set, the GroupResult's "state_change" attribute is + * updated to indicate whether the finding had its state changed, the + * finding's state remained unchanged, or if the finding was added during the + * compare_duration period of time that precedes the read_time. This is the + * time between (read_time - compare_duration) and read_time. + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * Possible "state_change" values when compare_duration is specified: + * * "CHANGED": indicates that the finding was present at the start of + * compare_duration, but changed its state at read_time. + * * "UNCHANGED": indicates that the finding was present at the start of + * compare_duration and did not change state at read_time. + * * "ADDED": indicates that the finding was not present at the start + * of compare_duration, but was present at read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present + * at read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + *+ * + *
.google.protobuf.Duration compare_duration = 5;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Duration,
+ com.google.protobuf.Duration.Builder,
+ com.google.protobuf.DurationOrBuilder>
+ getCompareDurationFieldBuilder() {
+ if (compareDurationBuilder_ == null) {
+ compareDurationBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Duration,
+ com.google.protobuf.Duration.Builder,
+ com.google.protobuf.DurationOrBuilder>(
+ getCompareDuration(), getParentForChildren(), isClean());
+ compareDuration_ = null;
+ }
+ return compareDurationBuilder_;
+ }
+
+ private java.lang.Object having_ = "";
+ /**
+ *
+ *
+ * + * Filter that specifies what fields to further filter on *after* the query + * filter has been executed. Currently only 'finding.state' and 'state_change' + * are supported and requires compare_duration to be specified. + *+ * + *
string having = 6;
+ */
+ public java.lang.String getHaving() {
+ java.lang.Object ref = having_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ having_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Filter that specifies what fields to further filter on *after* the query + * filter has been executed. Currently only 'finding.state' and 'state_change' + * are supported and requires compare_duration to be specified. + *+ * + *
string having = 6;
+ */
+ public com.google.protobuf.ByteString getHavingBytes() {
+ java.lang.Object ref = having_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ having_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Filter that specifies what fields to further filter on *after* the query + * filter has been executed. Currently only 'finding.state' and 'state_change' + * are supported and requires compare_duration to be specified. + *+ * + *
string having = 6;
+ */
+ public Builder setHaving(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ having_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Filter that specifies what fields to further filter on *after* the query + * filter has been executed. Currently only 'finding.state' and 'state_change' + * are supported and requires compare_duration to be specified. + *+ * + *
string having = 6;
+ */
+ public Builder clearHaving() {
+
+ having_ = getDefaultInstance().getHaving();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Filter that specifies what fields to further filter on *after* the query + * filter has been executed. Currently only 'finding.state' and 'state_change' + * are supported and requires compare_duration to be specified. + *+ * + *
string having = 6;
+ */
+ public Builder setHavingBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ having_ = value;
+ 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;
+ */
+ 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;
+ */
+ 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;
+ */
+ public Builder setPageToken(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ pageToken_ = value;
+ 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;
+ */
+ public Builder clearPageToken() {
+
+ pageToken_ = getDefaultInstance().getPageToken();
+ 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;
+ */
+ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ pageToken_ = value;
+ 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;
+ */
+ 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;
+ */
+ public Builder setPageSize(int value) {
+
+ pageSize_ = value;
+ 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;
+ */
+ public Builder clearPageSize() {
+
+ pageSize_ = 0;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.GroupFindingsRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.GroupFindingsRequest)
+ private static final com.google.cloud.securitycenter.v1.GroupFindingsRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.GroupFindingsRequest();
+ }
+
+ public static com.google.cloud.securitycenter.v1.GroupFindingsRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Name of the source to groupBy. Its format is + * "organizations/[organization_id]/sources/[source_id]". To groupBy across + * all sources provide a source_id of `-`. For example: + * organizations/123/sources/- + *+ * + *
string parent = 1;
+ */
+ java.lang.String getParent();
+ /**
+ *
+ *
+ * + * Name of the source to groupBy. Its format is + * "organizations/[organization_id]/sources/[source_id]". To groupBy across + * all sources provide a source_id of `-`. For example: + * organizations/123/sources/- + *+ * + *
string parent = 1;
+ */
+ 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 + * * source_properties.a_property + * * 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. + * For example, `source_properties.size = 100` is a valid filter string. + *+ * + *
string filter = 2;
+ */
+ 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 + * * source_properties.a_property + * * 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. + * For example, `source_properties.size = 100` is a valid filter string. + *+ * + *
string filter = 2;
+ */
+ com.google.protobuf.ByteString getFilterBytes();
+
+ /**
+ *
+ *
+ * + * Expression that defines what assets fields to use for grouping (including + * `state_change`). 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 + * * state_change + * * parent + *+ * + *
string group_by = 3;
+ */
+ java.lang.String getGroupBy();
+ /**
+ *
+ *
+ * + * Expression that defines what assets fields to use for grouping (including + * `state_change`). 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 + * * state_change + * * parent + *+ * + *
string group_by = 3;
+ */
+ com.google.protobuf.ByteString getGroupByBytes();
+
+ /**
+ *
+ *
+ * + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ */
+ boolean hasReadTime();
+ /**
+ *
+ *
+ * + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ */
+ com.google.protobuf.Timestamp getReadTime();
+ /**
+ *
+ *
+ * + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ */
+ com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder();
+
+ /**
+ *
+ *
+ * + * When compare_duration is set, the GroupResult's "state_change" attribute is + * updated to indicate whether the finding had its state changed, the + * finding's state remained unchanged, or if the finding was added during the + * compare_duration period of time that precedes the read_time. This is the + * time between (read_time - compare_duration) and read_time. + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * Possible "state_change" values when compare_duration is specified: + * * "CHANGED": indicates that the finding was present at the start of + * compare_duration, but changed its state at read_time. + * * "UNCHANGED": indicates that the finding was present at the start of + * compare_duration and did not change state at read_time. + * * "ADDED": indicates that the finding was not present at the start + * of compare_duration, but was present at read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present + * at read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + *+ * + *
.google.protobuf.Duration compare_duration = 5;
+ */
+ boolean hasCompareDuration();
+ /**
+ *
+ *
+ * + * When compare_duration is set, the GroupResult's "state_change" attribute is + * updated to indicate whether the finding had its state changed, the + * finding's state remained unchanged, or if the finding was added during the + * compare_duration period of time that precedes the read_time. This is the + * time between (read_time - compare_duration) and read_time. + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * Possible "state_change" values when compare_duration is specified: + * * "CHANGED": indicates that the finding was present at the start of + * compare_duration, but changed its state at read_time. + * * "UNCHANGED": indicates that the finding was present at the start of + * compare_duration and did not change state at read_time. + * * "ADDED": indicates that the finding was not present at the start + * of compare_duration, but was present at read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present + * at read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + *+ * + *
.google.protobuf.Duration compare_duration = 5;
+ */
+ com.google.protobuf.Duration getCompareDuration();
+ /**
+ *
+ *
+ * + * When compare_duration is set, the GroupResult's "state_change" attribute is + * updated to indicate whether the finding had its state changed, the + * finding's state remained unchanged, or if the finding was added during the + * compare_duration period of time that precedes the read_time. This is the + * time between (read_time - compare_duration) and read_time. + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * Possible "state_change" values when compare_duration is specified: + * * "CHANGED": indicates that the finding was present at the start of + * compare_duration, but changed its state at read_time. + * * "UNCHANGED": indicates that the finding was present at the start of + * compare_duration and did not change state at read_time. + * * "ADDED": indicates that the finding was not present at the start + * of compare_duration, but was present at read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present + * at read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + *+ * + *
.google.protobuf.Duration compare_duration = 5;
+ */
+ com.google.protobuf.DurationOrBuilder getCompareDurationOrBuilder();
+
+ /**
+ *
+ *
+ * + * Filter that specifies what fields to further filter on *after* the query + * filter has been executed. Currently only 'finding.state' and 'state_change' + * are supported and requires compare_duration to be specified. + *+ * + *
string having = 6;
+ */
+ java.lang.String getHaving();
+ /**
+ *
+ *
+ * + * Filter that specifies what fields to further filter on *after* the query + * filter has been executed. Currently only 'finding.state' and 'state_change' + * are supported and requires compare_duration to be specified. + *+ * + *
string having = 6;
+ */
+ com.google.protobuf.ByteString getHavingBytes();
+
+ /**
+ *
+ *
+ * + * 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;
+ */
+ 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;
+ */
+ 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;
+ */
+ int getPageSize();
+}
diff --git a/google-api-grpc/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupFindingsResponse.java b/google-api-grpc/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupFindingsResponse.java
new file mode 100644
index 000000000000..1d75196fe8a2
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupFindingsResponse.java
@@ -0,0 +1,1492 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/securitycenter/v1/securitycenter_service.proto
+
+package com.google.cloud.securitycenter.v1;
+
+/**
+ *
+ *
+ * + * Response message for group by findings. + *+ * + * Protobuf type {@code google.cloud.securitycenter.v1.GroupFindingsResponse} + */ +public final class GroupFindingsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.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_ = ""; + totalSize_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GroupFindingsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + groupByResults_ = + new java.util.ArrayList
+ * 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.v1.GroupResult group_by_results = 1;
+ */
+ public java.util.List+ * 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.v1.GroupResult group_by_results = 1;
+ */
+ public java.util.List extends com.google.cloud.securitycenter.v1.GroupResultOrBuilder>
+ 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.v1.GroupResult group_by_results = 1;
+ */
+ 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.v1.GroupResult group_by_results = 1;
+ */
+ public com.google.cloud.securitycenter.v1.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.v1.GroupResult group_by_results = 1;
+ */
+ public com.google.cloud.securitycenter.v1.GroupResultOrBuilder getGroupByResultsOrBuilder(
+ int index) {
+ return groupByResults_.get(index);
+ }
+
+ public static final int READ_TIME_FIELD_NUMBER = 2;
+ private com.google.protobuf.Timestamp readTime_;
+ /**
+ *
+ *
+ * + * Time used for executing the groupBy request. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ public boolean hasReadTime() {
+ return readTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * Time used for executing the groupBy request. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ public com.google.protobuf.Timestamp getReadTime() {
+ return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_;
+ }
+ /**
+ *
+ *
+ * + * Time used for executing the groupBy request. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() {
+ return getReadTime();
+ }
+
+ public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 3;
+ 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;
+ */
+ 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;
+ */
+ 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_;
+ /**
+ *
+ *
+ * + * The total number of results matching the query. + *+ * + *
int32 total_size = 4;
+ */
+ 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 (readTime_ != null) {
+ output.writeMessage(2, getReadTime());
+ }
+ if (!getNextPageTokenBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, nextPageToken_);
+ }
+ if (totalSize_ != 0) {
+ output.writeInt32(4, totalSize_);
+ }
+ unknownFields.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 (readTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getReadTime());
+ }
+ if (!getNextPageTokenBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nextPageToken_);
+ }
+ if (totalSize_ != 0) {
+ size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, totalSize_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.securitycenter.v1.GroupFindingsResponse)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.securitycenter.v1.GroupFindingsResponse other =
+ (com.google.cloud.securitycenter.v1.GroupFindingsResponse) obj;
+
+ boolean result = true;
+ result = result && getGroupByResultsList().equals(other.getGroupByResultsList());
+ result = result && (hasReadTime() == other.hasReadTime());
+ if (hasReadTime()) {
+ result = result && getReadTime().equals(other.getReadTime());
+ }
+ result = result && getNextPageToken().equals(other.getNextPageToken());
+ result = result && (getTotalSize() == other.getTotalSize());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @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();
+ }
+ if (hasReadTime()) {
+ hash = (37 * hash) + READ_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getReadTime().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) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.securitycenter.v1.GroupFindingsResponse parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.securitycenter.v1.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.v1.GroupFindingsResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.securitycenter.v1.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.v1.GroupFindingsResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.securitycenter.v1.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.v1.GroupFindingsResponse parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.securitycenter.v1.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.v1.GroupFindingsResponse parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.securitycenter.v1.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.v1.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.v1.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.v1.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.v1.GroupFindingsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * 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.v1.GroupResult group_by_results = 1;
+ */
+ public java.util.List+ * 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.v1.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.v1.GroupResult group_by_results = 1;
+ */
+ public com.google.cloud.securitycenter.v1.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.v1.GroupResult group_by_results = 1;
+ */
+ public Builder setGroupByResults(
+ int index, com.google.cloud.securitycenter.v1.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.v1.GroupResult group_by_results = 1;
+ */
+ public Builder setGroupByResults(
+ int index, com.google.cloud.securitycenter.v1.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.v1.GroupResult group_by_results = 1;
+ */
+ public Builder addGroupByResults(com.google.cloud.securitycenter.v1.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.v1.GroupResult group_by_results = 1;
+ */
+ public Builder addGroupByResults(
+ int index, com.google.cloud.securitycenter.v1.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.v1.GroupResult group_by_results = 1;
+ */
+ public Builder addGroupByResults(
+ com.google.cloud.securitycenter.v1.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.v1.GroupResult group_by_results = 1;
+ */
+ public Builder addGroupByResults(
+ int index, com.google.cloud.securitycenter.v1.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.v1.GroupResult group_by_results = 1;
+ */
+ public Builder addAllGroupByResults(
+ java.lang.Iterable extends com.google.cloud.securitycenter.v1.GroupResult> 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.v1.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.v1.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.v1.GroupResult group_by_results = 1;
+ */
+ public com.google.cloud.securitycenter.v1.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.v1.GroupResult group_by_results = 1;
+ */
+ public com.google.cloud.securitycenter.v1.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.v1.GroupResult group_by_results = 1;
+ */
+ public java.util.List extends com.google.cloud.securitycenter.v1.GroupResultOrBuilder>
+ 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.v1.GroupResult group_by_results = 1;
+ */
+ public com.google.cloud.securitycenter.v1.GroupResult.Builder addGroupByResultsBuilder() {
+ return getGroupByResultsFieldBuilder()
+ .addBuilder(com.google.cloud.securitycenter.v1.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.v1.GroupResult group_by_results = 1;
+ */
+ public com.google.cloud.securitycenter.v1.GroupResult.Builder addGroupByResultsBuilder(
+ int index) {
+ return getGroupByResultsFieldBuilder()
+ .addBuilder(index, com.google.cloud.securitycenter.v1.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.v1.GroupResult group_by_results = 1;
+ */
+ public java.util.List+ * Time used for executing the groupBy request. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ public boolean hasReadTime() {
+ return readTimeBuilder_ != null || readTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * Time used for executing the groupBy request. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ public com.google.protobuf.Timestamp getReadTime() {
+ if (readTimeBuilder_ == null) {
+ return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_;
+ } else {
+ return readTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Time used for executing the groupBy request. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ public Builder setReadTime(com.google.protobuf.Timestamp value) {
+ if (readTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ readTime_ = value;
+ onChanged();
+ } else {
+ readTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Time used for executing the groupBy request. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (readTimeBuilder_ == null) {
+ readTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ readTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Time used for executing the groupBy request. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ public Builder mergeReadTime(com.google.protobuf.Timestamp value) {
+ if (readTimeBuilder_ == null) {
+ if (readTime_ != null) {
+ readTime_ =
+ com.google.protobuf.Timestamp.newBuilder(readTime_).mergeFrom(value).buildPartial();
+ } else {
+ readTime_ = value;
+ }
+ onChanged();
+ } else {
+ readTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Time used for executing the groupBy request. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ public Builder clearReadTime() {
+ if (readTimeBuilder_ == null) {
+ readTime_ = null;
+ onChanged();
+ } else {
+ readTime_ = null;
+ readTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Time used for executing the groupBy request. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() {
+
+ onChanged();
+ return getReadTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Time used for executing the groupBy request. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() {
+ if (readTimeBuilder_ != null) {
+ return readTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Time used for executing the groupBy request. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getReadTimeFieldBuilder() {
+ if (readTimeBuilder_ == null) {
+ readTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getReadTime(), getParentForChildren(), isClean());
+ readTime_ = null;
+ }
+ return readTimeBuilder_;
+ }
+
+ 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;
+ */
+ 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;
+ */
+ 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;
+ */
+ public Builder setNextPageToken(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ nextPageToken_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Token to retrieve the next page of results, or empty if there are no more + * results. + *+ * + *
string next_page_token = 3;
+ */
+ public Builder clearNextPageToken() {
+
+ nextPageToken_ = getDefaultInstance().getNextPageToken();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Token to retrieve the next page of results, or empty if there are no more + * results. + *+ * + *
string next_page_token = 3;
+ */
+ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ nextPageToken_ = value;
+ onChanged();
+ return this;
+ }
+
+ private int totalSize_;
+ /**
+ *
+ *
+ * + * The total number of results matching the query. + *+ * + *
int32 total_size = 4;
+ */
+ public int getTotalSize() {
+ return totalSize_;
+ }
+ /**
+ *
+ *
+ * + * The total number of results matching the query. + *+ * + *
int32 total_size = 4;
+ */
+ public Builder setTotalSize(int value) {
+
+ totalSize_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The total number of results matching the query. + *+ * + *
int32 total_size = 4;
+ */
+ public Builder clearTotalSize() {
+
+ totalSize_ = 0;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.GroupFindingsResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.GroupFindingsResponse)
+ private static final com.google.cloud.securitycenter.v1.GroupFindingsResponse DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.GroupFindingsResponse();
+ }
+
+ public static com.google.cloud.securitycenter.v1.GroupFindingsResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * 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.v1.GroupResult group_by_results = 1;
+ */
+ java.util.List+ * 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.v1.GroupResult group_by_results = 1;
+ */
+ com.google.cloud.securitycenter.v1.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.v1.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.v1.GroupResult group_by_results = 1;
+ */
+ java.util.List extends com.google.cloud.securitycenter.v1.GroupResultOrBuilder>
+ 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.v1.GroupResult group_by_results = 1;
+ */
+ com.google.cloud.securitycenter.v1.GroupResultOrBuilder getGroupByResultsOrBuilder(int index);
+
+ /**
+ *
+ *
+ * + * Time used for executing the groupBy request. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ boolean hasReadTime();
+ /**
+ *
+ *
+ * + * Time used for executing the groupBy request. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ com.google.protobuf.Timestamp getReadTime();
+ /**
+ *
+ *
+ * + * Time used for executing the groupBy request. + *+ * + *
.google.protobuf.Timestamp read_time = 2;
+ */
+ com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder();
+
+ /**
+ *
+ *
+ * + * Token to retrieve the next page of results, or empty if there are no more + * results. + *+ * + *
string next_page_token = 3;
+ */
+ 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;
+ */
+ com.google.protobuf.ByteString getNextPageTokenBytes();
+
+ /**
+ *
+ *
+ * + * The total number of results matching the query. + *+ * + *
int32 total_size = 4;
+ */
+ int getTotalSize();
+}
diff --git a/google-api-grpc/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupResult.java b/google-api-grpc/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupResult.java
new file mode 100644
index 000000000000..10bb48d35108
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupResult.java
@@ -0,0 +1,847 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/securitycenter/v1/securitycenter_service.proto
+
+package com.google.cloud.securitycenter.v1;
+
+/**
+ *
+ *
+ * + * Result containing the properties and count of a groupBy request. + *+ * + * Protobuf type {@code google.cloud.securitycenter.v1.GroupResult} + */ +public final class GroupResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.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() { + count_ = 0L; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GroupResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + properties_ = + com.google.protobuf.MapField.newMapField( + PropertiesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry
+ * Properties matching the groupBy fields in the request. + *+ * + *
map<string, .google.protobuf.Value> properties = 1;
+ */
+ public boolean containsProperties(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ return internalGetProperties().getMap().containsKey(key);
+ }
+ /** Use {@link #getPropertiesMap()} instead. */
+ @java.lang.Deprecated
+ public java.util.Map+ * Properties matching the groupBy fields in the request. + *+ * + *
map<string, .google.protobuf.Value> properties = 1;
+ */
+ public java.util.Map+ * Properties matching the groupBy fields in the request. + *+ * + *
map<string, .google.protobuf.Value> properties = 1;
+ */
+ public com.google.protobuf.Value getPropertiesOrDefault(
+ java.lang.String key, com.google.protobuf.Value defaultValue) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map+ * Properties matching the groupBy fields in the request. + *+ * + *
map<string, .google.protobuf.Value> properties = 1;
+ */
+ public com.google.protobuf.Value getPropertiesOrThrow(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map