Skip to content

Commit a7a6d15

Browse files
gcf-owl-bot[bot]jskeet
authored andcommitted
feat: Mark the Asset APIs as deprecated in client libraries
PiperOrigin-RevId: 542687834 Source-Link: googleapis/googleapis@a7e1055 Source-Link: googleapis/googleapis-gen@b1e231a Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuU2VjdXJpdHlDZW50ZXIuVjEvLk93bEJvdC55YW1sIiwiaCI6ImIxZTIzMWFhM2U1OTdlZWU5NTJmMzk0MGQ3NzQzYjY2MGM2ZWFlZDUifQ==
1 parent d0b88e9 commit a7a6d15

14 files changed

+329
-238
lines changed

apis/Google.Cloud.SecurityCenter.V1/Google.Cloud.SecurityCenter.V1.GeneratedSnippets/SecurityCenterClient.GroupAssetsRequestObjectAsyncSnippet.g.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ public async Task GroupAssetsRequestObjectAsync()
4949
ReadTime = new Timestamp(),
5050
};
5151
// Make the request
52+
#pragma warning disable CS0612
5253
PagedAsyncEnumerable<GroupAssetsResponse, GroupResult> response = securityCenterClient.GroupAssetsAsync(request);
54+
#pragma warning restore CS0612
5355

5456
// Iterate over all response items, lazily performing RPCs as required
5557
await response.ForEachAsync((GroupResult item) =>

apis/Google.Cloud.SecurityCenter.V1/Google.Cloud.SecurityCenter.V1.GeneratedSnippets/SecurityCenterClient.GroupAssetsRequestObjectSnippet.g.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ public void GroupAssetsRequestObject()
4747
ReadTime = new Timestamp(),
4848
};
4949
// Make the request
50+
#pragma warning disable CS0612
5051
PagedEnumerable<GroupAssetsResponse, GroupResult> response = securityCenterClient.GroupAssets(request);
52+
#pragma warning restore CS0612
5153

5254
// Iterate over all response items, lazily performing RPCs as required
5355
foreach (GroupResult item in response)

apis/Google.Cloud.SecurityCenter.V1/Google.Cloud.SecurityCenter.V1.GeneratedSnippets/SecurityCenterClient.ListAssetsRequestObjectAsyncSnippet.g.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ public async Task ListAssetsRequestObjectAsync()
5050
FieldMask = new FieldMask(),
5151
};
5252
// Make the request
53+
#pragma warning disable CS0612
5354
PagedAsyncEnumerable<ListAssetsResponse, ListAssetsResponse.Types.ListAssetsResult> response = securityCenterClient.ListAssetsAsync(request);
55+
#pragma warning restore CS0612
5456

5557
// Iterate over all response items, lazily performing RPCs as required
5658
await response.ForEachAsync((ListAssetsResponse.Types.ListAssetsResult item) =>

apis/Google.Cloud.SecurityCenter.V1/Google.Cloud.SecurityCenter.V1.GeneratedSnippets/SecurityCenterClient.ListAssetsRequestObjectSnippet.g.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ public void ListAssetsRequestObject()
4848
FieldMask = new FieldMask(),
4949
};
5050
// Make the request
51+
#pragma warning disable CS0612
5152
PagedEnumerable<ListAssetsResponse, ListAssetsResponse.Types.ListAssetsResult> response = securityCenterClient.ListAssets(request);
53+
#pragma warning restore CS0612
5254

5355
// Iterate over all response items, lazily performing RPCs as required
5456
foreach (ListAssetsResponse.Types.ListAssetsResult item in response)

apis/Google.Cloud.SecurityCenter.V1/Google.Cloud.SecurityCenter.V1.GeneratedSnippets/SecurityCenterClient.RunAssetDiscoveryAsyncSnippet.g.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ public async Task RunAssetDiscoveryAsync()
3939
// Initialize request argument(s)
4040
string parent = "organizations/[ORGANIZATION]";
4141
// Make the request
42+
#pragma warning disable CS0612
4243
Operation<RunAssetDiscoveryResponse, Empty> response = await securityCenterClient.RunAssetDiscoveryAsync(parent);
44+
#pragma warning restore CS0612
4345

4446
// Poll until the returned long-running operation is complete
4547
Operation<RunAssetDiscoveryResponse, Empty> completedResponse = await response.PollUntilCompletedAsync();
@@ -49,7 +51,9 @@ public async Task RunAssetDiscoveryAsync()
4951
// Or get the name of the operation
5052
string operationName = response.Name;
5153
// This name can be stored, then the long-running operation retrieved later by name
54+
#pragma warning disable CS0612
5255
Operation<RunAssetDiscoveryResponse, Empty> retrievedResponse = await securityCenterClient.PollOnceRunAssetDiscoveryAsync(operationName);
56+
#pragma warning restore CS0612
5357
// Check if the retrieved long-running operation has completed
5458
if (retrievedResponse.IsCompleted)
5559
{

apis/Google.Cloud.SecurityCenter.V1/Google.Cloud.SecurityCenter.V1.GeneratedSnippets/SecurityCenterClient.RunAssetDiscoveryRequestObjectAsyncSnippet.g.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ public async Task RunAssetDiscoveryRequestObjectAsync()
4343
ParentAsOrganizationName = OrganizationName.FromOrganization("[ORGANIZATION]"),
4444
};
4545
// Make the request
46+
#pragma warning disable CS0612
4647
Operation<RunAssetDiscoveryResponse, Empty> response = await securityCenterClient.RunAssetDiscoveryAsync(request);
48+
#pragma warning restore CS0612
4749

4850
// Poll until the returned long-running operation is complete
4951
Operation<RunAssetDiscoveryResponse, Empty> completedResponse = await response.PollUntilCompletedAsync();
@@ -53,7 +55,9 @@ public async Task RunAssetDiscoveryRequestObjectAsync()
5355
// Or get the name of the operation
5456
string operationName = response.Name;
5557
// This name can be stored, then the long-running operation retrieved later by name
58+
#pragma warning disable CS0612
5659
Operation<RunAssetDiscoveryResponse, Empty> retrievedResponse = await securityCenterClient.PollOnceRunAssetDiscoveryAsync(operationName);
60+
#pragma warning restore CS0612
5761
// Check if the retrieved long-running operation has completed
5862
if (retrievedResponse.IsCompleted)
5963
{

apis/Google.Cloud.SecurityCenter.V1/Google.Cloud.SecurityCenter.V1.GeneratedSnippets/SecurityCenterClient.RunAssetDiscoveryRequestObjectSnippet.g.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ public void RunAssetDiscoveryRequestObject()
4242
ParentAsOrganizationName = OrganizationName.FromOrganization("[ORGANIZATION]"),
4343
};
4444
// Make the request
45+
#pragma warning disable CS0612
4546
Operation<RunAssetDiscoveryResponse, Empty> response = securityCenterClient.RunAssetDiscovery(request);
47+
#pragma warning restore CS0612
4648

4749
// Poll until the returned long-running operation is complete
4850
Operation<RunAssetDiscoveryResponse, Empty> completedResponse = response.PollUntilCompleted();
@@ -52,7 +54,9 @@ public void RunAssetDiscoveryRequestObject()
5254
// Or get the name of the operation
5355
string operationName = response.Name;
5456
// This name can be stored, then the long-running operation retrieved later by name
57+
#pragma warning disable CS0612
5558
Operation<RunAssetDiscoveryResponse, Empty> retrievedResponse = securityCenterClient.PollOnceRunAssetDiscovery(operationName);
59+
#pragma warning restore CS0612
5660
// Check if the retrieved long-running operation has completed
5761
if (retrievedResponse.IsCompleted)
5862
{

apis/Google.Cloud.SecurityCenter.V1/Google.Cloud.SecurityCenter.V1.GeneratedSnippets/SecurityCenterClient.RunAssetDiscoveryResourceNamesAsyncSnippet.g.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ public async Task RunAssetDiscoveryResourceNamesAsync()
4040
// Initialize request argument(s)
4141
OrganizationName parent = OrganizationName.FromOrganization("[ORGANIZATION]");
4242
// Make the request
43+
#pragma warning disable CS0612
4344
Operation<RunAssetDiscoveryResponse, Empty> response = await securityCenterClient.RunAssetDiscoveryAsync(parent);
45+
#pragma warning restore CS0612
4446

4547
// Poll until the returned long-running operation is complete
4648
Operation<RunAssetDiscoveryResponse, Empty> completedResponse = await response.PollUntilCompletedAsync();
@@ -50,7 +52,9 @@ public async Task RunAssetDiscoveryResourceNamesAsync()
5052
// Or get the name of the operation
5153
string operationName = response.Name;
5254
// This name can be stored, then the long-running operation retrieved later by name
55+
#pragma warning disable CS0612
5356
Operation<RunAssetDiscoveryResponse, Empty> retrievedResponse = await securityCenterClient.PollOnceRunAssetDiscoveryAsync(operationName);
57+
#pragma warning restore CS0612
5458
// Check if the retrieved long-running operation has completed
5559
if (retrievedResponse.IsCompleted)
5660
{

apis/Google.Cloud.SecurityCenter.V1/Google.Cloud.SecurityCenter.V1.GeneratedSnippets/SecurityCenterClient.RunAssetDiscoveryResourceNamesSnippet.g.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ public void RunAssetDiscoveryResourceNames()
3939
// Initialize request argument(s)
4040
OrganizationName parent = OrganizationName.FromOrganization("[ORGANIZATION]");
4141
// Make the request
42+
#pragma warning disable CS0612
4243
Operation<RunAssetDiscoveryResponse, Empty> response = securityCenterClient.RunAssetDiscovery(parent);
44+
#pragma warning restore CS0612
4345

4446
// Poll until the returned long-running operation is complete
4547
Operation<RunAssetDiscoveryResponse, Empty> completedResponse = response.PollUntilCompleted();
@@ -49,7 +51,9 @@ public void RunAssetDiscoveryResourceNames()
4951
// Or get the name of the operation
5052
string operationName = response.Name;
5153
// This name can be stored, then the long-running operation retrieved later by name
54+
#pragma warning disable CS0612
5255
Operation<RunAssetDiscoveryResponse, Empty> retrievedResponse = securityCenterClient.PollOnceRunAssetDiscovery(operationName);
56+
#pragma warning restore CS0612
5357
// Check if the retrieved long-running operation has completed
5458
if (retrievedResponse.IsCompleted)
5559
{

apis/Google.Cloud.SecurityCenter.V1/Google.Cloud.SecurityCenter.V1.GeneratedSnippets/SecurityCenterClient.RunAssetDiscoverySnippet.g.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ public void RunAssetDiscovery()
3838
// Initialize request argument(s)
3939
string parent = "organizations/[ORGANIZATION]";
4040
// Make the request
41+
#pragma warning disable CS0612
4142
Operation<RunAssetDiscoveryResponse, Empty> response = securityCenterClient.RunAssetDiscovery(parent);
43+
#pragma warning restore CS0612
4244

4345
// Poll until the returned long-running operation is complete
4446
Operation<RunAssetDiscoveryResponse, Empty> completedResponse = response.PollUntilCompleted();
@@ -48,7 +50,9 @@ public void RunAssetDiscovery()
4850
// Or get the name of the operation
4951
string operationName = response.Name;
5052
// This name can be stored, then the long-running operation retrieved later by name
53+
#pragma warning disable CS0612
5154
Operation<RunAssetDiscoveryResponse, Empty> retrievedResponse = securityCenterClient.PollOnceRunAssetDiscovery(operationName);
55+
#pragma warning restore CS0612
5256
// Check if the retrieved long-running operation has completed
5357
if (retrievedResponse.IsCompleted)
5458
{

0 commit comments

Comments
 (0)