Skip to content

Commit

Permalink
fix: bump default deadline on CreateDatabase and RestoreDatabase to 2…
Browse files Browse the repository at this point in the history
… minutes

feat: add filter argument to FirestoreAdmin.ListBackupsRequest

PiperOrigin-RevId: 716763143

Source-Link: googleapis/googleapis@3776db1

Source-Link: googleapis/googleapis-gen@10db5ac
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuRmlyZXN0b3JlLkFkbWluLlYxLy5Pd2xCb3QueWFtbCIsImgiOiIxMGRiNWFjNDc2YTk0YWE0YzllMGEyNDk0NmQ5ZmExYjdlYTQ1NmY2In0=
  • Loading branch information
gcf-owl-bot[bot] committed Jan 17, 2025
1 parent 63e48f3 commit 80b93fe
Show file tree
Hide file tree
Showing 159 changed files with 46,618 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// Copyright 2025 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 firestore_v1_generated_FirestoreAdmin_BulkDeleteDocuments_async_flattened]
using Google.Cloud.Firestore.Admin.V1;
using Google.LongRunning;
using System.Threading.Tasks;

public sealed partial class GeneratedFirestoreAdminClientSnippets
{
/// <summary>Snippet for BulkDeleteDocumentsAsync</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 BulkDeleteDocumentsAsync()
{
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/databases/[DATABASE]";
// Make the request
Operation<BulkDeleteDocumentsResponse, BulkDeleteDocumentsMetadata> response = await firestoreAdminClient.BulkDeleteDocumentsAsync(name);

// Poll until the returned long-running operation is complete
Operation<BulkDeleteDocumentsResponse, BulkDeleteDocumentsMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BulkDeleteDocumentsResponse 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<BulkDeleteDocumentsResponse, BulkDeleteDocumentsMetadata> retrievedResponse = await firestoreAdminClient.PollOnceBulkDeleteDocumentsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BulkDeleteDocumentsResponse retrievedResult = retrievedResponse.Result;
}
}
}
// [END firestore_v1_generated_FirestoreAdmin_BulkDeleteDocuments_async_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
// Copyright 2025 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 firestore_v1_generated_FirestoreAdmin_BulkDeleteDocuments_async]
using Google.Cloud.Firestore.Admin.V1;
using Google.LongRunning;
using System.Threading.Tasks;

public sealed partial class GeneratedFirestoreAdminClientSnippets
{
/// <summary>Snippet for BulkDeleteDocumentsAsync</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 BulkDeleteDocumentsRequestObjectAsync()
{
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
BulkDeleteDocumentsRequest request = new BulkDeleteDocumentsRequest
{
DatabaseName = DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]"),
CollectionIds = { "", },
NamespaceIds = { "", },
};
// Make the request
Operation<BulkDeleteDocumentsResponse, BulkDeleteDocumentsMetadata> response = await firestoreAdminClient.BulkDeleteDocumentsAsync(request);

// Poll until the returned long-running operation is complete
Operation<BulkDeleteDocumentsResponse, BulkDeleteDocumentsMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BulkDeleteDocumentsResponse 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<BulkDeleteDocumentsResponse, BulkDeleteDocumentsMetadata> retrievedResponse = await firestoreAdminClient.PollOnceBulkDeleteDocumentsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BulkDeleteDocumentsResponse retrievedResult = retrievedResponse.Result;
}
}
}
// [END firestore_v1_generated_FirestoreAdmin_BulkDeleteDocuments_async]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// Copyright 2025 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 firestore_v1_generated_FirestoreAdmin_BulkDeleteDocuments_sync]
using Google.Cloud.Firestore.Admin.V1;
using Google.LongRunning;

public sealed partial class GeneratedFirestoreAdminClientSnippets
{
/// <summary>Snippet for BulkDeleteDocuments</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 BulkDeleteDocumentsRequestObject()
{
// Create client
FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.Create();
// Initialize request argument(s)
BulkDeleteDocumentsRequest request = new BulkDeleteDocumentsRequest
{
DatabaseName = DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]"),
CollectionIds = { "", },
NamespaceIds = { "", },
};
// Make the request
Operation<BulkDeleteDocumentsResponse, BulkDeleteDocumentsMetadata> response = firestoreAdminClient.BulkDeleteDocuments(request);

// Poll until the returned long-running operation is complete
Operation<BulkDeleteDocumentsResponse, BulkDeleteDocumentsMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
BulkDeleteDocumentsResponse 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<BulkDeleteDocumentsResponse, BulkDeleteDocumentsMetadata> retrievedResponse = firestoreAdminClient.PollOnceBulkDeleteDocuments(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BulkDeleteDocumentsResponse retrievedResult = retrievedResponse.Result;
}
}
}
// [END firestore_v1_generated_FirestoreAdmin_BulkDeleteDocuments_sync]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// Copyright 2025 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 firestore_v1_generated_FirestoreAdmin_BulkDeleteDocuments_async_flattened_resourceNames]
using Google.Cloud.Firestore.Admin.V1;
using Google.LongRunning;
using System.Threading.Tasks;

public sealed partial class GeneratedFirestoreAdminClientSnippets
{
/// <summary>Snippet for BulkDeleteDocumentsAsync</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 BulkDeleteDocumentsResourceNamesAsync()
{
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
DatabaseName name = DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]");
// Make the request
Operation<BulkDeleteDocumentsResponse, BulkDeleteDocumentsMetadata> response = await firestoreAdminClient.BulkDeleteDocumentsAsync(name);

// Poll until the returned long-running operation is complete
Operation<BulkDeleteDocumentsResponse, BulkDeleteDocumentsMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BulkDeleteDocumentsResponse 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<BulkDeleteDocumentsResponse, BulkDeleteDocumentsMetadata> retrievedResponse = await firestoreAdminClient.PollOnceBulkDeleteDocumentsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BulkDeleteDocumentsResponse retrievedResult = retrievedResponse.Result;
}
}
}
// [END firestore_v1_generated_FirestoreAdmin_BulkDeleteDocuments_async_flattened_resourceNames]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// Copyright 2025 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 firestore_v1_generated_FirestoreAdmin_BulkDeleteDocuments_sync_flattened_resourceNames]
using Google.Cloud.Firestore.Admin.V1;
using Google.LongRunning;

public sealed partial class GeneratedFirestoreAdminClientSnippets
{
/// <summary>Snippet for BulkDeleteDocuments</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 BulkDeleteDocumentsResourceNames()
{
// Create client
FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.Create();
// Initialize request argument(s)
DatabaseName name = DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]");
// Make the request
Operation<BulkDeleteDocumentsResponse, BulkDeleteDocumentsMetadata> response = firestoreAdminClient.BulkDeleteDocuments(name);

// Poll until the returned long-running operation is complete
Operation<BulkDeleteDocumentsResponse, BulkDeleteDocumentsMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
BulkDeleteDocumentsResponse 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<BulkDeleteDocumentsResponse, BulkDeleteDocumentsMetadata> retrievedResponse = firestoreAdminClient.PollOnceBulkDeleteDocuments(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BulkDeleteDocumentsResponse retrievedResult = retrievedResponse.Result;
}
}
}
// [END firestore_v1_generated_FirestoreAdmin_BulkDeleteDocuments_sync_flattened_resourceNames]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// Copyright 2025 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 firestore_v1_generated_FirestoreAdmin_BulkDeleteDocuments_sync_flattened]
using Google.Cloud.Firestore.Admin.V1;
using Google.LongRunning;

public sealed partial class GeneratedFirestoreAdminClientSnippets
{
/// <summary>Snippet for BulkDeleteDocuments</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 BulkDeleteDocuments()
{
// Create client
FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/databases/[DATABASE]";
// Make the request
Operation<BulkDeleteDocumentsResponse, BulkDeleteDocumentsMetadata> response = firestoreAdminClient.BulkDeleteDocuments(name);

// Poll until the returned long-running operation is complete
Operation<BulkDeleteDocumentsResponse, BulkDeleteDocumentsMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
BulkDeleteDocumentsResponse 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<BulkDeleteDocumentsResponse, BulkDeleteDocumentsMetadata> retrievedResponse = firestoreAdminClient.PollOnceBulkDeleteDocuments(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BulkDeleteDocumentsResponse retrievedResult = retrievedResponse.Result;
}
}
}
// [END firestore_v1_generated_FirestoreAdmin_BulkDeleteDocuments_sync_flattened]
}
Loading

0 comments on commit 80b93fe

Please sign in to comment.