Skip to content

Commit

Permalink
feat: add Subscription resource and RPCs
Browse files Browse the repository at this point in the history
feat: add support for sharing_environment_config using which you can create data clean rooms.
feat: support restricted egress on Listings.

PiperOrigin-RevId: 568259024

Source-Link: googleapis/googleapis@26392c8

Source-Link: googleapis/googleapis-gen@dbdc394
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuQmlnUXVlcnkuQW5hbHl0aWNzSHViLlYxLy5Pd2xCb3QueWFtbCIsImgiOiJkYmRjMzk0ZGNhYTY3NTE3MGExYjBjZjM4NThmNTZjOTVlMTdiM2FhIn0=
  • Loading branch information
gcf-owl-bot[bot] authored and jskeet committed Sep 25, 2023
1 parent 881c034 commit 1353440
Show file tree
Hide file tree
Showing 53 changed files with 16,030 additions and 2,445 deletions.
@@ -0,0 +1,62 @@
// 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 analyticshub_v1_generated_AnalyticsHubService_DeleteSubscription_async_flattened]
using Google.Cloud.BigQuery.AnalyticsHub.V1;
using Google.LongRunning;
using Google.Protobuf.WellKnownTypes;
using System.Threading.Tasks;

public sealed partial class GeneratedAnalyticsHubServiceClientSnippets
{
/// <summary>Snippet for DeleteSubscriptionAsync</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 DeleteSubscriptionAsync()
{
// Create client
AnalyticsHubServiceClient analyticsHubServiceClient = await AnalyticsHubServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/subscriptions/[SUBSCRIPTION]";
// Make the request
Operation<Empty, OperationMetadata> response = await analyticsHubServiceClient.DeleteSubscriptionAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await analyticsHubServiceClient.PollOnceDeleteSubscriptionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
}
}
// [END analyticshub_v1_generated_AnalyticsHubService_DeleteSubscription_async_flattened]
}
@@ -0,0 +1,65 @@
// 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 analyticshub_v1_generated_AnalyticsHubService_DeleteSubscription_async]
using Google.Cloud.BigQuery.AnalyticsHub.V1;
using Google.LongRunning;
using Google.Protobuf.WellKnownTypes;
using System.Threading.Tasks;

public sealed partial class GeneratedAnalyticsHubServiceClientSnippets
{
/// <summary>Snippet for DeleteSubscriptionAsync</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 DeleteSubscriptionRequestObjectAsync()
{
// Create client
AnalyticsHubServiceClient analyticsHubServiceClient = await AnalyticsHubServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteSubscriptionRequest request = new DeleteSubscriptionRequest
{
SubscriptionName = SubscriptionName.FromProjectLocationSubscription("[PROJECT]", "[LOCATION]", "[SUBSCRIPTION]"),
};
// Make the request
Operation<Empty, OperationMetadata> response = await analyticsHubServiceClient.DeleteSubscriptionAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await analyticsHubServiceClient.PollOnceDeleteSubscriptionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
}
}
// [END analyticshub_v1_generated_AnalyticsHubService_DeleteSubscription_async]
}
@@ -0,0 +1,64 @@
// 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 analyticshub_v1_generated_AnalyticsHubService_DeleteSubscription_sync]
using Google.Cloud.BigQuery.AnalyticsHub.V1;
using Google.LongRunning;
using Google.Protobuf.WellKnownTypes;

public sealed partial class GeneratedAnalyticsHubServiceClientSnippets
{
/// <summary>Snippet for DeleteSubscription</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 DeleteSubscriptionRequestObject()
{
// Create client
AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.Create();
// Initialize request argument(s)
DeleteSubscriptionRequest request = new DeleteSubscriptionRequest
{
SubscriptionName = SubscriptionName.FromProjectLocationSubscription("[PROJECT]", "[LOCATION]", "[SUBSCRIPTION]"),
};
// Make the request
Operation<Empty, OperationMetadata> response = analyticsHubServiceClient.DeleteSubscription(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = analyticsHubServiceClient.PollOnceDeleteSubscription(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
}
}
// [END analyticshub_v1_generated_AnalyticsHubService_DeleteSubscription_sync]
}
@@ -0,0 +1,62 @@
// 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 analyticshub_v1_generated_AnalyticsHubService_DeleteSubscription_async_flattened_resourceNames]
using Google.Cloud.BigQuery.AnalyticsHub.V1;
using Google.LongRunning;
using Google.Protobuf.WellKnownTypes;
using System.Threading.Tasks;

public sealed partial class GeneratedAnalyticsHubServiceClientSnippets
{
/// <summary>Snippet for DeleteSubscriptionAsync</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 DeleteSubscriptionResourceNamesAsync()
{
// Create client
AnalyticsHubServiceClient analyticsHubServiceClient = await AnalyticsHubServiceClient.CreateAsync();
// Initialize request argument(s)
SubscriptionName name = SubscriptionName.FromProjectLocationSubscription("[PROJECT]", "[LOCATION]", "[SUBSCRIPTION]");
// Make the request
Operation<Empty, OperationMetadata> response = await analyticsHubServiceClient.DeleteSubscriptionAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await analyticsHubServiceClient.PollOnceDeleteSubscriptionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
}
}
// [END analyticshub_v1_generated_AnalyticsHubService_DeleteSubscription_async_flattened_resourceNames]
}
@@ -0,0 +1,61 @@
// 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 analyticshub_v1_generated_AnalyticsHubService_DeleteSubscription_sync_flattened_resourceNames]
using Google.Cloud.BigQuery.AnalyticsHub.V1;
using Google.LongRunning;
using Google.Protobuf.WellKnownTypes;

public sealed partial class GeneratedAnalyticsHubServiceClientSnippets
{
/// <summary>Snippet for DeleteSubscription</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 DeleteSubscriptionResourceNames()
{
// Create client
AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.Create();
// Initialize request argument(s)
SubscriptionName name = SubscriptionName.FromProjectLocationSubscription("[PROJECT]", "[LOCATION]", "[SUBSCRIPTION]");
// Make the request
Operation<Empty, OperationMetadata> response = analyticsHubServiceClient.DeleteSubscription(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = analyticsHubServiceClient.PollOnceDeleteSubscription(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
}
}
// [END analyticshub_v1_generated_AnalyticsHubService_DeleteSubscription_sync_flattened_resourceNames]
}
@@ -0,0 +1,61 @@
// 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 analyticshub_v1_generated_AnalyticsHubService_DeleteSubscription_sync_flattened]
using Google.Cloud.BigQuery.AnalyticsHub.V1;
using Google.LongRunning;
using Google.Protobuf.WellKnownTypes;

public sealed partial class GeneratedAnalyticsHubServiceClientSnippets
{
/// <summary>Snippet for DeleteSubscription</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 DeleteSubscription()
{
// Create client
AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/subscriptions/[SUBSCRIPTION]";
// Make the request
Operation<Empty, OperationMetadata> response = analyticsHubServiceClient.DeleteSubscription(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = analyticsHubServiceClient.PollOnceDeleteSubscription(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
}
}
// [END analyticshub_v1_generated_AnalyticsHubService_DeleteSubscription_sync_flattened]
}

0 comments on commit 1353440

Please sign in to comment.