Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+ * SecurityHealthAnalyticsSettingsName parent =
+ * SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]");
+ * SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule =
+ * SecurityHealthAnalyticsCustomModule.newBuilder().build();
+ * SecurityHealthAnalyticsCustomModule response =
+ * securityCenterClient.createSecurityHealthAnalyticsCustomModule(
+ * parent, securityHealthAnalyticsCustomModule);
+ * }
+ * }
+ *
+ * @param parent Required. Resource name of the new custom module's parent. Its format is
+ * "organizations/{organization}/securityHealthAnalyticsSettings",
+ * "folders/{folder}/securityHealthAnalyticsSettings", or
+ * "projects/{project}/securityHealthAnalyticsSettings"
+ * @param securityHealthAnalyticsCustomModule Required. SecurityHealthAnalytics custom module to
+ * create. The provided name is ignored and reset with provided parent information and
+ * server-generated ID.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SecurityHealthAnalyticsCustomModule createSecurityHealthAnalyticsCustomModule(
+ SecurityHealthAnalyticsSettingsName parent,
+ SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule) {
+ CreateSecurityHealthAnalyticsCustomModuleRequest request =
+ CreateSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setSecurityHealthAnalyticsCustomModule(securityHealthAnalyticsCustomModule)
+ .build();
+ return createSecurityHealthAnalyticsCustomModule(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the given CRM parent,
+ * and also creates inherited SecurityHealthAnalyticsCustomModules for all CRM descendants of the
+ * given parent. These modules are enabled by default.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+ * String parent =
+ * SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]").toString();
+ * SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule =
+ * SecurityHealthAnalyticsCustomModule.newBuilder().build();
+ * SecurityHealthAnalyticsCustomModule response =
+ * securityCenterClient.createSecurityHealthAnalyticsCustomModule(
+ * parent, securityHealthAnalyticsCustomModule);
+ * }
+ * }
+ *
+ * @param parent Required. Resource name of the new custom module's parent. Its format is
+ * "organizations/{organization}/securityHealthAnalyticsSettings",
+ * "folders/{folder}/securityHealthAnalyticsSettings", or
+ * "projects/{project}/securityHealthAnalyticsSettings"
+ * @param securityHealthAnalyticsCustomModule Required. SecurityHealthAnalytics custom module to
+ * create. The provided name is ignored and reset with provided parent information and
+ * server-generated ID.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SecurityHealthAnalyticsCustomModule createSecurityHealthAnalyticsCustomModule(
+ String parent, SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule) {
+ CreateSecurityHealthAnalyticsCustomModuleRequest request =
+ CreateSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
+ .setParent(parent)
+ .setSecurityHealthAnalyticsCustomModule(securityHealthAnalyticsCustomModule)
+ .build();
+ return createSecurityHealthAnalyticsCustomModule(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the given CRM parent,
+ * and also creates inherited SecurityHealthAnalyticsCustomModules for all CRM descendants of the
+ * given parent. These modules are enabled by default.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+ * CreateSecurityHealthAnalyticsCustomModuleRequest request =
+ * CreateSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
+ * .setParent(
+ * SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]")
+ * .toString())
+ * .setSecurityHealthAnalyticsCustomModule(
+ * SecurityHealthAnalyticsCustomModule.newBuilder().build())
+ * .build();
+ * SecurityHealthAnalyticsCustomModule response =
+ * securityCenterClient.createSecurityHealthAnalyticsCustomModule(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SecurityHealthAnalyticsCustomModule createSecurityHealthAnalyticsCustomModule(
+ CreateSecurityHealthAnalyticsCustomModuleRequest request) {
+ return createSecurityHealthAnalyticsCustomModuleCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the given CRM parent,
+ * and also creates inherited SecurityHealthAnalyticsCustomModules for all CRM descendants of the
+ * given parent. These modules are enabled by default.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+ * CreateSecurityHealthAnalyticsCustomModuleRequest request =
+ * CreateSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
+ * .setParent(
+ * SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]")
+ * .toString())
+ * .setSecurityHealthAnalyticsCustomModule(
+ * SecurityHealthAnalyticsCustomModule.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * securityCenterClient
+ * .createSecurityHealthAnalyticsCustomModuleCallable()
+ * .futureCall(request);
+ * // Do something.
+ * SecurityHealthAnalyticsCustomModule response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ CreateSecurityHealthAnalyticsCustomModuleRequest, SecurityHealthAnalyticsCustomModule>
+ createSecurityHealthAnalyticsCustomModuleCallable() {
+ return stub.createSecurityHealthAnalyticsCustomModuleCallable();
+ }
+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a source.
@@ -1597,6 +1764,144 @@ public final void deleteNotificationConfig(DeleteNotificationConfigRequest reque
return stub.deleteNotificationConfigCallable();
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes the specified SecurityHealthAnalyticsCustomModule and all of its descendants in the CRM
+ * hierarchy. This method is only supported for resident custom modules.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+ * SecurityHealthAnalyticsCustomModuleName name =
+ * SecurityHealthAnalyticsCustomModuleName.ofOrganizationCustomModuleName(
+ * "[ORGANIZATION]", "[CUSTOM_MODULE]");
+ * securityCenterClient.deleteSecurityHealthAnalyticsCustomModule(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the custom module to delete. Its format is
+ * "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}",
+ * "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", or
+ * "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}"
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteSecurityHealthAnalyticsCustomModule(
+ SecurityHealthAnalyticsCustomModuleName name) {
+ DeleteSecurityHealthAnalyticsCustomModuleRequest request =
+ DeleteSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ deleteSecurityHealthAnalyticsCustomModule(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes the specified SecurityHealthAnalyticsCustomModule and all of its descendants in the CRM
+ * hierarchy. This method is only supported for resident custom modules.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+ * String name =
+ * SecurityHealthAnalyticsCustomModuleName.ofOrganizationCustomModuleName(
+ * "[ORGANIZATION]", "[CUSTOM_MODULE]")
+ * .toString();
+ * securityCenterClient.deleteSecurityHealthAnalyticsCustomModule(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the custom module to delete. Its format is
+ * "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}",
+ * "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", or
+ * "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}"
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteSecurityHealthAnalyticsCustomModule(String name) {
+ DeleteSecurityHealthAnalyticsCustomModuleRequest request =
+ DeleteSecurityHealthAnalyticsCustomModuleRequest.newBuilder().setName(name).build();
+ deleteSecurityHealthAnalyticsCustomModule(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes the specified SecurityHealthAnalyticsCustomModule and all of its descendants in the CRM
+ * hierarchy. This method is only supported for resident custom modules.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+ * DeleteSecurityHealthAnalyticsCustomModuleRequest request =
+ * DeleteSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
+ * .setName(
+ * SecurityHealthAnalyticsCustomModuleName.ofOrganizationCustomModuleName(
+ * "[ORGANIZATION]", "[CUSTOM_MODULE]")
+ * .toString())
+ * .build();
+ * securityCenterClient.deleteSecurityHealthAnalyticsCustomModule(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteSecurityHealthAnalyticsCustomModule(
+ DeleteSecurityHealthAnalyticsCustomModuleRequest request) {
+ deleteSecurityHealthAnalyticsCustomModuleCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes the specified SecurityHealthAnalyticsCustomModule and all of its descendants in the CRM
+ * hierarchy. This method is only supported for resident custom modules.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+ * DeleteSecurityHealthAnalyticsCustomModuleRequest request =
+ * DeleteSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
+ * .setName(
+ * SecurityHealthAnalyticsCustomModuleName.ofOrganizationCustomModuleName(
+ * "[ORGANIZATION]", "[CUSTOM_MODULE]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * securityCenterClient
+ * .deleteSecurityHealthAnalyticsCustomModuleCallable()
+ * .futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: * @@ -2214,24 +2519,34 @@ public final OrganizationSettings getOrganizationSettings( * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { - * SourceName name = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); - * Source response = securityCenterClient.getSource(name); + * EffectiveSecurityHealthAnalyticsCustomModuleName name = + * EffectiveSecurityHealthAnalyticsCustomModuleName.ofOrganizationEffectiveCustomModuleName( + * "[ORGANIZATION]", "[EFFECTIVE_CUSTOM_MODULE]"); + * EffectiveSecurityHealthAnalyticsCustomModule response = + * securityCenterClient.getEffectiveSecurityHealthAnalyticsCustomModule(name); * } * } * - * @param name Required. Relative resource name of the source. Its format is - * "organizations/[organization_id]/source/[source_id]". + * @param name Required. Name of the effective custom module to get. Its format is + * "organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}", + * "folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}", + * or + * "projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}" * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Source getSource(SourceName name) { - GetSourceRequest request = - GetSourceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getSource(request); + public final EffectiveSecurityHealthAnalyticsCustomModule + getEffectiveSecurityHealthAnalyticsCustomModule( + EffectiveSecurityHealthAnalyticsCustomModuleName name) { + GetEffectiveSecurityHealthAnalyticsCustomModuleRequest request = + GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getEffectiveSecurityHealthAnalyticsCustomModule(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets a source. + * Retrieves an EffectiveSecurityHealthAnalyticsCustomModule. * *
Sample code: * @@ -2242,23 +2557,32 @@ public final Source getSource(SourceName name) { * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { - * String name = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString(); - * Source response = securityCenterClient.getSource(name); + * String name = + * EffectiveSecurityHealthAnalyticsCustomModuleName.ofOrganizationEffectiveCustomModuleName( + * "[ORGANIZATION]", "[EFFECTIVE_CUSTOM_MODULE]") + * .toString(); + * EffectiveSecurityHealthAnalyticsCustomModule response = + * securityCenterClient.getEffectiveSecurityHealthAnalyticsCustomModule(name); * } * } * - * @param name Required. Relative resource name of the source. Its format is - * "organizations/[organization_id]/source/[source_id]". + * @param name Required. Name of the effective custom module to get. Its format is + * "organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}", + * "folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}", + * or + * "projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}" * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Source getSource(String name) { - GetSourceRequest request = GetSourceRequest.newBuilder().setName(name).build(); - return getSource(request); + public final EffectiveSecurityHealthAnalyticsCustomModule + getEffectiveSecurityHealthAnalyticsCustomModule(String name) { + GetEffectiveSecurityHealthAnalyticsCustomModuleRequest request = + GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.newBuilder().setName(name).build(); + return getEffectiveSecurityHealthAnalyticsCustomModule(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets a source. + * Retrieves an EffectiveSecurityHealthAnalyticsCustomModule. * *
Sample code: * @@ -2269,24 +2593,31 @@ public final Source getSource(String name) { * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { - * GetSourceRequest request = - * GetSourceRequest.newBuilder() - * .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) + * GetEffectiveSecurityHealthAnalyticsCustomModuleRequest request = + * GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.newBuilder() + * .setName( + * EffectiveSecurityHealthAnalyticsCustomModuleName + * .ofOrganizationEffectiveCustomModuleName( + * "[ORGANIZATION]", "[EFFECTIVE_CUSTOM_MODULE]") + * .toString()) * .build(); - * Source response = securityCenterClient.getSource(request); + * EffectiveSecurityHealthAnalyticsCustomModule response = + * securityCenterClient.getEffectiveSecurityHealthAnalyticsCustomModule(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Source getSource(GetSourceRequest request) { - return getSourceCallable().call(request); + public final EffectiveSecurityHealthAnalyticsCustomModule + getEffectiveSecurityHealthAnalyticsCustomModule( + GetEffectiveSecurityHealthAnalyticsCustomModuleRequest request) { + return getEffectiveSecurityHealthAnalyticsCustomModuleCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets a source. + * Retrieves an EffectiveSecurityHealthAnalyticsCustomModule. * *
Sample code:
*
@@ -2297,23 +2628,33 @@ public final Source getSource(GetSourceRequest request) {
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
- * GetSourceRequest request =
- * GetSourceRequest.newBuilder()
- * .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
+ * GetEffectiveSecurityHealthAnalyticsCustomModuleRequest request =
+ * GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
+ * .setName(
+ * EffectiveSecurityHealthAnalyticsCustomModuleName
+ * .ofOrganizationEffectiveCustomModuleName(
+ * "[ORGANIZATION]", "[EFFECTIVE_CUSTOM_MODULE]")
+ * .toString())
* .build();
- * ApiFuture Sample code:
*
@@ -2324,32 +2665,32 @@ public final UnaryCallable Sample code:
*
@@ -2360,27 +2701,274 @@ public final GroupAssetsPagedResponse groupAssets(GroupAssetsRequest request) {
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
- * GroupAssetsRequest request =
- * GroupAssetsRequest.newBuilder()
- * .setParent(OrganizationName.of("[ORGANIZATION]").toString())
- * .setFilter("filter-1274492040")
- * .setGroupBy("groupBy293428022")
- * .setCompareDuration(Duration.newBuilder().build())
- * .setReadTime(Timestamp.newBuilder().build())
- * .setPageToken("pageToken873572522")
- * .setPageSize(883849137)
- * .build();
- * ApiFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * To list across all sources provide a `-` as the source id. Example:
- * /v1/organizations/{organization_id}/sources/-/findings
+ * Returns a list of all resident SecurityHealthAnalyticsCustomModules under the given CRM parent
+ * and all of the parent’s CRM descendants.
*
* Sample code:
*
@@ -2803,38 +3389,37 @@ public final UnaryCallable To list across all sources provide a `-` as the source id. Example:
- * /v1/organizations/{organization_id}/sources/-/findings
+ * Returns a list of all resident SecurityHealthAnalyticsCustomModules under the given CRM parent
+ * and all of the parent’s CRM descendants.
*
* Sample code:
*
@@ -2845,9 +3430,221 @@ public final ListFindingsPagedResponse listFindings(ListFindingsRequest request)
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
- * ListFindingsRequest request =
- * ListFindingsRequest.newBuilder()
- * .setParent(
+ * String parent =
+ * SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]").toString();
+ * for (SecurityHealthAnalyticsCustomModule element :
+ * securityCenterClient
+ * .listDescendantSecurityHealthAnalyticsCustomModules(parent)
+ * .iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Name of parent to list descendant custom modules. Its format is
+ * "organizations/{organization}/securityHealthAnalyticsSettings",
+ * "folders/{folder}/securityHealthAnalyticsSettings", or
+ * "projects/{project}/securityHealthAnalyticsSettings"
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListDescendantSecurityHealthAnalyticsCustomModulesPagedResponse
+ listDescendantSecurityHealthAnalyticsCustomModules(String parent) {
+ ListDescendantSecurityHealthAnalyticsCustomModulesRequest request =
+ ListDescendantSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
+ .setParent(parent)
+ .build();
+ return listDescendantSecurityHealthAnalyticsCustomModules(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns a list of all resident SecurityHealthAnalyticsCustomModules under the given CRM parent
+ * and all of the parent’s CRM descendants.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * To list across all sources provide a `-` as the source id. Example:
+ * /v1/organizations/{organization_id}/sources/-/findings
+ *
+ * Sample code:
+ *
+ * To list across all sources provide a `-` as the source id. Example:
+ * /v1/organizations/{organization_id}/sources/-/findings
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
*
@@ -3231,30 +4417,35 @@ public final ListNotificationConfigsPagedResponse listNotificationConfigs(
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
- * ProjectName parent = ProjectName.of("[PROJECT]");
- * for (NotificationConfig element :
- * securityCenterClient.listNotificationConfigs(parent).iterateAll()) {
+ * SecurityHealthAnalyticsSettingsName parent =
+ * SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]");
+ * for (SecurityHealthAnalyticsCustomModule element :
+ * securityCenterClient.listSecurityHealthAnalyticsCustomModules(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* } Sample code:
*
@@ -3265,28 +4456,33 @@ public final ListNotificationConfigsPagedResponse listNotificationConfigs(Projec
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
- * String parent = OrganizationName.of("[ORGANIZATION]").toString();
- * for (NotificationConfig element :
- * securityCenterClient.listNotificationConfigs(parent).iterateAll()) {
+ * String parent =
+ * SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]").toString();
+ * for (SecurityHealthAnalyticsCustomModule element :
+ * securityCenterClient.listSecurityHealthAnalyticsCustomModules(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
- * @param parent Required. The name of the parent in which to list the notification
- * configurations. Its format is "organizations/[organization_id]", "folders/[folder_id]", or
- * "projects/[project_id]".
+ * @param parent Required. Name of parent to list custom modules. Its format is
+ * "organizations/{organization}/securityHealthAnalyticsSettings",
+ * "folders/{folder}/securityHealthAnalyticsSettings", or
+ * "projects/{project}/securityHealthAnalyticsSettings"
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ListNotificationConfigsPagedResponse listNotificationConfigs(String parent) {
- ListNotificationConfigsRequest request =
- ListNotificationConfigsRequest.newBuilder().setParent(parent).build();
- return listNotificationConfigs(request);
+ public final ListSecurityHealthAnalyticsCustomModulesPagedResponse
+ listSecurityHealthAnalyticsCustomModules(String parent) {
+ ListSecurityHealthAnalyticsCustomModulesRequest request =
+ ListSecurityHealthAnalyticsCustomModulesRequest.newBuilder().setParent(parent).build();
+ return listSecurityHealthAnalyticsCustomModules(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Lists notification configs.
+ * Returns a list of all SecurityHealthAnalyticsCustomModules for the given parent. This includes
+ * resident modules defined at the scope of the parent, and inherited modules, inherited from CRM
+ * ancestors.
*
* Sample code:
*
@@ -3297,14 +4493,16 @@ public final ListNotificationConfigsPagedResponse listNotificationConfigs(String
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
- * ListNotificationConfigsRequest request =
- * ListNotificationConfigsRequest.newBuilder()
- * .setParent(OrganizationName.of("[ORGANIZATION]").toString())
- * .setPageToken("pageToken873572522")
+ * ListSecurityHealthAnalyticsCustomModulesRequest request =
+ * ListSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
+ * .setParent(
+ * SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]")
+ * .toString())
* .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
* .build();
- * for (NotificationConfig element :
- * securityCenterClient.listNotificationConfigs(request).iterateAll()) {
+ * for (SecurityHealthAnalyticsCustomModule element :
+ * securityCenterClient.listSecurityHealthAnalyticsCustomModules(request).iterateAll()) {
* // doThingsWith(element);
* }
* }
@@ -3313,14 +4511,17 @@ public final ListNotificationConfigsPagedResponse listNotificationConfigs(String
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ListNotificationConfigsPagedResponse listNotificationConfigs(
- ListNotificationConfigsRequest request) {
- return listNotificationConfigsPagedCallable().call(request);
+ public final ListSecurityHealthAnalyticsCustomModulesPagedResponse
+ listSecurityHealthAnalyticsCustomModules(
+ ListSecurityHealthAnalyticsCustomModulesRequest request) {
+ return listSecurityHealthAnalyticsCustomModulesPagedCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Lists notification configs.
+ * Returns a list of all SecurityHealthAnalyticsCustomModules for the given parent. This includes
+ * resident modules defined at the scope of the parent, and inherited modules, inherited from CRM
+ * ancestors.
*
* Sample code:
*
@@ -3331,29 +4532,37 @@ public final ListNotificationConfigsPagedResponse listNotificationConfigs(
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
- * ListNotificationConfigsRequest request =
- * ListNotificationConfigsRequest.newBuilder()
- * .setParent(OrganizationName.of("[ORGANIZATION]").toString())
- * .setPageToken("pageToken873572522")
+ * ListSecurityHealthAnalyticsCustomModulesRequest request =
+ * ListSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
+ * .setParent(
+ * SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]")
+ * .toString())
* .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
* .build();
- * ApiFuture Sample code:
*
@@ -3364,16 +4573,19 @@ public final ListNotificationConfigsPagedResponse listNotificationConfigs(
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
- * ListNotificationConfigsRequest request =
- * ListNotificationConfigsRequest.newBuilder()
- * .setParent(OrganizationName.of("[ORGANIZATION]").toString())
- * .setPageToken("pageToken873572522")
+ * ListSecurityHealthAnalyticsCustomModulesRequest request =
+ * ListSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
+ * .setParent(
+ * SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]")
+ * .toString())
* .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
* .build();
* while (true) {
- * ListNotificationConfigsResponse response =
- * securityCenterClient.listNotificationConfigsCallable().call(request);
- * for (NotificationConfig element : response.getNotificationConfigsList()) {
+ * ListSecurityHealthAnalyticsCustomModulesResponse response =
+ * securityCenterClient.listSecurityHealthAnalyticsCustomModulesCallable().call(request);
+ * for (SecurityHealthAnalyticsCustomModule element :
+ * response.getSecurityHealthAnalyticsCustomModulesList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
@@ -3386,9 +4598,11 @@ public final ListNotificationConfigsPagedResponse listNotificationConfigs(
* }
* }
*/
- public final UnaryCallable Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
* build() is called, the tree of builders is called to create the complete settings object.
*
- * For example, to set the total timeout of createSource to 30 seconds:
+ * For example, to set the total timeout of createSecurityHealthAnalyticsCustomModule to 30
+ * seconds:
*
* {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+ * GetSecurityHealthAnalyticsCustomModuleRequest request =
+ * GetSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
+ * .setName(
+ * SecurityHealthAnalyticsCustomModuleName.ofOrganizationCustomModuleName(
+ * "[ORGANIZATION]", "[CUSTOM_MODULE]")
+ * .toString())
+ * .build();
+ * SecurityHealthAnalyticsCustomModule response =
+ * securityCenterClient.getSecurityHealthAnalyticsCustomModule(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SecurityHealthAnalyticsCustomModule getSecurityHealthAnalyticsCustomModule(
+ GetSecurityHealthAnalyticsCustomModuleRequest request) {
+ return getSecurityHealthAnalyticsCustomModuleCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a SecurityHealthAnalyticsCustomModule.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+ * GetSecurityHealthAnalyticsCustomModuleRequest request =
+ * GetSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
+ * .setName(
+ * SecurityHealthAnalyticsCustomModuleName.ofOrganizationCustomModuleName(
+ * "[ORGANIZATION]", "[CUSTOM_MODULE]")
+ * .toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable<
+ GetSecurityHealthAnalyticsCustomModuleRequest, SecurityHealthAnalyticsCustomModule>
+ getSecurityHealthAnalyticsCustomModuleCallable() {
+ return stub.getSecurityHealthAnalyticsCustomModuleCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a source.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+ * SourceName name = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]");
+ * Source response = securityCenterClient.getSource(name);
+ * }
+ * }
+ *
+ * @param name Required. Relative resource name of the source. Its format is
+ * "organizations/[organization_id]/source/[source_id]".
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Source getSource(SourceName name) {
+ GetSourceRequest request =
+ GetSourceRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getSource(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a source.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+ * String name = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString();
+ * Source response = securityCenterClient.getSource(name);
+ * }
+ * }
+ *
+ * @param name Required. Relative resource name of the source. Its format is
+ * "organizations/[organization_id]/source/[source_id]".
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Source getSource(String name) {
+ GetSourceRequest request = GetSourceRequest.newBuilder().setName(name).build();
+ return getSource(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a source.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+ * GetSourceRequest request =
+ * GetSourceRequest.newBuilder()
+ * .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
+ * .build();
+ * Source response = securityCenterClient.getSource(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Source getSource(GetSourceRequest request) {
+ return getSourceCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a source.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+ * GetSourceRequest request =
+ * GetSourceRequest.newBuilder()
+ * .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+ * GroupAssetsRequest request =
+ * GroupAssetsRequest.newBuilder()
+ * .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+ * .setFilter("filter-1274492040")
+ * .setGroupBy("groupBy293428022")
+ * .setCompareDuration(Duration.newBuilder().build())
+ * .setReadTime(Timestamp.newBuilder().build())
+ * .setPageToken("pageToken873572522")
+ * .setPageSize(883849137)
+ * .build();
+ * for (GroupResult element : securityCenterClient.groupAssets(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GroupAssetsPagedResponse groupAssets(GroupAssetsRequest request) {
+ return groupAssetsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Filters an organization's assets and groups them by their specified properties.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+ * GroupAssetsRequest request =
+ * GroupAssetsRequest.newBuilder()
+ * .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+ * .setFilter("filter-1274492040")
+ * .setGroupBy("groupBy293428022")
+ * .setCompareDuration(Duration.newBuilder().build())
+ * .setReadTime(Timestamp.newBuilder().build())
+ * .setPageToken("pageToken873572522")
+ * .setPageSize(883849137)
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+ * ListDescendantSecurityHealthAnalyticsCustomModulesRequest request =
+ * ListDescendantSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
+ * .setParent(
+ * SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (SecurityHealthAnalyticsCustomModule element :
+ * securityCenterClient
+ * .listDescendantSecurityHealthAnalyticsCustomModules(request)
+ * .iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListDescendantSecurityHealthAnalyticsCustomModulesPagedResponse
+ listDescendantSecurityHealthAnalyticsCustomModules(
+ ListDescendantSecurityHealthAnalyticsCustomModulesRequest request) {
+ return listDescendantSecurityHealthAnalyticsCustomModulesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns a list of all resident SecurityHealthAnalyticsCustomModules under the given CRM parent
+ * and all of the parent’s CRM descendants.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+ * ListDescendantSecurityHealthAnalyticsCustomModulesRequest request =
+ * ListDescendantSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
+ * .setParent(
+ * SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable<
+ ListDescendantSecurityHealthAnalyticsCustomModulesRequest,
+ ListDescendantSecurityHealthAnalyticsCustomModulesPagedResponse>
+ listDescendantSecurityHealthAnalyticsCustomModulesPagedCallable() {
+ return stub.listDescendantSecurityHealthAnalyticsCustomModulesPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns a list of all resident SecurityHealthAnalyticsCustomModules under the given CRM parent
+ * and all of the parent’s CRM descendants.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+ * ListDescendantSecurityHealthAnalyticsCustomModulesRequest request =
+ * ListDescendantSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
+ * .setParent(
+ * SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListDescendantSecurityHealthAnalyticsCustomModulesResponse response =
+ * securityCenterClient
+ * .listDescendantSecurityHealthAnalyticsCustomModulesCallable()
+ * .call(request);
+ * for (SecurityHealthAnalyticsCustomModule element :
+ * response.getSecurityHealthAnalyticsCustomModulesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ ListDescendantSecurityHealthAnalyticsCustomModulesRequest,
+ ListDescendantSecurityHealthAnalyticsCustomModulesResponse>
+ listDescendantSecurityHealthAnalyticsCustomModulesCallable() {
+ return stub.listDescendantSecurityHealthAnalyticsCustomModulesCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists an organization or source's findings.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+ * ListFindingsRequest request =
+ * ListFindingsRequest.newBuilder()
+ * .setParent(
+ * SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .setReadTime(Timestamp.newBuilder().build())
+ * .setCompareDuration(Duration.newBuilder().build())
+ * .setFieldMask(FieldMask.newBuilder().build())
+ * .setPageToken("pageToken873572522")
+ * .setPageSize(883849137)
+ * .build();
+ * for (ListFindingsResponse.ListFindingsResult element :
+ * securityCenterClient.listFindings(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListFindingsPagedResponse listFindings(ListFindingsRequest request) {
+ return listFindingsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists an organization or source's findings.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+ * ListFindingsRequest request =
+ * ListFindingsRequest.newBuilder()
+ * .setParent(
* SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
* .setFilter("filter-1274492040")
* .setOrderBy("orderBy-1207110587")
@@ -3220,7 +4017,396 @@ public final ListNotificationConfigsPagedResponse listNotificationConfigs(
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Lists notification configs.
+ * Lists notification configs.
+ *
+ *
*
- * @param parent Required. The name of the parent in which to list the notification
- * configurations. Its format is "organizations/[organization_id]", "folders/[folder_id]", or
- * "projects/[project_id]".
+ * @param parent Required. Name of parent to list custom modules. Its format is
+ * "organizations/{organization}/securityHealthAnalyticsSettings",
+ * "folders/{folder}/securityHealthAnalyticsSettings", or
+ * "projects/{project}/securityHealthAnalyticsSettings"
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ListNotificationConfigsPagedResponse listNotificationConfigs(ProjectName parent) {
- ListNotificationConfigsRequest request =
- ListNotificationConfigsRequest.newBuilder()
+ public final ListSecurityHealthAnalyticsCustomModulesPagedResponse
+ listSecurityHealthAnalyticsCustomModules(SecurityHealthAnalyticsSettingsName parent) {
+ ListSecurityHealthAnalyticsCustomModulesRequest request =
+ ListSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.build();
- return listNotificationConfigs(request);
+ return listSecurityHealthAnalyticsCustomModules(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Lists notification configs.
+ * Returns a list of all SecurityHealthAnalyticsCustomModules for the given parent. This includes
+ * resident modules defined at the scope of the parent, and inherited modules, inherited from CRM
+ * ancestors.
*
* {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * for (NotificationConfig element :
+ * securityCenterClient.listNotificationConfigs(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The name of the parent in which to list the notification
+ * configurations. Its format is "organizations/[organization_id]", "folders/[folder_id]", or
+ * "projects/[project_id]".
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListNotificationConfigsPagedResponse listNotificationConfigs(ProjectName parent) {
+ ListNotificationConfigsRequest request =
+ ListNotificationConfigsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listNotificationConfigs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists notification configs.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+ * String parent = OrganizationName.of("[ORGANIZATION]").toString();
+ * for (NotificationConfig element :
+ * securityCenterClient.listNotificationConfigs(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The name of the parent in which to list the notification
+ * configurations. Its format is "organizations/[organization_id]", "folders/[folder_id]", or
+ * "projects/[project_id]".
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListNotificationConfigsPagedResponse listNotificationConfigs(String parent) {
+ ListNotificationConfigsRequest request =
+ ListNotificationConfigsRequest.newBuilder().setParent(parent).build();
+ return listNotificationConfigs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists notification configs.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+ * ListNotificationConfigsRequest request =
+ * ListNotificationConfigsRequest.newBuilder()
+ * .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+ * .setPageToken("pageToken873572522")
+ * .setPageSize(883849137)
+ * .build();
+ * for (NotificationConfig element :
+ * securityCenterClient.listNotificationConfigs(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListNotificationConfigsPagedResponse listNotificationConfigs(
+ ListNotificationConfigsRequest request) {
+ return listNotificationConfigsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists notification configs.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+ * ListNotificationConfigsRequest request =
+ * ListNotificationConfigsRequest.newBuilder()
+ * .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+ * .setPageToken("pageToken873572522")
+ * .setPageSize(883849137)
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+ * ListNotificationConfigsRequest request =
+ * ListNotificationConfigsRequest.newBuilder()
+ * .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+ * .setPageToken("pageToken873572522")
+ * .setPageSize(883849137)
+ * .build();
+ * while (true) {
+ * ListNotificationConfigsResponse response =
+ * securityCenterClient.listNotificationConfigsCallable().call(request);
+ * for (NotificationConfig element : response.getNotificationConfigsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+ * SecurityHealthAnalyticsSettingsName parent =
+ * SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]");
+ * for (EffectiveSecurityHealthAnalyticsCustomModule element :
+ * securityCenterClient
+ * .listEffectiveSecurityHealthAnalyticsCustomModules(parent)
+ * .iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Name of parent to list effective custom modules. Its format is
+ * "organizations/{organization}/securityHealthAnalyticsSettings",
+ * "folders/{folder}/securityHealthAnalyticsSettings", or
+ * "projects/{project}/securityHealthAnalyticsSettings"
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListEffectiveSecurityHealthAnalyticsCustomModulesPagedResponse
+ listEffectiveSecurityHealthAnalyticsCustomModules(
+ SecurityHealthAnalyticsSettingsName parent) {
+ ListEffectiveSecurityHealthAnalyticsCustomModulesRequest request =
+ ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listEffectiveSecurityHealthAnalyticsCustomModules(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the given parent. This
+ * includes resident modules defined at the scope of the parent, and inherited modules, inherited
+ * from CRM ancestors.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+ * String parent =
+ * SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]").toString();
+ * for (EffectiveSecurityHealthAnalyticsCustomModule element :
+ * securityCenterClient
+ * .listEffectiveSecurityHealthAnalyticsCustomModules(parent)
+ * .iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Name of parent to list effective custom modules. Its format is
+ * "organizations/{organization}/securityHealthAnalyticsSettings",
+ * "folders/{folder}/securityHealthAnalyticsSettings", or
+ * "projects/{project}/securityHealthAnalyticsSettings"
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListEffectiveSecurityHealthAnalyticsCustomModulesPagedResponse
+ listEffectiveSecurityHealthAnalyticsCustomModules(String parent) {
+ ListEffectiveSecurityHealthAnalyticsCustomModulesRequest request =
+ ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
+ .setParent(parent)
+ .build();
+ return listEffectiveSecurityHealthAnalyticsCustomModules(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the given parent. This
+ * includes resident modules defined at the scope of the parent, and inherited modules, inherited
+ * from CRM ancestors.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+ * ListEffectiveSecurityHealthAnalyticsCustomModulesRequest request =
+ * ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
+ * .setParent(
+ * SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (EffectiveSecurityHealthAnalyticsCustomModule element :
+ * securityCenterClient
+ * .listEffectiveSecurityHealthAnalyticsCustomModules(request)
+ * .iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListEffectiveSecurityHealthAnalyticsCustomModulesPagedResponse
+ listEffectiveSecurityHealthAnalyticsCustomModules(
+ ListEffectiveSecurityHealthAnalyticsCustomModulesRequest request) {
+ return listEffectiveSecurityHealthAnalyticsCustomModulesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the given parent. This
+ * includes resident modules defined at the scope of the parent, and inherited modules, inherited
+ * from CRM ancestors.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+ * ListEffectiveSecurityHealthAnalyticsCustomModulesRequest request =
+ * ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
+ * .setParent(
+ * SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable<
+ ListEffectiveSecurityHealthAnalyticsCustomModulesRequest,
+ ListEffectiveSecurityHealthAnalyticsCustomModulesPagedResponse>
+ listEffectiveSecurityHealthAnalyticsCustomModulesPagedCallable() {
+ return stub.listEffectiveSecurityHealthAnalyticsCustomModulesPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the given parent. This
+ * includes resident modules defined at the scope of the parent, and inherited modules, inherited
+ * from CRM ancestors.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+ * ListEffectiveSecurityHealthAnalyticsCustomModulesRequest request =
+ * ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
+ * .setParent(
+ * SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListEffectiveSecurityHealthAnalyticsCustomModulesResponse response =
+ * securityCenterClient
+ * .listEffectiveSecurityHealthAnalyticsCustomModulesCallable()
+ * .call(request);
+ * for (EffectiveSecurityHealthAnalyticsCustomModule element :
+ * response.getEffectiveSecurityHealthAnalyticsCustomModulesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ ListEffectiveSecurityHealthAnalyticsCustomModulesRequest,
+ ListEffectiveSecurityHealthAnalyticsCustomModulesResponse>
+ listEffectiveSecurityHealthAnalyticsCustomModulesCallable() {
+ return stub.listEffectiveSecurityHealthAnalyticsCustomModulesCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns a list of all SecurityHealthAnalyticsCustomModules for the given parent. This includes
+ * resident modules defined at the scope of the parent, and inherited modules, inherited from CRM
+ * ancestors.
*
* {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+ * SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule =
+ * SecurityHealthAnalyticsCustomModule.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * SecurityHealthAnalyticsCustomModule response =
+ * securityCenterClient.updateSecurityHealthAnalyticsCustomModule(
+ * securityHealthAnalyticsCustomModule, updateMask);
+ * }
+ * }
+ *
+ * @param securityHealthAnalyticsCustomModule Required. The SecurityHealthAnalytics custom module
+ * to update.
+ * @param updateMask The list of fields to update.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SecurityHealthAnalyticsCustomModule updateSecurityHealthAnalyticsCustomModule(
+ SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule,
+ FieldMask updateMask) {
+ UpdateSecurityHealthAnalyticsCustomModuleRequest request =
+ UpdateSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
+ .setSecurityHealthAnalyticsCustomModule(securityHealthAnalyticsCustomModule)
+ .setUpdateMask(updateMask)
+ .build();
+ return updateSecurityHealthAnalyticsCustomModule(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the SecurityHealthAnalyticsCustomModule under the given name based on the given update
+ * mask. Updating the enablement state is supported on both resident and inherited modules (though
+ * resident modules cannot have an enablement state of “inherited”). Updating the display name and
+ * custom config of a module is supported on resident modules only.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+ * UpdateSecurityHealthAnalyticsCustomModuleRequest request =
+ * UpdateSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
+ * .setSecurityHealthAnalyticsCustomModule(
+ * SecurityHealthAnalyticsCustomModule.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * SecurityHealthAnalyticsCustomModule response =
+ * securityCenterClient.updateSecurityHealthAnalyticsCustomModule(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SecurityHealthAnalyticsCustomModule updateSecurityHealthAnalyticsCustomModule(
+ UpdateSecurityHealthAnalyticsCustomModuleRequest request) {
+ return updateSecurityHealthAnalyticsCustomModuleCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the SecurityHealthAnalyticsCustomModule under the given name based on the given update
+ * mask. Updating the enablement state is supported on both resident and inherited modules (though
+ * resident modules cannot have an enablement state of “inherited”). Updating the display name and
+ * custom config of a module is supported on resident modules only.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+ * UpdateSecurityHealthAnalyticsCustomModuleRequest request =
+ * UpdateSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
+ * .setSecurityHealthAnalyticsCustomModule(
+ * SecurityHealthAnalyticsCustomModule.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable<
+ UpdateSecurityHealthAnalyticsCustomModuleRequest, SecurityHealthAnalyticsCustomModule>
+ updateSecurityHealthAnalyticsCustomModuleCallable() {
+ return stub.updateSecurityHealthAnalyticsCustomModuleCallable();
+ }
+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates a source.
@@ -5945,6 +7272,112 @@ protected ListAssetsFixedSizeCollection createCollection(
}
}
+ public static class ListDescendantSecurityHealthAnalyticsCustomModulesPagedResponse
+ extends AbstractPagedListResponse<
+ ListDescendantSecurityHealthAnalyticsCustomModulesRequest,
+ ListDescendantSecurityHealthAnalyticsCustomModulesResponse,
+ SecurityHealthAnalyticsCustomModule,
+ ListDescendantSecurityHealthAnalyticsCustomModulesPage,
+ ListDescendantSecurityHealthAnalyticsCustomModulesFixedSizeCollection> {
+
+ public static ApiFuture{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
@@ -77,10 +81,10 @@
* SecurityCenterSettings.Builder securityCenterSettingsBuilder =
* SecurityCenterSettings.newBuilder();
* securityCenterSettingsBuilder
- * .createSourceSettings()
+ * .createSecurityHealthAnalyticsCustomModuleSettings()
* .setRetrySettings(
* securityCenterSettingsBuilder
- * .createSourceSettings()
+ * .createSecurityHealthAnalyticsCustomModuleSettings()
* .getRetrySettings()
* .toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
@@ -102,6 +106,17 @@ public UnaryCallSettings
*/
diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/GrpcSecurityCenterStub.java b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/GrpcSecurityCenterStub.java
index cd09071d4c99..8523c509500d 100644
--- a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/GrpcSecurityCenterStub.java
+++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/GrpcSecurityCenterStub.java
@@ -20,9 +20,12 @@
import static com.google.cloud.securitycenter.v1.SecurityCenterClient.GroupFindingsPagedResponse;
import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListAssetsPagedResponse;
import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListBigQueryExportsPagedResponse;
+import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListDescendantSecurityHealthAnalyticsCustomModulesPagedResponse;
+import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListEffectiveSecurityHealthAnalyticsCustomModulesPagedResponse;
import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListFindingsPagedResponse;
import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListMuteConfigsPagedResponse;
import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListNotificationConfigsPagedResponse;
+import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListSecurityHealthAnalyticsCustomModulesPagedResponse;
import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListSourcesPagedResponse;
import com.google.api.gax.core.BackgroundResource;
@@ -39,16 +42,21 @@
import com.google.cloud.securitycenter.v1.CreateFindingRequest;
import com.google.cloud.securitycenter.v1.CreateMuteConfigRequest;
import com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest;
+import com.google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest;
import com.google.cloud.securitycenter.v1.CreateSourceRequest;
import com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest;
import com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest;
import com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest;
+import com.google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest;
+import com.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule;
import com.google.cloud.securitycenter.v1.ExternalSystem;
import com.google.cloud.securitycenter.v1.Finding;
import com.google.cloud.securitycenter.v1.GetBigQueryExportRequest;
+import com.google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest;
import com.google.cloud.securitycenter.v1.GetMuteConfigRequest;
import com.google.cloud.securitycenter.v1.GetNotificationConfigRequest;
import com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest;
+import com.google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest;
import com.google.cloud.securitycenter.v1.GetSourceRequest;
import com.google.cloud.securitycenter.v1.GroupAssetsRequest;
import com.google.cloud.securitycenter.v1.GroupAssetsResponse;
@@ -58,12 +66,18 @@
import com.google.cloud.securitycenter.v1.ListAssetsResponse;
import com.google.cloud.securitycenter.v1.ListBigQueryExportsRequest;
import com.google.cloud.securitycenter.v1.ListBigQueryExportsResponse;
+import com.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest;
+import com.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse;
+import com.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest;
+import com.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse;
import com.google.cloud.securitycenter.v1.ListFindingsRequest;
import com.google.cloud.securitycenter.v1.ListFindingsResponse;
import com.google.cloud.securitycenter.v1.ListMuteConfigsRequest;
import com.google.cloud.securitycenter.v1.ListMuteConfigsResponse;
import com.google.cloud.securitycenter.v1.ListNotificationConfigsRequest;
import com.google.cloud.securitycenter.v1.ListNotificationConfigsResponse;
+import com.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest;
+import com.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse;
import com.google.cloud.securitycenter.v1.ListSourcesRequest;
import com.google.cloud.securitycenter.v1.ListSourcesResponse;
import com.google.cloud.securitycenter.v1.MuteConfig;
@@ -71,6 +85,7 @@
import com.google.cloud.securitycenter.v1.OrganizationSettings;
import com.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest;
import com.google.cloud.securitycenter.v1.RunAssetDiscoveryResponse;
+import com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule;
import com.google.cloud.securitycenter.v1.SecurityMarks;
import com.google.cloud.securitycenter.v1.SetFindingStateRequest;
import com.google.cloud.securitycenter.v1.SetMuteRequest;
@@ -81,6 +96,7 @@
import com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest;
import com.google.cloud.securitycenter.v1.UpdateNotificationConfigRequest;
import com.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest;
+import com.google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest;
import com.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest;
import com.google.cloud.securitycenter.v1.UpdateSourceRequest;
import com.google.common.collect.ImmutableMap;
@@ -116,6 +132,23 @@ public class GrpcSecurityCenterStub extends SecurityCenterStub {
.setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
.build();
+ private static final MethodDescriptor<
+ CreateSecurityHealthAnalyticsCustomModuleRequest, SecurityHealthAnalyticsCustomModule>
+ createSecurityHealthAnalyticsCustomModuleMethodDescriptor =
+ MethodDescriptor
+ .