Skip to content

Commit

Permalink
feat: Add SimulateSecurityHealthAnalyticsCustomModule API for testing…
Browse files Browse the repository at this point in the history
… SHA custom module

PiperOrigin-RevId: 574612611

Source-Link: googleapis/googleapis@c768e7a

Source-Link: googleapis/googleapis-gen@e5502fc
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuU2VjdXJpdHlDZW50ZXIuVjEvLk93bEJvdC55YW1sIiwiaCI6ImU1NTAyZmMxN2VjZWFjYTFjMjM1MmZkMmE2MTRjNzZlYzYzZWY4ZTQifQ==
  • Loading branch information
gcf-owl-bot[bot] authored and anuragsrivstv committed Oct 19, 2023
1 parent 5f54d64 commit bdb2a81
Show file tree
Hide file tree
Showing 10 changed files with 2,611 additions and 721 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// Copyright 2023 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 code. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
// [START securitycenter_v1_generated_SecurityCenter_SimulateSecurityHealthAnalyticsCustomModule_async_flattened]
using Google.Cloud.SecurityCenter.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedSecurityCenterClientSnippets
{
/// <summary>Snippet for SimulateSecurityHealthAnalyticsCustomModuleAsync</summary>
/// <remarks>
/// 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/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public async Task SimulateSecurityHealthAnalyticsCustomModuleAsync()
{
// Create client
SecurityCenterClient securityCenterClient = await SecurityCenterClient.CreateAsync();
// Initialize request argument(s)
string parent = "";
CustomConfig customConfig = new CustomConfig();
SimulateSecurityHealthAnalyticsCustomModuleRequest.Types.SimulatedResource resource = new SimulateSecurityHealthAnalyticsCustomModuleRequest.Types.SimulatedResource();
// Make the request
SimulateSecurityHealthAnalyticsCustomModuleResponse response = await securityCenterClient.SimulateSecurityHealthAnalyticsCustomModuleAsync(parent, customConfig, resource);
}
}
// [END securitycenter_v1_generated_SecurityCenter_SimulateSecurityHealthAnalyticsCustomModule_async_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// Copyright 2023 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 code. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
// [START securitycenter_v1_generated_SecurityCenter_SimulateSecurityHealthAnalyticsCustomModule_async]
using Google.Cloud.SecurityCenter.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedSecurityCenterClientSnippets
{
/// <summary>Snippet for SimulateSecurityHealthAnalyticsCustomModuleAsync</summary>
/// <remarks>
/// 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/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public async Task SimulateSecurityHealthAnalyticsCustomModuleRequestObjectAsync()
{
// Create client
SecurityCenterClient securityCenterClient = await SecurityCenterClient.CreateAsync();
// Initialize request argument(s)
SimulateSecurityHealthAnalyticsCustomModuleRequest request = new SimulateSecurityHealthAnalyticsCustomModuleRequest
{
Parent = "",
CustomConfig = new CustomConfig(),
Resource = new SimulateSecurityHealthAnalyticsCustomModuleRequest.Types.SimulatedResource(),
};
// Make the request
SimulateSecurityHealthAnalyticsCustomModuleResponse response = await securityCenterClient.SimulateSecurityHealthAnalyticsCustomModuleAsync(request);
}
}
// [END securitycenter_v1_generated_SecurityCenter_SimulateSecurityHealthAnalyticsCustomModule_async]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// Copyright 2023 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 code. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
// [START securitycenter_v1_generated_SecurityCenter_SimulateSecurityHealthAnalyticsCustomModule_sync]
using Google.Cloud.SecurityCenter.V1;

public sealed partial class GeneratedSecurityCenterClientSnippets
{
/// <summary>Snippet for SimulateSecurityHealthAnalyticsCustomModule</summary>
/// <remarks>
/// 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/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public void SimulateSecurityHealthAnalyticsCustomModuleRequestObject()
{
// Create client
SecurityCenterClient securityCenterClient = SecurityCenterClient.Create();
// Initialize request argument(s)
SimulateSecurityHealthAnalyticsCustomModuleRequest request = new SimulateSecurityHealthAnalyticsCustomModuleRequest
{
Parent = "",
CustomConfig = new CustomConfig(),
Resource = new SimulateSecurityHealthAnalyticsCustomModuleRequest.Types.SimulatedResource(),
};
// Make the request
SimulateSecurityHealthAnalyticsCustomModuleResponse response = securityCenterClient.SimulateSecurityHealthAnalyticsCustomModule(request);
}
}
// [END securitycenter_v1_generated_SecurityCenter_SimulateSecurityHealthAnalyticsCustomModule_sync]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// Copyright 2023 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 code. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
// [START securitycenter_v1_generated_SecurityCenter_SimulateSecurityHealthAnalyticsCustomModule_sync_flattened]
using Google.Cloud.SecurityCenter.V1;

public sealed partial class GeneratedSecurityCenterClientSnippets
{
/// <summary>Snippet for SimulateSecurityHealthAnalyticsCustomModule</summary>
/// <remarks>
/// 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/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public void SimulateSecurityHealthAnalyticsCustomModule()
{
// Create client
SecurityCenterClient securityCenterClient = SecurityCenterClient.Create();
// Initialize request argument(s)
string parent = "";
CustomConfig customConfig = new CustomConfig();
SimulateSecurityHealthAnalyticsCustomModuleRequest.Types.SimulatedResource resource = new SimulateSecurityHealthAnalyticsCustomModuleRequest.Types.SimulatedResource();
// Make the request
SimulateSecurityHealthAnalyticsCustomModuleResponse response = securityCenterClient.SimulateSecurityHealthAnalyticsCustomModule(parent, customConfig, resource);
}
}
// [END securitycenter_v1_generated_SecurityCenter_SimulateSecurityHealthAnalyticsCustomModule_sync_flattened]
}
Loading

0 comments on commit bdb2a81

Please sign in to comment.