Skip to content

Commit e26bd80

Browse files
gcf-owl-bot[bot]amanda-tarafa
authored andcommitted
feat: add MaterializedViews and LogicalViews APIs
PiperOrigin-RevId: 735407006 Source-Link: googleapis/googleapis@b80f49d Source-Link: googleapis/googleapis-gen@9d5789e Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuQmlndGFibGUuQWRtaW4uVjIvLk93bEJvdC55YW1sIiwiaCI6IjlkNTc4OWU0NWFmODdkMzcxZmJiYWI0ZGYxNDY4OTgwN2ZjMmMzMjMifQ==
1 parent 2221165 commit e26bd80

File tree

63 files changed

+13602
-546
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+13602
-546
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// Copyright 2025 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 bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateLogicalView_async_flattened]
20+
using Google.Cloud.Bigtable.Admin.V2;
21+
using Google.LongRunning;
22+
using System.Threading.Tasks;
23+
24+
public sealed partial class GeneratedBigtableInstanceAdminClientSnippets
25+
{
26+
/// <summary>Snippet for CreateLogicalViewAsync</summary>
27+
/// <remarks>
28+
/// This snippet has been automatically generated and should be regarded as a code template only.
29+
/// It will require modifications to work:
30+
/// - It may require correct/in-range values for request initialization.
31+
/// - It may require specifying regional endpoints when creating the service client as shown in
32+
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
33+
/// </remarks>
34+
public async Task CreateLogicalViewAsync()
35+
{
36+
// Create client
37+
BigtableInstanceAdminClient bigtableInstanceAdminClient = await BigtableInstanceAdminClient.CreateAsync();
38+
// Initialize request argument(s)
39+
string parent = "projects/[PROJECT]/instances/[INSTANCE]";
40+
LogicalView logicalView = new LogicalView();
41+
string logicalViewId = "";
42+
// Make the request
43+
Operation<LogicalView, CreateLogicalViewMetadata> response = await bigtableInstanceAdminClient.CreateLogicalViewAsync(parent, logicalView, logicalViewId);
44+
45+
// Poll until the returned long-running operation is complete
46+
Operation<LogicalView, CreateLogicalViewMetadata> completedResponse = await response.PollUntilCompletedAsync();
47+
// Retrieve the operation result
48+
LogicalView 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<LogicalView, CreateLogicalViewMetadata> retrievedResponse = await bigtableInstanceAdminClient.PollOnceCreateLogicalViewAsync(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+
LogicalView retrievedResult = retrievedResponse.Result;
59+
}
60+
}
61+
}
62+
// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateLogicalView_async_flattened]
63+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
// Copyright 2025 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 bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateLogicalView_async]
20+
using Google.Cloud.Bigtable.Admin.V2;
21+
using Google.Cloud.Bigtable.Common.V2;
22+
using Google.LongRunning;
23+
using System.Threading.Tasks;
24+
25+
public sealed partial class GeneratedBigtableInstanceAdminClientSnippets
26+
{
27+
/// <summary>Snippet for CreateLogicalViewAsync</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 CreateLogicalViewRequestObjectAsync()
36+
{
37+
// Create client
38+
BigtableInstanceAdminClient bigtableInstanceAdminClient = await BigtableInstanceAdminClient.CreateAsync();
39+
// Initialize request argument(s)
40+
CreateLogicalViewRequest request = new CreateLogicalViewRequest
41+
{
42+
ParentAsInstanceName = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]"),
43+
LogicalViewId = "",
44+
LogicalView = new LogicalView(),
45+
};
46+
// Make the request
47+
Operation<LogicalView, CreateLogicalViewMetadata> response = await bigtableInstanceAdminClient.CreateLogicalViewAsync(request);
48+
49+
// Poll until the returned long-running operation is complete
50+
Operation<LogicalView, CreateLogicalViewMetadata> completedResponse = await response.PollUntilCompletedAsync();
51+
// Retrieve the operation result
52+
LogicalView result = completedResponse.Result;
53+
54+
// Or get the name of the operation
55+
string operationName = response.Name;
56+
// This name can be stored, then the long-running operation retrieved later by name
57+
Operation<LogicalView, CreateLogicalViewMetadata> retrievedResponse = await bigtableInstanceAdminClient.PollOnceCreateLogicalViewAsync(operationName);
58+
// Check if the retrieved long-running operation has completed
59+
if (retrievedResponse.IsCompleted)
60+
{
61+
// If it has completed, then access the result
62+
LogicalView retrievedResult = retrievedResponse.Result;
63+
}
64+
}
65+
}
66+
// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateLogicalView_async]
67+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
// Copyright 2025 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 bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateLogicalView_sync]
20+
using Google.Cloud.Bigtable.Admin.V2;
21+
using Google.Cloud.Bigtable.Common.V2;
22+
using Google.LongRunning;
23+
24+
public sealed partial class GeneratedBigtableInstanceAdminClientSnippets
25+
{
26+
/// <summary>Snippet for CreateLogicalView</summary>
27+
/// <remarks>
28+
/// This snippet has been automatically generated and should be regarded as a code template only.
29+
/// It will require modifications to work:
30+
/// - It may require correct/in-range values for request initialization.
31+
/// - It may require specifying regional endpoints when creating the service client as shown in
32+
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
33+
/// </remarks>
34+
public void CreateLogicalViewRequestObject()
35+
{
36+
// Create client
37+
BigtableInstanceAdminClient bigtableInstanceAdminClient = BigtableInstanceAdminClient.Create();
38+
// Initialize request argument(s)
39+
CreateLogicalViewRequest request = new CreateLogicalViewRequest
40+
{
41+
ParentAsInstanceName = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]"),
42+
LogicalViewId = "",
43+
LogicalView = new LogicalView(),
44+
};
45+
// Make the request
46+
Operation<LogicalView, CreateLogicalViewMetadata> response = bigtableInstanceAdminClient.CreateLogicalView(request);
47+
48+
// Poll until the returned long-running operation is complete
49+
Operation<LogicalView, CreateLogicalViewMetadata> completedResponse = response.PollUntilCompleted();
50+
// Retrieve the operation result
51+
LogicalView result = completedResponse.Result;
52+
53+
// Or get the name of the operation
54+
string operationName = response.Name;
55+
// This name can be stored, then the long-running operation retrieved later by name
56+
Operation<LogicalView, CreateLogicalViewMetadata> retrievedResponse = bigtableInstanceAdminClient.PollOnceCreateLogicalView(operationName);
57+
// Check if the retrieved long-running operation has completed
58+
if (retrievedResponse.IsCompleted)
59+
{
60+
// If it has completed, then access the result
61+
LogicalView retrievedResult = retrievedResponse.Result;
62+
}
63+
}
64+
}
65+
// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateLogicalView_sync]
66+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
// Copyright 2025 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 bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateLogicalView_async_flattened_resourceNames]
20+
using Google.Cloud.Bigtable.Admin.V2;
21+
using Google.Cloud.Bigtable.Common.V2;
22+
using Google.LongRunning;
23+
using System.Threading.Tasks;
24+
25+
public sealed partial class GeneratedBigtableInstanceAdminClientSnippets
26+
{
27+
/// <summary>Snippet for CreateLogicalViewAsync</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 CreateLogicalViewResourceNamesAsync()
36+
{
37+
// Create client
38+
BigtableInstanceAdminClient bigtableInstanceAdminClient = await BigtableInstanceAdminClient.CreateAsync();
39+
// Initialize request argument(s)
40+
InstanceName parent = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]");
41+
LogicalView logicalView = new LogicalView();
42+
string logicalViewId = "";
43+
// Make the request
44+
Operation<LogicalView, CreateLogicalViewMetadata> response = await bigtableInstanceAdminClient.CreateLogicalViewAsync(parent, logicalView, logicalViewId);
45+
46+
// Poll until the returned long-running operation is complete
47+
Operation<LogicalView, CreateLogicalViewMetadata> completedResponse = await response.PollUntilCompletedAsync();
48+
// Retrieve the operation result
49+
LogicalView result = completedResponse.Result;
50+
51+
// Or get the name of the operation
52+
string operationName = response.Name;
53+
// This name can be stored, then the long-running operation retrieved later by name
54+
Operation<LogicalView, CreateLogicalViewMetadata> retrievedResponse = await bigtableInstanceAdminClient.PollOnceCreateLogicalViewAsync(operationName);
55+
// Check if the retrieved long-running operation has completed
56+
if (retrievedResponse.IsCompleted)
57+
{
58+
// If it has completed, then access the result
59+
LogicalView retrievedResult = retrievedResponse.Result;
60+
}
61+
}
62+
}
63+
// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateLogicalView_async_flattened_resourceNames]
64+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// Copyright 2025 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 bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateLogicalView_sync_flattened_resourceNames]
20+
using Google.Cloud.Bigtable.Admin.V2;
21+
using Google.Cloud.Bigtable.Common.V2;
22+
using Google.LongRunning;
23+
24+
public sealed partial class GeneratedBigtableInstanceAdminClientSnippets
25+
{
26+
/// <summary>Snippet for CreateLogicalView</summary>
27+
/// <remarks>
28+
/// This snippet has been automatically generated and should be regarded as a code template only.
29+
/// It will require modifications to work:
30+
/// - It may require correct/in-range values for request initialization.
31+
/// - It may require specifying regional endpoints when creating the service client as shown in
32+
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
33+
/// </remarks>
34+
public void CreateLogicalViewResourceNames()
35+
{
36+
// Create client
37+
BigtableInstanceAdminClient bigtableInstanceAdminClient = BigtableInstanceAdminClient.Create();
38+
// Initialize request argument(s)
39+
InstanceName parent = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]");
40+
LogicalView logicalView = new LogicalView();
41+
string logicalViewId = "";
42+
// Make the request
43+
Operation<LogicalView, CreateLogicalViewMetadata> response = bigtableInstanceAdminClient.CreateLogicalView(parent, logicalView, logicalViewId);
44+
45+
// Poll until the returned long-running operation is complete
46+
Operation<LogicalView, CreateLogicalViewMetadata> completedResponse = response.PollUntilCompleted();
47+
// Retrieve the operation result
48+
LogicalView 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<LogicalView, CreateLogicalViewMetadata> retrievedResponse = bigtableInstanceAdminClient.PollOnceCreateLogicalView(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+
LogicalView retrievedResult = retrievedResponse.Result;
59+
}
60+
}
61+
}
62+
// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateLogicalView_sync_flattened_resourceNames]
63+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
// Copyright 2025 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 bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateLogicalView_sync_flattened]
20+
using Google.Cloud.Bigtable.Admin.V2;
21+
using Google.LongRunning;
22+
23+
public sealed partial class GeneratedBigtableInstanceAdminClientSnippets
24+
{
25+
/// <summary>Snippet for CreateLogicalView</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 void CreateLogicalView()
34+
{
35+
// Create client
36+
BigtableInstanceAdminClient bigtableInstanceAdminClient = BigtableInstanceAdminClient.Create();
37+
// Initialize request argument(s)
38+
string parent = "projects/[PROJECT]/instances/[INSTANCE]";
39+
LogicalView logicalView = new LogicalView();
40+
string logicalViewId = "";
41+
// Make the request
42+
Operation<LogicalView, CreateLogicalViewMetadata> response = bigtableInstanceAdminClient.CreateLogicalView(parent, logicalView, logicalViewId);
43+
44+
// Poll until the returned long-running operation is complete
45+
Operation<LogicalView, CreateLogicalViewMetadata> completedResponse = response.PollUntilCompleted();
46+
// Retrieve the operation result
47+
LogicalView result = completedResponse.Result;
48+
49+
// Or get the name of the operation
50+
string operationName = response.Name;
51+
// This name can be stored, then the long-running operation retrieved later by name
52+
Operation<LogicalView, CreateLogicalViewMetadata> retrievedResponse = bigtableInstanceAdminClient.PollOnceCreateLogicalView(operationName);
53+
// Check if the retrieved long-running operation has completed
54+
if (retrievedResponse.IsCompleted)
55+
{
56+
// If it has completed, then access the result
57+
LogicalView retrievedResult = retrievedResponse.Result;
58+
}
59+
}
60+
}
61+
// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateLogicalView_sync_flattened]
62+
}

0 commit comments

Comments
 (0)