Skip to content

Commit d066377

Browse files
regen: Regenerate Google.Cloud.Config.V1 at API commit 6145b5f
feat: add support for enabling automigration from deprecated Terraform versions feat: added error code when failing import values from an external source PiperOrigin-RevId: 854277617 Source-Link: googleapis/googleapis@6145b5f
1 parent 5237c60 commit d066377

18 files changed

+3224
-447
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// Copyright 2026 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Generated code. DO NOT EDIT!
16+
17+
namespace GoogleCSharpSnippets
18+
{
19+
// [START config_v1_generated_Config_GetAutoMigrationConfig_async_flattened]
20+
using Google.Cloud.Config.V1;
21+
using System.Threading.Tasks;
22+
23+
public sealed partial class GeneratedConfigClientSnippets
24+
{
25+
/// <summary>Snippet for GetAutoMigrationConfigAsync</summary>
26+
/// <remarks>
27+
/// This snippet has been automatically generated and should be regarded as a code template only.
28+
/// It will require modifications to work:
29+
/// - It may require correct/in-range values for request initialization.
30+
/// - It may require specifying regional endpoints when creating the service client as shown in
31+
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
32+
/// </remarks>
33+
public async Task GetAutoMigrationConfigAsync()
34+
{
35+
// Create client
36+
ConfigClient configClient = await ConfigClient.CreateAsync();
37+
// Initialize request argument(s)
38+
string name = "projects/[PROJECT]/locations/[LOCATION]/autoMigrationConfig";
39+
// Make the request
40+
AutoMigrationConfig response = await configClient.GetAutoMigrationConfigAsync(name);
41+
}
42+
}
43+
// [END config_v1_generated_Config_GetAutoMigrationConfig_async_flattened]
44+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// Copyright 2026 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Generated code. DO NOT EDIT!
16+
17+
namespace GoogleCSharpSnippets
18+
{
19+
// [START config_v1_generated_Config_GetAutoMigrationConfig_async]
20+
using Google.Cloud.Config.V1;
21+
using System.Threading.Tasks;
22+
23+
public sealed partial class GeneratedConfigClientSnippets
24+
{
25+
/// <summary>Snippet for GetAutoMigrationConfigAsync</summary>
26+
/// <remarks>
27+
/// This snippet has been automatically generated and should be regarded as a code template only.
28+
/// It will require modifications to work:
29+
/// - It may require correct/in-range values for request initialization.
30+
/// - It may require specifying regional endpoints when creating the service client as shown in
31+
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
32+
/// </remarks>
33+
public async Task GetAutoMigrationConfigRequestObjectAsync()
34+
{
35+
// Create client
36+
ConfigClient configClient = await ConfigClient.CreateAsync();
37+
// Initialize request argument(s)
38+
GetAutoMigrationConfigRequest request = new GetAutoMigrationConfigRequest
39+
{
40+
AutoMigrationConfigName = AutoMigrationConfigName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
41+
};
42+
// Make the request
43+
AutoMigrationConfig response = await configClient.GetAutoMigrationConfigAsync(request);
44+
}
45+
}
46+
// [END config_v1_generated_Config_GetAutoMigrationConfig_async]
47+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
// Copyright 2026 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Generated code. DO NOT EDIT!
16+
17+
namespace GoogleCSharpSnippets
18+
{
19+
// [START config_v1_generated_Config_GetAutoMigrationConfig_sync]
20+
using Google.Cloud.Config.V1;
21+
22+
public sealed partial class GeneratedConfigClientSnippets
23+
{
24+
/// <summary>Snippet for GetAutoMigrationConfig</summary>
25+
/// <remarks>
26+
/// This snippet has been automatically generated and should be regarded as a code template only.
27+
/// It will require modifications to work:
28+
/// - It may require correct/in-range values for request initialization.
29+
/// - It may require specifying regional endpoints when creating the service client as shown in
30+
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
31+
/// </remarks>
32+
public void GetAutoMigrationConfigRequestObject()
33+
{
34+
// Create client
35+
ConfigClient configClient = ConfigClient.Create();
36+
// Initialize request argument(s)
37+
GetAutoMigrationConfigRequest request = new GetAutoMigrationConfigRequest
38+
{
39+
AutoMigrationConfigName = AutoMigrationConfigName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
40+
};
41+
// Make the request
42+
AutoMigrationConfig response = configClient.GetAutoMigrationConfig(request);
43+
}
44+
}
45+
// [END config_v1_generated_Config_GetAutoMigrationConfig_sync]
46+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// Copyright 2026 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Generated code. DO NOT EDIT!
16+
17+
namespace GoogleCSharpSnippets
18+
{
19+
// [START config_v1_generated_Config_GetAutoMigrationConfig_async_flattened_resourceNames]
20+
using Google.Cloud.Config.V1;
21+
using System.Threading.Tasks;
22+
23+
public sealed partial class GeneratedConfigClientSnippets
24+
{
25+
/// <summary>Snippet for GetAutoMigrationConfigAsync</summary>
26+
/// <remarks>
27+
/// This snippet has been automatically generated and should be regarded as a code template only.
28+
/// It will require modifications to work:
29+
/// - It may require correct/in-range values for request initialization.
30+
/// - It may require specifying regional endpoints when creating the service client as shown in
31+
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
32+
/// </remarks>
33+
public async Task GetAutoMigrationConfigResourceNamesAsync()
34+
{
35+
// Create client
36+
ConfigClient configClient = await ConfigClient.CreateAsync();
37+
// Initialize request argument(s)
38+
AutoMigrationConfigName name = AutoMigrationConfigName.FromProjectLocation("[PROJECT]", "[LOCATION]");
39+
// Make the request
40+
AutoMigrationConfig response = await configClient.GetAutoMigrationConfigAsync(name);
41+
}
42+
}
43+
// [END config_v1_generated_Config_GetAutoMigrationConfig_async_flattened_resourceNames]
44+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// Copyright 2026 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Generated code. DO NOT EDIT!
16+
17+
namespace GoogleCSharpSnippets
18+
{
19+
// [START config_v1_generated_Config_GetAutoMigrationConfig_sync_flattened_resourceNames]
20+
using Google.Cloud.Config.V1;
21+
22+
public sealed partial class GeneratedConfigClientSnippets
23+
{
24+
/// <summary>Snippet for GetAutoMigrationConfig</summary>
25+
/// <remarks>
26+
/// This snippet has been automatically generated and should be regarded as a code template only.
27+
/// It will require modifications to work:
28+
/// - It may require correct/in-range values for request initialization.
29+
/// - It may require specifying regional endpoints when creating the service client as shown in
30+
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
31+
/// </remarks>
32+
public void GetAutoMigrationConfigResourceNames()
33+
{
34+
// Create client
35+
ConfigClient configClient = ConfigClient.Create();
36+
// Initialize request argument(s)
37+
AutoMigrationConfigName name = AutoMigrationConfigName.FromProjectLocation("[PROJECT]", "[LOCATION]");
38+
// Make the request
39+
AutoMigrationConfig response = configClient.GetAutoMigrationConfig(name);
40+
}
41+
}
42+
// [END config_v1_generated_Config_GetAutoMigrationConfig_sync_flattened_resourceNames]
43+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// Copyright 2026 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Generated code. DO NOT EDIT!
16+
17+
namespace GoogleCSharpSnippets
18+
{
19+
// [START config_v1_generated_Config_GetAutoMigrationConfig_sync_flattened]
20+
using Google.Cloud.Config.V1;
21+
22+
public sealed partial class GeneratedConfigClientSnippets
23+
{
24+
/// <summary>Snippet for GetAutoMigrationConfig</summary>
25+
/// <remarks>
26+
/// This snippet has been automatically generated and should be regarded as a code template only.
27+
/// It will require modifications to work:
28+
/// - It may require correct/in-range values for request initialization.
29+
/// - It may require specifying regional endpoints when creating the service client as shown in
30+
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
31+
/// </remarks>
32+
public void GetAutoMigrationConfig()
33+
{
34+
// Create client
35+
ConfigClient configClient = ConfigClient.Create();
36+
// Initialize request argument(s)
37+
string name = "projects/[PROJECT]/locations/[LOCATION]/autoMigrationConfig";
38+
// Make the request
39+
AutoMigrationConfig response = configClient.GetAutoMigrationConfig(name);
40+
}
41+
}
42+
// [END config_v1_generated_Config_GetAutoMigrationConfig_sync_flattened]
43+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// Copyright 2026 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Generated code. DO NOT EDIT!
16+
17+
namespace GoogleCSharpSnippets
18+
{
19+
// [START config_v1_generated_Config_UpdateAutoMigrationConfig_async_flattened]
20+
using Google.Cloud.Config.V1;
21+
using Google.LongRunning;
22+
using Google.Protobuf.WellKnownTypes;
23+
using System.Threading.Tasks;
24+
25+
public sealed partial class GeneratedConfigClientSnippets
26+
{
27+
/// <summary>Snippet for UpdateAutoMigrationConfigAsync</summary>
28+
/// <remarks>
29+
/// This snippet has been automatically generated and should be regarded as a code template only.
30+
/// It will require modifications to work:
31+
/// - It may require correct/in-range values for request initialization.
32+
/// - It may require specifying regional endpoints when creating the service client as shown in
33+
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
34+
/// </remarks>
35+
public async Task UpdateAutoMigrationConfigAsync()
36+
{
37+
// Create client
38+
ConfigClient configClient = await ConfigClient.CreateAsync();
39+
// Initialize request argument(s)
40+
AutoMigrationConfig autoMigrationConfig = new AutoMigrationConfig();
41+
FieldMask updateMask = new FieldMask();
42+
// Make the request
43+
Operation<AutoMigrationConfig, OperationMetadata> response = await configClient.UpdateAutoMigrationConfigAsync(autoMigrationConfig, updateMask);
44+
45+
// Poll until the returned long-running operation is complete
46+
Operation<AutoMigrationConfig, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
47+
// Retrieve the operation result
48+
AutoMigrationConfig result = completedResponse.Result;
49+
50+
// Or get the name of the operation
51+
string operationName = response.Name;
52+
// This name can be stored, then the long-running operation retrieved later by name
53+
Operation<AutoMigrationConfig, OperationMetadata> retrievedResponse = await configClient.PollOnceUpdateAutoMigrationConfigAsync(operationName);
54+
// Check if the retrieved long-running operation has completed
55+
if (retrievedResponse.IsCompleted)
56+
{
57+
// If it has completed, then access the result
58+
AutoMigrationConfig retrievedResult = retrievedResponse.Result;
59+
}
60+
}
61+
}
62+
// [END config_v1_generated_Config_UpdateAutoMigrationConfig_async_flattened]
63+
}

0 commit comments

Comments
 (0)