diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterClient.java b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterClient.java index df1fc928e75f..d2f815c19295 100644 --- a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterClient.java +++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterClient.java @@ -1403,7 +1403,7 @@ public final UnaryCallable getBigQuery * // This snippet has been automatically generated for illustrative purposes only. * // It may require modifications to work in your environment. * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { - * ResourceName resource = FolderName.of("[FOLDER]"); + * ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); * Policy response = securityCenterClient.getIamPolicy(resource); * } * } @@ -1456,7 +1456,8 @@ public final Policy getIamPolicy(String resource) { * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { * GetIamPolicyRequest request = * GetIamPolicyRequest.newBuilder() - * .setResource(FolderName.of("[FOLDER]").toString()) + * .setResource( + * SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) * .setOptions(GetPolicyOptions.newBuilder().build()) * .build(); * Policy response = securityCenterClient.getIamPolicy(request); @@ -1482,7 +1483,8 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) { * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { * GetIamPolicyRequest request = * GetIamPolicyRequest.newBuilder() - * .setResource(FolderName.of("[FOLDER]").toString()) + * .setResource( + * SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) * .setOptions(GetPolicyOptions.newBuilder().build()) * .build(); * ApiFuture future = securityCenterClient.getIamPolicyCallable().futureCall(request); @@ -1999,7 +2001,7 @@ public final GroupAssetsPagedResponse groupAssets(GroupAssetsRequest request) { * .build(); * while (true) { * GroupAssetsResponse response = securityCenterClient.groupAssetsCallable().call(request); - * for (GroupResult element : response.getResponsesList()) { + * for (GroupResult element : response.getGroupByResultsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -2227,7 +2229,7 @@ public final GroupFindingsPagedResponse groupFindings(GroupFindingsRequest reque * .build(); * while (true) { * GroupFindingsResponse response = securityCenterClient.groupFindingsCallable().call(request); - * for (GroupResult element : response.getResponsesList()) { + * for (GroupResult element : response.getGroupByResultsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -2336,7 +2338,7 @@ public final UnaryCallable listAsset * .build(); * while (true) { * ListAssetsResponse response = securityCenterClient.listAssetsCallable().call(request); - * for (ListAssetsResponse.ListAssetsResult element : response.getResponsesList()) { + * for (ListAssetsResponse.ListAssetsResult element : response.getListAssetsResultsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -2458,7 +2460,8 @@ public final ListFindingsPagedResponse listFindings(ListFindingsRequest request) * .build(); * while (true) { * ListFindingsResponse response = securityCenterClient.listFindingsCallable().call(request); - * for (ListFindingsResponse.ListFindingsResult element : response.getResponsesList()) { + * for (ListFindingsResponse.ListFindingsResult element : + * response.getListFindingsResultsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -2666,7 +2669,7 @@ public final ListMuteConfigsPagedResponse listMuteConfigs(ListMuteConfigsRequest * while (true) { * ListMuteConfigsResponse response = * securityCenterClient.listMuteConfigsCallable().call(request); - * for (MuteConfig element : response.getResponsesList()) { + * for (MuteConfig element : response.getMuteConfigsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -2823,7 +2826,7 @@ public final ListNotificationConfigsPagedResponse listNotificationConfigs( * while (true) { * ListNotificationConfigsResponse response = * securityCenterClient.listNotificationConfigsCallable().call(request); - * for (NotificationConfig element : response.getResponsesList()) { + * for (NotificationConfig element : response.getNotificationConfigsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -3031,7 +3034,7 @@ public final ListSourcesPagedResponse listSources(ListSourcesRequest request) { * .build(); * while (true) { * ListSourcesResponse response = securityCenterClient.listSourcesCallable().call(request); - * for (Source element : response.getResponsesList()) { + * for (Source element : response.getSourcesList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -3456,7 +3459,7 @@ public final UnaryCallable setMuteCallable() { * // This snippet has been automatically generated for illustrative purposes only. * // It may require modifications to work in your environment. * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { - * ResourceName resource = FolderName.of("[FOLDER]"); + * ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); * Policy policy = Policy.newBuilder().build(); * Policy response = securityCenterClient.setIamPolicy(resource, policy); * } @@ -3519,7 +3522,8 @@ public final Policy setIamPolicy(String resource, Policy policy) { * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { * SetIamPolicyRequest request = * SetIamPolicyRequest.newBuilder() - * .setResource(FolderName.of("[FOLDER]").toString()) + * .setResource( + * SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) * .setPolicy(Policy.newBuilder().build()) * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); @@ -3546,7 +3550,8 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) { * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { * SetIamPolicyRequest request = * SetIamPolicyRequest.newBuilder() - * .setResource(FolderName.of("[FOLDER]").toString()) + * .setResource( + * SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) * .setPolicy(Policy.newBuilder().build()) * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); @@ -3570,7 +3575,7 @@ public final UnaryCallable setIamPolicyCallable() { * // This snippet has been automatically generated for illustrative purposes only. * // It may require modifications to work in your environment. * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { - * ResourceName resource = FolderName.of("[FOLDER]"); + * ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); * List permissions = new ArrayList<>(); * TestIamPermissionsResponse response = * securityCenterClient.testIamPermissions(resource, permissions); @@ -3640,7 +3645,8 @@ public final TestIamPermissionsResponse testIamPermissions( * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { * TestIamPermissionsRequest request = * TestIamPermissionsRequest.newBuilder() - * .setResource(FolderName.of("[FOLDER]").toString()) + * .setResource( + * SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) * .addAllPermissions(new ArrayList()) * .build(); * TestIamPermissionsResponse response = securityCenterClient.testIamPermissions(request); @@ -3666,7 +3672,8 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { * TestIamPermissionsRequest request = * TestIamPermissionsRequest.newBuilder() - * .setResource(FolderName.of("[FOLDER]").toString()) + * .setResource( + * SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) * .addAllPermissions(new ArrayList()) * .build(); * ApiFuture future = @@ -4895,7 +4902,7 @@ public final ListBigQueryExportsPagedResponse listBigQueryExports( * while (true) { * ListBigQueryExportsResponse response = * securityCenterClient.listBigQueryExportsCallable().call(request); - * for (BigQueryExport element : response.getResponsesList()) { + * for (BigQueryExport element : response.getBigQueryExportsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1beta1/SecurityCenterClient.java b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1beta1/SecurityCenterClient.java index b9ba02905c9f..1c7404ec4ada 100644 --- a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1beta1/SecurityCenterClient.java +++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1beta1/SecurityCenterClient.java @@ -419,7 +419,7 @@ public final UnaryCallable createFindingCallable( * // This snippet has been automatically generated for illustrative purposes only. * // It may require modifications to work in your environment. * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { - * ResourceName resource = OrganizationName.of("[ORGANIZATION]"); + * ResourceName resource = SourceName.of("[ORGANIZATION]", "[SOURCE]"); * Policy response = securityCenterClient.getIamPolicy(resource); * } * } @@ -472,7 +472,7 @@ public final Policy getIamPolicy(String resource) { * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { * GetIamPolicyRequest request = * GetIamPolicyRequest.newBuilder() - * .setResource(OrganizationName.of("[ORGANIZATION]").toString()) + * .setResource(SourceName.of("[ORGANIZATION]", "[SOURCE]").toString()) * .setOptions(GetPolicyOptions.newBuilder().build()) * .build(); * Policy response = securityCenterClient.getIamPolicy(request); @@ -498,7 +498,7 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) { * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { * GetIamPolicyRequest request = * GetIamPolicyRequest.newBuilder() - * .setResource(OrganizationName.of("[ORGANIZATION]").toString()) + * .setResource(SourceName.of("[ORGANIZATION]", "[SOURCE]").toString()) * .setOptions(GetPolicyOptions.newBuilder().build()) * .build(); * ApiFuture future = securityCenterClient.getIamPolicyCallable().futureCall(request); @@ -802,7 +802,7 @@ public final GroupAssetsPagedResponse groupAssets(GroupAssetsRequest request) { * .build(); * while (true) { * GroupAssetsResponse response = securityCenterClient.groupAssetsCallable().call(request); - * for (GroupResult element : response.getResponsesList()) { + * for (GroupResult element : response.getGroupByResultsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -1003,7 +1003,7 @@ public final GroupFindingsPagedResponse groupFindings(GroupFindingsRequest reque * .build(); * while (true) { * GroupFindingsResponse response = securityCenterClient.groupFindingsCallable().call(request); - * for (GroupResult element : response.getResponsesList()) { + * for (GroupResult element : response.getGroupByResultsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -1112,7 +1112,7 @@ public final UnaryCallable listAsset * .build(); * while (true) { * ListAssetsResponse response = securityCenterClient.listAssetsCallable().call(request); - * for (ListAssetsResponse.ListAssetsResult element : response.getResponsesList()) { + * for (ListAssetsResponse.ListAssetsResult element : response.getListAssetsResultsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -1227,7 +1227,7 @@ public final ListFindingsPagedResponse listFindings(ListFindingsRequest request) * .build(); * while (true) { * ListFindingsResponse response = securityCenterClient.listFindingsCallable().call(request); - * for (Finding element : response.getResponsesList()) { + * for (Finding element : response.getFindingsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -1376,7 +1376,7 @@ public final ListSourcesPagedResponse listSources(ListSourcesRequest request) { * .build(); * while (true) { * ListSourcesResponse response = securityCenterClient.listSourcesCallable().call(request); - * for (Source element : response.getResponsesList()) { + * for (Source element : response.getSourcesList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -1667,7 +1667,7 @@ public final UnaryCallable setFindingStateCalla * // This snippet has been automatically generated for illustrative purposes only. * // It may require modifications to work in your environment. * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { - * ResourceName resource = OrganizationName.of("[ORGANIZATION]"); + * ResourceName resource = SourceName.of("[ORGANIZATION]", "[SOURCE]"); * Policy policy = Policy.newBuilder().build(); * Policy response = securityCenterClient.setIamPolicy(resource, policy); * } @@ -1730,7 +1730,7 @@ public final Policy setIamPolicy(String resource, Policy policy) { * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { * SetIamPolicyRequest request = * SetIamPolicyRequest.newBuilder() - * .setResource(OrganizationName.of("[ORGANIZATION]").toString()) + * .setResource(SourceName.of("[ORGANIZATION]", "[SOURCE]").toString()) * .setPolicy(Policy.newBuilder().build()) * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); @@ -1757,7 +1757,7 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) { * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { * SetIamPolicyRequest request = * SetIamPolicyRequest.newBuilder() - * .setResource(OrganizationName.of("[ORGANIZATION]").toString()) + * .setResource(SourceName.of("[ORGANIZATION]", "[SOURCE]").toString()) * .setPolicy(Policy.newBuilder().build()) * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); @@ -1781,7 +1781,7 @@ public final UnaryCallable setIamPolicyCallable() { * // This snippet has been automatically generated for illustrative purposes only. * // It may require modifications to work in your environment. * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { - * ResourceName resource = OrganizationName.of("[ORGANIZATION]"); + * ResourceName resource = SourceName.of("[ORGANIZATION]", "[SOURCE]"); * List permissions = new ArrayList<>(); * TestIamPermissionsResponse response = * securityCenterClient.testIamPermissions(resource, permissions); @@ -1851,7 +1851,7 @@ public final TestIamPermissionsResponse testIamPermissions( * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { * TestIamPermissionsRequest request = * TestIamPermissionsRequest.newBuilder() - * .setResource(OrganizationName.of("[ORGANIZATION]").toString()) + * .setResource(SourceName.of("[ORGANIZATION]", "[SOURCE]").toString()) * .addAllPermissions(new ArrayList()) * .build(); * TestIamPermissionsResponse response = securityCenterClient.testIamPermissions(request); @@ -1877,7 +1877,7 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { * TestIamPermissionsRequest request = * TestIamPermissionsRequest.newBuilder() - * .setResource(OrganizationName.of("[ORGANIZATION]").toString()) + * .setResource(SourceName.of("[ORGANIZATION]", "[SOURCE]").toString()) * .addAllPermissions(new ArrayList()) * .build(); * ApiFuture future = diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1p1beta1/SecurityCenterClient.java b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1p1beta1/SecurityCenterClient.java index 7eec1f17fd4e..65812b11cfc3 100644 --- a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1p1beta1/SecurityCenterClient.java +++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1p1beta1/SecurityCenterClient.java @@ -790,7 +790,7 @@ public final void deleteNotificationConfig(DeleteNotificationConfigRequest reque * // This snippet has been automatically generated for illustrative purposes only. * // It may require modifications to work in your environment. * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { - * ResourceName resource = FolderName.of("[FOLDER]"); + * ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); * Policy response = securityCenterClient.getIamPolicy(resource); * } * } @@ -843,7 +843,8 @@ public final Policy getIamPolicy(String resource) { * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { * GetIamPolicyRequest request = * GetIamPolicyRequest.newBuilder() - * .setResource(FolderName.of("[FOLDER]").toString()) + * .setResource( + * SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) * .setOptions(GetPolicyOptions.newBuilder().build()) * .build(); * Policy response = securityCenterClient.getIamPolicy(request); @@ -869,7 +870,8 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) { * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { * GetIamPolicyRequest request = * GetIamPolicyRequest.newBuilder() - * .setResource(FolderName.of("[FOLDER]").toString()) + * .setResource( + * SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) * .setOptions(GetPolicyOptions.newBuilder().build()) * .build(); * ApiFuture future = securityCenterClient.getIamPolicyCallable().futureCall(request); @@ -1279,7 +1281,7 @@ public final GroupAssetsPagedResponse groupAssets(GroupAssetsRequest request) { * .build(); * while (true) { * GroupAssetsResponse response = securityCenterClient.groupAssetsCallable().call(request); - * for (GroupResult element : response.getResponsesList()) { + * for (GroupResult element : response.getGroupByResultsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -1507,7 +1509,7 @@ public final GroupFindingsPagedResponse groupFindings(GroupFindingsRequest reque * .build(); * while (true) { * GroupFindingsResponse response = securityCenterClient.groupFindingsCallable().call(request); - * for (GroupResult element : response.getResponsesList()) { + * for (GroupResult element : response.getGroupByResultsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -1727,7 +1729,7 @@ public final UnaryCallable listAsset * .build(); * while (true) { * ListAssetsResponse response = securityCenterClient.listAssetsCallable().call(request); - * for (ListAssetsResponse.ListAssetsResult element : response.getResponsesList()) { + * for (ListAssetsResponse.ListAssetsResult element : response.getListAssetsResultsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -1920,7 +1922,8 @@ public final ListFindingsPagedResponse listFindings(ListFindingsRequest request) * .build(); * while (true) { * ListFindingsResponse response = securityCenterClient.listFindingsCallable().call(request); - * for (ListFindingsResponse.ListFindingsResult element : response.getResponsesList()) { + * for (ListFindingsResponse.ListFindingsResult element : + * response.getListFindingsResultsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -2076,7 +2079,7 @@ public final ListNotificationConfigsPagedResponse listNotificationConfigs( * while (true) { * ListNotificationConfigsResponse response = * securityCenterClient.listNotificationConfigsCallable().call(request); - * for (NotificationConfig element : response.getResponsesList()) { + * for (NotificationConfig element : response.getNotificationConfigsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -2284,7 +2287,7 @@ public final ListSourcesPagedResponse listSources(ListSourcesRequest request) { * .build(); * while (true) { * ListSourcesResponse response = securityCenterClient.listSourcesCallable().call(request); - * for (Source element : response.getResponsesList()) { + * for (Source element : response.getSourcesList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -2589,7 +2592,7 @@ public final UnaryCallable setFindingStateCalla * // This snippet has been automatically generated for illustrative purposes only. * // It may require modifications to work in your environment. * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { - * ResourceName resource = FolderName.of("[FOLDER]"); + * ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); * Policy policy = Policy.newBuilder().build(); * Policy response = securityCenterClient.setIamPolicy(resource, policy); * } @@ -2652,7 +2655,8 @@ public final Policy setIamPolicy(String resource, Policy policy) { * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { * SetIamPolicyRequest request = * SetIamPolicyRequest.newBuilder() - * .setResource(FolderName.of("[FOLDER]").toString()) + * .setResource( + * SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) * .setPolicy(Policy.newBuilder().build()) * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); @@ -2679,7 +2683,8 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) { * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { * SetIamPolicyRequest request = * SetIamPolicyRequest.newBuilder() - * .setResource(FolderName.of("[FOLDER]").toString()) + * .setResource( + * SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) * .setPolicy(Policy.newBuilder().build()) * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); @@ -2703,7 +2708,7 @@ public final UnaryCallable setIamPolicyCallable() { * // This snippet has been automatically generated for illustrative purposes only. * // It may require modifications to work in your environment. * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { - * ResourceName resource = FolderName.of("[FOLDER]"); + * ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); * List permissions = new ArrayList<>(); * TestIamPermissionsResponse response = * securityCenterClient.testIamPermissions(resource, permissions); @@ -2773,7 +2778,8 @@ public final TestIamPermissionsResponse testIamPermissions( * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { * TestIamPermissionsRequest request = * TestIamPermissionsRequest.newBuilder() - * .setResource(FolderName.of("[FOLDER]").toString()) + * .setResource( + * SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) * .addAllPermissions(new ArrayList()) * .build(); * TestIamPermissionsResponse response = securityCenterClient.testIamPermissions(request); @@ -2799,7 +2805,8 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { * TestIamPermissionsRequest request = * TestIamPermissionsRequest.newBuilder() - * .setResource(FolderName.of("[FOLDER]").toString()) + * .setResource( + * SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) * .addAllPermissions(new ArrayList()) * .build(); * ApiFuture future = diff --git a/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientTest.java b/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientTest.java index 3867482fcf9e..0e5b30f22c28 100644 --- a/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientTest.java +++ b/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientTest.java @@ -304,7 +304,10 @@ public void createFindingTest() throws Exception { .setAccess(Access.newBuilder().build()) .addAllConnections(new ArrayList()) .setMuteInitiator("muteInitiator1395645462") + .addAllProcesses(new ArrayList()) + .addAllCompliances(new ArrayList()) .setDescription("description-1724546052") + .setExfiltration(Exfiltration.newBuilder().build()) .addAllIamBindings(new ArrayList()) .setNextSteps("nextSteps1206138868") .build(); @@ -371,7 +374,10 @@ public void createFindingTest2() throws Exception { .setAccess(Access.newBuilder().build()) .addAllConnections(new ArrayList()) .setMuteInitiator("muteInitiator1395645462") + .addAllProcesses(new ArrayList()) + .addAllCompliances(new ArrayList()) .setDescription("description-1724546052") + .setExfiltration(Exfiltration.newBuilder().build()) .addAllIamBindings(new ArrayList()) .setNextSteps("nextSteps1206138868") .build(); @@ -1258,7 +1264,7 @@ public void getIamPolicyTest() throws Exception { .build(); mockSecurityCenter.addResponse(expectedResponse); - ResourceName resource = FolderName.of("[FOLDER]"); + ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); Policy actualResponse = client.getIamPolicy(resource); Assert.assertEquals(expectedResponse, actualResponse); @@ -1280,7 +1286,7 @@ public void getIamPolicyExceptionTest() throws Exception { mockSecurityCenter.addException(exception); try { - ResourceName resource = FolderName.of("[FOLDER]"); + ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); client.getIamPolicy(resource); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { @@ -2539,7 +2545,10 @@ public void setFindingStateTest() throws Exception { .setAccess(Access.newBuilder().build()) .addAllConnections(new ArrayList()) .setMuteInitiator("muteInitiator1395645462") + .addAllProcesses(new ArrayList()) + .addAllCompliances(new ArrayList()) .setDescription("description-1724546052") + .setExfiltration(Exfiltration.newBuilder().build()) .addAllIamBindings(new ArrayList()) .setNextSteps("nextSteps1206138868") .build(); @@ -2608,7 +2617,10 @@ public void setFindingStateTest2() throws Exception { .setAccess(Access.newBuilder().build()) .addAllConnections(new ArrayList()) .setMuteInitiator("muteInitiator1395645462") + .addAllProcesses(new ArrayList()) + .addAllCompliances(new ArrayList()) .setDescription("description-1724546052") + .setExfiltration(Exfiltration.newBuilder().build()) .addAllIamBindings(new ArrayList()) .setNextSteps("nextSteps1206138868") .build(); @@ -2675,7 +2687,10 @@ public void setMuteTest() throws Exception { .setAccess(Access.newBuilder().build()) .addAllConnections(new ArrayList()) .setMuteInitiator("muteInitiator1395645462") + .addAllProcesses(new ArrayList()) + .addAllCompliances(new ArrayList()) .setDescription("description-1724546052") + .setExfiltration(Exfiltration.newBuilder().build()) .addAllIamBindings(new ArrayList()) .setNextSteps("nextSteps1206138868") .build(); @@ -2741,7 +2756,10 @@ public void setMuteTest2() throws Exception { .setAccess(Access.newBuilder().build()) .addAllConnections(new ArrayList()) .setMuteInitiator("muteInitiator1395645462") + .addAllProcesses(new ArrayList()) + .addAllCompliances(new ArrayList()) .setDescription("description-1724546052") + .setExfiltration(Exfiltration.newBuilder().build()) .addAllIamBindings(new ArrayList()) .setNextSteps("nextSteps1206138868") .build(); @@ -2791,7 +2809,7 @@ public void setIamPolicyTest() throws Exception { .build(); mockSecurityCenter.addResponse(expectedResponse); - ResourceName resource = FolderName.of("[FOLDER]"); + ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); Policy policy = Policy.newBuilder().build(); Policy actualResponse = client.setIamPolicy(resource, policy); @@ -2815,7 +2833,7 @@ public void setIamPolicyExceptionTest() throws Exception { mockSecurityCenter.addException(exception); try { - ResourceName resource = FolderName.of("[FOLDER]"); + ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); Policy policy = Policy.newBuilder().build(); client.setIamPolicy(resource, policy); Assert.fail("No exception raised"); @@ -2874,7 +2892,7 @@ public void testIamPermissionsTest() throws Exception { TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); mockSecurityCenter.addResponse(expectedResponse); - ResourceName resource = FolderName.of("[FOLDER]"); + ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); List permissions = new ArrayList<>(); TestIamPermissionsResponse actualResponse = client.testIamPermissions(resource, permissions); @@ -2898,7 +2916,7 @@ public void testIamPermissionsExceptionTest() throws Exception { mockSecurityCenter.addException(exception); try { - ResourceName resource = FolderName.of("[FOLDER]"); + ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); List permissions = new ArrayList<>(); client.testIamPermissions(resource, permissions); Assert.fail("No exception raised"); @@ -3017,7 +3035,10 @@ public void updateFindingTest() throws Exception { .setAccess(Access.newBuilder().build()) .addAllConnections(new ArrayList()) .setMuteInitiator("muteInitiator1395645462") + .addAllProcesses(new ArrayList()) + .addAllCompliances(new ArrayList()) .setDescription("description-1724546052") + .setExfiltration(Exfiltration.newBuilder().build()) .addAllIamBindings(new ArrayList()) .setNextSteps("nextSteps1206138868") .build(); diff --git a/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1beta1/SecurityCenterClientTest.java b/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1beta1/SecurityCenterClientTest.java index fb6006322398..ac9e9515b1f4 100644 --- a/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1beta1/SecurityCenterClientTest.java +++ b/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1beta1/SecurityCenterClientTest.java @@ -303,7 +303,7 @@ public void getIamPolicyTest() throws Exception { .build(); mockSecurityCenter.addResponse(expectedResponse); - ResourceName resource = OrganizationName.of("[ORGANIZATION]"); + ResourceName resource = SourceName.of("[ORGANIZATION]", "[SOURCE]"); Policy actualResponse = client.getIamPolicy(resource); Assert.assertEquals(expectedResponse, actualResponse); @@ -325,7 +325,7 @@ public void getIamPolicyExceptionTest() throws Exception { mockSecurityCenter.addException(exception); try { - ResourceName resource = OrganizationName.of("[ORGANIZATION]"); + ResourceName resource = SourceName.of("[ORGANIZATION]", "[SOURCE]"); client.getIamPolicy(resource); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { @@ -1126,7 +1126,7 @@ public void setIamPolicyTest() throws Exception { .build(); mockSecurityCenter.addResponse(expectedResponse); - ResourceName resource = OrganizationName.of("[ORGANIZATION]"); + ResourceName resource = SourceName.of("[ORGANIZATION]", "[SOURCE]"); Policy policy = Policy.newBuilder().build(); Policy actualResponse = client.setIamPolicy(resource, policy); @@ -1150,7 +1150,7 @@ public void setIamPolicyExceptionTest() throws Exception { mockSecurityCenter.addException(exception); try { - ResourceName resource = OrganizationName.of("[ORGANIZATION]"); + ResourceName resource = SourceName.of("[ORGANIZATION]", "[SOURCE]"); Policy policy = Policy.newBuilder().build(); client.setIamPolicy(resource, policy); Assert.fail("No exception raised"); @@ -1209,7 +1209,7 @@ public void testIamPermissionsTest() throws Exception { TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); mockSecurityCenter.addResponse(expectedResponse); - ResourceName resource = OrganizationName.of("[ORGANIZATION]"); + ResourceName resource = SourceName.of("[ORGANIZATION]", "[SOURCE]"); List permissions = new ArrayList<>(); TestIamPermissionsResponse actualResponse = client.testIamPermissions(resource, permissions); @@ -1233,7 +1233,7 @@ public void testIamPermissionsExceptionTest() throws Exception { mockSecurityCenter.addException(exception); try { - ResourceName resource = OrganizationName.of("[ORGANIZATION]"); + ResourceName resource = SourceName.of("[ORGANIZATION]", "[SOURCE]"); List permissions = new ArrayList<>(); client.testIamPermissions(resource, permissions); Assert.fail("No exception raised"); diff --git a/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1p1beta1/SecurityCenterClientTest.java b/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1p1beta1/SecurityCenterClientTest.java index c5cfc706c274..cec69a74f116 100644 --- a/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1p1beta1/SecurityCenterClientTest.java +++ b/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1p1beta1/SecurityCenterClientTest.java @@ -690,7 +690,7 @@ public void getIamPolicyTest() throws Exception { .build(); mockSecurityCenter.addResponse(expectedResponse); - ResourceName resource = FolderName.of("[FOLDER]"); + ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); Policy actualResponse = client.getIamPolicy(resource); Assert.assertEquals(expectedResponse, actualResponse); @@ -712,7 +712,7 @@ public void getIamPolicyExceptionTest() throws Exception { mockSecurityCenter.addException(exception); try { - ResourceName resource = FolderName.of("[FOLDER]"); + ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); client.getIamPolicy(resource); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { @@ -1930,7 +1930,7 @@ public void setIamPolicyTest() throws Exception { .build(); mockSecurityCenter.addResponse(expectedResponse); - ResourceName resource = FolderName.of("[FOLDER]"); + ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); Policy policy = Policy.newBuilder().build(); Policy actualResponse = client.setIamPolicy(resource, policy); @@ -1954,7 +1954,7 @@ public void setIamPolicyExceptionTest() throws Exception { mockSecurityCenter.addException(exception); try { - ResourceName resource = FolderName.of("[FOLDER]"); + ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); Policy policy = Policy.newBuilder().build(); client.setIamPolicy(resource, policy); Assert.fail("No exception raised"); @@ -2013,7 +2013,7 @@ public void testIamPermissionsTest() throws Exception { TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); mockSecurityCenter.addResponse(expectedResponse); - ResourceName resource = FolderName.of("[FOLDER]"); + ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); List permissions = new ArrayList<>(); TestIamPermissionsResponse actualResponse = client.testIamPermissions(resource, permissions); @@ -2037,7 +2037,7 @@ public void testIamPermissionsExceptionTest() throws Exception { mockSecurityCenter.addException(exception); try { - ResourceName resource = FolderName.of("[FOLDER]"); + ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); List permissions = new ArrayList<>(); client.testIamPermissions(resource, permissions); Assert.fail("No exception raised"); diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Compliance.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Compliance.java new file mode 100644 index 000000000000..0ab2a44aec34 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Compliance.java @@ -0,0 +1,1103 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/compliance.proto + +package com.google.cloud.securitycenter.v1; + +/** + * + * + *
+ * Contains compliance information about a security standard indicating unmet
+ * recommendations.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.Compliance} + */ +public final class Compliance extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Compliance) + ComplianceOrBuilder { + private static final long serialVersionUID = 0L; + // Use Compliance.newBuilder() to construct. + private Compliance(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Compliance() { + standard_ = ""; + version_ = ""; + ids_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Compliance(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Compliance( + 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(); + + standard_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + ids_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + ids_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + ids_ = ids_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.ComplianceProto + .internal_static_google_cloud_securitycenter_v1_Compliance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.ComplianceProto + .internal_static_google_cloud_securitycenter_v1_Compliance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.Compliance.class, + com.google.cloud.securitycenter.v1.Compliance.Builder.class); + } + + public static final int STANDARD_FIELD_NUMBER = 1; + private volatile java.lang.Object standard_; + /** + * + * + *
+   * Refers to industry wide standards or benchmarks e.g. "cis", "pci", "owasp",
+   * etc.
+   * 
+ * + * string standard = 1; + * + * @return The standard. + */ + @java.lang.Override + public java.lang.String getStandard() { + java.lang.Object ref = standard_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + standard_ = s; + return s; + } + } + /** + * + * + *
+   * Refers to industry wide standards or benchmarks e.g. "cis", "pci", "owasp",
+   * etc.
+   * 
+ * + * string standard = 1; + * + * @return The bytes for standard. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStandardBytes() { + java.lang.Object ref = standard_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + standard_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 2; + private volatile java.lang.Object version_; + /** + * + * + *
+   * Version of the standard/benchmark e.g. 1.1
+   * 
+ * + * string version = 2; + * + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + * + * + *
+   * Version of the standard/benchmark e.g. 1.1
+   * 
+ * + * string version = 2; + * + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IDS_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList ids_; + /** + * + * + *
+   * Policies within the standard/benchmark e.g. A.12.4.1
+   * 
+ * + * repeated string ids = 3; + * + * @return A list containing the ids. + */ + public com.google.protobuf.ProtocolStringList getIdsList() { + return ids_; + } + /** + * + * + *
+   * Policies within the standard/benchmark e.g. A.12.4.1
+   * 
+ * + * repeated string ids = 3; + * + * @return The count of ids. + */ + public int getIdsCount() { + return ids_.size(); + } + /** + * + * + *
+   * Policies within the standard/benchmark e.g. A.12.4.1
+   * 
+ * + * repeated string ids = 3; + * + * @param index The index of the element to return. + * @return The ids at the given index. + */ + public java.lang.String getIds(int index) { + return ids_.get(index); + } + /** + * + * + *
+   * Policies within the standard/benchmark e.g. A.12.4.1
+   * 
+ * + * repeated string ids = 3; + * + * @param index The index of the value to return. + * @return The bytes of the ids at the given index. + */ + public com.google.protobuf.ByteString getIdsBytes(int index) { + return ids_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(standard_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, standard_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, version_); + } + for (int i = 0; i < ids_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, ids_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(standard_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, standard_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, version_); + } + { + int dataSize = 0; + for (int i = 0; i < ids_.size(); i++) { + dataSize += computeStringSizeNoTag(ids_.getRaw(i)); + } + size += dataSize; + size += 1 * getIdsList().size(); + } + size += 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.Compliance)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v1.Compliance other = + (com.google.cloud.securitycenter.v1.Compliance) obj; + + if (!getStandard().equals(other.getStandard())) return false; + if (!getVersion().equals(other.getVersion())) return false; + if (!getIdsList().equals(other.getIdsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STANDARD_FIELD_NUMBER; + hash = (53 * hash) + getStandard().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + if (getIdsCount() > 0) { + hash = (37 * hash) + IDS_FIELD_NUMBER; + hash = (53 * hash) + getIdsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v1.Compliance parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.Compliance parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.Compliance parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.Compliance parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.Compliance parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.Compliance parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.Compliance parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.Compliance parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.Compliance parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.Compliance parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.Compliance parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.Compliance parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.securitycenter.v1.Compliance prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Contains compliance information about a security standard indicating unmet
+   * recommendations.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.Compliance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Compliance) + com.google.cloud.securitycenter.v1.ComplianceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.ComplianceProto + .internal_static_google_cloud_securitycenter_v1_Compliance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.ComplianceProto + .internal_static_google_cloud_securitycenter_v1_Compliance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.Compliance.class, + com.google.cloud.securitycenter.v1.Compliance.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v1.Compliance.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + standard_ = ""; + + version_ = ""; + + ids_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v1.ComplianceProto + .internal_static_google_cloud_securitycenter_v1_Compliance_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.Compliance getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v1.Compliance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.Compliance build() { + com.google.cloud.securitycenter.v1.Compliance result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.Compliance buildPartial() { + com.google.cloud.securitycenter.v1.Compliance result = + new com.google.cloud.securitycenter.v1.Compliance(this); + int from_bitField0_ = bitField0_; + result.standard_ = standard_; + result.version_ = version_; + if (((bitField0_ & 0x00000001) != 0)) { + ids_ = ids_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.ids_ = ids_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.securitycenter.v1.Compliance) { + return mergeFrom((com.google.cloud.securitycenter.v1.Compliance) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v1.Compliance other) { + if (other == com.google.cloud.securitycenter.v1.Compliance.getDefaultInstance()) return this; + if (!other.getStandard().isEmpty()) { + standard_ = other.standard_; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + if (!other.ids_.isEmpty()) { + if (ids_.isEmpty()) { + ids_ = other.ids_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIdsIsMutable(); + ids_.addAll(other.ids_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.securitycenter.v1.Compliance parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.securitycenter.v1.Compliance) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object standard_ = ""; + /** + * + * + *
+     * Refers to industry wide standards or benchmarks e.g. "cis", "pci", "owasp",
+     * etc.
+     * 
+ * + * string standard = 1; + * + * @return The standard. + */ + public java.lang.String getStandard() { + java.lang.Object ref = standard_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + standard_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Refers to industry wide standards or benchmarks e.g. "cis", "pci", "owasp",
+     * etc.
+     * 
+ * + * string standard = 1; + * + * @return The bytes for standard. + */ + public com.google.protobuf.ByteString getStandardBytes() { + java.lang.Object ref = standard_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + standard_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Refers to industry wide standards or benchmarks e.g. "cis", "pci", "owasp",
+     * etc.
+     * 
+ * + * string standard = 1; + * + * @param value The standard to set. + * @return This builder for chaining. + */ + public Builder setStandard(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + standard_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Refers to industry wide standards or benchmarks e.g. "cis", "pci", "owasp",
+     * etc.
+     * 
+ * + * string standard = 1; + * + * @return This builder for chaining. + */ + public Builder clearStandard() { + + standard_ = getDefaultInstance().getStandard(); + onChanged(); + return this; + } + /** + * + * + *
+     * Refers to industry wide standards or benchmarks e.g. "cis", "pci", "owasp",
+     * etc.
+     * 
+ * + * string standard = 1; + * + * @param value The bytes for standard to set. + * @return This builder for chaining. + */ + public Builder setStandardBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + standard_ = value; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + * + * + *
+     * Version of the standard/benchmark e.g. 1.1
+     * 
+ * + * string version = 2; + * + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Version of the standard/benchmark e.g. 1.1
+     * 
+ * + * string version = 2; + * + * @return The bytes for version. + */ + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Version of the standard/benchmark e.g. 1.1
+     * 
+ * + * string version = 2; + * + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Version of the standard/benchmark e.g. 1.1
+     * 
+ * + * string version = 2; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * Version of the standard/benchmark e.g. 1.1
+     * 
+ * + * string version = 2; + * + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList ids_ = com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + ids_ = new com.google.protobuf.LazyStringArrayList(ids_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Policies within the standard/benchmark e.g. A.12.4.1
+     * 
+ * + * repeated string ids = 3; + * + * @return A list containing the ids. + */ + public com.google.protobuf.ProtocolStringList getIdsList() { + return ids_.getUnmodifiableView(); + } + /** + * + * + *
+     * Policies within the standard/benchmark e.g. A.12.4.1
+     * 
+ * + * repeated string ids = 3; + * + * @return The count of ids. + */ + public int getIdsCount() { + return ids_.size(); + } + /** + * + * + *
+     * Policies within the standard/benchmark e.g. A.12.4.1
+     * 
+ * + * repeated string ids = 3; + * + * @param index The index of the element to return. + * @return The ids at the given index. + */ + public java.lang.String getIds(int index) { + return ids_.get(index); + } + /** + * + * + *
+     * Policies within the standard/benchmark e.g. A.12.4.1
+     * 
+ * + * repeated string ids = 3; + * + * @param index The index of the value to return. + * @return The bytes of the ids at the given index. + */ + public com.google.protobuf.ByteString getIdsBytes(int index) { + return ids_.getByteString(index); + } + /** + * + * + *
+     * Policies within the standard/benchmark e.g. A.12.4.1
+     * 
+ * + * repeated string ids = 3; + * + * @param index The index to set the value at. + * @param value The ids to set. + * @return This builder for chaining. + */ + public Builder setIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdsIsMutable(); + ids_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Policies within the standard/benchmark e.g. A.12.4.1
+     * 
+ * + * repeated string ids = 3; + * + * @param value The ids to add. + * @return This builder for chaining. + */ + public Builder addIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdsIsMutable(); + ids_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Policies within the standard/benchmark e.g. A.12.4.1
+     * 
+ * + * repeated string ids = 3; + * + * @param values The ids to add. + * @return This builder for chaining. + */ + public Builder addAllIds(java.lang.Iterable values) { + ensureIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ids_); + onChanged(); + return this; + } + /** + * + * + *
+     * Policies within the standard/benchmark e.g. A.12.4.1
+     * 
+ * + * repeated string ids = 3; + * + * @return This builder for chaining. + */ + public Builder clearIds() { + ids_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Policies within the standard/benchmark e.g. A.12.4.1
+     * 
+ * + * repeated string ids = 3; + * + * @param value The bytes of the ids to add. + * @return This builder for chaining. + */ + public Builder addIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureIdsIsMutable(); + ids_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Compliance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Compliance) + private static final com.google.cloud.securitycenter.v1.Compliance DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Compliance(); + } + + public static com.google.cloud.securitycenter.v1.Compliance getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Compliance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Compliance(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.Compliance getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ComplianceOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ComplianceOrBuilder.java new file mode 100644 index 000000000000..5c95e93b53db --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ComplianceOrBuilder.java @@ -0,0 +1,128 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/compliance.proto + +package com.google.cloud.securitycenter.v1; + +public interface ComplianceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Compliance) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Refers to industry wide standards or benchmarks e.g. "cis", "pci", "owasp",
+   * etc.
+   * 
+ * + * string standard = 1; + * + * @return The standard. + */ + java.lang.String getStandard(); + /** + * + * + *
+   * Refers to industry wide standards or benchmarks e.g. "cis", "pci", "owasp",
+   * etc.
+   * 
+ * + * string standard = 1; + * + * @return The bytes for standard. + */ + com.google.protobuf.ByteString getStandardBytes(); + + /** + * + * + *
+   * Version of the standard/benchmark e.g. 1.1
+   * 
+ * + * string version = 2; + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+   * Version of the standard/benchmark e.g. 1.1
+   * 
+ * + * string version = 2; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); + + /** + * + * + *
+   * Policies within the standard/benchmark e.g. A.12.4.1
+   * 
+ * + * repeated string ids = 3; + * + * @return A list containing the ids. + */ + java.util.List getIdsList(); + /** + * + * + *
+   * Policies within the standard/benchmark e.g. A.12.4.1
+   * 
+ * + * repeated string ids = 3; + * + * @return The count of ids. + */ + int getIdsCount(); + /** + * + * + *
+   * Policies within the standard/benchmark e.g. A.12.4.1
+   * 
+ * + * repeated string ids = 3; + * + * @param index The index of the element to return. + * @return The ids at the given index. + */ + java.lang.String getIds(int index); + /** + * + * + *
+   * Policies within the standard/benchmark e.g. A.12.4.1
+   * 
+ * + * repeated string ids = 3; + * + * @param index The index of the value to return. + * @return The bytes of the ids at the given index. + */ + com.google.protobuf.ByteString getIdsBytes(int index); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ComplianceProto.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ComplianceProto.java new file mode 100644 index 000000000000..f6df500c8e2d --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ComplianceProto.java @@ -0,0 +1,68 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/compliance.proto + +package com.google.cloud.securitycenter.v1; + +public final class ComplianceProto { + private ComplianceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v1_Compliance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v1_Compliance_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n/google/cloud/securitycenter/v1/complia" + + "nce.proto\022\036google.cloud.securitycenter.v" + + "1\"<\n\nCompliance\022\020\n\010standard\030\001 \001(\t\022\017\n\007ver" + + "sion\030\002 \001(\t\022\013\n\003ids\030\003 \003(\tB\353\001\n\"com.google.c" + + "loud.securitycenter.v1B\017ComplianceProtoP" + + "\001ZLgoogle.golang.org/genproto/googleapis" + + "/cloud/securitycenter/v1;securitycenter\252" + + "\002\036Google.Cloud.SecurityCenter.V1\312\002\036Googl" + + "e\\Cloud\\SecurityCenter\\V1\352\002!Google::Clou" + + "d::SecurityCenter::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_cloud_securitycenter_v1_Compliance_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_securitycenter_v1_Compliance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v1_Compliance_descriptor, + new java.lang.String[] { + "Standard", "Version", "Ids", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/EnvironmentVariable.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/EnvironmentVariable.java new file mode 100644 index 000000000000..b9509f2103de --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/EnvironmentVariable.java @@ -0,0 +1,820 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/process.proto + +package com.google.cloud.securitycenter.v1; + +/** + * + * + *
+ * EnvironmentVariable is a name-value pair to store environment variables for
+ * Process.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.EnvironmentVariable} + */ +public final class EnvironmentVariable extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.EnvironmentVariable) + EnvironmentVariableOrBuilder { + private static final long serialVersionUID = 0L; + // Use EnvironmentVariable.newBuilder() to construct. + private EnvironmentVariable(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EnvironmentVariable() { + name_ = ""; + val_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EnvironmentVariable(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private EnvironmentVariable( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + val_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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.ProcessProto + .internal_static_google_cloud_securitycenter_v1_EnvironmentVariable_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.ProcessProto + .internal_static_google_cloud_securitycenter_v1_EnvironmentVariable_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.EnvironmentVariable.class, + com.google.cloud.securitycenter.v1.EnvironmentVariable.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Environment variable name as a JSON encoded string.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Environment variable name as a JSON encoded string.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VAL_FIELD_NUMBER = 2; + private volatile java.lang.Object val_; + /** + * + * + *
+   * Environment variable value as a JSON encoded string.
+   * 
+ * + * string val = 2; + * + * @return The val. + */ + @java.lang.Override + public java.lang.String getVal() { + java.lang.Object ref = val_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + val_ = s; + return s; + } + } + /** + * + * + *
+   * Environment variable value as a JSON encoded string.
+   * 
+ * + * string val = 2; + * + * @return The bytes for val. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValBytes() { + java.lang.Object ref = val_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + val_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(val_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, val_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(val_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, val_); + } + 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.EnvironmentVariable)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v1.EnvironmentVariable other = + (com.google.cloud.securitycenter.v1.EnvironmentVariable) obj; + + if (!getName().equals(other.getName())) return false; + if (!getVal().equals(other.getVal())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getVal().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v1.EnvironmentVariable parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.EnvironmentVariable parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.EnvironmentVariable parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.EnvironmentVariable parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.EnvironmentVariable parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.EnvironmentVariable parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.EnvironmentVariable parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.EnvironmentVariable parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.EnvironmentVariable parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.EnvironmentVariable parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.EnvironmentVariable parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.EnvironmentVariable parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.securitycenter.v1.EnvironmentVariable prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * EnvironmentVariable is a name-value pair to store environment variables for
+   * Process.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.EnvironmentVariable} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.EnvironmentVariable) + com.google.cloud.securitycenter.v1.EnvironmentVariableOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.ProcessProto + .internal_static_google_cloud_securitycenter_v1_EnvironmentVariable_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.ProcessProto + .internal_static_google_cloud_securitycenter_v1_EnvironmentVariable_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.EnvironmentVariable.class, + com.google.cloud.securitycenter.v1.EnvironmentVariable.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v1.EnvironmentVariable.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + val_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v1.ProcessProto + .internal_static_google_cloud_securitycenter_v1_EnvironmentVariable_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.EnvironmentVariable getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v1.EnvironmentVariable.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.EnvironmentVariable build() { + com.google.cloud.securitycenter.v1.EnvironmentVariable result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.EnvironmentVariable buildPartial() { + com.google.cloud.securitycenter.v1.EnvironmentVariable result = + new com.google.cloud.securitycenter.v1.EnvironmentVariable(this); + result.name_ = name_; + result.val_ = val_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.securitycenter.v1.EnvironmentVariable) { + return mergeFrom((com.google.cloud.securitycenter.v1.EnvironmentVariable) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v1.EnvironmentVariable other) { + if (other == com.google.cloud.securitycenter.v1.EnvironmentVariable.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getVal().isEmpty()) { + val_ = other.val_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.securitycenter.v1.EnvironmentVariable parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.securitycenter.v1.EnvironmentVariable) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Environment variable name as a JSON encoded string.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Environment variable name as a JSON encoded string.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Environment variable name as a JSON encoded string.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Environment variable name as a JSON encoded string.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Environment variable name as a JSON encoded string.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object val_ = ""; + /** + * + * + *
+     * Environment variable value as a JSON encoded string.
+     * 
+ * + * string val = 2; + * + * @return The val. + */ + public java.lang.String getVal() { + java.lang.Object ref = val_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + val_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Environment variable value as a JSON encoded string.
+     * 
+ * + * string val = 2; + * + * @return The bytes for val. + */ + public com.google.protobuf.ByteString getValBytes() { + java.lang.Object ref = val_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + val_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Environment variable value as a JSON encoded string.
+     * 
+ * + * string val = 2; + * + * @param value The val to set. + * @return This builder for chaining. + */ + public Builder setVal(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + val_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Environment variable value as a JSON encoded string.
+     * 
+ * + * string val = 2; + * + * @return This builder for chaining. + */ + public Builder clearVal() { + + val_ = getDefaultInstance().getVal(); + onChanged(); + return this; + } + /** + * + * + *
+     * Environment variable value as a JSON encoded string.
+     * 
+ * + * string val = 2; + * + * @param value The bytes for val to set. + * @return This builder for chaining. + */ + public Builder setValBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + val_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.EnvironmentVariable) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.EnvironmentVariable) + private static final com.google.cloud.securitycenter.v1.EnvironmentVariable DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.EnvironmentVariable(); + } + + public static com.google.cloud.securitycenter.v1.EnvironmentVariable getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EnvironmentVariable parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new EnvironmentVariable(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.EnvironmentVariable getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/EnvironmentVariableOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/EnvironmentVariableOrBuilder.java new file mode 100644 index 000000000000..a041145cfcaf --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/EnvironmentVariableOrBuilder.java @@ -0,0 +1,75 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/process.proto + +package com.google.cloud.securitycenter.v1; + +public interface EnvironmentVariableOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.EnvironmentVariable) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Environment variable name as a JSON encoded string.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Environment variable name as a JSON encoded string.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Environment variable value as a JSON encoded string.
+   * 
+ * + * string val = 2; + * + * @return The val. + */ + java.lang.String getVal(); + /** + * + * + *
+   * Environment variable value as a JSON encoded string.
+   * 
+ * + * string val = 2; + * + * @return The bytes for val. + */ + com.google.protobuf.ByteString getValBytes(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExfilResource.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExfilResource.java new file mode 100644 index 000000000000..79365402db47 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExfilResource.java @@ -0,0 +1,956 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/exfiltration.proto + +package com.google.cloud.securitycenter.v1; + +/** + * + * + *
+ * Resource that has been exfiltrated or exfiltrated_to.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.ExfilResource} + */ +public final class ExfilResource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.ExfilResource) + ExfilResourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExfilResource.newBuilder() to construct. + private ExfilResource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExfilResource() { + name_ = ""; + components_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExfilResource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExfilResource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + components_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + components_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + components_ = components_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.ExfiltrationProto + .internal_static_google_cloud_securitycenter_v1_ExfilResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.ExfiltrationProto + .internal_static_google_cloud_securitycenter_v1_ExfilResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.ExfilResource.class, + com.google.cloud.securitycenter.v1.ExfilResource.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Resource's URI (https://google.aip.dev/122#full-resource-names)
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Resource's URI (https://google.aip.dev/122#full-resource-names)
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COMPONENTS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList components_; + /** + * + * + *
+   * Subcomponents of the asset that is exfiltrated - these could be
+   * URIs used during exfiltration, table names, databases, filenames, etc.
+   * For example, multiple tables may be exfiltrated from the same CloudSQL
+   * instance, or multiple files from the same Cloud Storage bucket.
+   * 
+ * + * repeated string components = 2; + * + * @return A list containing the components. + */ + public com.google.protobuf.ProtocolStringList getComponentsList() { + return components_; + } + /** + * + * + *
+   * Subcomponents of the asset that is exfiltrated - these could be
+   * URIs used during exfiltration, table names, databases, filenames, etc.
+   * For example, multiple tables may be exfiltrated from the same CloudSQL
+   * instance, or multiple files from the same Cloud Storage bucket.
+   * 
+ * + * repeated string components = 2; + * + * @return The count of components. + */ + public int getComponentsCount() { + return components_.size(); + } + /** + * + * + *
+   * Subcomponents of the asset that is exfiltrated - these could be
+   * URIs used during exfiltration, table names, databases, filenames, etc.
+   * For example, multiple tables may be exfiltrated from the same CloudSQL
+   * instance, or multiple files from the same Cloud Storage bucket.
+   * 
+ * + * repeated string components = 2; + * + * @param index The index of the element to return. + * @return The components at the given index. + */ + public java.lang.String getComponents(int index) { + return components_.get(index); + } + /** + * + * + *
+   * Subcomponents of the asset that is exfiltrated - these could be
+   * URIs used during exfiltration, table names, databases, filenames, etc.
+   * For example, multiple tables may be exfiltrated from the same CloudSQL
+   * instance, or multiple files from the same Cloud Storage bucket.
+   * 
+ * + * repeated string components = 2; + * + * @param index The index of the value to return. + * @return The bytes of the components at the given index. + */ + public com.google.protobuf.ByteString getComponentsBytes(int index) { + return components_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < components_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, components_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + { + int dataSize = 0; + for (int i = 0; i < components_.size(); i++) { + dataSize += computeStringSizeNoTag(components_.getRaw(i)); + } + size += dataSize; + size += 1 * getComponentsList().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.ExfilResource)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v1.ExfilResource other = + (com.google.cloud.securitycenter.v1.ExfilResource) obj; + + if (!getName().equals(other.getName())) return false; + if (!getComponentsList().equals(other.getComponentsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getComponentsCount() > 0) { + hash = (37 * hash) + COMPONENTS_FIELD_NUMBER; + hash = (53 * hash) + getComponentsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v1.ExfilResource parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.ExfilResource parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.ExfilResource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.ExfilResource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.ExfilResource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.ExfilResource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.ExfilResource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.ExfilResource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.ExfilResource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.ExfilResource parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.ExfilResource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.ExfilResource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.securitycenter.v1.ExfilResource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Resource that has been exfiltrated or exfiltrated_to.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.ExfilResource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.ExfilResource) + com.google.cloud.securitycenter.v1.ExfilResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.ExfiltrationProto + .internal_static_google_cloud_securitycenter_v1_ExfilResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.ExfiltrationProto + .internal_static_google_cloud_securitycenter_v1_ExfilResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.ExfilResource.class, + com.google.cloud.securitycenter.v1.ExfilResource.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v1.ExfilResource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + components_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v1.ExfiltrationProto + .internal_static_google_cloud_securitycenter_v1_ExfilResource_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.ExfilResource getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v1.ExfilResource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.ExfilResource build() { + com.google.cloud.securitycenter.v1.ExfilResource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.ExfilResource buildPartial() { + com.google.cloud.securitycenter.v1.ExfilResource result = + new com.google.cloud.securitycenter.v1.ExfilResource(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (((bitField0_ & 0x00000001) != 0)) { + components_ = components_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.components_ = components_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.securitycenter.v1.ExfilResource) { + return mergeFrom((com.google.cloud.securitycenter.v1.ExfilResource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v1.ExfilResource other) { + if (other == com.google.cloud.securitycenter.v1.ExfilResource.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.components_.isEmpty()) { + if (components_.isEmpty()) { + components_ = other.components_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureComponentsIsMutable(); + components_.addAll(other.components_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.securitycenter.v1.ExfilResource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.securitycenter.v1.ExfilResource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Resource's URI (https://google.aip.dev/122#full-resource-names)
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Resource's URI (https://google.aip.dev/122#full-resource-names)
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Resource's URI (https://google.aip.dev/122#full-resource-names)
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Resource's URI (https://google.aip.dev/122#full-resource-names)
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Resource's URI (https://google.aip.dev/122#full-resource-names)
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList components_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureComponentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + components_ = new com.google.protobuf.LazyStringArrayList(components_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Subcomponents of the asset that is exfiltrated - these could be
+     * URIs used during exfiltration, table names, databases, filenames, etc.
+     * For example, multiple tables may be exfiltrated from the same CloudSQL
+     * instance, or multiple files from the same Cloud Storage bucket.
+     * 
+ * + * repeated string components = 2; + * + * @return A list containing the components. + */ + public com.google.protobuf.ProtocolStringList getComponentsList() { + return components_.getUnmodifiableView(); + } + /** + * + * + *
+     * Subcomponents of the asset that is exfiltrated - these could be
+     * URIs used during exfiltration, table names, databases, filenames, etc.
+     * For example, multiple tables may be exfiltrated from the same CloudSQL
+     * instance, or multiple files from the same Cloud Storage bucket.
+     * 
+ * + * repeated string components = 2; + * + * @return The count of components. + */ + public int getComponentsCount() { + return components_.size(); + } + /** + * + * + *
+     * Subcomponents of the asset that is exfiltrated - these could be
+     * URIs used during exfiltration, table names, databases, filenames, etc.
+     * For example, multiple tables may be exfiltrated from the same CloudSQL
+     * instance, or multiple files from the same Cloud Storage bucket.
+     * 
+ * + * repeated string components = 2; + * + * @param index The index of the element to return. + * @return The components at the given index. + */ + public java.lang.String getComponents(int index) { + return components_.get(index); + } + /** + * + * + *
+     * Subcomponents of the asset that is exfiltrated - these could be
+     * URIs used during exfiltration, table names, databases, filenames, etc.
+     * For example, multiple tables may be exfiltrated from the same CloudSQL
+     * instance, or multiple files from the same Cloud Storage bucket.
+     * 
+ * + * repeated string components = 2; + * + * @param index The index of the value to return. + * @return The bytes of the components at the given index. + */ + public com.google.protobuf.ByteString getComponentsBytes(int index) { + return components_.getByteString(index); + } + /** + * + * + *
+     * Subcomponents of the asset that is exfiltrated - these could be
+     * URIs used during exfiltration, table names, databases, filenames, etc.
+     * For example, multiple tables may be exfiltrated from the same CloudSQL
+     * instance, or multiple files from the same Cloud Storage bucket.
+     * 
+ * + * repeated string components = 2; + * + * @param index The index to set the value at. + * @param value The components to set. + * @return This builder for chaining. + */ + public Builder setComponents(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureComponentsIsMutable(); + components_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Subcomponents of the asset that is exfiltrated - these could be
+     * URIs used during exfiltration, table names, databases, filenames, etc.
+     * For example, multiple tables may be exfiltrated from the same CloudSQL
+     * instance, or multiple files from the same Cloud Storage bucket.
+     * 
+ * + * repeated string components = 2; + * + * @param value The components to add. + * @return This builder for chaining. + */ + public Builder addComponents(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureComponentsIsMutable(); + components_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Subcomponents of the asset that is exfiltrated - these could be
+     * URIs used during exfiltration, table names, databases, filenames, etc.
+     * For example, multiple tables may be exfiltrated from the same CloudSQL
+     * instance, or multiple files from the same Cloud Storage bucket.
+     * 
+ * + * repeated string components = 2; + * + * @param values The components to add. + * @return This builder for chaining. + */ + public Builder addAllComponents(java.lang.Iterable values) { + ensureComponentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, components_); + onChanged(); + return this; + } + /** + * + * + *
+     * Subcomponents of the asset that is exfiltrated - these could be
+     * URIs used during exfiltration, table names, databases, filenames, etc.
+     * For example, multiple tables may be exfiltrated from the same CloudSQL
+     * instance, or multiple files from the same Cloud Storage bucket.
+     * 
+ * + * repeated string components = 2; + * + * @return This builder for chaining. + */ + public Builder clearComponents() { + components_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Subcomponents of the asset that is exfiltrated - these could be
+     * URIs used during exfiltration, table names, databases, filenames, etc.
+     * For example, multiple tables may be exfiltrated from the same CloudSQL
+     * instance, or multiple files from the same Cloud Storage bucket.
+     * 
+ * + * repeated string components = 2; + * + * @param value The bytes of the components to add. + * @return This builder for chaining. + */ + public Builder addComponentsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureComponentsIsMutable(); + components_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.ExfilResource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.ExfilResource) + private static final com.google.cloud.securitycenter.v1.ExfilResource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.ExfilResource(); + } + + public static com.google.cloud.securitycenter.v1.ExfilResource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExfilResource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExfilResource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.ExfilResource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExfilResourceOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExfilResourceOrBuilder.java new file mode 100644 index 000000000000..40756efb7620 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExfilResourceOrBuilder.java @@ -0,0 +1,113 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/exfiltration.proto + +package com.google.cloud.securitycenter.v1; + +public interface ExfilResourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.ExfilResource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Resource's URI (https://google.aip.dev/122#full-resource-names)
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Resource's URI (https://google.aip.dev/122#full-resource-names)
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Subcomponents of the asset that is exfiltrated - these could be
+   * URIs used during exfiltration, table names, databases, filenames, etc.
+   * For example, multiple tables may be exfiltrated from the same CloudSQL
+   * instance, or multiple files from the same Cloud Storage bucket.
+   * 
+ * + * repeated string components = 2; + * + * @return A list containing the components. + */ + java.util.List getComponentsList(); + /** + * + * + *
+   * Subcomponents of the asset that is exfiltrated - these could be
+   * URIs used during exfiltration, table names, databases, filenames, etc.
+   * For example, multiple tables may be exfiltrated from the same CloudSQL
+   * instance, or multiple files from the same Cloud Storage bucket.
+   * 
+ * + * repeated string components = 2; + * + * @return The count of components. + */ + int getComponentsCount(); + /** + * + * + *
+   * Subcomponents of the asset that is exfiltrated - these could be
+   * URIs used during exfiltration, table names, databases, filenames, etc.
+   * For example, multiple tables may be exfiltrated from the same CloudSQL
+   * instance, or multiple files from the same Cloud Storage bucket.
+   * 
+ * + * repeated string components = 2; + * + * @param index The index of the element to return. + * @return The components at the given index. + */ + java.lang.String getComponents(int index); + /** + * + * + *
+   * Subcomponents of the asset that is exfiltrated - these could be
+   * URIs used during exfiltration, table names, databases, filenames, etc.
+   * For example, multiple tables may be exfiltrated from the same CloudSQL
+   * instance, or multiple files from the same Cloud Storage bucket.
+   * 
+ * + * repeated string components = 2; + * + * @param index The index of the value to return. + * @return The bytes of the components at the given index. + */ + com.google.protobuf.ByteString getComponentsBytes(int index); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Exfiltration.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Exfiltration.java new file mode 100644 index 000000000000..7d864369b758 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Exfiltration.java @@ -0,0 +1,1522 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/exfiltration.proto + +package com.google.cloud.securitycenter.v1; + +/** + * + * + *
+ * Exfiltration represents a data exfiltration attempt of one or more
+ * sources to one or more targets.  Sources represent the source
+ * of data that is exfiltrated, and Targets represents the destination the
+ * data was copied to.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.Exfiltration} + */ +public final class Exfiltration extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Exfiltration) + ExfiltrationOrBuilder { + private static final long serialVersionUID = 0L; + // Use Exfiltration.newBuilder() to construct. + private Exfiltration(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Exfiltration() { + sources_ = java.util.Collections.emptyList(); + targets_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Exfiltration(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Exfiltration( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + sources_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + sources_.add( + input.readMessage( + com.google.cloud.securitycenter.v1.ExfilResource.parser(), + extensionRegistry)); + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + targets_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + targets_.add( + input.readMessage( + com.google.cloud.securitycenter.v1.ExfilResource.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + sources_ = java.util.Collections.unmodifiableList(sources_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + targets_ = java.util.Collections.unmodifiableList(targets_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.ExfiltrationProto + .internal_static_google_cloud_securitycenter_v1_Exfiltration_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.ExfiltrationProto + .internal_static_google_cloud_securitycenter_v1_Exfiltration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.Exfiltration.class, + com.google.cloud.securitycenter.v1.Exfiltration.Builder.class); + } + + public static final int SOURCES_FIELD_NUMBER = 1; + private java.util.List sources_; + /** + * + * + *
+   * If there are multiple sources, then the data is considered "joined" between
+   * them. For instance, BigQuery can join multiple tables, and each
+   * table would be considered a source.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; + */ + @java.lang.Override + public java.util.List getSourcesList() { + return sources_; + } + /** + * + * + *
+   * If there are multiple sources, then the data is considered "joined" between
+   * them. For instance, BigQuery can join multiple tables, and each
+   * table would be considered a source.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; + */ + @java.lang.Override + public java.util.List + getSourcesOrBuilderList() { + return sources_; + } + /** + * + * + *
+   * If there are multiple sources, then the data is considered "joined" between
+   * them. For instance, BigQuery can join multiple tables, and each
+   * table would be considered a source.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; + */ + @java.lang.Override + public int getSourcesCount() { + return sources_.size(); + } + /** + * + * + *
+   * If there are multiple sources, then the data is considered "joined" between
+   * them. For instance, BigQuery can join multiple tables, and each
+   * table would be considered a source.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.ExfilResource getSources(int index) { + return sources_.get(index); + } + /** + * + * + *
+   * If there are multiple sources, then the data is considered "joined" between
+   * them. For instance, BigQuery can join multiple tables, and each
+   * table would be considered a source.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.ExfilResourceOrBuilder getSourcesOrBuilder(int index) { + return sources_.get(index); + } + + public static final int TARGETS_FIELD_NUMBER = 2; + private java.util.List targets_; + /** + * + * + *
+   * If there are multiple targets, each target would get a complete copy of the
+   * "joined" source data.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; + */ + @java.lang.Override + public java.util.List getTargetsList() { + return targets_; + } + /** + * + * + *
+   * If there are multiple targets, each target would get a complete copy of the
+   * "joined" source data.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; + */ + @java.lang.Override + public java.util.List + getTargetsOrBuilderList() { + return targets_; + } + /** + * + * + *
+   * If there are multiple targets, each target would get a complete copy of the
+   * "joined" source data.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; + */ + @java.lang.Override + public int getTargetsCount() { + return targets_.size(); + } + /** + * + * + *
+   * If there are multiple targets, each target would get a complete copy of the
+   * "joined" source data.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.ExfilResource getTargets(int index) { + return targets_.get(index); + } + /** + * + * + *
+   * If there are multiple targets, each target would get a complete copy of the
+   * "joined" source data.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.ExfilResourceOrBuilder getTargetsOrBuilder(int index) { + return targets_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < sources_.size(); i++) { + output.writeMessage(1, sources_.get(i)); + } + for (int i = 0; i < targets_.size(); i++) { + output.writeMessage(2, targets_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < sources_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, sources_.get(i)); + } + for (int i = 0; i < targets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, targets_.get(i)); + } + 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.Exfiltration)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v1.Exfiltration other = + (com.google.cloud.securitycenter.v1.Exfiltration) obj; + + if (!getSourcesList().equals(other.getSourcesList())) return false; + if (!getTargetsList().equals(other.getTargetsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSourcesCount() > 0) { + hash = (37 * hash) + SOURCES_FIELD_NUMBER; + hash = (53 * hash) + getSourcesList().hashCode(); + } + if (getTargetsCount() > 0) { + hash = (37 * hash) + TARGETS_FIELD_NUMBER; + hash = (53 * hash) + getTargetsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v1.Exfiltration parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.Exfiltration parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.Exfiltration parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.Exfiltration parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.Exfiltration parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.Exfiltration parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.Exfiltration parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.Exfiltration parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.Exfiltration parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.Exfiltration parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.Exfiltration parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.Exfiltration parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.securitycenter.v1.Exfiltration prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Exfiltration represents a data exfiltration attempt of one or more
+   * sources to one or more targets.  Sources represent the source
+   * of data that is exfiltrated, and Targets represents the destination the
+   * data was copied to.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.Exfiltration} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Exfiltration) + com.google.cloud.securitycenter.v1.ExfiltrationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.ExfiltrationProto + .internal_static_google_cloud_securitycenter_v1_Exfiltration_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.ExfiltrationProto + .internal_static_google_cloud_securitycenter_v1_Exfiltration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.Exfiltration.class, + com.google.cloud.securitycenter.v1.Exfiltration.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v1.Exfiltration.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSourcesFieldBuilder(); + getTargetsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (sourcesBuilder_ == null) { + sources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + sourcesBuilder_.clear(); + } + if (targetsBuilder_ == null) { + targets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + targetsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v1.ExfiltrationProto + .internal_static_google_cloud_securitycenter_v1_Exfiltration_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.Exfiltration getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v1.Exfiltration.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.Exfiltration build() { + com.google.cloud.securitycenter.v1.Exfiltration result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.Exfiltration buildPartial() { + com.google.cloud.securitycenter.v1.Exfiltration result = + new com.google.cloud.securitycenter.v1.Exfiltration(this); + int from_bitField0_ = bitField0_; + if (sourcesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + sources_ = java.util.Collections.unmodifiableList(sources_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.sources_ = sources_; + } else { + result.sources_ = sourcesBuilder_.build(); + } + if (targetsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + targets_ = java.util.Collections.unmodifiableList(targets_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.targets_ = targets_; + } else { + result.targets_ = targetsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.securitycenter.v1.Exfiltration) { + return mergeFrom((com.google.cloud.securitycenter.v1.Exfiltration) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v1.Exfiltration other) { + if (other == com.google.cloud.securitycenter.v1.Exfiltration.getDefaultInstance()) + return this; + if (sourcesBuilder_ == null) { + if (!other.sources_.isEmpty()) { + if (sources_.isEmpty()) { + sources_ = other.sources_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSourcesIsMutable(); + sources_.addAll(other.sources_); + } + onChanged(); + } + } else { + if (!other.sources_.isEmpty()) { + if (sourcesBuilder_.isEmpty()) { + sourcesBuilder_.dispose(); + sourcesBuilder_ = null; + sources_ = other.sources_; + bitField0_ = (bitField0_ & ~0x00000001); + sourcesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSourcesFieldBuilder() + : null; + } else { + sourcesBuilder_.addAllMessages(other.sources_); + } + } + } + if (targetsBuilder_ == null) { + if (!other.targets_.isEmpty()) { + if (targets_.isEmpty()) { + targets_ = other.targets_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTargetsIsMutable(); + targets_.addAll(other.targets_); + } + onChanged(); + } + } else { + if (!other.targets_.isEmpty()) { + if (targetsBuilder_.isEmpty()) { + targetsBuilder_.dispose(); + targetsBuilder_ = null; + targets_ = other.targets_; + bitField0_ = (bitField0_ & ~0x00000002); + targetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTargetsFieldBuilder() + : null; + } else { + targetsBuilder_.addAllMessages(other.targets_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.securitycenter.v1.Exfiltration parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.securitycenter.v1.Exfiltration) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List sources_ = + java.util.Collections.emptyList(); + + private void ensureSourcesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + sources_ = + new java.util.ArrayList(sources_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v1.ExfilResource, + com.google.cloud.securitycenter.v1.ExfilResource.Builder, + com.google.cloud.securitycenter.v1.ExfilResourceOrBuilder> + sourcesBuilder_; + + /** + * + * + *
+     * If there are multiple sources, then the data is considered "joined" between
+     * them. For instance, BigQuery can join multiple tables, and each
+     * table would be considered a source.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; + */ + public java.util.List getSourcesList() { + if (sourcesBuilder_ == null) { + return java.util.Collections.unmodifiableList(sources_); + } else { + return sourcesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * If there are multiple sources, then the data is considered "joined" between
+     * them. For instance, BigQuery can join multiple tables, and each
+     * table would be considered a source.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; + */ + public int getSourcesCount() { + if (sourcesBuilder_ == null) { + return sources_.size(); + } else { + return sourcesBuilder_.getCount(); + } + } + /** + * + * + *
+     * If there are multiple sources, then the data is considered "joined" between
+     * them. For instance, BigQuery can join multiple tables, and each
+     * table would be considered a source.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; + */ + public com.google.cloud.securitycenter.v1.ExfilResource getSources(int index) { + if (sourcesBuilder_ == null) { + return sources_.get(index); + } else { + return sourcesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * If there are multiple sources, then the data is considered "joined" between
+     * them. For instance, BigQuery can join multiple tables, and each
+     * table would be considered a source.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; + */ + public Builder setSources(int index, com.google.cloud.securitycenter.v1.ExfilResource value) { + if (sourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourcesIsMutable(); + sources_.set(index, value); + onChanged(); + } else { + sourcesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * If there are multiple sources, then the data is considered "joined" between
+     * them. For instance, BigQuery can join multiple tables, and each
+     * table would be considered a source.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; + */ + public Builder setSources( + int index, com.google.cloud.securitycenter.v1.ExfilResource.Builder builderForValue) { + if (sourcesBuilder_ == null) { + ensureSourcesIsMutable(); + sources_.set(index, builderForValue.build()); + onChanged(); + } else { + sourcesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * If there are multiple sources, then the data is considered "joined" between
+     * them. For instance, BigQuery can join multiple tables, and each
+     * table would be considered a source.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; + */ + public Builder addSources(com.google.cloud.securitycenter.v1.ExfilResource value) { + if (sourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourcesIsMutable(); + sources_.add(value); + onChanged(); + } else { + sourcesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * If there are multiple sources, then the data is considered "joined" between
+     * them. For instance, BigQuery can join multiple tables, and each
+     * table would be considered a source.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; + */ + public Builder addSources(int index, com.google.cloud.securitycenter.v1.ExfilResource value) { + if (sourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourcesIsMutable(); + sources_.add(index, value); + onChanged(); + } else { + sourcesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * If there are multiple sources, then the data is considered "joined" between
+     * them. For instance, BigQuery can join multiple tables, and each
+     * table would be considered a source.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; + */ + public Builder addSources( + com.google.cloud.securitycenter.v1.ExfilResource.Builder builderForValue) { + if (sourcesBuilder_ == null) { + ensureSourcesIsMutable(); + sources_.add(builderForValue.build()); + onChanged(); + } else { + sourcesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * If there are multiple sources, then the data is considered "joined" between
+     * them. For instance, BigQuery can join multiple tables, and each
+     * table would be considered a source.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; + */ + public Builder addSources( + int index, com.google.cloud.securitycenter.v1.ExfilResource.Builder builderForValue) { + if (sourcesBuilder_ == null) { + ensureSourcesIsMutable(); + sources_.add(index, builderForValue.build()); + onChanged(); + } else { + sourcesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * If there are multiple sources, then the data is considered "joined" between
+     * them. For instance, BigQuery can join multiple tables, and each
+     * table would be considered a source.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; + */ + public Builder addAllSources( + java.lang.Iterable values) { + if (sourcesBuilder_ == null) { + ensureSourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sources_); + onChanged(); + } else { + sourcesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * If there are multiple sources, then the data is considered "joined" between
+     * them. For instance, BigQuery can join multiple tables, and each
+     * table would be considered a source.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; + */ + public Builder clearSources() { + if (sourcesBuilder_ == null) { + sources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + sourcesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * If there are multiple sources, then the data is considered "joined" between
+     * them. For instance, BigQuery can join multiple tables, and each
+     * table would be considered a source.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; + */ + public Builder removeSources(int index) { + if (sourcesBuilder_ == null) { + ensureSourcesIsMutable(); + sources_.remove(index); + onChanged(); + } else { + sourcesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * If there are multiple sources, then the data is considered "joined" between
+     * them. For instance, BigQuery can join multiple tables, and each
+     * table would be considered a source.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; + */ + public com.google.cloud.securitycenter.v1.ExfilResource.Builder getSourcesBuilder(int index) { + return getSourcesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * If there are multiple sources, then the data is considered "joined" between
+     * them. For instance, BigQuery can join multiple tables, and each
+     * table would be considered a source.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; + */ + public com.google.cloud.securitycenter.v1.ExfilResourceOrBuilder getSourcesOrBuilder( + int index) { + if (sourcesBuilder_ == null) { + return sources_.get(index); + } else { + return sourcesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * If there are multiple sources, then the data is considered "joined" between
+     * them. For instance, BigQuery can join multiple tables, and each
+     * table would be considered a source.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; + */ + public java.util.List + getSourcesOrBuilderList() { + if (sourcesBuilder_ != null) { + return sourcesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(sources_); + } + } + /** + * + * + *
+     * If there are multiple sources, then the data is considered "joined" between
+     * them. For instance, BigQuery can join multiple tables, and each
+     * table would be considered a source.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; + */ + public com.google.cloud.securitycenter.v1.ExfilResource.Builder addSourcesBuilder() { + return getSourcesFieldBuilder() + .addBuilder(com.google.cloud.securitycenter.v1.ExfilResource.getDefaultInstance()); + } + /** + * + * + *
+     * If there are multiple sources, then the data is considered "joined" between
+     * them. For instance, BigQuery can join multiple tables, and each
+     * table would be considered a source.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; + */ + public com.google.cloud.securitycenter.v1.ExfilResource.Builder addSourcesBuilder(int index) { + return getSourcesFieldBuilder() + .addBuilder(index, com.google.cloud.securitycenter.v1.ExfilResource.getDefaultInstance()); + } + /** + * + * + *
+     * If there are multiple sources, then the data is considered "joined" between
+     * them. For instance, BigQuery can join multiple tables, and each
+     * table would be considered a source.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; + */ + public java.util.List + getSourcesBuilderList() { + return getSourcesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v1.ExfilResource, + com.google.cloud.securitycenter.v1.ExfilResource.Builder, + com.google.cloud.securitycenter.v1.ExfilResourceOrBuilder> + getSourcesFieldBuilder() { + if (sourcesBuilder_ == null) { + sourcesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v1.ExfilResource, + com.google.cloud.securitycenter.v1.ExfilResource.Builder, + com.google.cloud.securitycenter.v1.ExfilResourceOrBuilder>( + sources_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + sources_ = null; + } + return sourcesBuilder_; + } + + private java.util.List targets_ = + java.util.Collections.emptyList(); + + private void ensureTargetsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + targets_ = + new java.util.ArrayList(targets_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v1.ExfilResource, + com.google.cloud.securitycenter.v1.ExfilResource.Builder, + com.google.cloud.securitycenter.v1.ExfilResourceOrBuilder> + targetsBuilder_; + + /** + * + * + *
+     * If there are multiple targets, each target would get a complete copy of the
+     * "joined" source data.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; + */ + public java.util.List getTargetsList() { + if (targetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(targets_); + } else { + return targetsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * If there are multiple targets, each target would get a complete copy of the
+     * "joined" source data.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; + */ + public int getTargetsCount() { + if (targetsBuilder_ == null) { + return targets_.size(); + } else { + return targetsBuilder_.getCount(); + } + } + /** + * + * + *
+     * If there are multiple targets, each target would get a complete copy of the
+     * "joined" source data.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; + */ + public com.google.cloud.securitycenter.v1.ExfilResource getTargets(int index) { + if (targetsBuilder_ == null) { + return targets_.get(index); + } else { + return targetsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * If there are multiple targets, each target would get a complete copy of the
+     * "joined" source data.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; + */ + public Builder setTargets(int index, com.google.cloud.securitycenter.v1.ExfilResource value) { + if (targetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetsIsMutable(); + targets_.set(index, value); + onChanged(); + } else { + targetsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * If there are multiple targets, each target would get a complete copy of the
+     * "joined" source data.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; + */ + public Builder setTargets( + int index, com.google.cloud.securitycenter.v1.ExfilResource.Builder builderForValue) { + if (targetsBuilder_ == null) { + ensureTargetsIsMutable(); + targets_.set(index, builderForValue.build()); + onChanged(); + } else { + targetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * If there are multiple targets, each target would get a complete copy of the
+     * "joined" source data.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; + */ + public Builder addTargets(com.google.cloud.securitycenter.v1.ExfilResource value) { + if (targetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetsIsMutable(); + targets_.add(value); + onChanged(); + } else { + targetsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * If there are multiple targets, each target would get a complete copy of the
+     * "joined" source data.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; + */ + public Builder addTargets(int index, com.google.cloud.securitycenter.v1.ExfilResource value) { + if (targetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetsIsMutable(); + targets_.add(index, value); + onChanged(); + } else { + targetsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * If there are multiple targets, each target would get a complete copy of the
+     * "joined" source data.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; + */ + public Builder addTargets( + com.google.cloud.securitycenter.v1.ExfilResource.Builder builderForValue) { + if (targetsBuilder_ == null) { + ensureTargetsIsMutable(); + targets_.add(builderForValue.build()); + onChanged(); + } else { + targetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * If there are multiple targets, each target would get a complete copy of the
+     * "joined" source data.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; + */ + public Builder addTargets( + int index, com.google.cloud.securitycenter.v1.ExfilResource.Builder builderForValue) { + if (targetsBuilder_ == null) { + ensureTargetsIsMutable(); + targets_.add(index, builderForValue.build()); + onChanged(); + } else { + targetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * If there are multiple targets, each target would get a complete copy of the
+     * "joined" source data.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; + */ + public Builder addAllTargets( + java.lang.Iterable values) { + if (targetsBuilder_ == null) { + ensureTargetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, targets_); + onChanged(); + } else { + targetsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * If there are multiple targets, each target would get a complete copy of the
+     * "joined" source data.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; + */ + public Builder clearTargets() { + if (targetsBuilder_ == null) { + targets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + targetsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * If there are multiple targets, each target would get a complete copy of the
+     * "joined" source data.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; + */ + public Builder removeTargets(int index) { + if (targetsBuilder_ == null) { + ensureTargetsIsMutable(); + targets_.remove(index); + onChanged(); + } else { + targetsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * If there are multiple targets, each target would get a complete copy of the
+     * "joined" source data.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; + */ + public com.google.cloud.securitycenter.v1.ExfilResource.Builder getTargetsBuilder(int index) { + return getTargetsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * If there are multiple targets, each target would get a complete copy of the
+     * "joined" source data.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; + */ + public com.google.cloud.securitycenter.v1.ExfilResourceOrBuilder getTargetsOrBuilder( + int index) { + if (targetsBuilder_ == null) { + return targets_.get(index); + } else { + return targetsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * If there are multiple targets, each target would get a complete copy of the
+     * "joined" source data.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; + */ + public java.util.List + getTargetsOrBuilderList() { + if (targetsBuilder_ != null) { + return targetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(targets_); + } + } + /** + * + * + *
+     * If there are multiple targets, each target would get a complete copy of the
+     * "joined" source data.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; + */ + public com.google.cloud.securitycenter.v1.ExfilResource.Builder addTargetsBuilder() { + return getTargetsFieldBuilder() + .addBuilder(com.google.cloud.securitycenter.v1.ExfilResource.getDefaultInstance()); + } + /** + * + * + *
+     * If there are multiple targets, each target would get a complete copy of the
+     * "joined" source data.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; + */ + public com.google.cloud.securitycenter.v1.ExfilResource.Builder addTargetsBuilder(int index) { + return getTargetsFieldBuilder() + .addBuilder(index, com.google.cloud.securitycenter.v1.ExfilResource.getDefaultInstance()); + } + /** + * + * + *
+     * If there are multiple targets, each target would get a complete copy of the
+     * "joined" source data.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; + */ + public java.util.List + getTargetsBuilderList() { + return getTargetsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v1.ExfilResource, + com.google.cloud.securitycenter.v1.ExfilResource.Builder, + com.google.cloud.securitycenter.v1.ExfilResourceOrBuilder> + getTargetsFieldBuilder() { + if (targetsBuilder_ == null) { + targetsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v1.ExfilResource, + com.google.cloud.securitycenter.v1.ExfilResource.Builder, + com.google.cloud.securitycenter.v1.ExfilResourceOrBuilder>( + targets_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + targets_ = null; + } + return targetsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Exfiltration) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Exfiltration) + private static final com.google.cloud.securitycenter.v1.Exfiltration DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Exfiltration(); + } + + public static com.google.cloud.securitycenter.v1.Exfiltration getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Exfiltration parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Exfiltration(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.Exfiltration getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExfiltrationOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExfiltrationOrBuilder.java new file mode 100644 index 000000000000..f84ebb366f09 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExfiltrationOrBuilder.java @@ -0,0 +1,144 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/exfiltration.proto + +package com.google.cloud.securitycenter.v1; + +public interface ExfiltrationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Exfiltration) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * If there are multiple sources, then the data is considered "joined" between
+   * them. For instance, BigQuery can join multiple tables, and each
+   * table would be considered a source.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; + */ + java.util.List getSourcesList(); + /** + * + * + *
+   * If there are multiple sources, then the data is considered "joined" between
+   * them. For instance, BigQuery can join multiple tables, and each
+   * table would be considered a source.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; + */ + com.google.cloud.securitycenter.v1.ExfilResource getSources(int index); + /** + * + * + *
+   * If there are multiple sources, then the data is considered "joined" between
+   * them. For instance, BigQuery can join multiple tables, and each
+   * table would be considered a source.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; + */ + int getSourcesCount(); + /** + * + * + *
+   * If there are multiple sources, then the data is considered "joined" between
+   * them. For instance, BigQuery can join multiple tables, and each
+   * table would be considered a source.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; + */ + java.util.List + getSourcesOrBuilderList(); + /** + * + * + *
+   * If there are multiple sources, then the data is considered "joined" between
+   * them. For instance, BigQuery can join multiple tables, and each
+   * table would be considered a source.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; + */ + com.google.cloud.securitycenter.v1.ExfilResourceOrBuilder getSourcesOrBuilder(int index); + + /** + * + * + *
+   * If there are multiple targets, each target would get a complete copy of the
+   * "joined" source data.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; + */ + java.util.List getTargetsList(); + /** + * + * + *
+   * If there are multiple targets, each target would get a complete copy of the
+   * "joined" source data.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; + */ + com.google.cloud.securitycenter.v1.ExfilResource getTargets(int index); + /** + * + * + *
+   * If there are multiple targets, each target would get a complete copy of the
+   * "joined" source data.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; + */ + int getTargetsCount(); + /** + * + * + *
+   * If there are multiple targets, each target would get a complete copy of the
+   * "joined" source data.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; + */ + java.util.List + getTargetsOrBuilderList(); + /** + * + * + *
+   * If there are multiple targets, each target would get a complete copy of the
+   * "joined" source data.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; + */ + com.google.cloud.securitycenter.v1.ExfilResourceOrBuilder getTargetsOrBuilder(int index); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExfiltrationProto.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExfiltrationProto.java new file mode 100644 index 000000000000..40827fa73574 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExfiltrationProto.java @@ -0,0 +1,84 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/exfiltration.proto + +package com.google.cloud.securitycenter.v1; + +public final class ExfiltrationProto { + private ExfiltrationProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v1_Exfiltration_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v1_Exfiltration_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v1_ExfilResource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v1_ExfilResource_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n1google/cloud/securitycenter/v1/exfiltr" + + "ation.proto\022\036google.cloud.securitycenter" + + ".v1\"\216\001\n\014Exfiltration\022>\n\007sources\030\001 \003(\0132-." + + "google.cloud.securitycenter.v1.ExfilReso" + + "urce\022>\n\007targets\030\002 \003(\0132-.google.cloud.sec" + + "uritycenter.v1.ExfilResource\"1\n\rExfilRes" + + "ource\022\014\n\004name\030\001 \001(\t\022\022\n\ncomponents\030\002 \003(\tB" + + "\355\001\n\"com.google.cloud.securitycenter.v1B\021" + + "ExfiltrationProtoP\001ZLgoogle.golang.org/g" + + "enproto/googleapis/cloud/securitycenter/" + + "v1;securitycenter\252\002\036Google.Cloud.Securit" + + "yCenter.V1\312\002\036Google\\Cloud\\SecurityCenter" + + "\\V1\352\002!Google::Cloud::SecurityCenter::V1b" + + "\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_cloud_securitycenter_v1_Exfiltration_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_securitycenter_v1_Exfiltration_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v1_Exfiltration_descriptor, + new java.lang.String[] { + "Sources", "Targets", + }); + internal_static_google_cloud_securitycenter_v1_ExfilResource_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_securitycenter_v1_ExfilResource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v1_ExfilResource_descriptor, + new java.lang.String[] { + "Name", "Components", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/File.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/File.java new file mode 100644 index 000000000000..693bf5ff4b0e --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/File.java @@ -0,0 +1,1294 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/file.proto + +package com.google.cloud.securitycenter.v1; + +/** + * + * + *
+ * File information about the related binary/library used by an executable, or
+ * the script used by a script interpreter
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.File} + */ +public final class File extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.File) + FileOrBuilder { + private static final long serialVersionUID = 0L; + // Use File.newBuilder() to construct. + private File(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private File() { + path_ = ""; + sha256_ = ""; + contents_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new File(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private File( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + path_ = s; + break; + } + case 16: + { + size_ = input.readInt64(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + sha256_ = s; + break; + } + case 32: + { + hashedSize_ = input.readInt64(); + break; + } + case 40: + { + partiallyHashed_ = input.readBool(); + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + contents_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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.FileProto + .internal_static_google_cloud_securitycenter_v1_File_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.FileProto + .internal_static_google_cloud_securitycenter_v1_File_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.File.class, + com.google.cloud.securitycenter.v1.File.Builder.class); + } + + public static final int PATH_FIELD_NUMBER = 1; + private volatile java.lang.Object path_; + /** + * + * + *
+   * Absolute path of the file as a JSON encoded string.
+   * 
+ * + * string path = 1; + * + * @return The path. + */ + @java.lang.Override + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } + } + /** + * + * + *
+   * Absolute path of the file as a JSON encoded string.
+   * 
+ * + * string path = 1; + * + * @return The bytes for path. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SIZE_FIELD_NUMBER = 2; + private long size_; + /** + * + * + *
+   * Size of the file in bytes.
+   * 
+ * + * int64 size = 2; + * + * @return The size. + */ + @java.lang.Override + public long getSize() { + return size_; + } + + public static final int SHA256_FIELD_NUMBER = 3; + private volatile java.lang.Object sha256_; + /** + * + * + *
+   * SHA256 hash of the first hashed_size bytes of the file encoded as a
+   * hex string.  If hashed_size == size, hash_sha256 represents the SHA256 hash
+   * of the entire file.
+   * 
+ * + * string sha256 = 3; + * + * @return The sha256. + */ + @java.lang.Override + public java.lang.String getSha256() { + java.lang.Object ref = sha256_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sha256_ = s; + return s; + } + } + /** + * + * + *
+   * SHA256 hash of the first hashed_size bytes of the file encoded as a
+   * hex string.  If hashed_size == size, hash_sha256 represents the SHA256 hash
+   * of the entire file.
+   * 
+ * + * string sha256 = 3; + * + * @return The bytes for sha256. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSha256Bytes() { + java.lang.Object ref = sha256_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sha256_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HASHED_SIZE_FIELD_NUMBER = 4; + private long hashedSize_; + /** + * + * + *
+   * The length in bytes of the file prefix that was hashed.  If
+   * hashed_size == size, any hashes reported represent the entire
+   * file.
+   * 
+ * + * int64 hashed_size = 4; + * + * @return The hashedSize. + */ + @java.lang.Override + public long getHashedSize() { + return hashedSize_; + } + + public static final int PARTIALLY_HASHED_FIELD_NUMBER = 5; + private boolean partiallyHashed_; + /** + * + * + *
+   * True when the hash covers only a prefix of the file.
+   * 
+ * + * bool partially_hashed = 5; + * + * @return The partiallyHashed. + */ + @java.lang.Override + public boolean getPartiallyHashed() { + return partiallyHashed_; + } + + public static final int CONTENTS_FIELD_NUMBER = 6; + private volatile java.lang.Object contents_; + /** + * + * + *
+   * Prefix of the file contents as a JSON encoded string.
+   * (Currently only populated for Malicious Script Executed findings.)
+   * 
+ * + * string contents = 6; + * + * @return The contents. + */ + @java.lang.Override + public java.lang.String getContents() { + java.lang.Object ref = contents_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + contents_ = s; + return s; + } + } + /** + * + * + *
+   * Prefix of the file contents as a JSON encoded string.
+   * (Currently only populated for Malicious Script Executed findings.)
+   * 
+ * + * string contents = 6; + * + * @return The bytes for contents. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContentsBytes() { + java.lang.Object ref = contents_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + contents_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, path_); + } + if (size_ != 0L) { + output.writeInt64(2, size_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sha256_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sha256_); + } + if (hashedSize_ != 0L) { + output.writeInt64(4, hashedSize_); + } + if (partiallyHashed_ != false) { + output.writeBool(5, partiallyHashed_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contents_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, contents_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, path_); + } + if (size_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, size_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sha256_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sha256_); + } + if (hashedSize_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, hashedSize_); + } + if (partiallyHashed_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, partiallyHashed_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contents_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, contents_); + } + 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.File)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v1.File other = (com.google.cloud.securitycenter.v1.File) obj; + + if (!getPath().equals(other.getPath())) return false; + if (getSize() != other.getSize()) return false; + if (!getSha256().equals(other.getSha256())) return false; + if (getHashedSize() != other.getHashedSize()) return false; + if (getPartiallyHashed() != other.getPartiallyHashed()) return false; + if (!getContents().equals(other.getContents())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PATH_FIELD_NUMBER; + hash = (53 * hash) + getPath().hashCode(); + hash = (37 * hash) + SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSize()); + hash = (37 * hash) + SHA256_FIELD_NUMBER; + hash = (53 * hash) + getSha256().hashCode(); + hash = (37 * hash) + HASHED_SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getHashedSize()); + hash = (37 * hash) + PARTIALLY_HASHED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPartiallyHashed()); + hash = (37 * hash) + CONTENTS_FIELD_NUMBER; + hash = (53 * hash) + getContents().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v1.File parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.File parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.File parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.File parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.File parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.File parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.File parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.File parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.File parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.File parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.File parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.File parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.securitycenter.v1.File prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * File information about the related binary/library used by an executable, or
+   * the script used by a script interpreter
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.File} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.File) + com.google.cloud.securitycenter.v1.FileOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.FileProto + .internal_static_google_cloud_securitycenter_v1_File_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.FileProto + .internal_static_google_cloud_securitycenter_v1_File_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.File.class, + com.google.cloud.securitycenter.v1.File.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v1.File.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + path_ = ""; + + size_ = 0L; + + sha256_ = ""; + + hashedSize_ = 0L; + + partiallyHashed_ = false; + + contents_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v1.FileProto + .internal_static_google_cloud_securitycenter_v1_File_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.File getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v1.File.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.File build() { + com.google.cloud.securitycenter.v1.File result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.File buildPartial() { + com.google.cloud.securitycenter.v1.File result = + new com.google.cloud.securitycenter.v1.File(this); + result.path_ = path_; + result.size_ = size_; + result.sha256_ = sha256_; + result.hashedSize_ = hashedSize_; + result.partiallyHashed_ = partiallyHashed_; + result.contents_ = contents_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.securitycenter.v1.File) { + return mergeFrom((com.google.cloud.securitycenter.v1.File) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v1.File other) { + if (other == com.google.cloud.securitycenter.v1.File.getDefaultInstance()) return this; + if (!other.getPath().isEmpty()) { + path_ = other.path_; + onChanged(); + } + if (other.getSize() != 0L) { + setSize(other.getSize()); + } + if (!other.getSha256().isEmpty()) { + sha256_ = other.sha256_; + onChanged(); + } + if (other.getHashedSize() != 0L) { + setHashedSize(other.getHashedSize()); + } + if (other.getPartiallyHashed() != false) { + setPartiallyHashed(other.getPartiallyHashed()); + } + if (!other.getContents().isEmpty()) { + contents_ = other.contents_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.securitycenter.v1.File parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.securitycenter.v1.File) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object path_ = ""; + /** + * + * + *
+     * Absolute path of the file as a JSON encoded string.
+     * 
+ * + * string path = 1; + * + * @return The path. + */ + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Absolute path of the file as a JSON encoded string.
+     * 
+ * + * string path = 1; + * + * @return The bytes for path. + */ + public com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Absolute path of the file as a JSON encoded string.
+     * 
+ * + * string path = 1; + * + * @param value The path to set. + * @return This builder for chaining. + */ + public Builder setPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + path_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Absolute path of the file as a JSON encoded string.
+     * 
+ * + * string path = 1; + * + * @return This builder for chaining. + */ + public Builder clearPath() { + + path_ = getDefaultInstance().getPath(); + onChanged(); + return this; + } + /** + * + * + *
+     * Absolute path of the file as a JSON encoded string.
+     * 
+ * + * string path = 1; + * + * @param value The bytes for path to set. + * @return This builder for chaining. + */ + public Builder setPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + path_ = value; + onChanged(); + return this; + } + + private long size_; + /** + * + * + *
+     * Size of the file in bytes.
+     * 
+ * + * int64 size = 2; + * + * @return The size. + */ + @java.lang.Override + public long getSize() { + return size_; + } + /** + * + * + *
+     * Size of the file in bytes.
+     * 
+ * + * int64 size = 2; + * + * @param value The size to set. + * @return This builder for chaining. + */ + public Builder setSize(long value) { + + size_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Size of the file in bytes.
+     * 
+ * + * int64 size = 2; + * + * @return This builder for chaining. + */ + public Builder clearSize() { + + size_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object sha256_ = ""; + /** + * + * + *
+     * SHA256 hash of the first hashed_size bytes of the file encoded as a
+     * hex string.  If hashed_size == size, hash_sha256 represents the SHA256 hash
+     * of the entire file.
+     * 
+ * + * string sha256 = 3; + * + * @return The sha256. + */ + public java.lang.String getSha256() { + java.lang.Object ref = sha256_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sha256_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * SHA256 hash of the first hashed_size bytes of the file encoded as a
+     * hex string.  If hashed_size == size, hash_sha256 represents the SHA256 hash
+     * of the entire file.
+     * 
+ * + * string sha256 = 3; + * + * @return The bytes for sha256. + */ + public com.google.protobuf.ByteString getSha256Bytes() { + java.lang.Object ref = sha256_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sha256_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * SHA256 hash of the first hashed_size bytes of the file encoded as a
+     * hex string.  If hashed_size == size, hash_sha256 represents the SHA256 hash
+     * of the entire file.
+     * 
+ * + * string sha256 = 3; + * + * @param value The sha256 to set. + * @return This builder for chaining. + */ + public Builder setSha256(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sha256_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * SHA256 hash of the first hashed_size bytes of the file encoded as a
+     * hex string.  If hashed_size == size, hash_sha256 represents the SHA256 hash
+     * of the entire file.
+     * 
+ * + * string sha256 = 3; + * + * @return This builder for chaining. + */ + public Builder clearSha256() { + + sha256_ = getDefaultInstance().getSha256(); + onChanged(); + return this; + } + /** + * + * + *
+     * SHA256 hash of the first hashed_size bytes of the file encoded as a
+     * hex string.  If hashed_size == size, hash_sha256 represents the SHA256 hash
+     * of the entire file.
+     * 
+ * + * string sha256 = 3; + * + * @param value The bytes for sha256 to set. + * @return This builder for chaining. + */ + public Builder setSha256Bytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sha256_ = value; + onChanged(); + return this; + } + + private long hashedSize_; + /** + * + * + *
+     * The length in bytes of the file prefix that was hashed.  If
+     * hashed_size == size, any hashes reported represent the entire
+     * file.
+     * 
+ * + * int64 hashed_size = 4; + * + * @return The hashedSize. + */ + @java.lang.Override + public long getHashedSize() { + return hashedSize_; + } + /** + * + * + *
+     * The length in bytes of the file prefix that was hashed.  If
+     * hashed_size == size, any hashes reported represent the entire
+     * file.
+     * 
+ * + * int64 hashed_size = 4; + * + * @param value The hashedSize to set. + * @return This builder for chaining. + */ + public Builder setHashedSize(long value) { + + hashedSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The length in bytes of the file prefix that was hashed.  If
+     * hashed_size == size, any hashes reported represent the entire
+     * file.
+     * 
+ * + * int64 hashed_size = 4; + * + * @return This builder for chaining. + */ + public Builder clearHashedSize() { + + hashedSize_ = 0L; + onChanged(); + return this; + } + + private boolean partiallyHashed_; + /** + * + * + *
+     * True when the hash covers only a prefix of the file.
+     * 
+ * + * bool partially_hashed = 5; + * + * @return The partiallyHashed. + */ + @java.lang.Override + public boolean getPartiallyHashed() { + return partiallyHashed_; + } + /** + * + * + *
+     * True when the hash covers only a prefix of the file.
+     * 
+ * + * bool partially_hashed = 5; + * + * @param value The partiallyHashed to set. + * @return This builder for chaining. + */ + public Builder setPartiallyHashed(boolean value) { + + partiallyHashed_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * True when the hash covers only a prefix of the file.
+     * 
+ * + * bool partially_hashed = 5; + * + * @return This builder for chaining. + */ + public Builder clearPartiallyHashed() { + + partiallyHashed_ = false; + onChanged(); + return this; + } + + private java.lang.Object contents_ = ""; + /** + * + * + *
+     * Prefix of the file contents as a JSON encoded string.
+     * (Currently only populated for Malicious Script Executed findings.)
+     * 
+ * + * string contents = 6; + * + * @return The contents. + */ + public java.lang.String getContents() { + java.lang.Object ref = contents_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + contents_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Prefix of the file contents as a JSON encoded string.
+     * (Currently only populated for Malicious Script Executed findings.)
+     * 
+ * + * string contents = 6; + * + * @return The bytes for contents. + */ + public com.google.protobuf.ByteString getContentsBytes() { + java.lang.Object ref = contents_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + contents_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Prefix of the file contents as a JSON encoded string.
+     * (Currently only populated for Malicious Script Executed findings.)
+     * 
+ * + * string contents = 6; + * + * @param value The contents to set. + * @return This builder for chaining. + */ + public Builder setContents(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + contents_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Prefix of the file contents as a JSON encoded string.
+     * (Currently only populated for Malicious Script Executed findings.)
+     * 
+ * + * string contents = 6; + * + * @return This builder for chaining. + */ + public Builder clearContents() { + + contents_ = getDefaultInstance().getContents(); + onChanged(); + return this; + } + /** + * + * + *
+     * Prefix of the file contents as a JSON encoded string.
+     * (Currently only populated for Malicious Script Executed findings.)
+     * 
+ * + * string contents = 6; + * + * @param value The bytes for contents to set. + * @return This builder for chaining. + */ + public Builder setContentsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + contents_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.File) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.File) + private static final com.google.cloud.securitycenter.v1.File DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.File(); + } + + public static com.google.cloud.securitycenter.v1.File getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public File parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new File(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.File getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FileOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FileOrBuilder.java new file mode 100644 index 000000000000..b48ec9954bc0 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FileOrBuilder.java @@ -0,0 +1,147 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/file.proto + +package com.google.cloud.securitycenter.v1; + +public interface FileOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.File) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Absolute path of the file as a JSON encoded string.
+   * 
+ * + * string path = 1; + * + * @return The path. + */ + java.lang.String getPath(); + /** + * + * + *
+   * Absolute path of the file as a JSON encoded string.
+   * 
+ * + * string path = 1; + * + * @return The bytes for path. + */ + com.google.protobuf.ByteString getPathBytes(); + + /** + * + * + *
+   * Size of the file in bytes.
+   * 
+ * + * int64 size = 2; + * + * @return The size. + */ + long getSize(); + + /** + * + * + *
+   * SHA256 hash of the first hashed_size bytes of the file encoded as a
+   * hex string.  If hashed_size == size, hash_sha256 represents the SHA256 hash
+   * of the entire file.
+   * 
+ * + * string sha256 = 3; + * + * @return The sha256. + */ + java.lang.String getSha256(); + /** + * + * + *
+   * SHA256 hash of the first hashed_size bytes of the file encoded as a
+   * hex string.  If hashed_size == size, hash_sha256 represents the SHA256 hash
+   * of the entire file.
+   * 
+ * + * string sha256 = 3; + * + * @return The bytes for sha256. + */ + com.google.protobuf.ByteString getSha256Bytes(); + + /** + * + * + *
+   * The length in bytes of the file prefix that was hashed.  If
+   * hashed_size == size, any hashes reported represent the entire
+   * file.
+   * 
+ * + * int64 hashed_size = 4; + * + * @return The hashedSize. + */ + long getHashedSize(); + + /** + * + * + *
+   * True when the hash covers only a prefix of the file.
+   * 
+ * + * bool partially_hashed = 5; + * + * @return The partiallyHashed. + */ + boolean getPartiallyHashed(); + + /** + * + * + *
+   * Prefix of the file contents as a JSON encoded string.
+   * (Currently only populated for Malicious Script Executed findings.)
+   * 
+ * + * string contents = 6; + * + * @return The contents. + */ + java.lang.String getContents(); + /** + * + * + *
+   * Prefix of the file contents as a JSON encoded string.
+   * (Currently only populated for Malicious Script Executed findings.)
+   * 
+ * + * string contents = 6; + * + * @return The bytes for contents. + */ + com.google.protobuf.ByteString getContentsBytes(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FileProto.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FileProto.java new file mode 100644 index 000000000000..2f6f2c0f961c --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FileProto.java @@ -0,0 +1,69 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/file.proto + +package com.google.cloud.securitycenter.v1; + +public final class FileProto { + private FileProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v1_File_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v1_File_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/file.pr" + + "oto\022\036google.cloud.securitycenter.v1\"s\n\004F" + + "ile\022\014\n\004path\030\001 \001(\t\022\014\n\004size\030\002 \001(\003\022\016\n\006sha25" + + "6\030\003 \001(\t\022\023\n\013hashed_size\030\004 \001(\003\022\030\n\020partiall" + + "y_hashed\030\005 \001(\010\022\020\n\010contents\030\006 \001(\tB\345\001\n\"com" + + ".google.cloud.securitycenter.v1B\tFilePro" + + "toP\001ZLgoogle.golang.org/genproto/googlea" + + "pis/cloud/securitycenter/v1;securitycent" + + "er\252\002\036Google.Cloud.SecurityCenter.V1\312\002\036Go" + + "ogle\\Cloud\\SecurityCenter\\V1\352\002!Google::C" + + "loud::SecurityCenter::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_cloud_securitycenter_v1_File_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_securitycenter_v1_File_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v1_File_descriptor, + new java.lang.String[] { + "Path", "Size", "Sha256", "HashedSize", "PartiallyHashed", "Contents", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Finding.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Finding.java index 44fd9707273e..e1c0d0890bd3 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Finding.java +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Finding.java @@ -55,6 +55,8 @@ private Finding() { findingClass_ = 0; connections_ = java.util.Collections.emptyList(); muteInitiator_ = ""; + processes_ = java.util.Collections.emptyList(); + compliances_ = java.util.Collections.emptyList(); description_ = ""; iamBindings_ = java.util.Collections.emptyList(); nextSteps_ = ""; @@ -329,6 +331,17 @@ private Finding( muteInitiator_ = s; break; } + case 242: + { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + processes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + processes_.add( + input.readMessage( + com.google.cloud.securitycenter.v1.Process.parser(), extensionRegistry)); + break; + } case 250: { if (!((mutable_bitField0_ & 0x00000004) != 0)) { @@ -341,19 +354,47 @@ private Finding( com.google.cloud.securitycenter.v1.Connection.parser(), extensionRegistry)); break; } + case 274: + { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + compliances_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + compliances_.add( + input.readMessage( + com.google.cloud.securitycenter.v1.Compliance.parser(), extensionRegistry)); + break; + } case 298: { java.lang.String s = input.readStringRequireUtf8(); description_ = s; + break; + } + case 306: + { + com.google.cloud.securitycenter.v1.Exfiltration.Builder subBuilder = null; + if (exfiltration_ != null) { + subBuilder = exfiltration_.toBuilder(); + } + exfiltration_ = + input.readMessage( + com.google.cloud.securitycenter.v1.Exfiltration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(exfiltration_); + exfiltration_ = subBuilder.buildPartial(); + } + break; } case 314: { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { + if (!((mutable_bitField0_ & 0x00000020) != 0)) { iamBindings_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; + mutable_bitField0_ |= 0x00000020; } iamBindings_.add( input.readMessage( @@ -383,10 +424,16 @@ private Finding( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { + if (((mutable_bitField0_ & 0x00000008) != 0)) { + processes_ = java.util.Collections.unmodifiableList(processes_); + } if (((mutable_bitField0_ & 0x00000004) != 0)) { connections_ = java.util.Collections.unmodifiableList(connections_); } - if (((mutable_bitField0_ & 0x00000008) != 0)) { + if (((mutable_bitField0_ & 0x00000010) != 0)) { + compliances_ = java.util.Collections.unmodifiableList(compliances_); + } + if (((mutable_bitField0_ & 0x00000020) != 0)) { iamBindings_ = java.util.Collections.unmodifiableList(iamBindings_); } this.unknownFields = unknownFields.build(); @@ -2246,8 +2293,8 @@ public int getExternalSystemsCount() { * * *
-   * Output only. Third party SIEM/SOAR fields within SCC, contains external system
-   * information and external system finding fields.
+   * Output only. Third party SIEM/SOAR fields within SCC, contains external
+   * system information and external system finding fields.
    * 
* * @@ -2272,8 +2319,8 @@ public boolean containsExternalSystems(java.lang.String key) { * * *
-   * Output only. Third party SIEM/SOAR fields within SCC, contains external system
-   * information and external system finding fields.
+   * Output only. Third party SIEM/SOAR fields within SCC, contains external
+   * system information and external system finding fields.
    * 
* * @@ -2289,8 +2336,8 @@ public boolean containsExternalSystems(java.lang.String key) { * * *
-   * Output only. Third party SIEM/SOAR fields within SCC, contains external system
-   * information and external system finding fields.
+   * Output only. Third party SIEM/SOAR fields within SCC, contains external
+   * system information and external system finding fields.
    * 
* * @@ -2311,8 +2358,8 @@ public com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystemsOrDef * * *
-   * Output only. Third party SIEM/SOAR fields within SCC, contains external system
-   * information and external system finding fields.
+   * Output only. Third party SIEM/SOAR fields within SCC, contains external
+   * system information and external system finding fields.
    * 
* * @@ -2559,6 +2606,149 @@ public com.google.protobuf.ByteString getMuteInitiatorBytes() { } } + public static final int PROCESSES_FIELD_NUMBER = 30; + private java.util.List processes_; + /** + * + * + *
+   * Represents operating system processes associated with the Finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.Process processes = 30; + */ + @java.lang.Override + public java.util.List getProcessesList() { + return processes_; + } + /** + * + * + *
+   * Represents operating system processes associated with the Finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.Process processes = 30; + */ + @java.lang.Override + public java.util.List + getProcessesOrBuilderList() { + return processes_; + } + /** + * + * + *
+   * Represents operating system processes associated with the Finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.Process processes = 30; + */ + @java.lang.Override + public int getProcessesCount() { + return processes_.size(); + } + /** + * + * + *
+   * Represents operating system processes associated with the Finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.Process processes = 30; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.Process getProcesses(int index) { + return processes_.get(index); + } + /** + * + * + *
+   * Represents operating system processes associated with the Finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.Process processes = 30; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.ProcessOrBuilder getProcessesOrBuilder(int index) { + return processes_.get(index); + } + + public static final int COMPLIANCES_FIELD_NUMBER = 34; + private java.util.List compliances_; + /** + * + * + *
+   * Contains compliance information for security standards associated to the
+   * finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; + */ + @java.lang.Override + public java.util.List getCompliancesList() { + return compliances_; + } + /** + * + * + *
+   * Contains compliance information for security standards associated to the
+   * finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; + */ + @java.lang.Override + public java.util.List + getCompliancesOrBuilderList() { + return compliances_; + } + /** + * + * + *
+   * Contains compliance information for security standards associated to the
+   * finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; + */ + @java.lang.Override + public int getCompliancesCount() { + return compliances_.size(); + } + /** + * + * + *
+   * Contains compliance information for security standards associated to the
+   * finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.Compliance getCompliances(int index) { + return compliances_.get(index); + } + /** + * + * + *
+   * Contains compliance information for security standards associated to the
+   * finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.ComplianceOrBuilder getCompliancesOrBuilder(int index) { + return compliances_.get(index); + } + public static final int DESCRIPTION_FIELD_NUMBER = 37; private volatile java.lang.Object description_; /** @@ -2608,6 +2798,54 @@ public com.google.protobuf.ByteString getDescriptionBytes() { } } + public static final int EXFILTRATION_FIELD_NUMBER = 38; + private com.google.cloud.securitycenter.v1.Exfiltration exfiltration_; + /** + * + * + *
+   * Represents exfiltration associated with the Finding.
+   * 
+ * + * .google.cloud.securitycenter.v1.Exfiltration exfiltration = 38; + * + * @return Whether the exfiltration field is set. + */ + @java.lang.Override + public boolean hasExfiltration() { + return exfiltration_ != null; + } + /** + * + * + *
+   * Represents exfiltration associated with the Finding.
+   * 
+ * + * .google.cloud.securitycenter.v1.Exfiltration exfiltration = 38; + * + * @return The exfiltration. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.Exfiltration getExfiltration() { + return exfiltration_ == null + ? com.google.cloud.securitycenter.v1.Exfiltration.getDefaultInstance() + : exfiltration_; + } + /** + * + * + *
+   * Represents exfiltration associated with the Finding.
+   * 
+ * + * .google.cloud.securitycenter.v1.Exfiltration exfiltration = 38; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.ExfiltrationOrBuilder getExfiltrationOrBuilder() { + return getExfiltration(); + } + public static final int IAM_BINDINGS_FIELD_NUMBER = 39; private java.util.List iamBindings_; /** @@ -2804,12 +3042,21 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(muteInitiator_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 28, muteInitiator_); } + for (int i = 0; i < processes_.size(); i++) { + output.writeMessage(30, processes_.get(i)); + } for (int i = 0; i < connections_.size(); i++) { output.writeMessage(31, connections_.get(i)); } + for (int i = 0; i < compliances_.size(); i++) { + output.writeMessage(34, compliances_.get(i)); + } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 37, description_); } + if (exfiltration_ != null) { + output.writeMessage(38, getExfiltration()); + } for (int i = 0; i < iamBindings_.size(); i++) { output.writeMessage(39, iamBindings_.get(i)); } @@ -2907,12 +3154,21 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(muteInitiator_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(28, muteInitiator_); } + for (int i = 0; i < processes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(30, processes_.get(i)); + } for (int i = 0; i < connections_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(31, connections_.get(i)); } + for (int i = 0; i < compliances_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(34, compliances_.get(i)); + } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(37, description_); } + if (exfiltration_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(38, getExfiltration()); + } for (int i = 0; i < iamBindings_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(39, iamBindings_.get(i)); } @@ -2981,7 +3237,13 @@ public boolean equals(final java.lang.Object obj) { } if (!getConnectionsList().equals(other.getConnectionsList())) return false; if (!getMuteInitiator().equals(other.getMuteInitiator())) return false; + if (!getProcessesList().equals(other.getProcessesList())) return false; + if (!getCompliancesList().equals(other.getCompliancesList())) return false; if (!getDescription().equals(other.getDescription())) return false; + if (hasExfiltration() != other.hasExfiltration()) return false; + if (hasExfiltration()) { + if (!getExfiltration().equals(other.getExfiltration())) return false; + } if (!getIamBindingsList().equals(other.getIamBindingsList())) return false; if (!getNextSteps().equals(other.getNextSteps())) return false; if (!unknownFields.equals(other.unknownFields)) return false; @@ -3061,8 +3323,20 @@ public int hashCode() { } hash = (37 * hash) + MUTE_INITIATOR_FIELD_NUMBER; hash = (53 * hash) + getMuteInitiator().hashCode(); + if (getProcessesCount() > 0) { + hash = (37 * hash) + PROCESSES_FIELD_NUMBER; + hash = (53 * hash) + getProcessesList().hashCode(); + } + if (getCompliancesCount() > 0) { + hash = (37 * hash) + COMPLIANCES_FIELD_NUMBER; + hash = (53 * hash) + getCompliancesList().hashCode(); + } hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); + if (hasExfiltration()) { + hash = (37 * hash) + EXFILTRATION_FIELD_NUMBER; + hash = (53 * hash) + getExfiltration().hashCode(); + } if (getIamBindingsCount() > 0) { hash = (37 * hash) + IAM_BINDINGS_FIELD_NUMBER; hash = (53 * hash) + getIamBindingsList().hashCode(); @@ -3239,6 +3513,8 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getConnectionsFieldBuilder(); + getProcessesFieldBuilder(); + getCompliancesFieldBuilder(); getIamBindingsFieldBuilder(); } } @@ -3324,11 +3600,29 @@ public Builder clear() { } muteInitiator_ = ""; + if (processesBuilder_ == null) { + processes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + processesBuilder_.clear(); + } + if (compliancesBuilder_ == null) { + compliances_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + } else { + compliancesBuilder_.clear(); + } description_ = ""; + if (exfiltrationBuilder_ == null) { + exfiltration_ = null; + } else { + exfiltration_ = null; + exfiltrationBuilder_ = null; + } if (iamBindingsBuilder_ == null) { iamBindings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000020); } else { iamBindingsBuilder_.clear(); } @@ -3426,11 +3720,34 @@ public com.google.cloud.securitycenter.v1.Finding buildPartial() { result.connections_ = connectionsBuilder_.build(); } result.muteInitiator_ = muteInitiator_; + if (processesBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + processes_ = java.util.Collections.unmodifiableList(processes_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.processes_ = processes_; + } else { + result.processes_ = processesBuilder_.build(); + } + if (compliancesBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + compliances_ = java.util.Collections.unmodifiableList(compliances_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.compliances_ = compliances_; + } else { + result.compliances_ = compliancesBuilder_.build(); + } result.description_ = description_; + if (exfiltrationBuilder_ == null) { + result.exfiltration_ = exfiltration_; + } else { + result.exfiltration_ = exfiltrationBuilder_.build(); + } if (iamBindingsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { + if (((bitField0_ & 0x00000020) != 0)) { iamBindings_ = java.util.Collections.unmodifiableList(iamBindings_); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000020); } result.iamBindings_ = iamBindings_; } else { @@ -3579,15 +3896,72 @@ public Builder mergeFrom(com.google.cloud.securitycenter.v1.Finding other) { muteInitiator_ = other.muteInitiator_; onChanged(); } + if (processesBuilder_ == null) { + if (!other.processes_.isEmpty()) { + if (processes_.isEmpty()) { + processes_ = other.processes_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureProcessesIsMutable(); + processes_.addAll(other.processes_); + } + onChanged(); + } + } else { + if (!other.processes_.isEmpty()) { + if (processesBuilder_.isEmpty()) { + processesBuilder_.dispose(); + processesBuilder_ = null; + processes_ = other.processes_; + bitField0_ = (bitField0_ & ~0x00000008); + processesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getProcessesFieldBuilder() + : null; + } else { + processesBuilder_.addAllMessages(other.processes_); + } + } + } + if (compliancesBuilder_ == null) { + if (!other.compliances_.isEmpty()) { + if (compliances_.isEmpty()) { + compliances_ = other.compliances_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureCompliancesIsMutable(); + compliances_.addAll(other.compliances_); + } + onChanged(); + } + } else { + if (!other.compliances_.isEmpty()) { + if (compliancesBuilder_.isEmpty()) { + compliancesBuilder_.dispose(); + compliancesBuilder_ = null; + compliances_ = other.compliances_; + bitField0_ = (bitField0_ & ~0x00000010); + compliancesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCompliancesFieldBuilder() + : null; + } else { + compliancesBuilder_.addAllMessages(other.compliances_); + } + } + } if (!other.getDescription().isEmpty()) { description_ = other.description_; onChanged(); } + if (other.hasExfiltration()) { + mergeExfiltration(other.getExfiltration()); + } if (iamBindingsBuilder_ == null) { if (!other.iamBindings_.isEmpty()) { if (iamBindings_.isEmpty()) { iamBindings_ = other.iamBindings_; - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000020); } else { ensureIamBindingsIsMutable(); iamBindings_.addAll(other.iamBindings_); @@ -3600,7 +3974,7 @@ public Builder mergeFrom(com.google.cloud.securitycenter.v1.Finding other) { iamBindingsBuilder_.dispose(); iamBindingsBuilder_ = null; iamBindings_ = other.iamBindings_; - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000020); iamBindingsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getIamBindingsFieldBuilder() @@ -6262,8 +6636,8 @@ public int getExternalSystemsCount() { * * *
-     * Output only. Third party SIEM/SOAR fields within SCC, contains external system
-     * information and external system finding fields.
+     * Output only. Third party SIEM/SOAR fields within SCC, contains external
+     * system information and external system finding fields.
      * 
* * @@ -6288,8 +6662,8 @@ public boolean containsExternalSystems(java.lang.String key) { * * *
-     * Output only. Third party SIEM/SOAR fields within SCC, contains external system
-     * information and external system finding fields.
+     * Output only. Third party SIEM/SOAR fields within SCC, contains external
+     * system information and external system finding fields.
      * 
* * @@ -6305,8 +6679,8 @@ public boolean containsExternalSystems(java.lang.String key) { * * *
-     * Output only. Third party SIEM/SOAR fields within SCC, contains external system
-     * information and external system finding fields.
+     * Output only. Third party SIEM/SOAR fields within SCC, contains external
+     * system information and external system finding fields.
      * 
* * @@ -6327,8 +6701,8 @@ public com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystemsOrDef * * *
-     * Output only. Third party SIEM/SOAR fields within SCC, contains external system
-     * information and external system finding fields.
+     * Output only. Third party SIEM/SOAR fields within SCC, contains external
+     * system information and external system finding fields.
      * 
* * @@ -6357,8 +6731,8 @@ public Builder clearExternalSystems() { * * *
-     * Output only. Third party SIEM/SOAR fields within SCC, contains external system
-     * information and external system finding fields.
+     * Output only. Third party SIEM/SOAR fields within SCC, contains external
+     * system information and external system finding fields.
      * 
* * @@ -6382,8 +6756,8 @@ public Builder removeExternalSystems(java.lang.String key) { * * *
-     * Output only. Third party SIEM/SOAR fields within SCC, contains external system
-     * information and external system finding fields.
+     * Output only. Third party SIEM/SOAR fields within SCC, contains external
+     * system information and external system finding fields.
      * 
* * @@ -6406,8 +6780,8 @@ public Builder putExternalSystems( * * *
-     * Output only. Third party SIEM/SOAR fields within SCC, contains external system
-     * information and external system finding fields.
+     * Output only. Third party SIEM/SOAR fields within SCC, contains external
+     * system information and external system finding fields.
      * 
* * @@ -7282,70 +7656,791 @@ public Builder setMuteInitiatorBytes(com.google.protobuf.ByteString value) { return this; } - private java.lang.Object description_ = ""; + private java.util.List processes_ = + java.util.Collections.emptyList(); + + private void ensureProcessesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + processes_ = + new java.util.ArrayList(processes_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v1.Process, + com.google.cloud.securitycenter.v1.Process.Builder, + com.google.cloud.securitycenter.v1.ProcessOrBuilder> + processesBuilder_; + /** * * *
-     * Contains more detail about the finding.
+     * Represents operating system processes associated with the Finding.
      * 
* - * string description = 37; - * - * @return The description. + * repeated .google.cloud.securitycenter.v1.Process processes = 30; */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; + public java.util.List getProcessesList() { + if (processesBuilder_ == null) { + return java.util.Collections.unmodifiableList(processes_); } else { - return (java.lang.String) ref; + return processesBuilder_.getMessageList(); } } /** * * *
-     * Contains more detail about the finding.
+     * Represents operating system processes associated with the Finding.
      * 
* - * string description = 37; - * - * @return The bytes for description. + * repeated .google.cloud.securitycenter.v1.Process processes = 30; */ - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; + public int getProcessesCount() { + if (processesBuilder_ == null) { + return processes_.size(); } else { - return (com.google.protobuf.ByteString) ref; + return processesBuilder_.getCount(); } } /** * * *
-     * Contains more detail about the finding.
+     * Represents operating system processes associated with the Finding.
      * 
* - * string description = 37; - * - * @param value The description to set. - * @return This builder for chaining. + * repeated .google.cloud.securitycenter.v1.Process processes = 30; */ - public Builder setDescription(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public com.google.cloud.securitycenter.v1.Process getProcesses(int index) { + if (processesBuilder_ == null) { + return processes_.get(index); + } else { + return processesBuilder_.getMessage(index); } - - description_ = value; - onChanged(); + } + /** + * + * + *
+     * Represents operating system processes associated with the Finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Process processes = 30; + */ + public Builder setProcesses(int index, com.google.cloud.securitycenter.v1.Process value) { + if (processesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProcessesIsMutable(); + processes_.set(index, value); + onChanged(); + } else { + processesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Represents operating system processes associated with the Finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Process processes = 30; + */ + public Builder setProcesses( + int index, com.google.cloud.securitycenter.v1.Process.Builder builderForValue) { + if (processesBuilder_ == null) { + ensureProcessesIsMutable(); + processes_.set(index, builderForValue.build()); + onChanged(); + } else { + processesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Represents operating system processes associated with the Finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Process processes = 30; + */ + public Builder addProcesses(com.google.cloud.securitycenter.v1.Process value) { + if (processesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProcessesIsMutable(); + processes_.add(value); + onChanged(); + } else { + processesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Represents operating system processes associated with the Finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Process processes = 30; + */ + public Builder addProcesses(int index, com.google.cloud.securitycenter.v1.Process value) { + if (processesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProcessesIsMutable(); + processes_.add(index, value); + onChanged(); + } else { + processesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Represents operating system processes associated with the Finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Process processes = 30; + */ + public Builder addProcesses( + com.google.cloud.securitycenter.v1.Process.Builder builderForValue) { + if (processesBuilder_ == null) { + ensureProcessesIsMutable(); + processes_.add(builderForValue.build()); + onChanged(); + } else { + processesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Represents operating system processes associated with the Finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Process processes = 30; + */ + public Builder addProcesses( + int index, com.google.cloud.securitycenter.v1.Process.Builder builderForValue) { + if (processesBuilder_ == null) { + ensureProcessesIsMutable(); + processes_.add(index, builderForValue.build()); + onChanged(); + } else { + processesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Represents operating system processes associated with the Finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Process processes = 30; + */ + public Builder addAllProcesses( + java.lang.Iterable values) { + if (processesBuilder_ == null) { + ensureProcessesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, processes_); + onChanged(); + } else { + processesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Represents operating system processes associated with the Finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Process processes = 30; + */ + public Builder clearProcesses() { + if (processesBuilder_ == null) { + processes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + processesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Represents operating system processes associated with the Finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Process processes = 30; + */ + public Builder removeProcesses(int index) { + if (processesBuilder_ == null) { + ensureProcessesIsMutable(); + processes_.remove(index); + onChanged(); + } else { + processesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Represents operating system processes associated with the Finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Process processes = 30; + */ + public com.google.cloud.securitycenter.v1.Process.Builder getProcessesBuilder(int index) { + return getProcessesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Represents operating system processes associated with the Finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Process processes = 30; + */ + public com.google.cloud.securitycenter.v1.ProcessOrBuilder getProcessesOrBuilder(int index) { + if (processesBuilder_ == null) { + return processes_.get(index); + } else { + return processesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Represents operating system processes associated with the Finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Process processes = 30; + */ + public java.util.List + getProcessesOrBuilderList() { + if (processesBuilder_ != null) { + return processesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(processes_); + } + } + /** + * + * + *
+     * Represents operating system processes associated with the Finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Process processes = 30; + */ + public com.google.cloud.securitycenter.v1.Process.Builder addProcessesBuilder() { + return getProcessesFieldBuilder() + .addBuilder(com.google.cloud.securitycenter.v1.Process.getDefaultInstance()); + } + /** + * + * + *
+     * Represents operating system processes associated with the Finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Process processes = 30; + */ + public com.google.cloud.securitycenter.v1.Process.Builder addProcessesBuilder(int index) { + return getProcessesFieldBuilder() + .addBuilder(index, com.google.cloud.securitycenter.v1.Process.getDefaultInstance()); + } + /** + * + * + *
+     * Represents operating system processes associated with the Finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Process processes = 30; + */ + public java.util.List + getProcessesBuilderList() { + return getProcessesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v1.Process, + com.google.cloud.securitycenter.v1.Process.Builder, + com.google.cloud.securitycenter.v1.ProcessOrBuilder> + getProcessesFieldBuilder() { + if (processesBuilder_ == null) { + processesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v1.Process, + com.google.cloud.securitycenter.v1.Process.Builder, + com.google.cloud.securitycenter.v1.ProcessOrBuilder>( + processes_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + processes_ = null; + } + return processesBuilder_; + } + + private java.util.List compliances_ = + java.util.Collections.emptyList(); + + private void ensureCompliancesIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + compliances_ = + new java.util.ArrayList(compliances_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v1.Compliance, + com.google.cloud.securitycenter.v1.Compliance.Builder, + com.google.cloud.securitycenter.v1.ComplianceOrBuilder> + compliancesBuilder_; + + /** + * + * + *
+     * Contains compliance information for security standards associated to the
+     * finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; + */ + public java.util.List getCompliancesList() { + if (compliancesBuilder_ == null) { + return java.util.Collections.unmodifiableList(compliances_); + } else { + return compliancesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Contains compliance information for security standards associated to the
+     * finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; + */ + public int getCompliancesCount() { + if (compliancesBuilder_ == null) { + return compliances_.size(); + } else { + return compliancesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Contains compliance information for security standards associated to the
+     * finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; + */ + public com.google.cloud.securitycenter.v1.Compliance getCompliances(int index) { + if (compliancesBuilder_ == null) { + return compliances_.get(index); + } else { + return compliancesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Contains compliance information for security standards associated to the
+     * finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; + */ + public Builder setCompliances(int index, com.google.cloud.securitycenter.v1.Compliance value) { + if (compliancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCompliancesIsMutable(); + compliances_.set(index, value); + onChanged(); + } else { + compliancesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Contains compliance information for security standards associated to the
+     * finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; + */ + public Builder setCompliances( + int index, com.google.cloud.securitycenter.v1.Compliance.Builder builderForValue) { + if (compliancesBuilder_ == null) { + ensureCompliancesIsMutable(); + compliances_.set(index, builderForValue.build()); + onChanged(); + } else { + compliancesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Contains compliance information for security standards associated to the
+     * finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; + */ + public Builder addCompliances(com.google.cloud.securitycenter.v1.Compliance value) { + if (compliancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCompliancesIsMutable(); + compliances_.add(value); + onChanged(); + } else { + compliancesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Contains compliance information for security standards associated to the
+     * finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; + */ + public Builder addCompliances(int index, com.google.cloud.securitycenter.v1.Compliance value) { + if (compliancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCompliancesIsMutable(); + compliances_.add(index, value); + onChanged(); + } else { + compliancesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Contains compliance information for security standards associated to the
+     * finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; + */ + public Builder addCompliances( + com.google.cloud.securitycenter.v1.Compliance.Builder builderForValue) { + if (compliancesBuilder_ == null) { + ensureCompliancesIsMutable(); + compliances_.add(builderForValue.build()); + onChanged(); + } else { + compliancesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Contains compliance information for security standards associated to the
+     * finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; + */ + public Builder addCompliances( + int index, com.google.cloud.securitycenter.v1.Compliance.Builder builderForValue) { + if (compliancesBuilder_ == null) { + ensureCompliancesIsMutable(); + compliances_.add(index, builderForValue.build()); + onChanged(); + } else { + compliancesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Contains compliance information for security standards associated to the
+     * finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; + */ + public Builder addAllCompliances( + java.lang.Iterable values) { + if (compliancesBuilder_ == null) { + ensureCompliancesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, compliances_); + onChanged(); + } else { + compliancesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Contains compliance information for security standards associated to the
+     * finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; + */ + public Builder clearCompliances() { + if (compliancesBuilder_ == null) { + compliances_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + compliancesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Contains compliance information for security standards associated to the
+     * finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; + */ + public Builder removeCompliances(int index) { + if (compliancesBuilder_ == null) { + ensureCompliancesIsMutable(); + compliances_.remove(index); + onChanged(); + } else { + compliancesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Contains compliance information for security standards associated to the
+     * finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; + */ + public com.google.cloud.securitycenter.v1.Compliance.Builder getCompliancesBuilder(int index) { + return getCompliancesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Contains compliance information for security standards associated to the
+     * finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; + */ + public com.google.cloud.securitycenter.v1.ComplianceOrBuilder getCompliancesOrBuilder( + int index) { + if (compliancesBuilder_ == null) { + return compliances_.get(index); + } else { + return compliancesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Contains compliance information for security standards associated to the
+     * finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; + */ + public java.util.List + getCompliancesOrBuilderList() { + if (compliancesBuilder_ != null) { + return compliancesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(compliances_); + } + } + /** + * + * + *
+     * Contains compliance information for security standards associated to the
+     * finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; + */ + public com.google.cloud.securitycenter.v1.Compliance.Builder addCompliancesBuilder() { + return getCompliancesFieldBuilder() + .addBuilder(com.google.cloud.securitycenter.v1.Compliance.getDefaultInstance()); + } + /** + * + * + *
+     * Contains compliance information for security standards associated to the
+     * finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; + */ + public com.google.cloud.securitycenter.v1.Compliance.Builder addCompliancesBuilder(int index) { + return getCompliancesFieldBuilder() + .addBuilder(index, com.google.cloud.securitycenter.v1.Compliance.getDefaultInstance()); + } + /** + * + * + *
+     * Contains compliance information for security standards associated to the
+     * finding.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; + */ + public java.util.List + getCompliancesBuilderList() { + return getCompliancesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v1.Compliance, + com.google.cloud.securitycenter.v1.Compliance.Builder, + com.google.cloud.securitycenter.v1.ComplianceOrBuilder> + getCompliancesFieldBuilder() { + if (compliancesBuilder_ == null) { + compliancesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v1.Compliance, + com.google.cloud.securitycenter.v1.Compliance.Builder, + com.google.cloud.securitycenter.v1.ComplianceOrBuilder>( + compliances_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); + compliances_ = null; + } + return compliancesBuilder_; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Contains more detail about the finding.
+     * 
+ * + * string description = 37; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Contains more detail about the finding.
+     * 
+ * + * string description = 37; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Contains more detail about the finding.
+     * 
+ * + * string description = 37; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); return this; } /** @@ -7388,14 +8483,200 @@ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.cloud.securitycenter.v1.Exfiltration exfiltration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.Exfiltration, + com.google.cloud.securitycenter.v1.Exfiltration.Builder, + com.google.cloud.securitycenter.v1.ExfiltrationOrBuilder> + exfiltrationBuilder_; + /** + * + * + *
+     * Represents exfiltration associated with the Finding.
+     * 
+ * + * .google.cloud.securitycenter.v1.Exfiltration exfiltration = 38; + * + * @return Whether the exfiltration field is set. + */ + public boolean hasExfiltration() { + return exfiltrationBuilder_ != null || exfiltration_ != null; + } + /** + * + * + *
+     * Represents exfiltration associated with the Finding.
+     * 
+ * + * .google.cloud.securitycenter.v1.Exfiltration exfiltration = 38; + * + * @return The exfiltration. + */ + public com.google.cloud.securitycenter.v1.Exfiltration getExfiltration() { + if (exfiltrationBuilder_ == null) { + return exfiltration_ == null + ? com.google.cloud.securitycenter.v1.Exfiltration.getDefaultInstance() + : exfiltration_; + } else { + return exfiltrationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Represents exfiltration associated with the Finding.
+     * 
+ * + * .google.cloud.securitycenter.v1.Exfiltration exfiltration = 38; + */ + public Builder setExfiltration(com.google.cloud.securitycenter.v1.Exfiltration value) { + if (exfiltrationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + exfiltration_ = value; + onChanged(); + } else { + exfiltrationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Represents exfiltration associated with the Finding.
+     * 
+ * + * .google.cloud.securitycenter.v1.Exfiltration exfiltration = 38; + */ + public Builder setExfiltration( + com.google.cloud.securitycenter.v1.Exfiltration.Builder builderForValue) { + if (exfiltrationBuilder_ == null) { + exfiltration_ = builderForValue.build(); + onChanged(); + } else { + exfiltrationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Represents exfiltration associated with the Finding.
+     * 
+ * + * .google.cloud.securitycenter.v1.Exfiltration exfiltration = 38; + */ + public Builder mergeExfiltration(com.google.cloud.securitycenter.v1.Exfiltration value) { + if (exfiltrationBuilder_ == null) { + if (exfiltration_ != null) { + exfiltration_ = + com.google.cloud.securitycenter.v1.Exfiltration.newBuilder(exfiltration_) + .mergeFrom(value) + .buildPartial(); + } else { + exfiltration_ = value; + } + onChanged(); + } else { + exfiltrationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Represents exfiltration associated with the Finding.
+     * 
+ * + * .google.cloud.securitycenter.v1.Exfiltration exfiltration = 38; + */ + public Builder clearExfiltration() { + if (exfiltrationBuilder_ == null) { + exfiltration_ = null; + onChanged(); + } else { + exfiltration_ = null; + exfiltrationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Represents exfiltration associated with the Finding.
+     * 
+ * + * .google.cloud.securitycenter.v1.Exfiltration exfiltration = 38; + */ + public com.google.cloud.securitycenter.v1.Exfiltration.Builder getExfiltrationBuilder() { + + onChanged(); + return getExfiltrationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Represents exfiltration associated with the Finding.
+     * 
+ * + * .google.cloud.securitycenter.v1.Exfiltration exfiltration = 38; + */ + public com.google.cloud.securitycenter.v1.ExfiltrationOrBuilder getExfiltrationOrBuilder() { + if (exfiltrationBuilder_ != null) { + return exfiltrationBuilder_.getMessageOrBuilder(); + } else { + return exfiltration_ == null + ? com.google.cloud.securitycenter.v1.Exfiltration.getDefaultInstance() + : exfiltration_; + } + } + /** + * + * + *
+     * Represents exfiltration associated with the Finding.
+     * 
+ * + * .google.cloud.securitycenter.v1.Exfiltration exfiltration = 38; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.Exfiltration, + com.google.cloud.securitycenter.v1.Exfiltration.Builder, + com.google.cloud.securitycenter.v1.ExfiltrationOrBuilder> + getExfiltrationFieldBuilder() { + if (exfiltrationBuilder_ == null) { + exfiltrationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.Exfiltration, + com.google.cloud.securitycenter.v1.Exfiltration.Builder, + com.google.cloud.securitycenter.v1.ExfiltrationOrBuilder>( + getExfiltration(), getParentForChildren(), isClean()); + exfiltration_ = null; + } + return exfiltrationBuilder_; + } + private java.util.List iamBindings_ = java.util.Collections.emptyList(); private void ensureIamBindingsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { + if (!((bitField0_ & 0x00000020) != 0)) { iamBindings_ = new java.util.ArrayList(iamBindings_); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000020; } } @@ -7611,7 +8892,7 @@ public Builder addAllIamBindings( public Builder clearIamBindings() { if (iamBindingsBuilder_ == null) { iamBindings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000020); onChanged(); } else { iamBindingsBuilder_.clear(); @@ -7734,7 +9015,7 @@ public com.google.cloud.securitycenter.v1.IamBinding.Builder addIamBindingsBuild com.google.cloud.securitycenter.v1.IamBinding, com.google.cloud.securitycenter.v1.IamBinding.Builder, com.google.cloud.securitycenter.v1.IamBindingOrBuilder>( - iamBindings_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + iamBindings_, ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); iamBindings_ = null; } return iamBindingsBuilder_; diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOrBuilder.java index ddcc4964e8fc..0bc5d05aec0b 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOrBuilder.java +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOrBuilder.java @@ -663,8 +663,8 @@ com.google.protobuf.Value getSourcePropertiesOrDefault( * * *
-   * Output only. Third party SIEM/SOAR fields within SCC, contains external system
-   * information and external system finding fields.
+   * Output only. Third party SIEM/SOAR fields within SCC, contains external
+   * system information and external system finding fields.
    * 
* * @@ -676,8 +676,8 @@ com.google.protobuf.Value getSourcePropertiesOrDefault( * * *
-   * Output only. Third party SIEM/SOAR fields within SCC, contains external system
-   * information and external system finding fields.
+   * Output only. Third party SIEM/SOAR fields within SCC, contains external
+   * system information and external system finding fields.
    * 
* * @@ -693,8 +693,8 @@ com.google.protobuf.Value getSourcePropertiesOrDefault( * * *
-   * Output only. Third party SIEM/SOAR fields within SCC, contains external system
-   * information and external system finding fields.
+   * Output only. Third party SIEM/SOAR fields within SCC, contains external
+   * system information and external system finding fields.
    * 
* * @@ -707,8 +707,8 @@ com.google.protobuf.Value getSourcePropertiesOrDefault( * * *
-   * Output only. Third party SIEM/SOAR fields within SCC, contains external system
-   * information and external system finding fields.
+   * Output only. Third party SIEM/SOAR fields within SCC, contains external
+   * system information and external system finding fields.
    * 
* * @@ -725,8 +725,8 @@ com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystemsOrDefault( * * *
-   * Output only. Third party SIEM/SOAR fields within SCC, contains external system
-   * information and external system finding fields.
+   * Output only. Third party SIEM/SOAR fields within SCC, contains external
+   * system information and external system finding fields.
    * 
* * @@ -894,6 +894,115 @@ com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystemsOrDefault( */ com.google.protobuf.ByteString getMuteInitiatorBytes(); + /** + * + * + *
+   * Represents operating system processes associated with the Finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.Process processes = 30; + */ + java.util.List getProcessesList(); + /** + * + * + *
+   * Represents operating system processes associated with the Finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.Process processes = 30; + */ + com.google.cloud.securitycenter.v1.Process getProcesses(int index); + /** + * + * + *
+   * Represents operating system processes associated with the Finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.Process processes = 30; + */ + int getProcessesCount(); + /** + * + * + *
+   * Represents operating system processes associated with the Finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.Process processes = 30; + */ + java.util.List + getProcessesOrBuilderList(); + /** + * + * + *
+   * Represents operating system processes associated with the Finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.Process processes = 30; + */ + com.google.cloud.securitycenter.v1.ProcessOrBuilder getProcessesOrBuilder(int index); + + /** + * + * + *
+   * Contains compliance information for security standards associated to the
+   * finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; + */ + java.util.List getCompliancesList(); + /** + * + * + *
+   * Contains compliance information for security standards associated to the
+   * finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; + */ + com.google.cloud.securitycenter.v1.Compliance getCompliances(int index); + /** + * + * + *
+   * Contains compliance information for security standards associated to the
+   * finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; + */ + int getCompliancesCount(); + /** + * + * + *
+   * Contains compliance information for security standards associated to the
+   * finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; + */ + java.util.List + getCompliancesOrBuilderList(); + /** + * + * + *
+   * Contains compliance information for security standards associated to the
+   * finding.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; + */ + com.google.cloud.securitycenter.v1.ComplianceOrBuilder getCompliancesOrBuilder(int index); + /** * * @@ -919,6 +1028,41 @@ com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystemsOrDefault( */ com.google.protobuf.ByteString getDescriptionBytes(); + /** + * + * + *
+   * Represents exfiltration associated with the Finding.
+   * 
+ * + * .google.cloud.securitycenter.v1.Exfiltration exfiltration = 38; + * + * @return Whether the exfiltration field is set. + */ + boolean hasExfiltration(); + /** + * + * + *
+   * Represents exfiltration associated with the Finding.
+   * 
+ * + * .google.cloud.securitycenter.v1.Exfiltration exfiltration = 38; + * + * @return The exfiltration. + */ + com.google.cloud.securitycenter.v1.Exfiltration getExfiltration(); + /** + * + * + *
+   * Represents exfiltration associated with the Finding.
+   * 
+ * + * .google.cloud.securitycenter.v1.Exfiltration exfiltration = 38; + */ + com.google.cloud.securitycenter.v1.ExfiltrationOrBuilder getExfiltrationOrBuilder(); + /** * * diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOuterClass.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOuterClass.java index f651ba8a38be..a255009395e4 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOuterClass.java +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOuterClass.java @@ -53,73 +53,81 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "google/api/field_behavior.proto\032\031google/" + "api/resource.proto\032+google/cloud/securit" + "ycenter/v1/access.proto\032/google/cloud/se" - + "curitycenter/v1/connection.proto\0324google" - + "/cloud/securitycenter/v1/external_system" - + ".proto\0320google/cloud/securitycenter/v1/i" - + "am_binding.proto\032.google/cloud/securityc" - + "enter/v1/indicator.proto\0321google/cloud/s" - + "ecuritycenter/v1/mitre_attack.proto\0323goo" - + "gle/cloud/securitycenter/v1/security_mar" - + "ks.proto\0322google/cloud/securitycenter/v1" - + "/vulnerability.proto\032\034google/protobuf/st" - + "ruct.proto\032\037google/protobuf/timestamp.pr" - + "oto\"\331\017\n\007Finding\022\014\n\004name\030\001 \001(\t\022\016\n\006parent\030" - + "\002 \001(\t\022\025\n\rresource_name\030\003 \001(\t\022<\n\005state\030\004 " - + "\001(\0162-.google.cloud.securitycenter.v1.Fin" - + "ding.State\022\020\n\010category\030\005 \001(\t\022\024\n\014external" - + "_uri\030\006 \001(\t\022X\n\021source_properties\030\007 \003(\0132=." + + "curitycenter/v1/compliance.proto\032/google" + + "/cloud/securitycenter/v1/connection.prot" + + "o\0321google/cloud/securitycenter/v1/exfilt" + + "ration.proto\0324google/cloud/securitycente" + + "r/v1/external_system.proto\0320google/cloud" + + "/securitycenter/v1/iam_binding.proto\032.go" + + "ogle/cloud/securitycenter/v1/indicator.p" + + "roto\0321google/cloud/securitycenter/v1/mit" + + "re_attack.proto\032,google/cloud/securityce" + + "nter/v1/process.proto\0323google/cloud/secu" + + "ritycenter/v1/security_marks.proto\0322goog" + + "le/cloud/securitycenter/v1/vulnerability" + + ".proto\032\034google/protobuf/struct.proto\032\037go" + + "ogle/protobuf/timestamp.proto\"\232\021\n\007Findin" + + "g\022\014\n\004name\030\001 \001(\t\022\016\n\006parent\030\002 \001(\t\022\025\n\rresou" + + "rce_name\030\003 \001(\t\022<\n\005state\030\004 \001(\0162-.google.c" + + "loud.securitycenter.v1.Finding.State\022\020\n\010" + + "category\030\005 \001(\t\022\024\n\014external_uri\030\006 \001(\t\022X\n\021" + + "source_properties\030\007 \003(\0132=.google.cloud.s" + + "ecuritycenter.v1.Finding.SourcePropertie" + + "sEntry\022J\n\016security_marks\030\010 \001(\0132-.google." + + "cloud.securitycenter.v1.SecurityMarksB\003\340" + + "A\003\022.\n\nevent_time\030\t \001(\0132\032.google.protobuf" + + ".Timestamp\022/\n\013create_time\030\n \001(\0132\032.google" + + ".protobuf.Timestamp\022B\n\010severity\030\014 \001(\01620." + "google.cloud.securitycenter.v1.Finding.S" - + "ourcePropertiesEntry\022J\n\016security_marks\030\010" - + " \001(\0132-.google.cloud.securitycenter.v1.Se" - + "curityMarksB\003\340A\003\022.\n\nevent_time\030\t \001(\0132\032.g" - + "oogle.protobuf.Timestamp\022/\n\013create_time\030" - + "\n \001(\0132\032.google.protobuf.Timestamp\022B\n\010sev" - + "erity\030\014 \001(\01620.google.cloud.securitycente" - + "r.v1.Finding.Severity\022\026\n\016canonical_name\030" - + "\016 \001(\t\022:\n\004mute\030\017 \001(\0162,.google.cloud.secur" - + "itycenter.v1.Finding.Mute\022K\n\rfinding_cla" - + "ss\030\021 \001(\01624.google.cloud.securitycenter.v" - + "1.Finding.FindingClass\022<\n\tindicator\030\022 \001(" - + "\0132).google.cloud.securitycenter.v1.Indic" - + "ator\022D\n\rvulnerability\030\024 \001(\0132-.google.clo" - + "ud.securitycenter.v1.Vulnerability\0229\n\020mu" - + "te_update_time\030\025 \001(\0132\032.google.protobuf.T" - + "imestampB\003\340A\003\022[\n\020external_systems\030\026 \003(\0132" - + "<.google.cloud.securitycenter.v1.Finding" - + ".ExternalSystemsEntryB\003\340A\003\022A\n\014mitre_atta" - + "ck\030\031 \001(\0132+.google.cloud.securitycenter.v" - + "1.MitreAttack\0226\n\006access\030\032 \001(\0132&.google.c" - + "loud.securitycenter.v1.Access\022?\n\013connect" - + "ions\030\037 \003(\0132*.google.cloud.securitycenter" - + ".v1.Connection\022\026\n\016mute_initiator\030\034 \001(\t\022\023" - + "\n\013description\030% \001(\t\022@\n\014iam_bindings\030\' \003(" - + "\0132*.google.cloud.securitycenter.v1.IamBi" - + "nding\022\022\n\nnext_steps\030( \001(\t\032O\n\025SourcePrope" - + "rtiesEntry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\026" - + ".google.protobuf.Value:\0028\001\032f\n\024ExternalSy" - + "stemsEntry\022\013\n\003key\030\001 \001(\t\022=\n\005value\030\002 \001(\0132." - + ".google.cloud.securitycenter.v1.External" - + "System:\0028\001\"8\n\005State\022\025\n\021STATE_UNSPECIFIED" - + "\020\000\022\n\n\006ACTIVE\020\001\022\014\n\010INACTIVE\020\002\"Q\n\010Severity" - + "\022\030\n\024SEVERITY_UNSPECIFIED\020\000\022\014\n\010CRITICAL\020\001" - + "\022\010\n\004HIGH\020\002\022\n\n\006MEDIUM\020\003\022\007\n\003LOW\020\004\"C\n\004Mute\022" - + "\024\n\020MUTE_UNSPECIFIED\020\000\022\t\n\005MUTED\020\001\022\013\n\007UNMU" - + "TED\020\002\022\r\n\tUNDEFINED\020\004\"\202\001\n\014FindingClass\022\035\n" - + "\031FINDING_CLASS_UNSPECIFIED\020\000\022\n\n\006THREAT\020\001" - + "\022\021\n\rVULNERABILITY\020\002\022\024\n\020MISCONFIGURATION\020" - + "\003\022\017\n\013OBSERVATION\020\004\022\r\n\tSCC_ERROR\020\005:\333\001\352A\327\001" - + "\n%securitycenter.googleapis.com/Finding\022" - + "@organizations/{organization}/sources/{s" - + "ource}/findings/{finding}\0224folders/{fold" - + "er}/sources/{source}/findings/{finding}\022" - + "6projects/{project}/sources/{source}/fin" - + "dings/{finding}B\332\001\n\"com.google.cloud.sec" - + "uritycenter.v1P\001ZLgoogle.golang.org/genp" - + "roto/googleapis/cloud/securitycenter/v1;" - + "securitycenter\252\002\036Google.Cloud.SecurityCe" - + "nter.V1\312\002\036Google\\Cloud\\SecurityCenter\\V1" - + "\352\002!Google::Cloud::SecurityCenter::V1b\006pr" - + "oto3" + + "everity\022\026\n\016canonical_name\030\016 \001(\t\022:\n\004mute\030" + + "\017 \001(\0162,.google.cloud.securitycenter.v1.F" + + "inding.Mute\022K\n\rfinding_class\030\021 \001(\01624.goo" + + "gle.cloud.securitycenter.v1.Finding.Find" + + "ingClass\022<\n\tindicator\030\022 \001(\0132).google.clo" + + "ud.securitycenter.v1.Indicator\022D\n\rvulner" + + "ability\030\024 \001(\0132-.google.cloud.securitycen" + + "ter.v1.Vulnerability\0229\n\020mute_update_time" + + "\030\025 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022" + + "[\n\020external_systems\030\026 \003(\0132<.google.cloud" + + ".securitycenter.v1.Finding.ExternalSyste" + + "msEntryB\003\340A\003\022A\n\014mitre_attack\030\031 \001(\0132+.goo" + + "gle.cloud.securitycenter.v1.MitreAttack\022" + + "6\n\006access\030\032 \001(\0132&.google.cloud.securityc" + + "enter.v1.Access\022?\n\013connections\030\037 \003(\0132*.g" + + "oogle.cloud.securitycenter.v1.Connection" + + "\022\026\n\016mute_initiator\030\034 \001(\t\022:\n\tprocesses\030\036 " + + "\003(\0132\'.google.cloud.securitycenter.v1.Pro" + + "cess\022?\n\013compliances\030\" \003(\0132*.google.cloud" + + ".securitycenter.v1.Compliance\022\023\n\013descrip" + + "tion\030% \001(\t\022B\n\014exfiltration\030& \001(\0132,.googl" + + "e.cloud.securitycenter.v1.Exfiltration\022@" + + "\n\014iam_bindings\030\' \003(\0132*.google.cloud.secu" + + "ritycenter.v1.IamBinding\022\022\n\nnext_steps\030(" + + " \001(\t\032O\n\025SourcePropertiesEntry\022\013\n\003key\030\001 \001" + + "(\t\022%\n\005value\030\002 \001(\0132\026.google.protobuf.Valu" + + "e:\0028\001\032f\n\024ExternalSystemsEntry\022\013\n\003key\030\001 \001" + + "(\t\022=\n\005value\030\002 \001(\0132..google.cloud.securit" + + "ycenter.v1.ExternalSystem:\0028\001\"8\n\005State\022\025" + + "\n\021STATE_UNSPECIFIED\020\000\022\n\n\006ACTIVE\020\001\022\014\n\010INA" + + "CTIVE\020\002\"Q\n\010Severity\022\030\n\024SEVERITY_UNSPECIF" + + "IED\020\000\022\014\n\010CRITICAL\020\001\022\010\n\004HIGH\020\002\022\n\n\006MEDIUM\020" + + "\003\022\007\n\003LOW\020\004\"C\n\004Mute\022\024\n\020MUTE_UNSPECIFIED\020\000" + + "\022\t\n\005MUTED\020\001\022\013\n\007UNMUTED\020\002\022\r\n\tUNDEFINED\020\004\"" + + "\202\001\n\014FindingClass\022\035\n\031FINDING_CLASS_UNSPEC" + + "IFIED\020\000\022\n\n\006THREAT\020\001\022\021\n\rVULNERABILITY\020\002\022\024" + + "\n\020MISCONFIGURATION\020\003\022\017\n\013OBSERVATION\020\004\022\r\n" + + "\tSCC_ERROR\020\005:\333\001\352A\327\001\n%securitycenter.goog" + + "leapis.com/Finding\022@organizations/{organ" + + "ization}/sources/{source}/findings/{find" + + "ing}\0224folders/{folder}/sources/{source}/" + + "findings/{finding}\0226projects/{project}/s" + + "ources/{source}/findings/{finding}B\332\001\n\"c" + + "om.google.cloud.securitycenter.v1P\001ZLgoo" + + "gle.golang.org/genproto/googleapis/cloud" + + "/securitycenter/v1;securitycenter\252\002\036Goog" + + "le.Cloud.SecurityCenter.V1\312\002\036Google\\Clou" + + "d\\SecurityCenter\\V1\352\002!Google::Cloud::Sec" + + "urityCenter::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -128,11 +136,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.cloud.securitycenter.v1.AccessProto.getDescriptor(), + com.google.cloud.securitycenter.v1.ComplianceProto.getDescriptor(), com.google.cloud.securitycenter.v1.ConnectionProto.getDescriptor(), + com.google.cloud.securitycenter.v1.ExfiltrationProto.getDescriptor(), com.google.cloud.securitycenter.v1.ExternalSystemProto.getDescriptor(), com.google.cloud.securitycenter.v1.IamBindingProto.getDescriptor(), com.google.cloud.securitycenter.v1.IndicatorProto.getDescriptor(), com.google.cloud.securitycenter.v1.MitreAttackProto.getDescriptor(), + com.google.cloud.securitycenter.v1.ProcessProto.getDescriptor(), com.google.cloud.securitycenter.v1.SecurityMarksOuterClass.getDescriptor(), com.google.cloud.securitycenter.v1.VulnerabilityProto.getDescriptor(), com.google.protobuf.StructProto.getDescriptor(), @@ -166,7 +177,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Access", "Connections", "MuteInitiator", + "Processes", + "Compliances", "Description", + "Exfiltration", "IamBindings", "NextSteps", }); @@ -195,11 +209,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.cloud.securitycenter.v1.AccessProto.getDescriptor(); + com.google.cloud.securitycenter.v1.ComplianceProto.getDescriptor(); com.google.cloud.securitycenter.v1.ConnectionProto.getDescriptor(); + com.google.cloud.securitycenter.v1.ExfiltrationProto.getDescriptor(); com.google.cloud.securitycenter.v1.ExternalSystemProto.getDescriptor(); com.google.cloud.securitycenter.v1.IamBindingProto.getDescriptor(); com.google.cloud.securitycenter.v1.IndicatorProto.getDescriptor(); com.google.cloud.securitycenter.v1.MitreAttackProto.getDescriptor(); + com.google.cloud.securitycenter.v1.ProcessProto.getDescriptor(); com.google.cloud.securitycenter.v1.SecurityMarksOuterClass.getDescriptor(); com.google.cloud.securitycenter.v1.VulnerabilityProto.getDescriptor(); com.google.protobuf.StructProto.getDescriptor(); diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/MitreAttack.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/MitreAttack.java index 67307d4b5fd6..8078bc17ee9d 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/MitreAttack.java +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/MitreAttack.java @@ -638,7 +638,6 @@ private Tactic(int value) { *
    * MITRE ATT&CK techniques that can be referenced by SCC findings.
    * See: https://attack.mitre.org/techniques/enterprise/
-   * Next ID: 31
    * 
* * Protobuf enum {@code google.cloud.securitycenter.v1.MitreAttack.Technique} @@ -954,6 +953,16 @@ public enum Technique implements com.google.protobuf.ProtocolMessageEnum { * DOMAIN_POLICY_MODIFICATION = 30; */ DOMAIN_POLICY_MODIFICATION(30), + /** + * + * + *
+     * T1562
+     * 
+ * + * IMPAIR_DEFENSES = 31; + */ + IMPAIR_DEFENSES(31), UNRECOGNIZED(-1), ; @@ -1267,6 +1276,16 @@ public enum Technique implements com.google.protobuf.ProtocolMessageEnum { * DOMAIN_POLICY_MODIFICATION = 30; */ public static final int DOMAIN_POLICY_MODIFICATION_VALUE = 30; + /** + * + * + *
+     * T1562
+     * 
+ * + * IMPAIR_DEFENSES = 31; + */ + public static final int IMPAIR_DEFENSES_VALUE = 31; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -1354,6 +1373,8 @@ public static Technique forNumber(int value) { return DATA_DESTRUCTION; case 30: return DOMAIN_POLICY_MODIFICATION; + case 31: + return IMPAIR_DEFENSES; default: return null; } diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/MitreAttackProto.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/MitreAttackProto.java index b78d40e98a05..995687f5c31a 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/MitreAttackProto.java +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/MitreAttackProto.java @@ -42,7 +42,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n1google/cloud/securitycenter/v1/mitre_a" + "ttack.proto\022\036google.cloud.securitycenter" - + ".v1\"\330\013\n\013MitreAttack\022J\n\016primary_tactic\030\001 " + + ".v1\"\355\013\n\013MitreAttack\022J\n\016primary_tactic\030\001 " + "\001(\01622.google.cloud.securitycenter.v1.Mit" + "reAttack.Tactic\022Q\n\022primary_techniques\030\002 " + "\003(\01625.google.cloud.securitycenter.v1.Mit" @@ -58,7 +58,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\022\023\n\017DEFENSE_EVASION\020\007\022\025\n\021CREDENTIAL_ACCE" + "SS\020\t\022\r\n\tDISCOVERY\020\n\022\024\n\020LATERAL_MOVEMENT\020" + "\013\022\016\n\nCOLLECTION\020\014\022\027\n\023COMMAND_AND_CONTROL" - + "\020\004\022\020\n\014EXFILTRATION\020\r\022\n\n\006IMPACT\020\016\"\273\006\n\tTec" + + "\020\004\022\020\n\014EXFILTRATION\020\r\022\n\n\006IMPACT\020\016\"\320\006\n\tTec" + "hnique\022\031\n\025TECHNIQUE_UNSPECIFIED\020\000\022\023\n\017ACT" + "IVE_SCANNING\020\001\022\026\n\022SCANNING_IP_BLOCKS\020\002\022\031" + "\n\025INGRESS_TOOL_TRANSFER\020\003\022\016\n\nNATIVE_API\020" @@ -79,13 +79,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "FRASTRUCTURE\020\032\022%\n!EXPLOIT_PUBLIC_FACING_" + "APPLICATION\020\033\022!\n\035MODIFY_AUTHENTICATION_P" + "ROCESS\020\034\022\024\n\020DATA_DESTRUCTION\020\035\022\036\n\032DOMAIN" - + "_POLICY_MODIFICATION\020\036B\354\001\n\"com.google.cl" - + "oud.securitycenter.v1B\020MitreAttackProtoP" - + "\001ZLgoogle.golang.org/genproto/googleapis" - + "/cloud/securitycenter/v1;securitycenter\252" - + "\002\036Google.Cloud.SecurityCenter.V1\312\002\036Googl" - + "e\\Cloud\\SecurityCenter\\V1\352\002!Google::Clou" - + "d::SecurityCenter::V1b\006proto3" + + "_POLICY_MODIFICATION\020\036\022\023\n\017IMPAIR_DEFENSE" + + "S\020\037B\354\001\n\"com.google.cloud.securitycenter." + + "v1B\020MitreAttackProtoP\001ZLgoogle.golang.or" + + "g/genproto/googleapis/cloud/securitycent" + + "er/v1;securitycenter\252\002\036Google.Cloud.Secu" + + "rityCenter.V1\312\002\036Google\\Cloud\\SecurityCen" + + "ter\\V1\352\002!Google::Cloud::SecurityCenter::" + + "V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Process.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Process.java new file mode 100644 index 000000000000..54cf3db622e2 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Process.java @@ -0,0 +1,2674 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/process.proto + +package com.google.cloud.securitycenter.v1; + +/** + * + * + *
+ * Represents an operating system process.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.Process} + */ +public final class Process extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Process) + ProcessOrBuilder { + private static final long serialVersionUID = 0L; + // Use Process.newBuilder() to construct. + private Process(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Process() { + libraries_ = java.util.Collections.emptyList(); + args_ = com.google.protobuf.LazyStringArrayList.EMPTY; + envVariables_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Process(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Process( + 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 26: + { + com.google.cloud.securitycenter.v1.File.Builder subBuilder = null; + if (binary_ != null) { + subBuilder = binary_.toBuilder(); + } + binary_ = + input.readMessage( + com.google.cloud.securitycenter.v1.File.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(binary_); + binary_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + libraries_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + libraries_.add( + input.readMessage( + com.google.cloud.securitycenter.v1.File.parser(), extensionRegistry)); + break; + } + case 42: + { + com.google.cloud.securitycenter.v1.File.Builder subBuilder = null; + if (script_ != null) { + subBuilder = script_.toBuilder(); + } + script_ = + input.readMessage( + com.google.cloud.securitycenter.v1.File.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(script_); + script_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + args_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + args_.add(s); + break; + } + case 56: + { + argumentsTruncated_ = input.readBool(); + break; + } + case 66: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + envVariables_ = + new java.util.ArrayList< + com.google.cloud.securitycenter.v1.EnvironmentVariable>(); + mutable_bitField0_ |= 0x00000004; + } + envVariables_.add( + input.readMessage( + com.google.cloud.securitycenter.v1.EnvironmentVariable.parser(), + extensionRegistry)); + break; + } + case 72: + { + envVariablesTruncated_ = input.readBool(); + break; + } + case 80: + { + pid_ = input.readInt64(); + break; + } + case 88: + { + parentPid_ = input.readInt64(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + libraries_ = java.util.Collections.unmodifiableList(libraries_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + args_ = args_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + envVariables_ = java.util.Collections.unmodifiableList(envVariables_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.ProcessProto + .internal_static_google_cloud_securitycenter_v1_Process_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.ProcessProto + .internal_static_google_cloud_securitycenter_v1_Process_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.Process.class, + com.google.cloud.securitycenter.v1.Process.Builder.class); + } + + public static final int BINARY_FIELD_NUMBER = 3; + private com.google.cloud.securitycenter.v1.File binary_; + /** + * + * + *
+   * File information for the process executable.
+   * 
+ * + * .google.cloud.securitycenter.v1.File binary = 3; + * + * @return Whether the binary field is set. + */ + @java.lang.Override + public boolean hasBinary() { + return binary_ != null; + } + /** + * + * + *
+   * File information for the process executable.
+   * 
+ * + * .google.cloud.securitycenter.v1.File binary = 3; + * + * @return The binary. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.File getBinary() { + return binary_ == null ? com.google.cloud.securitycenter.v1.File.getDefaultInstance() : binary_; + } + /** + * + * + *
+   * File information for the process executable.
+   * 
+ * + * .google.cloud.securitycenter.v1.File binary = 3; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.FileOrBuilder getBinaryOrBuilder() { + return getBinary(); + } + + public static final int LIBRARIES_FIELD_NUMBER = 4; + private java.util.List libraries_; + /** + * + * + *
+   * File information for libraries loaded by the process.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.File libraries = 4; + */ + @java.lang.Override + public java.util.List getLibrariesList() { + return libraries_; + } + /** + * + * + *
+   * File information for libraries loaded by the process.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.File libraries = 4; + */ + @java.lang.Override + public java.util.List + getLibrariesOrBuilderList() { + return libraries_; + } + /** + * + * + *
+   * File information for libraries loaded by the process.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.File libraries = 4; + */ + @java.lang.Override + public int getLibrariesCount() { + return libraries_.size(); + } + /** + * + * + *
+   * File information for libraries loaded by the process.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.File libraries = 4; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.File getLibraries(int index) { + return libraries_.get(index); + } + /** + * + * + *
+   * File information for libraries loaded by the process.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.File libraries = 4; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.FileOrBuilder getLibrariesOrBuilder(int index) { + return libraries_.get(index); + } + + public static final int SCRIPT_FIELD_NUMBER = 5; + private com.google.cloud.securitycenter.v1.File script_; + /** + * + * + *
+   * When the process represents the invocation of a script,
+   * `binary` provides information about the interpreter while `script`
+   * provides information about the script file provided to the
+   * interpreter.
+   * 
+ * + * .google.cloud.securitycenter.v1.File script = 5; + * + * @return Whether the script field is set. + */ + @java.lang.Override + public boolean hasScript() { + return script_ != null; + } + /** + * + * + *
+   * When the process represents the invocation of a script,
+   * `binary` provides information about the interpreter while `script`
+   * provides information about the script file provided to the
+   * interpreter.
+   * 
+ * + * .google.cloud.securitycenter.v1.File script = 5; + * + * @return The script. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.File getScript() { + return script_ == null ? com.google.cloud.securitycenter.v1.File.getDefaultInstance() : script_; + } + /** + * + * + *
+   * When the process represents the invocation of a script,
+   * `binary` provides information about the interpreter while `script`
+   * provides information about the script file provided to the
+   * interpreter.
+   * 
+ * + * .google.cloud.securitycenter.v1.File script = 5; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.FileOrBuilder getScriptOrBuilder() { + return getScript(); + } + + public static final int ARGS_FIELD_NUMBER = 6; + private com.google.protobuf.LazyStringList args_; + /** + * + * + *
+   * Process arguments as JSON encoded strings.
+   * 
+ * + * repeated string args = 6; + * + * @return A list containing the args. + */ + public com.google.protobuf.ProtocolStringList getArgsList() { + return args_; + } + /** + * + * + *
+   * Process arguments as JSON encoded strings.
+   * 
+ * + * repeated string args = 6; + * + * @return The count of args. + */ + public int getArgsCount() { + return args_.size(); + } + /** + * + * + *
+   * Process arguments as JSON encoded strings.
+   * 
+ * + * repeated string args = 6; + * + * @param index The index of the element to return. + * @return The args at the given index. + */ + public java.lang.String getArgs(int index) { + return args_.get(index); + } + /** + * + * + *
+   * Process arguments as JSON encoded strings.
+   * 
+ * + * repeated string args = 6; + * + * @param index The index of the value to return. + * @return The bytes of the args at the given index. + */ + public com.google.protobuf.ByteString getArgsBytes(int index) { + return args_.getByteString(index); + } + + public static final int ARGUMENTS_TRUNCATED_FIELD_NUMBER = 7; + private boolean argumentsTruncated_; + /** + * + * + *
+   * True if `args` is incomplete.
+   * 
+ * + * bool arguments_truncated = 7; + * + * @return The argumentsTruncated. + */ + @java.lang.Override + public boolean getArgumentsTruncated() { + return argumentsTruncated_; + } + + public static final int ENV_VARIABLES_FIELD_NUMBER = 8; + private java.util.List envVariables_; + /** + * + * + *
+   * Process environment variables.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.EnvironmentVariable env_variables = 8; + */ + @java.lang.Override + public java.util.List + getEnvVariablesList() { + return envVariables_; + } + /** + * + * + *
+   * Process environment variables.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.EnvironmentVariable env_variables = 8; + */ + @java.lang.Override + public java.util.List + getEnvVariablesOrBuilderList() { + return envVariables_; + } + /** + * + * + *
+   * Process environment variables.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.EnvironmentVariable env_variables = 8; + */ + @java.lang.Override + public int getEnvVariablesCount() { + return envVariables_.size(); + } + /** + * + * + *
+   * Process environment variables.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.EnvironmentVariable env_variables = 8; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.EnvironmentVariable getEnvVariables(int index) { + return envVariables_.get(index); + } + /** + * + * + *
+   * Process environment variables.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.EnvironmentVariable env_variables = 8; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.EnvironmentVariableOrBuilder getEnvVariablesOrBuilder( + int index) { + return envVariables_.get(index); + } + + public static final int ENV_VARIABLES_TRUNCATED_FIELD_NUMBER = 9; + private boolean envVariablesTruncated_; + /** + * + * + *
+   * True if `env_variables` is incomplete.
+   * 
+ * + * bool env_variables_truncated = 9; + * + * @return The envVariablesTruncated. + */ + @java.lang.Override + public boolean getEnvVariablesTruncated() { + return envVariablesTruncated_; + } + + public static final int PID_FIELD_NUMBER = 10; + private long pid_; + /** + * + * + *
+   * The process id.
+   * 
+ * + * int64 pid = 10; + * + * @return The pid. + */ + @java.lang.Override + public long getPid() { + return pid_; + } + + public static final int PARENT_PID_FIELD_NUMBER = 11; + private long parentPid_; + /** + * + * + *
+   * The parent process id.
+   * 
+ * + * int64 parent_pid = 11; + * + * @return The parentPid. + */ + @java.lang.Override + public long getParentPid() { + return parentPid_; + } + + 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 (binary_ != null) { + output.writeMessage(3, getBinary()); + } + for (int i = 0; i < libraries_.size(); i++) { + output.writeMessage(4, libraries_.get(i)); + } + if (script_ != null) { + output.writeMessage(5, getScript()); + } + for (int i = 0; i < args_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, args_.getRaw(i)); + } + if (argumentsTruncated_ != false) { + output.writeBool(7, argumentsTruncated_); + } + for (int i = 0; i < envVariables_.size(); i++) { + output.writeMessage(8, envVariables_.get(i)); + } + if (envVariablesTruncated_ != false) { + output.writeBool(9, envVariablesTruncated_); + } + if (pid_ != 0L) { + output.writeInt64(10, pid_); + } + if (parentPid_ != 0L) { + output.writeInt64(11, parentPid_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (binary_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBinary()); + } + for (int i = 0; i < libraries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, libraries_.get(i)); + } + if (script_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getScript()); + } + { + int dataSize = 0; + for (int i = 0; i < args_.size(); i++) { + dataSize += computeStringSizeNoTag(args_.getRaw(i)); + } + size += dataSize; + size += 1 * getArgsList().size(); + } + if (argumentsTruncated_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, argumentsTruncated_); + } + for (int i = 0; i < envVariables_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, envVariables_.get(i)); + } + if (envVariablesTruncated_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(9, envVariablesTruncated_); + } + if (pid_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(10, pid_); + } + if (parentPid_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(11, parentPid_); + } + 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.Process)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v1.Process other = + (com.google.cloud.securitycenter.v1.Process) obj; + + if (hasBinary() != other.hasBinary()) return false; + if (hasBinary()) { + if (!getBinary().equals(other.getBinary())) return false; + } + if (!getLibrariesList().equals(other.getLibrariesList())) return false; + if (hasScript() != other.hasScript()) return false; + if (hasScript()) { + if (!getScript().equals(other.getScript())) return false; + } + if (!getArgsList().equals(other.getArgsList())) return false; + if (getArgumentsTruncated() != other.getArgumentsTruncated()) return false; + if (!getEnvVariablesList().equals(other.getEnvVariablesList())) return false; + if (getEnvVariablesTruncated() != other.getEnvVariablesTruncated()) return false; + if (getPid() != other.getPid()) return false; + if (getParentPid() != other.getParentPid()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBinary()) { + hash = (37 * hash) + BINARY_FIELD_NUMBER; + hash = (53 * hash) + getBinary().hashCode(); + } + if (getLibrariesCount() > 0) { + hash = (37 * hash) + LIBRARIES_FIELD_NUMBER; + hash = (53 * hash) + getLibrariesList().hashCode(); + } + if (hasScript()) { + hash = (37 * hash) + SCRIPT_FIELD_NUMBER; + hash = (53 * hash) + getScript().hashCode(); + } + if (getArgsCount() > 0) { + hash = (37 * hash) + ARGS_FIELD_NUMBER; + hash = (53 * hash) + getArgsList().hashCode(); + } + hash = (37 * hash) + ARGUMENTS_TRUNCATED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getArgumentsTruncated()); + if (getEnvVariablesCount() > 0) { + hash = (37 * hash) + ENV_VARIABLES_FIELD_NUMBER; + hash = (53 * hash) + getEnvVariablesList().hashCode(); + } + hash = (37 * hash) + ENV_VARIABLES_TRUNCATED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnvVariablesTruncated()); + hash = (37 * hash) + PID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPid()); + hash = (37 * hash) + PARENT_PID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getParentPid()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v1.Process parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.Process 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.Process parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.Process 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.Process parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.Process 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.Process parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.Process 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.Process parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.Process 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.Process 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.Process 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.Process prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Represents an operating system process.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.Process} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Process) + com.google.cloud.securitycenter.v1.ProcessOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.ProcessProto + .internal_static_google_cloud_securitycenter_v1_Process_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.ProcessProto + .internal_static_google_cloud_securitycenter_v1_Process_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.Process.class, + com.google.cloud.securitycenter.v1.Process.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v1.Process.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getLibrariesFieldBuilder(); + getEnvVariablesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (binaryBuilder_ == null) { + binary_ = null; + } else { + binary_ = null; + binaryBuilder_ = null; + } + if (librariesBuilder_ == null) { + libraries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + librariesBuilder_.clear(); + } + if (scriptBuilder_ == null) { + script_ = null; + } else { + script_ = null; + scriptBuilder_ = null; + } + args_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + argumentsTruncated_ = false; + + if (envVariablesBuilder_ == null) { + envVariables_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + envVariablesBuilder_.clear(); + } + envVariablesTruncated_ = false; + + pid_ = 0L; + + parentPid_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v1.ProcessProto + .internal_static_google_cloud_securitycenter_v1_Process_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.Process getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v1.Process.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.Process build() { + com.google.cloud.securitycenter.v1.Process result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.Process buildPartial() { + com.google.cloud.securitycenter.v1.Process result = + new com.google.cloud.securitycenter.v1.Process(this); + int from_bitField0_ = bitField0_; + if (binaryBuilder_ == null) { + result.binary_ = binary_; + } else { + result.binary_ = binaryBuilder_.build(); + } + if (librariesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + libraries_ = java.util.Collections.unmodifiableList(libraries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.libraries_ = libraries_; + } else { + result.libraries_ = librariesBuilder_.build(); + } + if (scriptBuilder_ == null) { + result.script_ = script_; + } else { + result.script_ = scriptBuilder_.build(); + } + if (((bitField0_ & 0x00000002) != 0)) { + args_ = args_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.args_ = args_; + result.argumentsTruncated_ = argumentsTruncated_; + if (envVariablesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + envVariables_ = java.util.Collections.unmodifiableList(envVariables_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.envVariables_ = envVariables_; + } else { + result.envVariables_ = envVariablesBuilder_.build(); + } + result.envVariablesTruncated_ = envVariablesTruncated_; + result.pid_ = pid_; + result.parentPid_ = parentPid_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.securitycenter.v1.Process) { + return mergeFrom((com.google.cloud.securitycenter.v1.Process) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v1.Process other) { + if (other == com.google.cloud.securitycenter.v1.Process.getDefaultInstance()) return this; + if (other.hasBinary()) { + mergeBinary(other.getBinary()); + } + if (librariesBuilder_ == null) { + if (!other.libraries_.isEmpty()) { + if (libraries_.isEmpty()) { + libraries_ = other.libraries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLibrariesIsMutable(); + libraries_.addAll(other.libraries_); + } + onChanged(); + } + } else { + if (!other.libraries_.isEmpty()) { + if (librariesBuilder_.isEmpty()) { + librariesBuilder_.dispose(); + librariesBuilder_ = null; + libraries_ = other.libraries_; + bitField0_ = (bitField0_ & ~0x00000001); + librariesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getLibrariesFieldBuilder() + : null; + } else { + librariesBuilder_.addAllMessages(other.libraries_); + } + } + } + if (other.hasScript()) { + mergeScript(other.getScript()); + } + if (!other.args_.isEmpty()) { + if (args_.isEmpty()) { + args_ = other.args_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureArgsIsMutable(); + args_.addAll(other.args_); + } + onChanged(); + } + if (other.getArgumentsTruncated() != false) { + setArgumentsTruncated(other.getArgumentsTruncated()); + } + if (envVariablesBuilder_ == null) { + if (!other.envVariables_.isEmpty()) { + if (envVariables_.isEmpty()) { + envVariables_ = other.envVariables_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureEnvVariablesIsMutable(); + envVariables_.addAll(other.envVariables_); + } + onChanged(); + } + } else { + if (!other.envVariables_.isEmpty()) { + if (envVariablesBuilder_.isEmpty()) { + envVariablesBuilder_.dispose(); + envVariablesBuilder_ = null; + envVariables_ = other.envVariables_; + bitField0_ = (bitField0_ & ~0x00000004); + envVariablesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEnvVariablesFieldBuilder() + : null; + } else { + envVariablesBuilder_.addAllMessages(other.envVariables_); + } + } + } + if (other.getEnvVariablesTruncated() != false) { + setEnvVariablesTruncated(other.getEnvVariablesTruncated()); + } + if (other.getPid() != 0L) { + setPid(other.getPid()); + } + if (other.getParentPid() != 0L) { + setParentPid(other.getParentPid()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.securitycenter.v1.Process parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.securitycenter.v1.Process) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.cloud.securitycenter.v1.File binary_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.File, + com.google.cloud.securitycenter.v1.File.Builder, + com.google.cloud.securitycenter.v1.FileOrBuilder> + binaryBuilder_; + /** + * + * + *
+     * File information for the process executable.
+     * 
+ * + * .google.cloud.securitycenter.v1.File binary = 3; + * + * @return Whether the binary field is set. + */ + public boolean hasBinary() { + return binaryBuilder_ != null || binary_ != null; + } + /** + * + * + *
+     * File information for the process executable.
+     * 
+ * + * .google.cloud.securitycenter.v1.File binary = 3; + * + * @return The binary. + */ + public com.google.cloud.securitycenter.v1.File getBinary() { + if (binaryBuilder_ == null) { + return binary_ == null + ? com.google.cloud.securitycenter.v1.File.getDefaultInstance() + : binary_; + } else { + return binaryBuilder_.getMessage(); + } + } + /** + * + * + *
+     * File information for the process executable.
+     * 
+ * + * .google.cloud.securitycenter.v1.File binary = 3; + */ + public Builder setBinary(com.google.cloud.securitycenter.v1.File value) { + if (binaryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + binary_ = value; + onChanged(); + } else { + binaryBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * File information for the process executable.
+     * 
+ * + * .google.cloud.securitycenter.v1.File binary = 3; + */ + public Builder setBinary(com.google.cloud.securitycenter.v1.File.Builder builderForValue) { + if (binaryBuilder_ == null) { + binary_ = builderForValue.build(); + onChanged(); + } else { + binaryBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * File information for the process executable.
+     * 
+ * + * .google.cloud.securitycenter.v1.File binary = 3; + */ + public Builder mergeBinary(com.google.cloud.securitycenter.v1.File value) { + if (binaryBuilder_ == null) { + if (binary_ != null) { + binary_ = + com.google.cloud.securitycenter.v1.File.newBuilder(binary_) + .mergeFrom(value) + .buildPartial(); + } else { + binary_ = value; + } + onChanged(); + } else { + binaryBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * File information for the process executable.
+     * 
+ * + * .google.cloud.securitycenter.v1.File binary = 3; + */ + public Builder clearBinary() { + if (binaryBuilder_ == null) { + binary_ = null; + onChanged(); + } else { + binary_ = null; + binaryBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * File information for the process executable.
+     * 
+ * + * .google.cloud.securitycenter.v1.File binary = 3; + */ + public com.google.cloud.securitycenter.v1.File.Builder getBinaryBuilder() { + + onChanged(); + return getBinaryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * File information for the process executable.
+     * 
+ * + * .google.cloud.securitycenter.v1.File binary = 3; + */ + public com.google.cloud.securitycenter.v1.FileOrBuilder getBinaryOrBuilder() { + if (binaryBuilder_ != null) { + return binaryBuilder_.getMessageOrBuilder(); + } else { + return binary_ == null + ? com.google.cloud.securitycenter.v1.File.getDefaultInstance() + : binary_; + } + } + /** + * + * + *
+     * File information for the process executable.
+     * 
+ * + * .google.cloud.securitycenter.v1.File binary = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.File, + com.google.cloud.securitycenter.v1.File.Builder, + com.google.cloud.securitycenter.v1.FileOrBuilder> + getBinaryFieldBuilder() { + if (binaryBuilder_ == null) { + binaryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.File, + com.google.cloud.securitycenter.v1.File.Builder, + com.google.cloud.securitycenter.v1.FileOrBuilder>( + getBinary(), getParentForChildren(), isClean()); + binary_ = null; + } + return binaryBuilder_; + } + + private java.util.List libraries_ = + java.util.Collections.emptyList(); + + private void ensureLibrariesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + libraries_ = new java.util.ArrayList(libraries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v1.File, + com.google.cloud.securitycenter.v1.File.Builder, + com.google.cloud.securitycenter.v1.FileOrBuilder> + librariesBuilder_; + + /** + * + * + *
+     * File information for libraries loaded by the process.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.File libraries = 4; + */ + public java.util.List getLibrariesList() { + if (librariesBuilder_ == null) { + return java.util.Collections.unmodifiableList(libraries_); + } else { + return librariesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * File information for libraries loaded by the process.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.File libraries = 4; + */ + public int getLibrariesCount() { + if (librariesBuilder_ == null) { + return libraries_.size(); + } else { + return librariesBuilder_.getCount(); + } + } + /** + * + * + *
+     * File information for libraries loaded by the process.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.File libraries = 4; + */ + public com.google.cloud.securitycenter.v1.File getLibraries(int index) { + if (librariesBuilder_ == null) { + return libraries_.get(index); + } else { + return librariesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * File information for libraries loaded by the process.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.File libraries = 4; + */ + public Builder setLibraries(int index, com.google.cloud.securitycenter.v1.File value) { + if (librariesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLibrariesIsMutable(); + libraries_.set(index, value); + onChanged(); + } else { + librariesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * File information for libraries loaded by the process.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.File libraries = 4; + */ + public Builder setLibraries( + int index, com.google.cloud.securitycenter.v1.File.Builder builderForValue) { + if (librariesBuilder_ == null) { + ensureLibrariesIsMutable(); + libraries_.set(index, builderForValue.build()); + onChanged(); + } else { + librariesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * File information for libraries loaded by the process.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.File libraries = 4; + */ + public Builder addLibraries(com.google.cloud.securitycenter.v1.File value) { + if (librariesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLibrariesIsMutable(); + libraries_.add(value); + onChanged(); + } else { + librariesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * File information for libraries loaded by the process.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.File libraries = 4; + */ + public Builder addLibraries(int index, com.google.cloud.securitycenter.v1.File value) { + if (librariesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLibrariesIsMutable(); + libraries_.add(index, value); + onChanged(); + } else { + librariesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * File information for libraries loaded by the process.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.File libraries = 4; + */ + public Builder addLibraries(com.google.cloud.securitycenter.v1.File.Builder builderForValue) { + if (librariesBuilder_ == null) { + ensureLibrariesIsMutable(); + libraries_.add(builderForValue.build()); + onChanged(); + } else { + librariesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * File information for libraries loaded by the process.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.File libraries = 4; + */ + public Builder addLibraries( + int index, com.google.cloud.securitycenter.v1.File.Builder builderForValue) { + if (librariesBuilder_ == null) { + ensureLibrariesIsMutable(); + libraries_.add(index, builderForValue.build()); + onChanged(); + } else { + librariesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * File information for libraries loaded by the process.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.File libraries = 4; + */ + public Builder addAllLibraries( + java.lang.Iterable values) { + if (librariesBuilder_ == null) { + ensureLibrariesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, libraries_); + onChanged(); + } else { + librariesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * File information for libraries loaded by the process.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.File libraries = 4; + */ + public Builder clearLibraries() { + if (librariesBuilder_ == null) { + libraries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + librariesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * File information for libraries loaded by the process.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.File libraries = 4; + */ + public Builder removeLibraries(int index) { + if (librariesBuilder_ == null) { + ensureLibrariesIsMutable(); + libraries_.remove(index); + onChanged(); + } else { + librariesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * File information for libraries loaded by the process.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.File libraries = 4; + */ + public com.google.cloud.securitycenter.v1.File.Builder getLibrariesBuilder(int index) { + return getLibrariesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * File information for libraries loaded by the process.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.File libraries = 4; + */ + public com.google.cloud.securitycenter.v1.FileOrBuilder getLibrariesOrBuilder(int index) { + if (librariesBuilder_ == null) { + return libraries_.get(index); + } else { + return librariesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * File information for libraries loaded by the process.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.File libraries = 4; + */ + public java.util.List + getLibrariesOrBuilderList() { + if (librariesBuilder_ != null) { + return librariesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(libraries_); + } + } + /** + * + * + *
+     * File information for libraries loaded by the process.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.File libraries = 4; + */ + public com.google.cloud.securitycenter.v1.File.Builder addLibrariesBuilder() { + return getLibrariesFieldBuilder() + .addBuilder(com.google.cloud.securitycenter.v1.File.getDefaultInstance()); + } + /** + * + * + *
+     * File information for libraries loaded by the process.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.File libraries = 4; + */ + public com.google.cloud.securitycenter.v1.File.Builder addLibrariesBuilder(int index) { + return getLibrariesFieldBuilder() + .addBuilder(index, com.google.cloud.securitycenter.v1.File.getDefaultInstance()); + } + /** + * + * + *
+     * File information for libraries loaded by the process.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.File libraries = 4; + */ + public java.util.List + getLibrariesBuilderList() { + return getLibrariesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v1.File, + com.google.cloud.securitycenter.v1.File.Builder, + com.google.cloud.securitycenter.v1.FileOrBuilder> + getLibrariesFieldBuilder() { + if (librariesBuilder_ == null) { + librariesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v1.File, + com.google.cloud.securitycenter.v1.File.Builder, + com.google.cloud.securitycenter.v1.FileOrBuilder>( + libraries_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + libraries_ = null; + } + return librariesBuilder_; + } + + private com.google.cloud.securitycenter.v1.File script_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.File, + com.google.cloud.securitycenter.v1.File.Builder, + com.google.cloud.securitycenter.v1.FileOrBuilder> + scriptBuilder_; + /** + * + * + *
+     * When the process represents the invocation of a script,
+     * `binary` provides information about the interpreter while `script`
+     * provides information about the script file provided to the
+     * interpreter.
+     * 
+ * + * .google.cloud.securitycenter.v1.File script = 5; + * + * @return Whether the script field is set. + */ + public boolean hasScript() { + return scriptBuilder_ != null || script_ != null; + } + /** + * + * + *
+     * When the process represents the invocation of a script,
+     * `binary` provides information about the interpreter while `script`
+     * provides information about the script file provided to the
+     * interpreter.
+     * 
+ * + * .google.cloud.securitycenter.v1.File script = 5; + * + * @return The script. + */ + public com.google.cloud.securitycenter.v1.File getScript() { + if (scriptBuilder_ == null) { + return script_ == null + ? com.google.cloud.securitycenter.v1.File.getDefaultInstance() + : script_; + } else { + return scriptBuilder_.getMessage(); + } + } + /** + * + * + *
+     * When the process represents the invocation of a script,
+     * `binary` provides information about the interpreter while `script`
+     * provides information about the script file provided to the
+     * interpreter.
+     * 
+ * + * .google.cloud.securitycenter.v1.File script = 5; + */ + public Builder setScript(com.google.cloud.securitycenter.v1.File value) { + if (scriptBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + script_ = value; + onChanged(); + } else { + scriptBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * When the process represents the invocation of a script,
+     * `binary` provides information about the interpreter while `script`
+     * provides information about the script file provided to the
+     * interpreter.
+     * 
+ * + * .google.cloud.securitycenter.v1.File script = 5; + */ + public Builder setScript(com.google.cloud.securitycenter.v1.File.Builder builderForValue) { + if (scriptBuilder_ == null) { + script_ = builderForValue.build(); + onChanged(); + } else { + scriptBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * When the process represents the invocation of a script,
+     * `binary` provides information about the interpreter while `script`
+     * provides information about the script file provided to the
+     * interpreter.
+     * 
+ * + * .google.cloud.securitycenter.v1.File script = 5; + */ + public Builder mergeScript(com.google.cloud.securitycenter.v1.File value) { + if (scriptBuilder_ == null) { + if (script_ != null) { + script_ = + com.google.cloud.securitycenter.v1.File.newBuilder(script_) + .mergeFrom(value) + .buildPartial(); + } else { + script_ = value; + } + onChanged(); + } else { + scriptBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * When the process represents the invocation of a script,
+     * `binary` provides information about the interpreter while `script`
+     * provides information about the script file provided to the
+     * interpreter.
+     * 
+ * + * .google.cloud.securitycenter.v1.File script = 5; + */ + public Builder clearScript() { + if (scriptBuilder_ == null) { + script_ = null; + onChanged(); + } else { + script_ = null; + scriptBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * When the process represents the invocation of a script,
+     * `binary` provides information about the interpreter while `script`
+     * provides information about the script file provided to the
+     * interpreter.
+     * 
+ * + * .google.cloud.securitycenter.v1.File script = 5; + */ + public com.google.cloud.securitycenter.v1.File.Builder getScriptBuilder() { + + onChanged(); + return getScriptFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * When the process represents the invocation of a script,
+     * `binary` provides information about the interpreter while `script`
+     * provides information about the script file provided to the
+     * interpreter.
+     * 
+ * + * .google.cloud.securitycenter.v1.File script = 5; + */ + public com.google.cloud.securitycenter.v1.FileOrBuilder getScriptOrBuilder() { + if (scriptBuilder_ != null) { + return scriptBuilder_.getMessageOrBuilder(); + } else { + return script_ == null + ? com.google.cloud.securitycenter.v1.File.getDefaultInstance() + : script_; + } + } + /** + * + * + *
+     * When the process represents the invocation of a script,
+     * `binary` provides information about the interpreter while `script`
+     * provides information about the script file provided to the
+     * interpreter.
+     * 
+ * + * .google.cloud.securitycenter.v1.File script = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.File, + com.google.cloud.securitycenter.v1.File.Builder, + com.google.cloud.securitycenter.v1.FileOrBuilder> + getScriptFieldBuilder() { + if (scriptBuilder_ == null) { + scriptBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.File, + com.google.cloud.securitycenter.v1.File.Builder, + com.google.cloud.securitycenter.v1.FileOrBuilder>( + getScript(), getParentForChildren(), isClean()); + script_ = null; + } + return scriptBuilder_; + } + + private com.google.protobuf.LazyStringList args_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureArgsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + args_ = new com.google.protobuf.LazyStringArrayList(args_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Process arguments as JSON encoded strings.
+     * 
+ * + * repeated string args = 6; + * + * @return A list containing the args. + */ + public com.google.protobuf.ProtocolStringList getArgsList() { + return args_.getUnmodifiableView(); + } + /** + * + * + *
+     * Process arguments as JSON encoded strings.
+     * 
+ * + * repeated string args = 6; + * + * @return The count of args. + */ + public int getArgsCount() { + return args_.size(); + } + /** + * + * + *
+     * Process arguments as JSON encoded strings.
+     * 
+ * + * repeated string args = 6; + * + * @param index The index of the element to return. + * @return The args at the given index. + */ + public java.lang.String getArgs(int index) { + return args_.get(index); + } + /** + * + * + *
+     * Process arguments as JSON encoded strings.
+     * 
+ * + * repeated string args = 6; + * + * @param index The index of the value to return. + * @return The bytes of the args at the given index. + */ + public com.google.protobuf.ByteString getArgsBytes(int index) { + return args_.getByteString(index); + } + /** + * + * + *
+     * Process arguments as JSON encoded strings.
+     * 
+ * + * repeated string args = 6; + * + * @param index The index to set the value at. + * @param value The args to set. + * @return This builder for chaining. + */ + public Builder setArgs(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureArgsIsMutable(); + args_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Process arguments as JSON encoded strings.
+     * 
+ * + * repeated string args = 6; + * + * @param value The args to add. + * @return This builder for chaining. + */ + public Builder addArgs(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureArgsIsMutable(); + args_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Process arguments as JSON encoded strings.
+     * 
+ * + * repeated string args = 6; + * + * @param values The args to add. + * @return This builder for chaining. + */ + public Builder addAllArgs(java.lang.Iterable values) { + ensureArgsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, args_); + onChanged(); + return this; + } + /** + * + * + *
+     * Process arguments as JSON encoded strings.
+     * 
+ * + * repeated string args = 6; + * + * @return This builder for chaining. + */ + public Builder clearArgs() { + args_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Process arguments as JSON encoded strings.
+     * 
+ * + * repeated string args = 6; + * + * @param value The bytes of the args to add. + * @return This builder for chaining. + */ + public Builder addArgsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureArgsIsMutable(); + args_.add(value); + onChanged(); + return this; + } + + private boolean argumentsTruncated_; + /** + * + * + *
+     * True if `args` is incomplete.
+     * 
+ * + * bool arguments_truncated = 7; + * + * @return The argumentsTruncated. + */ + @java.lang.Override + public boolean getArgumentsTruncated() { + return argumentsTruncated_; + } + /** + * + * + *
+     * True if `args` is incomplete.
+     * 
+ * + * bool arguments_truncated = 7; + * + * @param value The argumentsTruncated to set. + * @return This builder for chaining. + */ + public Builder setArgumentsTruncated(boolean value) { + + argumentsTruncated_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * True if `args` is incomplete.
+     * 
+ * + * bool arguments_truncated = 7; + * + * @return This builder for chaining. + */ + public Builder clearArgumentsTruncated() { + + argumentsTruncated_ = false; + onChanged(); + return this; + } + + private java.util.List envVariables_ = + java.util.Collections.emptyList(); + + private void ensureEnvVariablesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + envVariables_ = + new java.util.ArrayList( + envVariables_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v1.EnvironmentVariable, + com.google.cloud.securitycenter.v1.EnvironmentVariable.Builder, + com.google.cloud.securitycenter.v1.EnvironmentVariableOrBuilder> + envVariablesBuilder_; + + /** + * + * + *
+     * Process environment variables.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.EnvironmentVariable env_variables = 8; + */ + public java.util.List + getEnvVariablesList() { + if (envVariablesBuilder_ == null) { + return java.util.Collections.unmodifiableList(envVariables_); + } else { + return envVariablesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Process environment variables.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.EnvironmentVariable env_variables = 8; + */ + public int getEnvVariablesCount() { + if (envVariablesBuilder_ == null) { + return envVariables_.size(); + } else { + return envVariablesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Process environment variables.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.EnvironmentVariable env_variables = 8; + */ + public com.google.cloud.securitycenter.v1.EnvironmentVariable getEnvVariables(int index) { + if (envVariablesBuilder_ == null) { + return envVariables_.get(index); + } else { + return envVariablesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Process environment variables.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.EnvironmentVariable env_variables = 8; + */ + public Builder setEnvVariables( + int index, com.google.cloud.securitycenter.v1.EnvironmentVariable value) { + if (envVariablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnvVariablesIsMutable(); + envVariables_.set(index, value); + onChanged(); + } else { + envVariablesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Process environment variables.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.EnvironmentVariable env_variables = 8; + */ + public Builder setEnvVariables( + int index, com.google.cloud.securitycenter.v1.EnvironmentVariable.Builder builderForValue) { + if (envVariablesBuilder_ == null) { + ensureEnvVariablesIsMutable(); + envVariables_.set(index, builderForValue.build()); + onChanged(); + } else { + envVariablesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Process environment variables.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.EnvironmentVariable env_variables = 8; + */ + public Builder addEnvVariables(com.google.cloud.securitycenter.v1.EnvironmentVariable value) { + if (envVariablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnvVariablesIsMutable(); + envVariables_.add(value); + onChanged(); + } else { + envVariablesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Process environment variables.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.EnvironmentVariable env_variables = 8; + */ + public Builder addEnvVariables( + int index, com.google.cloud.securitycenter.v1.EnvironmentVariable value) { + if (envVariablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnvVariablesIsMutable(); + envVariables_.add(index, value); + onChanged(); + } else { + envVariablesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Process environment variables.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.EnvironmentVariable env_variables = 8; + */ + public Builder addEnvVariables( + com.google.cloud.securitycenter.v1.EnvironmentVariable.Builder builderForValue) { + if (envVariablesBuilder_ == null) { + ensureEnvVariablesIsMutable(); + envVariables_.add(builderForValue.build()); + onChanged(); + } else { + envVariablesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Process environment variables.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.EnvironmentVariable env_variables = 8; + */ + public Builder addEnvVariables( + int index, com.google.cloud.securitycenter.v1.EnvironmentVariable.Builder builderForValue) { + if (envVariablesBuilder_ == null) { + ensureEnvVariablesIsMutable(); + envVariables_.add(index, builderForValue.build()); + onChanged(); + } else { + envVariablesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Process environment variables.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.EnvironmentVariable env_variables = 8; + */ + public Builder addAllEnvVariables( + java.lang.Iterable + values) { + if (envVariablesBuilder_ == null) { + ensureEnvVariablesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, envVariables_); + onChanged(); + } else { + envVariablesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Process environment variables.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.EnvironmentVariable env_variables = 8; + */ + public Builder clearEnvVariables() { + if (envVariablesBuilder_ == null) { + envVariables_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + envVariablesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Process environment variables.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.EnvironmentVariable env_variables = 8; + */ + public Builder removeEnvVariables(int index) { + if (envVariablesBuilder_ == null) { + ensureEnvVariablesIsMutable(); + envVariables_.remove(index); + onChanged(); + } else { + envVariablesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Process environment variables.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.EnvironmentVariable env_variables = 8; + */ + public com.google.cloud.securitycenter.v1.EnvironmentVariable.Builder getEnvVariablesBuilder( + int index) { + return getEnvVariablesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Process environment variables.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.EnvironmentVariable env_variables = 8; + */ + public com.google.cloud.securitycenter.v1.EnvironmentVariableOrBuilder getEnvVariablesOrBuilder( + int index) { + if (envVariablesBuilder_ == null) { + return envVariables_.get(index); + } else { + return envVariablesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Process environment variables.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.EnvironmentVariable env_variables = 8; + */ + public java.util.List + getEnvVariablesOrBuilderList() { + if (envVariablesBuilder_ != null) { + return envVariablesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(envVariables_); + } + } + /** + * + * + *
+     * Process environment variables.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.EnvironmentVariable env_variables = 8; + */ + public com.google.cloud.securitycenter.v1.EnvironmentVariable.Builder addEnvVariablesBuilder() { + return getEnvVariablesFieldBuilder() + .addBuilder(com.google.cloud.securitycenter.v1.EnvironmentVariable.getDefaultInstance()); + } + /** + * + * + *
+     * Process environment variables.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.EnvironmentVariable env_variables = 8; + */ + public com.google.cloud.securitycenter.v1.EnvironmentVariable.Builder addEnvVariablesBuilder( + int index) { + return getEnvVariablesFieldBuilder() + .addBuilder( + index, com.google.cloud.securitycenter.v1.EnvironmentVariable.getDefaultInstance()); + } + /** + * + * + *
+     * Process environment variables.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.EnvironmentVariable env_variables = 8; + */ + public java.util.List + getEnvVariablesBuilderList() { + return getEnvVariablesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v1.EnvironmentVariable, + com.google.cloud.securitycenter.v1.EnvironmentVariable.Builder, + com.google.cloud.securitycenter.v1.EnvironmentVariableOrBuilder> + getEnvVariablesFieldBuilder() { + if (envVariablesBuilder_ == null) { + envVariablesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v1.EnvironmentVariable, + com.google.cloud.securitycenter.v1.EnvironmentVariable.Builder, + com.google.cloud.securitycenter.v1.EnvironmentVariableOrBuilder>( + envVariables_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + envVariables_ = null; + } + return envVariablesBuilder_; + } + + private boolean envVariablesTruncated_; + /** + * + * + *
+     * True if `env_variables` is incomplete.
+     * 
+ * + * bool env_variables_truncated = 9; + * + * @return The envVariablesTruncated. + */ + @java.lang.Override + public boolean getEnvVariablesTruncated() { + return envVariablesTruncated_; + } + /** + * + * + *
+     * True if `env_variables` is incomplete.
+     * 
+ * + * bool env_variables_truncated = 9; + * + * @param value The envVariablesTruncated to set. + * @return This builder for chaining. + */ + public Builder setEnvVariablesTruncated(boolean value) { + + envVariablesTruncated_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * True if `env_variables` is incomplete.
+     * 
+ * + * bool env_variables_truncated = 9; + * + * @return This builder for chaining. + */ + public Builder clearEnvVariablesTruncated() { + + envVariablesTruncated_ = false; + onChanged(); + return this; + } + + private long pid_; + /** + * + * + *
+     * The process id.
+     * 
+ * + * int64 pid = 10; + * + * @return The pid. + */ + @java.lang.Override + public long getPid() { + return pid_; + } + /** + * + * + *
+     * The process id.
+     * 
+ * + * int64 pid = 10; + * + * @param value The pid to set. + * @return This builder for chaining. + */ + public Builder setPid(long value) { + + pid_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The process id.
+     * 
+ * + * int64 pid = 10; + * + * @return This builder for chaining. + */ + public Builder clearPid() { + + pid_ = 0L; + onChanged(); + return this; + } + + private long parentPid_; + /** + * + * + *
+     * The parent process id.
+     * 
+ * + * int64 parent_pid = 11; + * + * @return The parentPid. + */ + @java.lang.Override + public long getParentPid() { + return parentPid_; + } + /** + * + * + *
+     * The parent process id.
+     * 
+ * + * int64 parent_pid = 11; + * + * @param value The parentPid to set. + * @return This builder for chaining. + */ + public Builder setParentPid(long value) { + + parentPid_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The parent process id.
+     * 
+ * + * int64 parent_pid = 11; + * + * @return This builder for chaining. + */ + public Builder clearParentPid() { + + parentPid_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Process) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Process) + private static final com.google.cloud.securitycenter.v1.Process DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Process(); + } + + public static com.google.cloud.securitycenter.v1.Process getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Process parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Process(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.Process getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ProcessOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ProcessOrBuilder.java new file mode 100644 index 000000000000..00904a14fd2a --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ProcessOrBuilder.java @@ -0,0 +1,312 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/process.proto + +package com.google.cloud.securitycenter.v1; + +public interface ProcessOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Process) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * File information for the process executable.
+   * 
+ * + * .google.cloud.securitycenter.v1.File binary = 3; + * + * @return Whether the binary field is set. + */ + boolean hasBinary(); + /** + * + * + *
+   * File information for the process executable.
+   * 
+ * + * .google.cloud.securitycenter.v1.File binary = 3; + * + * @return The binary. + */ + com.google.cloud.securitycenter.v1.File getBinary(); + /** + * + * + *
+   * File information for the process executable.
+   * 
+ * + * .google.cloud.securitycenter.v1.File binary = 3; + */ + com.google.cloud.securitycenter.v1.FileOrBuilder getBinaryOrBuilder(); + + /** + * + * + *
+   * File information for libraries loaded by the process.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.File libraries = 4; + */ + java.util.List getLibrariesList(); + /** + * + * + *
+   * File information for libraries loaded by the process.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.File libraries = 4; + */ + com.google.cloud.securitycenter.v1.File getLibraries(int index); + /** + * + * + *
+   * File information for libraries loaded by the process.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.File libraries = 4; + */ + int getLibrariesCount(); + /** + * + * + *
+   * File information for libraries loaded by the process.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.File libraries = 4; + */ + java.util.List + getLibrariesOrBuilderList(); + /** + * + * + *
+   * File information for libraries loaded by the process.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.File libraries = 4; + */ + com.google.cloud.securitycenter.v1.FileOrBuilder getLibrariesOrBuilder(int index); + + /** + * + * + *
+   * When the process represents the invocation of a script,
+   * `binary` provides information about the interpreter while `script`
+   * provides information about the script file provided to the
+   * interpreter.
+   * 
+ * + * .google.cloud.securitycenter.v1.File script = 5; + * + * @return Whether the script field is set. + */ + boolean hasScript(); + /** + * + * + *
+   * When the process represents the invocation of a script,
+   * `binary` provides information about the interpreter while `script`
+   * provides information about the script file provided to the
+   * interpreter.
+   * 
+ * + * .google.cloud.securitycenter.v1.File script = 5; + * + * @return The script. + */ + com.google.cloud.securitycenter.v1.File getScript(); + /** + * + * + *
+   * When the process represents the invocation of a script,
+   * `binary` provides information about the interpreter while `script`
+   * provides information about the script file provided to the
+   * interpreter.
+   * 
+ * + * .google.cloud.securitycenter.v1.File script = 5; + */ + com.google.cloud.securitycenter.v1.FileOrBuilder getScriptOrBuilder(); + + /** + * + * + *
+   * Process arguments as JSON encoded strings.
+   * 
+ * + * repeated string args = 6; + * + * @return A list containing the args. + */ + java.util.List getArgsList(); + /** + * + * + *
+   * Process arguments as JSON encoded strings.
+   * 
+ * + * repeated string args = 6; + * + * @return The count of args. + */ + int getArgsCount(); + /** + * + * + *
+   * Process arguments as JSON encoded strings.
+   * 
+ * + * repeated string args = 6; + * + * @param index The index of the element to return. + * @return The args at the given index. + */ + java.lang.String getArgs(int index); + /** + * + * + *
+   * Process arguments as JSON encoded strings.
+   * 
+ * + * repeated string args = 6; + * + * @param index The index of the value to return. + * @return The bytes of the args at the given index. + */ + com.google.protobuf.ByteString getArgsBytes(int index); + + /** + * + * + *
+   * True if `args` is incomplete.
+   * 
+ * + * bool arguments_truncated = 7; + * + * @return The argumentsTruncated. + */ + boolean getArgumentsTruncated(); + + /** + * + * + *
+   * Process environment variables.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.EnvironmentVariable env_variables = 8; + */ + java.util.List getEnvVariablesList(); + /** + * + * + *
+   * Process environment variables.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.EnvironmentVariable env_variables = 8; + */ + com.google.cloud.securitycenter.v1.EnvironmentVariable getEnvVariables(int index); + /** + * + * + *
+   * Process environment variables.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.EnvironmentVariable env_variables = 8; + */ + int getEnvVariablesCount(); + /** + * + * + *
+   * Process environment variables.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.EnvironmentVariable env_variables = 8; + */ + java.util.List + getEnvVariablesOrBuilderList(); + /** + * + * + *
+   * Process environment variables.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.EnvironmentVariable env_variables = 8; + */ + com.google.cloud.securitycenter.v1.EnvironmentVariableOrBuilder getEnvVariablesOrBuilder( + int index); + + /** + * + * + *
+   * True if `env_variables` is incomplete.
+   * 
+ * + * bool env_variables_truncated = 9; + * + * @return The envVariablesTruncated. + */ + boolean getEnvVariablesTruncated(); + + /** + * + * + *
+   * The process id.
+   * 
+ * + * int64 pid = 10; + * + * @return The pid. + */ + long getPid(); + + /** + * + * + *
+   * The parent process id.
+   * 
+ * + * int64 parent_pid = 11; + * + * @return The parentPid. + */ + long getParentPid(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ProcessProto.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ProcessProto.java new file mode 100644 index 000000000000..342b225b8bef --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ProcessProto.java @@ -0,0 +1,102 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/process.proto + +package com.google.cloud.securitycenter.v1; + +public final class ProcessProto { + private ProcessProto() {} + + 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_Process_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v1_Process_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v1_EnvironmentVariable_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v1_EnvironmentVariable_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/process" + + ".proto\022\036google.cloud.securitycenter.v1\032)" + + "google/cloud/securitycenter/v1/file.prot" + + "o\"\347\002\n\007Process\0224\n\006binary\030\003 \001(\0132$.google.c" + + "loud.securitycenter.v1.File\0227\n\tlibraries" + + "\030\004 \003(\0132$.google.cloud.securitycenter.v1." + + "File\0224\n\006script\030\005 \001(\0132$.google.cloud.secu" + + "ritycenter.v1.File\022\014\n\004args\030\006 \003(\t\022\033\n\023argu" + + "ments_truncated\030\007 \001(\010\022J\n\renv_variables\030\010" + + " \003(\01323.google.cloud.securitycenter.v1.En" + + "vironmentVariable\022\037\n\027env_variables_trunc" + + "ated\030\t \001(\010\022\013\n\003pid\030\n \001(\003\022\022\n\nparent_pid\030\013 " + + "\001(\003\"0\n\023EnvironmentVariable\022\014\n\004name\030\001 \001(\t" + + "\022\013\n\003val\030\002 \001(\tB\350\001\n\"com.google.cloud.secur" + + "itycenter.v1B\014ProcessProtoP\001ZLgoogle.gol" + + "ang.org/genproto/googleapis/cloud/securi" + + "tycenter/v1;securitycenter\252\002\036Google.Clou" + + "d.SecurityCenter.V1\312\002\036Google\\Cloud\\Secur" + + "ityCenter\\V1\352\002!Google::Cloud::SecurityCe" + + "nter::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.cloud.securitycenter.v1.FileProto.getDescriptor(), + }); + internal_static_google_cloud_securitycenter_v1_Process_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_securitycenter_v1_Process_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v1_Process_descriptor, + new java.lang.String[] { + "Binary", + "Libraries", + "Script", + "Args", + "ArgumentsTruncated", + "EnvVariables", + "EnvVariablesTruncated", + "Pid", + "ParentPid", + }); + internal_static_google_cloud_securitycenter_v1_EnvironmentVariable_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_securitycenter_v1_EnvironmentVariable_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v1_EnvironmentVariable_descriptor, + new java.lang.String[] { + "Name", "Val", + }); + com.google.cloud.securitycenter.v1.FileProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/compliance.proto b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/compliance.proto new file mode 100644 index 000000000000..ca1353b69d0c --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/compliance.proto @@ -0,0 +1,39 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.securitycenter.v1; + +option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter"; +option java_multiple_files = true; +option java_outer_classname = "ComplianceProto"; +option java_package = "com.google.cloud.securitycenter.v1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1"; + +// Contains compliance information about a security standard indicating unmet +// recommendations. +message Compliance { + // Refers to industry wide standards or benchmarks e.g. "cis", "pci", "owasp", + // etc. + string standard = 1; + + // Version of the standard/benchmark e.g. 1.1 + string version = 2; + + // Policies within the standard/benchmark e.g. A.12.4.1 + repeated string ids = 3; +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/exfiltration.proto b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/exfiltration.proto new file mode 100644 index 000000000000..14e644f66020 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/exfiltration.proto @@ -0,0 +1,52 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.securitycenter.v1; + +option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter"; +option java_multiple_files = true; +option java_outer_classname = "ExfiltrationProto"; +option java_package = "com.google.cloud.securitycenter.v1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1"; + +// Exfiltration represents a data exfiltration attempt of one or more +// sources to one or more targets. Sources represent the source +// of data that is exfiltrated, and Targets represents the destination the +// data was copied to. +message Exfiltration { + // If there are multiple sources, then the data is considered "joined" between + // them. For instance, BigQuery can join multiple tables, and each + // table would be considered a source. + repeated ExfilResource sources = 1; + + // If there are multiple targets, each target would get a complete copy of the + // "joined" source data. + repeated ExfilResource targets = 2; +} + +// Resource that has been exfiltrated or exfiltrated_to. +message ExfilResource { + // Resource's URI (https://google.aip.dev/122#full-resource-names) + string name = 1; + + // Subcomponents of the asset that is exfiltrated - these could be + // URIs used during exfiltration, table names, databases, filenames, etc. + // For example, multiple tables may be exfiltrated from the same CloudSQL + // instance, or multiple files from the same Cloud Storage bucket. + repeated string components = 2; +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/file.proto b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/file.proto new file mode 100644 index 000000000000..97ba1d0bde35 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/file.proto @@ -0,0 +1,52 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.securitycenter.v1; + +option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter"; +option java_multiple_files = true; +option java_outer_classname = "FileProto"; +option java_package = "com.google.cloud.securitycenter.v1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1"; + +// File information about the related binary/library used by an executable, or +// the script used by a script interpreter +message File { + // Absolute path of the file as a JSON encoded string. + string path = 1; + + // Size of the file in bytes. + int64 size = 2; + + // SHA256 hash of the first hashed_size bytes of the file encoded as a + // hex string. If hashed_size == size, hash_sha256 represents the SHA256 hash + // of the entire file. + string sha256 = 3; + + // The length in bytes of the file prefix that was hashed. If + // hashed_size == size, any hashes reported represent the entire + // file. + int64 hashed_size = 4; + + // True when the hash covers only a prefix of the file. + bool partially_hashed = 5; + + // Prefix of the file contents as a JSON encoded string. + // (Currently only populated for Malicious Script Executed findings.) + string contents = 6; +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/finding.proto b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/finding.proto index 20d920d249b1..e43a90c285ed 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/finding.proto +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/finding.proto @@ -19,11 +19,14 @@ package google.cloud.securitycenter.v1; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/securitycenter/v1/access.proto"; +import "google/cloud/securitycenter/v1/compliance.proto"; import "google/cloud/securitycenter/v1/connection.proto"; +import "google/cloud/securitycenter/v1/exfiltration.proto"; import "google/cloud/securitycenter/v1/external_system.proto"; import "google/cloud/securitycenter/v1/iam_binding.proto"; import "google/cloud/securitycenter/v1/indicator.proto"; import "google/cloud/securitycenter/v1/mitre_attack.proto"; +import "google/cloud/securitycenter/v1/process.proto"; import "google/cloud/securitycenter/v1/security_marks.proto"; import "google/cloud/securitycenter/v1/vulnerability.proto"; import "google/protobuf/struct.proto"; @@ -251,11 +254,13 @@ message Finding { Vulnerability vulnerability = 20; // Output only. The most recent time this finding was muted or unmuted. - google.protobuf.Timestamp mute_update_time = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp mute_update_time = 21 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Third party SIEM/SOAR fields within SCC, contains external system - // information and external system finding fields. - map external_systems = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Third party SIEM/SOAR fields within SCC, contains external + // system information and external system finding fields. + map external_systems = 22 + [(google.api.field_behavior) = OUTPUT_ONLY]; // MITRE ATT&CK tactics and techniques related to this finding. // See: https://attack.mitre.org @@ -274,9 +279,19 @@ message Finding { // shouldn't set the value of mute. string mute_initiator = 28; + // Represents operating system processes associated with the Finding. + repeated Process processes = 30; + + // Contains compliance information for security standards associated to the + // finding. + repeated Compliance compliances = 34; + // Contains more detail about the finding. string description = 37; + // Represents exfiltration associated with the Finding. + Exfiltration exfiltration = 38; + // Represents IAM bindings associated with the Finding. repeated IamBinding iam_bindings = 39; diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/mitre_attack.proto b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/mitre_attack.proto index bb315d5f2da0..c65f62f17ef2 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/mitre_attack.proto +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/mitre_attack.proto @@ -78,7 +78,6 @@ message MitreAttack { // MITRE ATT&CK techniques that can be referenced by SCC findings. // See: https://attack.mitre.org/techniques/enterprise/ - // Next ID: 31 enum Technique { // Unspecified value. TECHNIQUE_UNSPECIFIED = 0; @@ -172,6 +171,9 @@ message MitreAttack { // T1484 DOMAIN_POLICY_MODIFICATION = 30; + + // T1562 + IMPAIR_DEFENSES = 31; } // The MITRE ATT&CK tactic most closely represented by this finding, if any. diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/process.proto b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/process.proto new file mode 100644 index 000000000000..185f0467fe0b --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/process.proto @@ -0,0 +1,70 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.securitycenter.v1; + +import "google/cloud/securitycenter/v1/file.proto"; + +option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter"; +option java_multiple_files = true; +option java_outer_classname = "ProcessProto"; +option java_package = "com.google.cloud.securitycenter.v1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1"; + +// Represents an operating system process. +message Process { + // File information for the process executable. + File binary = 3; + + // File information for libraries loaded by the process. + repeated File libraries = 4; + + // When the process represents the invocation of a script, + // `binary` provides information about the interpreter while `script` + // provides information about the script file provided to the + // interpreter. + File script = 5; + + // Process arguments as JSON encoded strings. + repeated string args = 6; + + // True if `args` is incomplete. + bool arguments_truncated = 7; + + // Process environment variables. + repeated EnvironmentVariable env_variables = 8; + + // True if `env_variables` is incomplete. + bool env_variables_truncated = 9; + + // The process id. + int64 pid = 10; + + // The parent process id. + int64 parent_pid = 11; +} + +// EnvironmentVariable is a name-value pair to store environment variables for +// Process. +message EnvironmentVariable { + // Environment variable name as a JSON encoded string. + string name = 1; + + // Environment variable value as a JSON encoded string. + string val = 2; +}