public abstract class FirestoreAdminClient
Reference documentation and code samples for the Firestore Admin v1 API class FirestoreAdminClient.
FirestoreAdmin client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Firestore.Admin.V1Assembly
Google.Cloud.Firestore.Admin.V1.dll
Remarks
The Cloud Firestore Admin API.
This API provides several administrative services for Cloud Firestore.
Project, Database, Namespace, Collection, Collection Group, and Document are used as defined in the Google Cloud Firestore API.
Operation: An Operation represents work being performed in the background.
The index service manages Cloud Firestore indexes.
Index creation is performed asynchronously. An Operation resource is created for each such asynchronous operation. The state of the operation (including any errors encountered) may be queried via the Operation resource.
The Operations collection provides a record of actions performed for the specified Project (including any Operations in progress). Operations are not created directly but through calls on other collections or resources.
An Operation that is done may be deleted so that it is no longer listed as
part of the Operation collection. Operations are garbage collected after
30 days. By default, ListOperations will only return in progress and failed
operations. To list completed operation, issue a ListOperations request with
the filter done: true
.
Operations are created by service FirestoreAdmin
, but are accessed via
service google.longrunning.Operations
.
Properties
CreateDatabaseOperationsClient
public virtual OperationsClient CreateDatabaseOperationsClient { get; }
The long-running operations client for CreateDatabase
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
CreateIndexOperationsClient
public virtual OperationsClient CreateIndexOperationsClient { get; }
The long-running operations client for CreateIndex
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the FirestoreAdmin service, which is a host of "firestore.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
string |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default FirestoreAdmin scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyListstring |
The default FirestoreAdmin scopes are:
DeleteDatabaseOperationsClient
public virtual OperationsClient DeleteDatabaseOperationsClient { get; }
The long-running operations client for DeleteDatabase
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
ExportDocumentsOperationsClient
public virtual OperationsClient ExportDocumentsOperationsClient { get; }
The long-running operations client for ExportDocuments
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
GrpcClient
public virtual FirestoreAdmin.FirestoreAdminClient GrpcClient { get; }
The underlying gRPC FirestoreAdmin client
Property Value | |
---|---|
Type | Description |
FirestoreAdminFirestoreAdminClient |
ImportDocumentsOperationsClient
public virtual OperationsClient ImportDocumentsOperationsClient { get; }
The long-running operations client for ImportDocuments
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
LocationsClient
public virtual LocationsClient LocationsClient { get; }
The LocationsClient associated with this client.
Property Value | |
---|---|
Type | Description |
LocationsClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
UpdateDatabaseOperationsClient
public virtual OperationsClient UpdateDatabaseOperationsClient { get; }
The long-running operations client for UpdateDatabase
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
UpdateFieldOperationsClient
public virtual OperationsClient UpdateFieldOperationsClient { get; }
The long-running operations client for UpdateField
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
Methods
Create()
public static FirestoreAdminClient Create()
Synchronously creates a FirestoreAdminClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use FirestoreAdminClientBuilder.
Returns | |
---|---|
Type | Description |
FirestoreAdminClient | The created FirestoreAdminClient. |
CreateAsync(CancellationToken)
public static Task<FirestoreAdminClient> CreateAsync(CancellationToken cancellationToken = default)
Asynchronously creates a FirestoreAdminClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use FirestoreAdminClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
TaskFirestoreAdminClient | The task representing the created FirestoreAdminClient. |
CreateDatabase(ProjectName, Database, string, CallSettings)
public virtual Operation<Database, CreateDatabaseMetadata> CreateDatabase(ProjectName parent, Database database, string databaseId, CallSettings callSettings = null)
Create a database.
Parameters | |
---|---|
Name | Description |
parent | ProjectName Required. A parent name of the form
|
database | Database Required. The Database to create. |
databaseId | string Required. The ID to use for the database, which will become the final component of the database's resource name. This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ with first character a letter and the last a letter or a number. Must not be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. "(default)" database id is also valid. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationDatabaseCreateDatabaseMetadata | The RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
gcfav::Database database = new gcfav::Database();
string databaseId = "";
// Make the request
Operation<gcfav::Database, gcfav::CreateDatabaseMetadata> response = firestoreAdminClient.CreateDatabase(parent, database, databaseId);
// Poll until the returned long-running operation is complete
Operation<gcfav::Database, gcfav::CreateDatabaseMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcfav::Database 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<gcfav::Database, gcfav::CreateDatabaseMetadata> retrievedResponse = firestoreAdminClient.PollOnceCreateDatabase(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Database retrievedResult = retrievedResponse.Result;
}
CreateDatabase(CreateDatabaseRequest, CallSettings)
public virtual Operation<Database, CreateDatabaseMetadata> CreateDatabase(CreateDatabaseRequest request, CallSettings callSettings = null)
Create a database.
Parameters | |
---|---|
Name | Description |
request | CreateDatabaseRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationDatabaseCreateDatabaseMetadata | The RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
gcfav::CreateDatabaseRequest request = new gcfav::CreateDatabaseRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
Database = new gcfav::Database(),
DatabaseId = "",
};
// Make the request
Operation<gcfav::Database, gcfav::CreateDatabaseMetadata> response = firestoreAdminClient.CreateDatabase(request);
// Poll until the returned long-running operation is complete
Operation<gcfav::Database, gcfav::CreateDatabaseMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcfav::Database 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<gcfav::Database, gcfav::CreateDatabaseMetadata> retrievedResponse = firestoreAdminClient.PollOnceCreateDatabase(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Database retrievedResult = retrievedResponse.Result;
}
CreateDatabase(string, Database, string, CallSettings)
public virtual Operation<Database, CreateDatabaseMetadata> CreateDatabase(string parent, Database database, string databaseId, CallSettings callSettings = null)
Create a database.
Parameters | |
---|---|
Name | Description |
parent | string Required. A parent name of the form
|
database | Database Required. The Database to create. |
databaseId | string Required. The ID to use for the database, which will become the final component of the database's resource name. This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ with first character a letter and the last a letter or a number. Must not be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. "(default)" database id is also valid. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationDatabaseCreateDatabaseMetadata | The RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
gcfav::Database database = new gcfav::Database();
string databaseId = "";
// Make the request
Operation<gcfav::Database, gcfav::CreateDatabaseMetadata> response = firestoreAdminClient.CreateDatabase(parent, database, databaseId);
// Poll until the returned long-running operation is complete
Operation<gcfav::Database, gcfav::CreateDatabaseMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcfav::Database 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<gcfav::Database, gcfav::CreateDatabaseMetadata> retrievedResponse = firestoreAdminClient.PollOnceCreateDatabase(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Database retrievedResult = retrievedResponse.Result;
}
CreateDatabaseAsync(ProjectName, Database, string, CallSettings)
public virtual Task<Operation<Database, CreateDatabaseMetadata>> CreateDatabaseAsync(ProjectName parent, Database database, string databaseId, CallSettings callSettings = null)
Create a database.
Parameters | |
---|---|
Name | Description |
parent | ProjectName Required. A parent name of the form
|
database | Database Required. The Database to create. |
databaseId | string Required. The ID to use for the database, which will become the final component of the database's resource name. This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ with first character a letter and the last a letter or a number. Must not be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. "(default)" database id is also valid. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationDatabaseCreateDatabaseMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
gcfav::Database database = new gcfav::Database();
string databaseId = "";
// Make the request
Operation<gcfav::Database, gcfav::CreateDatabaseMetadata> response = await firestoreAdminClient.CreateDatabaseAsync(parent, database, databaseId);
// Poll until the returned long-running operation is complete
Operation<gcfav::Database, gcfav::CreateDatabaseMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcfav::Database 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<gcfav::Database, gcfav::CreateDatabaseMetadata> retrievedResponse = await firestoreAdminClient.PollOnceCreateDatabaseAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Database retrievedResult = retrievedResponse.Result;
}
CreateDatabaseAsync(ProjectName, Database, string, CancellationToken)
public virtual Task<Operation<Database, CreateDatabaseMetadata>> CreateDatabaseAsync(ProjectName parent, Database database, string databaseId, CancellationToken cancellationToken)
Create a database.
Parameters | |
---|---|
Name | Description |
parent | ProjectName Required. A parent name of the form
|
database | Database Required. The Database to create. |
databaseId | string Required. The ID to use for the database, which will become the final component of the database's resource name. This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ with first character a letter and the last a letter or a number. Must not be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. "(default)" database id is also valid. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationDatabaseCreateDatabaseMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
gcfav::Database database = new gcfav::Database();
string databaseId = "";
// Make the request
Operation<gcfav::Database, gcfav::CreateDatabaseMetadata> response = await firestoreAdminClient.CreateDatabaseAsync(parent, database, databaseId);
// Poll until the returned long-running operation is complete
Operation<gcfav::Database, gcfav::CreateDatabaseMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcfav::Database 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<gcfav::Database, gcfav::CreateDatabaseMetadata> retrievedResponse = await firestoreAdminClient.PollOnceCreateDatabaseAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Database retrievedResult = retrievedResponse.Result;
}
CreateDatabaseAsync(CreateDatabaseRequest, CallSettings)
public virtual Task<Operation<Database, CreateDatabaseMetadata>> CreateDatabaseAsync(CreateDatabaseRequest request, CallSettings callSettings = null)
Create a database.
Parameters | |
---|---|
Name | Description |
request | CreateDatabaseRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationDatabaseCreateDatabaseMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::CreateDatabaseRequest request = new gcfav::CreateDatabaseRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
Database = new gcfav::Database(),
DatabaseId = "",
};
// Make the request
Operation<gcfav::Database, gcfav::CreateDatabaseMetadata> response = await firestoreAdminClient.CreateDatabaseAsync(request);
// Poll until the returned long-running operation is complete
Operation<gcfav::Database, gcfav::CreateDatabaseMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcfav::Database 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<gcfav::Database, gcfav::CreateDatabaseMetadata> retrievedResponse = await firestoreAdminClient.PollOnceCreateDatabaseAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Database retrievedResult = retrievedResponse.Result;
}
CreateDatabaseAsync(CreateDatabaseRequest, CancellationToken)
public virtual Task<Operation<Database, CreateDatabaseMetadata>> CreateDatabaseAsync(CreateDatabaseRequest request, CancellationToken cancellationToken)
Create a database.
Parameters | |
---|---|
Name | Description |
request | CreateDatabaseRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationDatabaseCreateDatabaseMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::CreateDatabaseRequest request = new gcfav::CreateDatabaseRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
Database = new gcfav::Database(),
DatabaseId = "",
};
// Make the request
Operation<gcfav::Database, gcfav::CreateDatabaseMetadata> response = await firestoreAdminClient.CreateDatabaseAsync(request);
// Poll until the returned long-running operation is complete
Operation<gcfav::Database, gcfav::CreateDatabaseMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcfav::Database 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<gcfav::Database, gcfav::CreateDatabaseMetadata> retrievedResponse = await firestoreAdminClient.PollOnceCreateDatabaseAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Database retrievedResult = retrievedResponse.Result;
}
CreateDatabaseAsync(string, Database, string, CallSettings)
public virtual Task<Operation<Database, CreateDatabaseMetadata>> CreateDatabaseAsync(string parent, Database database, string databaseId, CallSettings callSettings = null)
Create a database.
Parameters | |
---|---|
Name | Description |
parent | string Required. A parent name of the form
|
database | Database Required. The Database to create. |
databaseId | string Required. The ID to use for the database, which will become the final component of the database's resource name. This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ with first character a letter and the last a letter or a number. Must not be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. "(default)" database id is also valid. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationDatabaseCreateDatabaseMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
gcfav::Database database = new gcfav::Database();
string databaseId = "";
// Make the request
Operation<gcfav::Database, gcfav::CreateDatabaseMetadata> response = await firestoreAdminClient.CreateDatabaseAsync(parent, database, databaseId);
// Poll until the returned long-running operation is complete
Operation<gcfav::Database, gcfav::CreateDatabaseMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcfav::Database 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<gcfav::Database, gcfav::CreateDatabaseMetadata> retrievedResponse = await firestoreAdminClient.PollOnceCreateDatabaseAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Database retrievedResult = retrievedResponse.Result;
}
CreateDatabaseAsync(string, Database, string, CancellationToken)
public virtual Task<Operation<Database, CreateDatabaseMetadata>> CreateDatabaseAsync(string parent, Database database, string databaseId, CancellationToken cancellationToken)
Create a database.
Parameters | |
---|---|
Name | Description |
parent | string Required. A parent name of the form
|
database | Database Required. The Database to create. |
databaseId | string Required. The ID to use for the database, which will become the final component of the database's resource name. This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ with first character a letter and the last a letter or a number. Must not be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. "(default)" database id is also valid. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationDatabaseCreateDatabaseMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
gcfav::Database database = new gcfav::Database();
string databaseId = "";
// Make the request
Operation<gcfav::Database, gcfav::CreateDatabaseMetadata> response = await firestoreAdminClient.CreateDatabaseAsync(parent, database, databaseId);
// Poll until the returned long-running operation is complete
Operation<gcfav::Database, gcfav::CreateDatabaseMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcfav::Database 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<gcfav::Database, gcfav::CreateDatabaseMetadata> retrievedResponse = await firestoreAdminClient.PollOnceCreateDatabaseAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Database retrievedResult = retrievedResponse.Result;
}
CreateIndex(CollectionGroupName, Index, CallSettings)
public virtual Operation<Index, IndexOperationMetadata> CreateIndex(CollectionGroupName parent, Index index, CallSettings callSettings = null)
Creates a composite index. This returns a [google.longrunning.Operation][google.longrunning.Operation] which may be used to track the status of the creation. The metadata for the operation will be the type [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata].
Parameters | |
---|---|
Name | Description |
parent | CollectionGroupName Required. A parent name of the form
|
index | Index Required. The composite index to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationIndexIndexOperationMetadata | The RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
gcfav::CollectionGroupName parent = gcfav::CollectionGroupName.FromProjectDatabaseCollection("[PROJECT]", "[DATABASE]", "[COLLECTION]");
gcfav::Index index = new gcfav::Index();
// Make the request
Operation<gcfav::Index, gcfav::IndexOperationMetadata> response = firestoreAdminClient.CreateIndex(parent, index);
// Poll until the returned long-running operation is complete
Operation<gcfav::Index, gcfav::IndexOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcfav::Index 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<gcfav::Index, gcfav::IndexOperationMetadata> retrievedResponse = firestoreAdminClient.PollOnceCreateIndex(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Index retrievedResult = retrievedResponse.Result;
}
CreateIndex(CreateIndexRequest, CallSettings)
public virtual Operation<Index, IndexOperationMetadata> CreateIndex(CreateIndexRequest request, CallSettings callSettings = null)
Creates a composite index. This returns a [google.longrunning.Operation][google.longrunning.Operation] which may be used to track the status of the creation. The metadata for the operation will be the type [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata].
Parameters | |
---|---|
Name | Description |
request | CreateIndexRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationIndexIndexOperationMetadata | The RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
gcfav::CreateIndexRequest request = new gcfav::CreateIndexRequest
{
ParentAsCollectionGroupName = gcfav::CollectionGroupName.FromProjectDatabaseCollection("[PROJECT]", "[DATABASE]", "[COLLECTION]"),
Index = new gcfav::Index(),
};
// Make the request
Operation<gcfav::Index, gcfav::IndexOperationMetadata> response = firestoreAdminClient.CreateIndex(request);
// Poll until the returned long-running operation is complete
Operation<gcfav::Index, gcfav::IndexOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcfav::Index 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<gcfav::Index, gcfav::IndexOperationMetadata> retrievedResponse = firestoreAdminClient.PollOnceCreateIndex(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Index retrievedResult = retrievedResponse.Result;
}
CreateIndex(string, Index, CallSettings)
public virtual Operation<Index, IndexOperationMetadata> CreateIndex(string parent, Index index, CallSettings callSettings = null)
Creates a composite index. This returns a [google.longrunning.Operation][google.longrunning.Operation] which may be used to track the status of the creation. The metadata for the operation will be the type [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata].
Parameters | |
---|---|
Name | Description |
parent | string Required. A parent name of the form
|
index | Index Required. The composite index to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationIndexIndexOperationMetadata | The RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/databases/[DATABASE]/collectionGroups/[COLLECTION]";
gcfav::Index index = new gcfav::Index();
// Make the request
Operation<gcfav::Index, gcfav::IndexOperationMetadata> response = firestoreAdminClient.CreateIndex(parent, index);
// Poll until the returned long-running operation is complete
Operation<gcfav::Index, gcfav::IndexOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcfav::Index 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<gcfav::Index, gcfav::IndexOperationMetadata> retrievedResponse = firestoreAdminClient.PollOnceCreateIndex(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Index retrievedResult = retrievedResponse.Result;
}
CreateIndexAsync(CollectionGroupName, Index, CallSettings)
public virtual Task<Operation<Index, IndexOperationMetadata>> CreateIndexAsync(CollectionGroupName parent, Index index, CallSettings callSettings = null)
Creates a composite index. This returns a [google.longrunning.Operation][google.longrunning.Operation] which may be used to track the status of the creation. The metadata for the operation will be the type [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata].
Parameters | |
---|---|
Name | Description |
parent | CollectionGroupName Required. A parent name of the form
|
index | Index Required. The composite index to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationIndexIndexOperationMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::CollectionGroupName parent = gcfav::CollectionGroupName.FromProjectDatabaseCollection("[PROJECT]", "[DATABASE]", "[COLLECTION]");
gcfav::Index index = new gcfav::Index();
// Make the request
Operation<gcfav::Index, gcfav::IndexOperationMetadata> response = await firestoreAdminClient.CreateIndexAsync(parent, index);
// Poll until the returned long-running operation is complete
Operation<gcfav::Index, gcfav::IndexOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcfav::Index 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<gcfav::Index, gcfav::IndexOperationMetadata> retrievedResponse = await firestoreAdminClient.PollOnceCreateIndexAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Index retrievedResult = retrievedResponse.Result;
}
CreateIndexAsync(CollectionGroupName, Index, CancellationToken)
public virtual Task<Operation<Index, IndexOperationMetadata>> CreateIndexAsync(CollectionGroupName parent, Index index, CancellationToken cancellationToken)
Creates a composite index. This returns a [google.longrunning.Operation][google.longrunning.Operation] which may be used to track the status of the creation. The metadata for the operation will be the type [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata].
Parameters | |
---|---|
Name | Description |
parent | CollectionGroupName Required. A parent name of the form
|
index | Index Required. The composite index to create. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationIndexIndexOperationMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::CollectionGroupName parent = gcfav::CollectionGroupName.FromProjectDatabaseCollection("[PROJECT]", "[DATABASE]", "[COLLECTION]");
gcfav::Index index = new gcfav::Index();
// Make the request
Operation<gcfav::Index, gcfav::IndexOperationMetadata> response = await firestoreAdminClient.CreateIndexAsync(parent, index);
// Poll until the returned long-running operation is complete
Operation<gcfav::Index, gcfav::IndexOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcfav::Index 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<gcfav::Index, gcfav::IndexOperationMetadata> retrievedResponse = await firestoreAdminClient.PollOnceCreateIndexAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Index retrievedResult = retrievedResponse.Result;
}
CreateIndexAsync(CreateIndexRequest, CallSettings)
public virtual Task<Operation<Index, IndexOperationMetadata>> CreateIndexAsync(CreateIndexRequest request, CallSettings callSettings = null)
Creates a composite index. This returns a [google.longrunning.Operation][google.longrunning.Operation] which may be used to track the status of the creation. The metadata for the operation will be the type [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata].
Parameters | |
---|---|
Name | Description |
request | CreateIndexRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationIndexIndexOperationMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::CreateIndexRequest request = new gcfav::CreateIndexRequest
{
ParentAsCollectionGroupName = gcfav::CollectionGroupName.FromProjectDatabaseCollection("[PROJECT]", "[DATABASE]", "[COLLECTION]"),
Index = new gcfav::Index(),
};
// Make the request
Operation<gcfav::Index, gcfav::IndexOperationMetadata> response = await firestoreAdminClient.CreateIndexAsync(request);
// Poll until the returned long-running operation is complete
Operation<gcfav::Index, gcfav::IndexOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcfav::Index 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<gcfav::Index, gcfav::IndexOperationMetadata> retrievedResponse = await firestoreAdminClient.PollOnceCreateIndexAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Index retrievedResult = retrievedResponse.Result;
}
CreateIndexAsync(CreateIndexRequest, CancellationToken)
public virtual Task<Operation<Index, IndexOperationMetadata>> CreateIndexAsync(CreateIndexRequest request, CancellationToken cancellationToken)
Creates a composite index. This returns a [google.longrunning.Operation][google.longrunning.Operation] which may be used to track the status of the creation. The metadata for the operation will be the type [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata].
Parameters | |
---|---|
Name | Description |
request | CreateIndexRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationIndexIndexOperationMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::CreateIndexRequest request = new gcfav::CreateIndexRequest
{
ParentAsCollectionGroupName = gcfav::CollectionGroupName.FromProjectDatabaseCollection("[PROJECT]", "[DATABASE]", "[COLLECTION]"),
Index = new gcfav::Index(),
};
// Make the request
Operation<gcfav::Index, gcfav::IndexOperationMetadata> response = await firestoreAdminClient.CreateIndexAsync(request);
// Poll until the returned long-running operation is complete
Operation<gcfav::Index, gcfav::IndexOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcfav::Index 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<gcfav::Index, gcfav::IndexOperationMetadata> retrievedResponse = await firestoreAdminClient.PollOnceCreateIndexAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Index retrievedResult = retrievedResponse.Result;
}
CreateIndexAsync(string, Index, CallSettings)
public virtual Task<Operation<Index, IndexOperationMetadata>> CreateIndexAsync(string parent, Index index, CallSettings callSettings = null)
Creates a composite index. This returns a [google.longrunning.Operation][google.longrunning.Operation] which may be used to track the status of the creation. The metadata for the operation will be the type [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata].
Parameters | |
---|---|
Name | Description |
parent | string Required. A parent name of the form
|
index | Index Required. The composite index to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationIndexIndexOperationMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/databases/[DATABASE]/collectionGroups/[COLLECTION]";
gcfav::Index index = new gcfav::Index();
// Make the request
Operation<gcfav::Index, gcfav::IndexOperationMetadata> response = await firestoreAdminClient.CreateIndexAsync(parent, index);
// Poll until the returned long-running operation is complete
Operation<gcfav::Index, gcfav::IndexOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcfav::Index 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<gcfav::Index, gcfav::IndexOperationMetadata> retrievedResponse = await firestoreAdminClient.PollOnceCreateIndexAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Index retrievedResult = retrievedResponse.Result;
}
CreateIndexAsync(string, Index, CancellationToken)
public virtual Task<Operation<Index, IndexOperationMetadata>> CreateIndexAsync(string parent, Index index, CancellationToken cancellationToken)
Creates a composite index. This returns a [google.longrunning.Operation][google.longrunning.Operation] which may be used to track the status of the creation. The metadata for the operation will be the type [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata].
Parameters | |
---|---|
Name | Description |
parent | string Required. A parent name of the form
|
index | Index Required. The composite index to create. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationIndexIndexOperationMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/databases/[DATABASE]/collectionGroups/[COLLECTION]";
gcfav::Index index = new gcfav::Index();
// Make the request
Operation<gcfav::Index, gcfav::IndexOperationMetadata> response = await firestoreAdminClient.CreateIndexAsync(parent, index);
// Poll until the returned long-running operation is complete
Operation<gcfav::Index, gcfav::IndexOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcfav::Index 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<gcfav::Index, gcfav::IndexOperationMetadata> retrievedResponse = await firestoreAdminClient.PollOnceCreateIndexAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Index retrievedResult = retrievedResponse.Result;
}
DeleteDatabase(DatabaseName, CallSettings)
public virtual Operation<Database, DeleteDatabaseMetadata> DeleteDatabase(DatabaseName name, CallSettings callSettings = null)
Deletes a database.
Parameters | |
---|---|
Name | Description |
name | DatabaseName Required. A name of the form
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationDatabaseDeleteDatabaseMetadata | The RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
gcfav::DatabaseName name = gcfav::DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]");
// Make the request
Operation<gcfav::Database, gcfav::DeleteDatabaseMetadata> response = firestoreAdminClient.DeleteDatabase(name);
// Poll until the returned long-running operation is complete
Operation<gcfav::Database, gcfav::DeleteDatabaseMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcfav::Database 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<gcfav::Database, gcfav::DeleteDatabaseMetadata> retrievedResponse = firestoreAdminClient.PollOnceDeleteDatabase(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Database retrievedResult = retrievedResponse.Result;
}
DeleteDatabase(DeleteDatabaseRequest, CallSettings)
public virtual Operation<Database, DeleteDatabaseMetadata> DeleteDatabase(DeleteDatabaseRequest request, CallSettings callSettings = null)
Deletes a database.
Parameters | |
---|---|
Name | Description |
request | DeleteDatabaseRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationDatabaseDeleteDatabaseMetadata | The RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
gcfav::DeleteDatabaseRequest request = new gcfav::DeleteDatabaseRequest
{
DatabaseName = gcfav::DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]"),
Etag = "",
};
// Make the request
Operation<gcfav::Database, gcfav::DeleteDatabaseMetadata> response = firestoreAdminClient.DeleteDatabase(request);
// Poll until the returned long-running operation is complete
Operation<gcfav::Database, gcfav::DeleteDatabaseMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcfav::Database 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<gcfav::Database, gcfav::DeleteDatabaseMetadata> retrievedResponse = firestoreAdminClient.PollOnceDeleteDatabase(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Database retrievedResult = retrievedResponse.Result;
}
DeleteDatabase(string, CallSettings)
public virtual Operation<Database, DeleteDatabaseMetadata> DeleteDatabase(string name, CallSettings callSettings = null)
Deletes a database.
Parameters | |
---|---|
Name | Description |
name | string Required. A name of the form
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationDatabaseDeleteDatabaseMetadata | The RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/databases/[DATABASE]";
// Make the request
Operation<gcfav::Database, gcfav::DeleteDatabaseMetadata> response = firestoreAdminClient.DeleteDatabase(name);
// Poll until the returned long-running operation is complete
Operation<gcfav::Database, gcfav::DeleteDatabaseMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcfav::Database 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<gcfav::Database, gcfav::DeleteDatabaseMetadata> retrievedResponse = firestoreAdminClient.PollOnceDeleteDatabase(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Database retrievedResult = retrievedResponse.Result;
}
DeleteDatabaseAsync(DatabaseName, CallSettings)
public virtual Task<Operation<Database, DeleteDatabaseMetadata>> DeleteDatabaseAsync(DatabaseName name, CallSettings callSettings = null)
Deletes a database.
Parameters | |
---|---|
Name | Description |
name | DatabaseName Required. A name of the form
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationDatabaseDeleteDatabaseMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::DatabaseName name = gcfav::DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]");
// Make the request
Operation<gcfav::Database, gcfav::DeleteDatabaseMetadata> response = await firestoreAdminClient.DeleteDatabaseAsync(name);
// Poll until the returned long-running operation is complete
Operation<gcfav::Database, gcfav::DeleteDatabaseMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcfav::Database 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<gcfav::Database, gcfav::DeleteDatabaseMetadata> retrievedResponse = await firestoreAdminClient.PollOnceDeleteDatabaseAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Database retrievedResult = retrievedResponse.Result;
}
DeleteDatabaseAsync(DatabaseName, CancellationToken)
public virtual Task<Operation<Database, DeleteDatabaseMetadata>> DeleteDatabaseAsync(DatabaseName name, CancellationToken cancellationToken)
Deletes a database.
Parameters | |
---|---|
Name | Description |
name | DatabaseName Required. A name of the form
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationDatabaseDeleteDatabaseMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::DatabaseName name = gcfav::DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]");
// Make the request
Operation<gcfav::Database, gcfav::DeleteDatabaseMetadata> response = await firestoreAdminClient.DeleteDatabaseAsync(name);
// Poll until the returned long-running operation is complete
Operation<gcfav::Database, gcfav::DeleteDatabaseMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcfav::Database 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<gcfav::Database, gcfav::DeleteDatabaseMetadata> retrievedResponse = await firestoreAdminClient.PollOnceDeleteDatabaseAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Database retrievedResult = retrievedResponse.Result;
}
DeleteDatabaseAsync(DeleteDatabaseRequest, CallSettings)
public virtual Task<Operation<Database, DeleteDatabaseMetadata>> DeleteDatabaseAsync(DeleteDatabaseRequest request, CallSettings callSettings = null)
Deletes a database.
Parameters | |
---|---|
Name | Description |
request | DeleteDatabaseRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationDatabaseDeleteDatabaseMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::DeleteDatabaseRequest request = new gcfav::DeleteDatabaseRequest
{
DatabaseName = gcfav::DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]"),
Etag = "",
};
// Make the request
Operation<gcfav::Database, gcfav::DeleteDatabaseMetadata> response = await firestoreAdminClient.DeleteDatabaseAsync(request);
// Poll until the returned long-running operation is complete
Operation<gcfav::Database, gcfav::DeleteDatabaseMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcfav::Database 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<gcfav::Database, gcfav::DeleteDatabaseMetadata> retrievedResponse = await firestoreAdminClient.PollOnceDeleteDatabaseAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Database retrievedResult = retrievedResponse.Result;
}
DeleteDatabaseAsync(DeleteDatabaseRequest, CancellationToken)
public virtual Task<Operation<Database, DeleteDatabaseMetadata>> DeleteDatabaseAsync(DeleteDatabaseRequest request, CancellationToken cancellationToken)
Deletes a database.
Parameters | |
---|---|
Name | Description |
request | DeleteDatabaseRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationDatabaseDeleteDatabaseMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::DeleteDatabaseRequest request = new gcfav::DeleteDatabaseRequest
{
DatabaseName = gcfav::DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]"),
Etag = "",
};
// Make the request
Operation<gcfav::Database, gcfav::DeleteDatabaseMetadata> response = await firestoreAdminClient.DeleteDatabaseAsync(request);
// Poll until the returned long-running operation is complete
Operation<gcfav::Database, gcfav::DeleteDatabaseMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcfav::Database 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<gcfav::Database, gcfav::DeleteDatabaseMetadata> retrievedResponse = await firestoreAdminClient.PollOnceDeleteDatabaseAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Database retrievedResult = retrievedResponse.Result;
}
DeleteDatabaseAsync(string, CallSettings)
public virtual Task<Operation<Database, DeleteDatabaseMetadata>> DeleteDatabaseAsync(string name, CallSettings callSettings = null)
Deletes a database.
Parameters | |
---|---|
Name | Description |
name | string Required. A name of the form
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationDatabaseDeleteDatabaseMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/databases/[DATABASE]";
// Make the request
Operation<gcfav::Database, gcfav::DeleteDatabaseMetadata> response = await firestoreAdminClient.DeleteDatabaseAsync(name);
// Poll until the returned long-running operation is complete
Operation<gcfav::Database, gcfav::DeleteDatabaseMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcfav::Database 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<gcfav::Database, gcfav::DeleteDatabaseMetadata> retrievedResponse = await firestoreAdminClient.PollOnceDeleteDatabaseAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Database retrievedResult = retrievedResponse.Result;
}
DeleteDatabaseAsync(string, CancellationToken)
public virtual Task<Operation<Database, DeleteDatabaseMetadata>> DeleteDatabaseAsync(string name, CancellationToken cancellationToken)
Deletes a database.
Parameters | |
---|---|
Name | Description |
name | string Required. A name of the form
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationDatabaseDeleteDatabaseMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/databases/[DATABASE]";
// Make the request
Operation<gcfav::Database, gcfav::DeleteDatabaseMetadata> response = await firestoreAdminClient.DeleteDatabaseAsync(name);
// Poll until the returned long-running operation is complete
Operation<gcfav::Database, gcfav::DeleteDatabaseMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcfav::Database 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<gcfav::Database, gcfav::DeleteDatabaseMetadata> retrievedResponse = await firestoreAdminClient.PollOnceDeleteDatabaseAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Database retrievedResult = retrievedResponse.Result;
}
DeleteIndex(DeleteIndexRequest, CallSettings)
public virtual void DeleteIndex(DeleteIndexRequest request, CallSettings callSettings = null)
Deletes a composite index.
Parameters | |
---|---|
Name | Description |
request | DeleteIndexRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
gcfav::DeleteIndexRequest request = new gcfav::DeleteIndexRequest
{
IndexName = gcfav::IndexName.FromProjectDatabaseCollectionIndex("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]"),
};
// Make the request
firestoreAdminClient.DeleteIndex(request);
DeleteIndex(IndexName, CallSettings)
public virtual void DeleteIndex(IndexName name, CallSettings callSettings = null)
Deletes a composite index.
Parameters | |
---|---|
Name | Description |
name | IndexName Required. A name of the form
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
gcfav::IndexName name = gcfav::IndexName.FromProjectDatabaseCollectionIndex("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]");
// Make the request
firestoreAdminClient.DeleteIndex(name);
DeleteIndex(string, CallSettings)
public virtual void DeleteIndex(string name, CallSettings callSettings = null)
Deletes a composite index.
Parameters | |
---|---|
Name | Description |
name | string Required. A name of the form
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/databases/[DATABASE]/collectionGroups/[COLLECTION]/indexes/[INDEX]";
// Make the request
firestoreAdminClient.DeleteIndex(name);
DeleteIndexAsync(DeleteIndexRequest, CallSettings)
public virtual Task DeleteIndexAsync(DeleteIndexRequest request, CallSettings callSettings = null)
Deletes a composite index.
Parameters | |
---|---|
Name | Description |
request | DeleteIndexRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::DeleteIndexRequest request = new gcfav::DeleteIndexRequest
{
IndexName = gcfav::IndexName.FromProjectDatabaseCollectionIndex("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]"),
};
// Make the request
await firestoreAdminClient.DeleteIndexAsync(request);
DeleteIndexAsync(DeleteIndexRequest, CancellationToken)
public virtual Task DeleteIndexAsync(DeleteIndexRequest request, CancellationToken cancellationToken)
Deletes a composite index.
Parameters | |
---|---|
Name | Description |
request | DeleteIndexRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::DeleteIndexRequest request = new gcfav::DeleteIndexRequest
{
IndexName = gcfav::IndexName.FromProjectDatabaseCollectionIndex("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]"),
};
// Make the request
await firestoreAdminClient.DeleteIndexAsync(request);
DeleteIndexAsync(IndexName, CallSettings)
public virtual Task DeleteIndexAsync(IndexName name, CallSettings callSettings = null)
Deletes a composite index.
Parameters | |
---|---|
Name | Description |
name | IndexName Required. A name of the form
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::IndexName name = gcfav::IndexName.FromProjectDatabaseCollectionIndex("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]");
// Make the request
await firestoreAdminClient.DeleteIndexAsync(name);
DeleteIndexAsync(IndexName, CancellationToken)
public virtual Task DeleteIndexAsync(IndexName name, CancellationToken cancellationToken)
Deletes a composite index.
Parameters | |
---|---|
Name | Description |
name | IndexName Required. A name of the form
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::IndexName name = gcfav::IndexName.FromProjectDatabaseCollectionIndex("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]");
// Make the request
await firestoreAdminClient.DeleteIndexAsync(name);
DeleteIndexAsync(string, CallSettings)
public virtual Task DeleteIndexAsync(string name, CallSettings callSettings = null)
Deletes a composite index.
Parameters | |
---|---|
Name | Description |
name | string Required. A name of the form
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/databases/[DATABASE]/collectionGroups/[COLLECTION]/indexes/[INDEX]";
// Make the request
await firestoreAdminClient.DeleteIndexAsync(name);
DeleteIndexAsync(string, CancellationToken)
public virtual Task DeleteIndexAsync(string name, CancellationToken cancellationToken)
Deletes a composite index.
Parameters | |
---|---|
Name | Description |
name | string Required. A name of the form
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/databases/[DATABASE]/collectionGroups/[COLLECTION]/indexes/[INDEX]";
// Make the request
await firestoreAdminClient.DeleteIndexAsync(name);
ExportDocuments(DatabaseName, CallSettings)
public virtual Operation<ExportDocumentsResponse, ExportDocumentsMetadata> ExportDocuments(DatabaseName name, CallSettings callSettings = null)
Exports a copy of all or a subset of documents from Google Cloud Firestore to another storage system, such as Google Cloud Storage. Recent updates to documents may not be reflected in the export. The export occurs in the background and its progress can be monitored and managed via the Operation resource that is created. The output of an export may only be used once the associated operation is done. If an export operation is cancelled before completion it may leave partial data behind in Google Cloud Storage.
For more details on export behavior and output format, refer to: https://cloud.google.com/firestore/docs/manage-data/export-import
Parameters | |
---|---|
Name | Description |
name | DatabaseName Required. Database to export. Should be of the form:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationExportDocumentsResponseExportDocumentsMetadata | The RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
gcfav::DatabaseName name = gcfav::DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]");
// Make the request
Operation<gcfav::ExportDocumentsResponse, gcfav::ExportDocumentsMetadata> response = firestoreAdminClient.ExportDocuments(name);
// Poll until the returned long-running operation is complete
Operation<gcfav::ExportDocumentsResponse, gcfav::ExportDocumentsMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcfav::ExportDocumentsResponse 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<gcfav::ExportDocumentsResponse, gcfav::ExportDocumentsMetadata> retrievedResponse = firestoreAdminClient.PollOnceExportDocuments(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::ExportDocumentsResponse retrievedResult = retrievedResponse.Result;
}
ExportDocuments(ExportDocumentsRequest, CallSettings)
public virtual Operation<ExportDocumentsResponse, ExportDocumentsMetadata> ExportDocuments(ExportDocumentsRequest request, CallSettings callSettings = null)
Exports a copy of all or a subset of documents from Google Cloud Firestore to another storage system, such as Google Cloud Storage. Recent updates to documents may not be reflected in the export. The export occurs in the background and its progress can be monitored and managed via the Operation resource that is created. The output of an export may only be used once the associated operation is done. If an export operation is cancelled before completion it may leave partial data behind in Google Cloud Storage.
For more details on export behavior and output format, refer to: https://cloud.google.com/firestore/docs/manage-data/export-import
Parameters | |
---|---|
Name | Description |
request | ExportDocumentsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationExportDocumentsResponseExportDocumentsMetadata | The RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
gcfav::ExportDocumentsRequest request = new gcfav::ExportDocumentsRequest
{
DatabaseName = gcfav::DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]"),
CollectionIds = { "", },
OutputUriPrefix = "",
NamespaceIds = { "", },
SnapshotTime = new Timestamp(),
};
// Make the request
Operation<gcfav::ExportDocumentsResponse, gcfav::ExportDocumentsMetadata> response = firestoreAdminClient.ExportDocuments(request);
// Poll until the returned long-running operation is complete
Operation<gcfav::ExportDocumentsResponse, gcfav::ExportDocumentsMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcfav::ExportDocumentsResponse 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<gcfav::ExportDocumentsResponse, gcfav::ExportDocumentsMetadata> retrievedResponse = firestoreAdminClient.PollOnceExportDocuments(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::ExportDocumentsResponse retrievedResult = retrievedResponse.Result;
}
ExportDocuments(string, CallSettings)
public virtual Operation<ExportDocumentsResponse, ExportDocumentsMetadata> ExportDocuments(string name, CallSettings callSettings = null)
Exports a copy of all or a subset of documents from Google Cloud Firestore to another storage system, such as Google Cloud Storage. Recent updates to documents may not be reflected in the export. The export occurs in the background and its progress can be monitored and managed via the Operation resource that is created. The output of an export may only be used once the associated operation is done. If an export operation is cancelled before completion it may leave partial data behind in Google Cloud Storage.
For more details on export behavior and output format, refer to: https://cloud.google.com/firestore/docs/manage-data/export-import
Parameters | |
---|---|
Name | Description |
name | string Required. Database to export. Should be of the form:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationExportDocumentsResponseExportDocumentsMetadata | The RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/databases/[DATABASE]";
// Make the request
Operation<gcfav::ExportDocumentsResponse, gcfav::ExportDocumentsMetadata> response = firestoreAdminClient.ExportDocuments(name);
// Poll until the returned long-running operation is complete
Operation<gcfav::ExportDocumentsResponse, gcfav::ExportDocumentsMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcfav::ExportDocumentsResponse 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<gcfav::ExportDocumentsResponse, gcfav::ExportDocumentsMetadata> retrievedResponse = firestoreAdminClient.PollOnceExportDocuments(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::ExportDocumentsResponse retrievedResult = retrievedResponse.Result;
}
ExportDocumentsAsync(DatabaseName, CallSettings)
public virtual Task<Operation<ExportDocumentsResponse, ExportDocumentsMetadata>> ExportDocumentsAsync(DatabaseName name, CallSettings callSettings = null)
Exports a copy of all or a subset of documents from Google Cloud Firestore to another storage system, such as Google Cloud Storage. Recent updates to documents may not be reflected in the export. The export occurs in the background and its progress can be monitored and managed via the Operation resource that is created. The output of an export may only be used once the associated operation is done. If an export operation is cancelled before completion it may leave partial data behind in Google Cloud Storage.
For more details on export behavior and output format, refer to: https://cloud.google.com/firestore/docs/manage-data/export-import
Parameters | |
---|---|
Name | Description |
name | DatabaseName Required. Database to export. Should be of the form:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationExportDocumentsResponseExportDocumentsMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::DatabaseName name = gcfav::DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]");
// Make the request
Operation<gcfav::ExportDocumentsResponse, gcfav::ExportDocumentsMetadata> response = await firestoreAdminClient.ExportDocumentsAsync(name);
// Poll until the returned long-running operation is complete
Operation<gcfav::ExportDocumentsResponse, gcfav::ExportDocumentsMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcfav::ExportDocumentsResponse 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<gcfav::ExportDocumentsResponse, gcfav::ExportDocumentsMetadata> retrievedResponse = await firestoreAdminClient.PollOnceExportDocumentsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::ExportDocumentsResponse retrievedResult = retrievedResponse.Result;
}
ExportDocumentsAsync(DatabaseName, CancellationToken)
public virtual Task<Operation<ExportDocumentsResponse, ExportDocumentsMetadata>> ExportDocumentsAsync(DatabaseName name, CancellationToken cancellationToken)
Exports a copy of all or a subset of documents from Google Cloud Firestore to another storage system, such as Google Cloud Storage. Recent updates to documents may not be reflected in the export. The export occurs in the background and its progress can be monitored and managed via the Operation resource that is created. The output of an export may only be used once the associated operation is done. If an export operation is cancelled before completion it may leave partial data behind in Google Cloud Storage.
For more details on export behavior and output format, refer to: https://cloud.google.com/firestore/docs/manage-data/export-import
Parameters | |
---|---|
Name | Description |
name | DatabaseName Required. Database to export. Should be of the form:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationExportDocumentsResponseExportDocumentsMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::DatabaseName name = gcfav::DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]");
// Make the request
Operation<gcfav::ExportDocumentsResponse, gcfav::ExportDocumentsMetadata> response = await firestoreAdminClient.ExportDocumentsAsync(name);
// Poll until the returned long-running operation is complete
Operation<gcfav::ExportDocumentsResponse, gcfav::ExportDocumentsMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcfav::ExportDocumentsResponse 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<gcfav::ExportDocumentsResponse, gcfav::ExportDocumentsMetadata> retrievedResponse = await firestoreAdminClient.PollOnceExportDocumentsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::ExportDocumentsResponse retrievedResult = retrievedResponse.Result;
}
ExportDocumentsAsync(ExportDocumentsRequest, CallSettings)
public virtual Task<Operation<ExportDocumentsResponse, ExportDocumentsMetadata>> ExportDocumentsAsync(ExportDocumentsRequest request, CallSettings callSettings = null)
Exports a copy of all or a subset of documents from Google Cloud Firestore to another storage system, such as Google Cloud Storage. Recent updates to documents may not be reflected in the export. The export occurs in the background and its progress can be monitored and managed via the Operation resource that is created. The output of an export may only be used once the associated operation is done. If an export operation is cancelled before completion it may leave partial data behind in Google Cloud Storage.
For more details on export behavior and output format, refer to: https://cloud.google.com/firestore/docs/manage-data/export-import
Parameters | |
---|---|
Name | Description |
request | ExportDocumentsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationExportDocumentsResponseExportDocumentsMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::ExportDocumentsRequest request = new gcfav::ExportDocumentsRequest
{
DatabaseName = gcfav::DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]"),
CollectionIds = { "", },
OutputUriPrefix = "",
NamespaceIds = { "", },
SnapshotTime = new Timestamp(),
};
// Make the request
Operation<gcfav::ExportDocumentsResponse, gcfav::ExportDocumentsMetadata> response = await firestoreAdminClient.ExportDocumentsAsync(request);
// Poll until the returned long-running operation is complete
Operation<gcfav::ExportDocumentsResponse, gcfav::ExportDocumentsMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcfav::ExportDocumentsResponse 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<gcfav::ExportDocumentsResponse, gcfav::ExportDocumentsMetadata> retrievedResponse = await firestoreAdminClient.PollOnceExportDocumentsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::ExportDocumentsResponse retrievedResult = retrievedResponse.Result;
}
ExportDocumentsAsync(ExportDocumentsRequest, CancellationToken)
public virtual Task<Operation<ExportDocumentsResponse, ExportDocumentsMetadata>> ExportDocumentsAsync(ExportDocumentsRequest request, CancellationToken cancellationToken)
Exports a copy of all or a subset of documents from Google Cloud Firestore to another storage system, such as Google Cloud Storage. Recent updates to documents may not be reflected in the export. The export occurs in the background and its progress can be monitored and managed via the Operation resource that is created. The output of an export may only be used once the associated operation is done. If an export operation is cancelled before completion it may leave partial data behind in Google Cloud Storage.
For more details on export behavior and output format, refer to: https://cloud.google.com/firestore/docs/manage-data/export-import
Parameters | |
---|---|
Name | Description |
request | ExportDocumentsRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationExportDocumentsResponseExportDocumentsMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::ExportDocumentsRequest request = new gcfav::ExportDocumentsRequest
{
DatabaseName = gcfav::DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]"),
CollectionIds = { "", },
OutputUriPrefix = "",
NamespaceIds = { "", },
SnapshotTime = new Timestamp(),
};
// Make the request
Operation<gcfav::ExportDocumentsResponse, gcfav::ExportDocumentsMetadata> response = await firestoreAdminClient.ExportDocumentsAsync(request);
// Poll until the returned long-running operation is complete
Operation<gcfav::ExportDocumentsResponse, gcfav::ExportDocumentsMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcfav::ExportDocumentsResponse 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<gcfav::ExportDocumentsResponse, gcfav::ExportDocumentsMetadata> retrievedResponse = await firestoreAdminClient.PollOnceExportDocumentsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::ExportDocumentsResponse retrievedResult = retrievedResponse.Result;
}
ExportDocumentsAsync(string, CallSettings)
public virtual Task<Operation<ExportDocumentsResponse, ExportDocumentsMetadata>> ExportDocumentsAsync(string name, CallSettings callSettings = null)
Exports a copy of all or a subset of documents from Google Cloud Firestore to another storage system, such as Google Cloud Storage. Recent updates to documents may not be reflected in the export. The export occurs in the background and its progress can be monitored and managed via the Operation resource that is created. The output of an export may only be used once the associated operation is done. If an export operation is cancelled before completion it may leave partial data behind in Google Cloud Storage.
For more details on export behavior and output format, refer to: https://cloud.google.com/firestore/docs/manage-data/export-import
Parameters | |
---|---|
Name | Description |
name | string Required. Database to export. Should be of the form:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationExportDocumentsResponseExportDocumentsMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/databases/[DATABASE]";
// Make the request
Operation<gcfav::ExportDocumentsResponse, gcfav::ExportDocumentsMetadata> response = await firestoreAdminClient.ExportDocumentsAsync(name);
// Poll until the returned long-running operation is complete
Operation<gcfav::ExportDocumentsResponse, gcfav::ExportDocumentsMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcfav::ExportDocumentsResponse 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<gcfav::ExportDocumentsResponse, gcfav::ExportDocumentsMetadata> retrievedResponse = await firestoreAdminClient.PollOnceExportDocumentsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::ExportDocumentsResponse retrievedResult = retrievedResponse.Result;
}
ExportDocumentsAsync(string, CancellationToken)
public virtual Task<Operation<ExportDocumentsResponse, ExportDocumentsMetadata>> ExportDocumentsAsync(string name, CancellationToken cancellationToken)
Exports a copy of all or a subset of documents from Google Cloud Firestore to another storage system, such as Google Cloud Storage. Recent updates to documents may not be reflected in the export. The export occurs in the background and its progress can be monitored and managed via the Operation resource that is created. The output of an export may only be used once the associated operation is done. If an export operation is cancelled before completion it may leave partial data behind in Google Cloud Storage.
For more details on export behavior and output format, refer to: https://cloud.google.com/firestore/docs/manage-data/export-import
Parameters | |
---|---|
Name | Description |
name | string Required. Database to export. Should be of the form:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationExportDocumentsResponseExportDocumentsMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/databases/[DATABASE]";
// Make the request
Operation<gcfav::ExportDocumentsResponse, gcfav::ExportDocumentsMetadata> response = await firestoreAdminClient.ExportDocumentsAsync(name);
// Poll until the returned long-running operation is complete
Operation<gcfav::ExportDocumentsResponse, gcfav::ExportDocumentsMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcfav::ExportDocumentsResponse 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<gcfav::ExportDocumentsResponse, gcfav::ExportDocumentsMetadata> retrievedResponse = await firestoreAdminClient.PollOnceExportDocumentsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::ExportDocumentsResponse retrievedResult = retrievedResponse.Result;
}
GetDatabase(DatabaseName, CallSettings)
public virtual Database GetDatabase(DatabaseName name, CallSettings callSettings = null)
Gets information about a database.
Parameters | |
---|---|
Name | Description |
name | DatabaseName Required. A name of the form
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Database | The RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
gcfav::DatabaseName name = gcfav::DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]");
// Make the request
gcfav::Database response = firestoreAdminClient.GetDatabase(name);
GetDatabase(GetDatabaseRequest, CallSettings)
public virtual Database GetDatabase(GetDatabaseRequest request, CallSettings callSettings = null)
Gets information about a database.
Parameters | |
---|---|
Name | Description |
request | GetDatabaseRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Database | The RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
gcfav::GetDatabaseRequest request = new gcfav::GetDatabaseRequest
{
DatabaseName = gcfav::DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]"),
};
// Make the request
gcfav::Database response = firestoreAdminClient.GetDatabase(request);
GetDatabase(string, CallSettings)
public virtual Database GetDatabase(string name, CallSettings callSettings = null)
Gets information about a database.
Parameters | |
---|---|
Name | Description |
name | string Required. A name of the form
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Database | The RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/databases/[DATABASE]";
// Make the request
gcfav::Database response = firestoreAdminClient.GetDatabase(name);
GetDatabaseAsync(DatabaseName, CallSettings)
public virtual Task<Database> GetDatabaseAsync(DatabaseName name, CallSettings callSettings = null)
Gets information about a database.
Parameters | |
---|---|
Name | Description |
name | DatabaseName Required. A name of the form
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskDatabase | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::DatabaseName name = gcfav::DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]");
// Make the request
gcfav::Database response = await firestoreAdminClient.GetDatabaseAsync(name);
GetDatabaseAsync(DatabaseName, CancellationToken)
public virtual Task<Database> GetDatabaseAsync(DatabaseName name, CancellationToken cancellationToken)
Gets information about a database.
Parameters | |
---|---|
Name | Description |
name | DatabaseName Required. A name of the form
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskDatabase | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::DatabaseName name = gcfav::DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]");
// Make the request
gcfav::Database response = await firestoreAdminClient.GetDatabaseAsync(name);
GetDatabaseAsync(GetDatabaseRequest, CallSettings)
public virtual Task<Database> GetDatabaseAsync(GetDatabaseRequest request, CallSettings callSettings = null)
Gets information about a database.
Parameters | |
---|---|
Name | Description |
request | GetDatabaseRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskDatabase | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::GetDatabaseRequest request = new gcfav::GetDatabaseRequest
{
DatabaseName = gcfav::DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]"),
};
// Make the request
gcfav::Database response = await firestoreAdminClient.GetDatabaseAsync(request);
GetDatabaseAsync(GetDatabaseRequest, CancellationToken)
public virtual Task<Database> GetDatabaseAsync(GetDatabaseRequest request, CancellationToken cancellationToken)
Gets information about a database.
Parameters | |
---|---|
Name | Description |
request | GetDatabaseRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskDatabase | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::GetDatabaseRequest request = new gcfav::GetDatabaseRequest
{
DatabaseName = gcfav::DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]"),
};
// Make the request
gcfav::Database response = await firestoreAdminClient.GetDatabaseAsync(request);
GetDatabaseAsync(string, CallSettings)
public virtual Task<Database> GetDatabaseAsync(string name, CallSettings callSettings = null)
Gets information about a database.
Parameters | |
---|---|
Name | Description |
name | string Required. A name of the form
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskDatabase | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/databases/[DATABASE]";
// Make the request
gcfav::Database response = await firestoreAdminClient.GetDatabaseAsync(name);
GetDatabaseAsync(string, CancellationToken)
public virtual Task<Database> GetDatabaseAsync(string name, CancellationToken cancellationToken)
Gets information about a database.
Parameters | |
---|---|
Name | Description |
name | string Required. A name of the form
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskDatabase | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/databases/[DATABASE]";
// Make the request
gcfav::Database response = await firestoreAdminClient.GetDatabaseAsync(name);
GetField(FieldName, CallSettings)
public virtual Field GetField(FieldName name, CallSettings callSettings = null)
Gets the metadata and configuration for a Field.
Parameters | |
---|---|
Name | Description |
name | FieldName Required. A name of the form
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Field | The RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
gcfav::FieldName name = gcfav::FieldName.FromProjectDatabaseCollectionField("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[FIELD]");
// Make the request
gcfav::Field response = firestoreAdminClient.GetField(name);
GetField(GetFieldRequest, CallSettings)
public virtual Field GetField(GetFieldRequest request, CallSettings callSettings = null)
Gets the metadata and configuration for a Field.
Parameters | |
---|---|
Name | Description |
request | GetFieldRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Field | The RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
gcfav::GetFieldRequest request = new gcfav::GetFieldRequest
{
FieldName = gcfav::FieldName.FromProjectDatabaseCollectionField("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[FIELD]"),
};
// Make the request
gcfav::Field response = firestoreAdminClient.GetField(request);
GetField(string, CallSettings)
public virtual Field GetField(string name, CallSettings callSettings = null)
Gets the metadata and configuration for a Field.
Parameters | |
---|---|
Name | Description |
name | string Required. A name of the form
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Field | The RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/databases/[DATABASE]/collectionGroups/[COLLECTION]/fields/[FIELD]";
// Make the request
gcfav::Field response = firestoreAdminClient.GetField(name);
GetFieldAsync(FieldName, CallSettings)
public virtual Task<Field> GetFieldAsync(FieldName name, CallSettings callSettings = null)
Gets the metadata and configuration for a Field.
Parameters | |
---|---|
Name | Description |
name | FieldName Required. A name of the form
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskField | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::FieldName name = gcfav::FieldName.FromProjectDatabaseCollectionField("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[FIELD]");
// Make the request
gcfav::Field response = await firestoreAdminClient.GetFieldAsync(name);
GetFieldAsync(FieldName, CancellationToken)
public virtual Task<Field> GetFieldAsync(FieldName name, CancellationToken cancellationToken)
Gets the metadata and configuration for a Field.
Parameters | |
---|---|
Name | Description |
name | FieldName Required. A name of the form
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskField | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::FieldName name = gcfav::FieldName.FromProjectDatabaseCollectionField("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[FIELD]");
// Make the request
gcfav::Field response = await firestoreAdminClient.GetFieldAsync(name);
GetFieldAsync(GetFieldRequest, CallSettings)
public virtual Task<Field> GetFieldAsync(GetFieldRequest request, CallSettings callSettings = null)
Gets the metadata and configuration for a Field.
Parameters | |
---|---|
Name | Description |
request | GetFieldRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskField | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::GetFieldRequest request = new gcfav::GetFieldRequest
{
FieldName = gcfav::FieldName.FromProjectDatabaseCollectionField("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[FIELD]"),
};
// Make the request
gcfav::Field response = await firestoreAdminClient.GetFieldAsync(request);
GetFieldAsync(GetFieldRequest, CancellationToken)
public virtual Task<Field> GetFieldAsync(GetFieldRequest request, CancellationToken cancellationToken)
Gets the metadata and configuration for a Field.
Parameters | |
---|---|
Name | Description |
request | GetFieldRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskField | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::GetFieldRequest request = new gcfav::GetFieldRequest
{
FieldName = gcfav::FieldName.FromProjectDatabaseCollectionField("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[FIELD]"),
};
// Make the request
gcfav::Field response = await firestoreAdminClient.GetFieldAsync(request);
GetFieldAsync(string, CallSettings)
public virtual Task<Field> GetFieldAsync(string name, CallSettings callSettings = null)
Gets the metadata and configuration for a Field.
Parameters | |
---|---|
Name | Description |
name | string Required. A name of the form
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskField | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/databases/[DATABASE]/collectionGroups/[COLLECTION]/fields/[FIELD]";
// Make the request
gcfav::Field response = await firestoreAdminClient.GetFieldAsync(name);
GetFieldAsync(string, CancellationToken)
public virtual Task<Field> GetFieldAsync(string name, CancellationToken cancellationToken)
Gets the metadata and configuration for a Field.
Parameters | |
---|---|
Name | Description |
name | string Required. A name of the form
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskField | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/databases/[DATABASE]/collectionGroups/[COLLECTION]/fields/[FIELD]";
// Make the request
gcfav::Field response = await firestoreAdminClient.GetFieldAsync(name);
GetIndex(GetIndexRequest, CallSettings)
public virtual Index GetIndex(GetIndexRequest request, CallSettings callSettings = null)
Gets a composite index.
Parameters | |
---|---|
Name | Description |
request | GetIndexRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Index | The RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
gcfav::GetIndexRequest request = new gcfav::GetIndexRequest
{
IndexName = gcfav::IndexName.FromProjectDatabaseCollectionIndex("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]"),
};
// Make the request
gcfav::Index response = firestoreAdminClient.GetIndex(request);
GetIndex(IndexName, CallSettings)
public virtual Index GetIndex(IndexName name, CallSettings callSettings = null)
Gets a composite index.
Parameters | |
---|---|
Name | Description |
name | IndexName Required. A name of the form
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Index | The RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
gcfav::IndexName name = gcfav::IndexName.FromProjectDatabaseCollectionIndex("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]");
// Make the request
gcfav::Index response = firestoreAdminClient.GetIndex(name);
GetIndex(string, CallSettings)
public virtual Index GetIndex(string name, CallSettings callSettings = null)
Gets a composite index.
Parameters | |
---|---|
Name | Description |
name | string Required. A name of the form
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Index | The RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/databases/[DATABASE]/collectionGroups/[COLLECTION]/indexes/[INDEX]";
// Make the request
gcfav::Index response = firestoreAdminClient.GetIndex(name);
GetIndexAsync(GetIndexRequest, CallSettings)
public virtual Task<Index> GetIndexAsync(GetIndexRequest request, CallSettings callSettings = null)
Gets a composite index.
Parameters | |
---|---|
Name | Description |
request | GetIndexRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskIndex | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::GetIndexRequest request = new gcfav::GetIndexRequest
{
IndexName = gcfav::IndexName.FromProjectDatabaseCollectionIndex("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]"),
};
// Make the request
gcfav::Index response = await firestoreAdminClient.GetIndexAsync(request);
GetIndexAsync(GetIndexRequest, CancellationToken)
public virtual Task<Index> GetIndexAsync(GetIndexRequest request, CancellationToken cancellationToken)
Gets a composite index.
Parameters | |
---|---|
Name | Description |
request | GetIndexRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskIndex | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::GetIndexRequest request = new gcfav::GetIndexRequest
{
IndexName = gcfav::IndexName.FromProjectDatabaseCollectionIndex("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]"),
};
// Make the request
gcfav::Index response = await firestoreAdminClient.GetIndexAsync(request);
GetIndexAsync(IndexName, CallSettings)
public virtual Task<Index> GetIndexAsync(IndexName name, CallSettings callSettings = null)
Gets a composite index.
Parameters | |
---|---|
Name | Description |
name | IndexName Required. A name of the form
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskIndex | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::IndexName name = gcfav::IndexName.FromProjectDatabaseCollectionIndex("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]");
// Make the request
gcfav::Index response = await firestoreAdminClient.GetIndexAsync(name);
GetIndexAsync(IndexName, CancellationToken)
public virtual Task<Index> GetIndexAsync(IndexName name, CancellationToken cancellationToken)
Gets a composite index.
Parameters | |
---|---|
Name | Description |
name | IndexName Required. A name of the form
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskIndex | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::IndexName name = gcfav::IndexName.FromProjectDatabaseCollectionIndex("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]");
// Make the request
gcfav::Index response = await firestoreAdminClient.GetIndexAsync(name);
GetIndexAsync(string, CallSettings)
public virtual Task<Index> GetIndexAsync(string name, CallSettings callSettings = null)
Gets a composite index.
Parameters | |
---|---|
Name | Description |
name | string Required. A name of the form
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskIndex | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/databases/[DATABASE]/collectionGroups/[COLLECTION]/indexes/[INDEX]";
// Make the request
gcfav::Index response = await firestoreAdminClient.GetIndexAsync(name);
GetIndexAsync(string, CancellationToken)
public virtual Task<Index> GetIndexAsync(string name, CancellationToken cancellationToken)
Gets a composite index.
Parameters | |
---|---|
Name | Description |
name | string Required. A name of the form
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskIndex | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/databases/[DATABASE]/collectionGroups/[COLLECTION]/indexes/[INDEX]";
// Make the request
gcfav::Index response = await firestoreAdminClient.GetIndexAsync(name);
ImportDocuments(DatabaseName, CallSettings)
public virtual Operation<Empty, ImportDocumentsMetadata> ImportDocuments(DatabaseName name, CallSettings callSettings = null)
Imports documents into Google Cloud Firestore. Existing documents with the same name are overwritten. The import occurs in the background and its progress can be monitored and managed via the Operation resource that is created. If an ImportDocuments operation is cancelled, it is possible that a subset of the data has already been imported to Cloud Firestore.
Parameters | |
---|---|
Name | Description |
name | DatabaseName Required. Database to import into. Should be of the form:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyImportDocumentsMetadata | The RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
gcfav::DatabaseName name = gcfav::DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]");
// Make the request
Operation<Empty, gcfav::ImportDocumentsMetadata> response = firestoreAdminClient.ImportDocuments(name);
// Poll until the returned long-running operation is complete
Operation<Empty, gcfav::ImportDocumentsMetadata> 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, gcfav::ImportDocumentsMetadata> retrievedResponse = firestoreAdminClient.PollOnceImportDocuments(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;
}
ImportDocuments(ImportDocumentsRequest, CallSettings)
public virtual Operation<Empty, ImportDocumentsMetadata> ImportDocuments(ImportDocumentsRequest request, CallSettings callSettings = null)
Imports documents into Google Cloud Firestore. Existing documents with the same name are overwritten. The import occurs in the background and its progress can be monitored and managed via the Operation resource that is created. If an ImportDocuments operation is cancelled, it is possible that a subset of the data has already been imported to Cloud Firestore.
Parameters | |
---|---|
Name | Description |
request | ImportDocumentsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyImportDocumentsMetadata | The RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
gcfav::ImportDocumentsRequest request = new gcfav::ImportDocumentsRequest
{
DatabaseName = gcfav::DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]"),
CollectionIds = { "", },
InputUriPrefix = "",
NamespaceIds = { "", },
};
// Make the request
Operation<Empty, gcfav::ImportDocumentsMetadata> response = firestoreAdminClient.ImportDocuments(request);
// Poll until the returned long-running operation is complete
Operation<Empty, gcfav::ImportDocumentsMetadata> 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, gcfav::ImportDocumentsMetadata> retrievedResponse = firestoreAdminClient.PollOnceImportDocuments(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;
}
ImportDocuments(string, CallSettings)
public virtual Operation<Empty, ImportDocumentsMetadata> ImportDocuments(string name, CallSettings callSettings = null)
Imports documents into Google Cloud Firestore. Existing documents with the same name are overwritten. The import occurs in the background and its progress can be monitored and managed via the Operation resource that is created. If an ImportDocuments operation is cancelled, it is possible that a subset of the data has already been imported to Cloud Firestore.
Parameters | |
---|---|
Name | Description |
name | string Required. Database to import into. Should be of the form:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyImportDocumentsMetadata | The RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/databases/[DATABASE]";
// Make the request
Operation<Empty, gcfav::ImportDocumentsMetadata> response = firestoreAdminClient.ImportDocuments(name);
// Poll until the returned long-running operation is complete
Operation<Empty, gcfav::ImportDocumentsMetadata> 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, gcfav::ImportDocumentsMetadata> retrievedResponse = firestoreAdminClient.PollOnceImportDocuments(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;
}
ImportDocumentsAsync(DatabaseName, CallSettings)
public virtual Task<Operation<Empty, ImportDocumentsMetadata>> ImportDocumentsAsync(DatabaseName name, CallSettings callSettings = null)
Imports documents into Google Cloud Firestore. Existing documents with the same name are overwritten. The import occurs in the background and its progress can be monitored and managed via the Operation resource that is created. If an ImportDocuments operation is cancelled, it is possible that a subset of the data has already been imported to Cloud Firestore.
Parameters | |
---|---|
Name | Description |
name | DatabaseName Required. Database to import into. Should be of the form:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyImportDocumentsMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::DatabaseName name = gcfav::DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]");
// Make the request
Operation<Empty, gcfav::ImportDocumentsMetadata> response = await firestoreAdminClient.ImportDocumentsAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, gcfav::ImportDocumentsMetadata> 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, gcfav::ImportDocumentsMetadata> retrievedResponse = await firestoreAdminClient.PollOnceImportDocumentsAsync(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;
}
ImportDocumentsAsync(DatabaseName, CancellationToken)
public virtual Task<Operation<Empty, ImportDocumentsMetadata>> ImportDocumentsAsync(DatabaseName name, CancellationToken cancellationToken)
Imports documents into Google Cloud Firestore. Existing documents with the same name are overwritten. The import occurs in the background and its progress can be monitored and managed via the Operation resource that is created. If an ImportDocuments operation is cancelled, it is possible that a subset of the data has already been imported to Cloud Firestore.
Parameters | |
---|---|
Name | Description |
name | DatabaseName Required. Database to import into. Should be of the form:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyImportDocumentsMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::DatabaseName name = gcfav::DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]");
// Make the request
Operation<Empty, gcfav::ImportDocumentsMetadata> response = await firestoreAdminClient.ImportDocumentsAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, gcfav::ImportDocumentsMetadata> 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, gcfav::ImportDocumentsMetadata> retrievedResponse = await firestoreAdminClient.PollOnceImportDocumentsAsync(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;
}
ImportDocumentsAsync(ImportDocumentsRequest, CallSettings)
public virtual Task<Operation<Empty, ImportDocumentsMetadata>> ImportDocumentsAsync(ImportDocumentsRequest request, CallSettings callSettings = null)
Imports documents into Google Cloud Firestore. Existing documents with the same name are overwritten. The import occurs in the background and its progress can be monitored and managed via the Operation resource that is created. If an ImportDocuments operation is cancelled, it is possible that a subset of the data has already been imported to Cloud Firestore.
Parameters | |
---|---|
Name | Description |
request | ImportDocumentsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyImportDocumentsMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::ImportDocumentsRequest request = new gcfav::ImportDocumentsRequest
{
DatabaseName = gcfav::DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]"),
CollectionIds = { "", },
InputUriPrefix = "",
NamespaceIds = { "", },
};
// Make the request
Operation<Empty, gcfav::ImportDocumentsMetadata> response = await firestoreAdminClient.ImportDocumentsAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, gcfav::ImportDocumentsMetadata> 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, gcfav::ImportDocumentsMetadata> retrievedResponse = await firestoreAdminClient.PollOnceImportDocumentsAsync(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;
}
ImportDocumentsAsync(ImportDocumentsRequest, CancellationToken)
public virtual Task<Operation<Empty, ImportDocumentsMetadata>> ImportDocumentsAsync(ImportDocumentsRequest request, CancellationToken cancellationToken)
Imports documents into Google Cloud Firestore. Existing documents with the same name are overwritten. The import occurs in the background and its progress can be monitored and managed via the Operation resource that is created. If an ImportDocuments operation is cancelled, it is possible that a subset of the data has already been imported to Cloud Firestore.
Parameters | |
---|---|
Name | Description |
request | ImportDocumentsRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyImportDocumentsMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::ImportDocumentsRequest request = new gcfav::ImportDocumentsRequest
{
DatabaseName = gcfav::DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]"),
CollectionIds = { "", },
InputUriPrefix = "",
NamespaceIds = { "", },
};
// Make the request
Operation<Empty, gcfav::ImportDocumentsMetadata> response = await firestoreAdminClient.ImportDocumentsAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, gcfav::ImportDocumentsMetadata> 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, gcfav::ImportDocumentsMetadata> retrievedResponse = await firestoreAdminClient.PollOnceImportDocumentsAsync(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;
}
ImportDocumentsAsync(string, CallSettings)
public virtual Task<Operation<Empty, ImportDocumentsMetadata>> ImportDocumentsAsync(string name, CallSettings callSettings = null)
Imports documents into Google Cloud Firestore. Existing documents with the same name are overwritten. The import occurs in the background and its progress can be monitored and managed via the Operation resource that is created. If an ImportDocuments operation is cancelled, it is possible that a subset of the data has already been imported to Cloud Firestore.
Parameters | |
---|---|
Name | Description |
name | string Required. Database to import into. Should be of the form:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyImportDocumentsMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/databases/[DATABASE]";
// Make the request
Operation<Empty, gcfav::ImportDocumentsMetadata> response = await firestoreAdminClient.ImportDocumentsAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, gcfav::ImportDocumentsMetadata> 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, gcfav::ImportDocumentsMetadata> retrievedResponse = await firestoreAdminClient.PollOnceImportDocumentsAsync(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;
}
ImportDocumentsAsync(string, CancellationToken)
public virtual Task<Operation<Empty, ImportDocumentsMetadata>> ImportDocumentsAsync(string name, CancellationToken cancellationToken)
Imports documents into Google Cloud Firestore. Existing documents with the same name are overwritten. The import occurs in the background and its progress can be monitored and managed via the Operation resource that is created. If an ImportDocuments operation is cancelled, it is possible that a subset of the data has already been imported to Cloud Firestore.
Parameters | |
---|---|
Name | Description |
name | string Required. Database to import into. Should be of the form:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyImportDocumentsMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/databases/[DATABASE]";
// Make the request
Operation<Empty, gcfav::ImportDocumentsMetadata> response = await firestoreAdminClient.ImportDocumentsAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, gcfav::ImportDocumentsMetadata> 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, gcfav::ImportDocumentsMetadata> retrievedResponse = await firestoreAdminClient.PollOnceImportDocumentsAsync(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;
}
ListDatabases(ProjectName, CallSettings)
public virtual ListDatabasesResponse ListDatabases(ProjectName parent, CallSettings callSettings = null)
List all the databases in the project.
Parameters | |
---|---|
Name | Description |
parent | ProjectName Required. A parent name of the form
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ListDatabasesResponse | The RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
// Make the request
gcfav::ListDatabasesResponse response = firestoreAdminClient.ListDatabases(parent);
ListDatabases(ListDatabasesRequest, CallSettings)
public virtual ListDatabasesResponse ListDatabases(ListDatabasesRequest request, CallSettings callSettings = null)
List all the databases in the project.
Parameters | |
---|---|
Name | Description |
request | ListDatabasesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ListDatabasesResponse | The RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
gcfav::ListDatabasesRequest request = new gcfav::ListDatabasesRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
gcfav::ListDatabasesResponse response = firestoreAdminClient.ListDatabases(request);
ListDatabases(string, CallSettings)
public virtual ListDatabasesResponse ListDatabases(string parent, CallSettings callSettings = null)
List all the databases in the project.
Parameters | |
---|---|
Name | Description |
parent | string Required. A parent name of the form
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ListDatabasesResponse | The RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
// Make the request
gcfav::ListDatabasesResponse response = firestoreAdminClient.ListDatabases(parent);
ListDatabasesAsync(ProjectName, CallSettings)
public virtual Task<ListDatabasesResponse> ListDatabasesAsync(ProjectName parent, CallSettings callSettings = null)
List all the databases in the project.
Parameters | |
---|---|
Name | Description |
parent | ProjectName Required. A parent name of the form
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskListDatabasesResponse | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
// Make the request
gcfav::ListDatabasesResponse response = await firestoreAdminClient.ListDatabasesAsync(parent);
ListDatabasesAsync(ProjectName, CancellationToken)
public virtual Task<ListDatabasesResponse> ListDatabasesAsync(ProjectName parent, CancellationToken cancellationToken)
List all the databases in the project.
Parameters | |
---|---|
Name | Description |
parent | ProjectName Required. A parent name of the form
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskListDatabasesResponse | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
// Make the request
gcfav::ListDatabasesResponse response = await firestoreAdminClient.ListDatabasesAsync(parent);
ListDatabasesAsync(ListDatabasesRequest, CallSettings)
public virtual Task<ListDatabasesResponse> ListDatabasesAsync(ListDatabasesRequest request, CallSettings callSettings = null)
List all the databases in the project.
Parameters | |
---|---|
Name | Description |
request | ListDatabasesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskListDatabasesResponse | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::ListDatabasesRequest request = new gcfav::ListDatabasesRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
gcfav::ListDatabasesResponse response = await firestoreAdminClient.ListDatabasesAsync(request);
ListDatabasesAsync(ListDatabasesRequest, CancellationToken)
public virtual Task<ListDatabasesResponse> ListDatabasesAsync(ListDatabasesRequest request, CancellationToken cancellationToken)
List all the databases in the project.
Parameters | |
---|---|
Name | Description |
request | ListDatabasesRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskListDatabasesResponse | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::ListDatabasesRequest request = new gcfav::ListDatabasesRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
gcfav::ListDatabasesResponse response = await firestoreAdminClient.ListDatabasesAsync(request);
ListDatabasesAsync(string, CallSettings)
public virtual Task<ListDatabasesResponse> ListDatabasesAsync(string parent, CallSettings callSettings = null)
List all the databases in the project.
Parameters | |
---|---|
Name | Description |
parent | string Required. A parent name of the form
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskListDatabasesResponse | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
// Make the request
gcfav::ListDatabasesResponse response = await firestoreAdminClient.ListDatabasesAsync(parent);
ListDatabasesAsync(string, CancellationToken)
public virtual Task<ListDatabasesResponse> ListDatabasesAsync(string parent, CancellationToken cancellationToken)
List all the databases in the project.
Parameters | |
---|---|
Name | Description |
parent | string Required. A parent name of the form
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskListDatabasesResponse | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
// Make the request
gcfav::ListDatabasesResponse response = await firestoreAdminClient.ListDatabasesAsync(parent);
ListFields(CollectionGroupName, string, int?, CallSettings)
public virtual PagedEnumerable<ListFieldsResponse, Field> ListFields(CollectionGroupName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists the field configuration and metadata for this database.
Currently,
[FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields]
only supports listing fields that have been explicitly overridden. To issue
this query, call
[FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields]
with the filter set to indexConfig.usesAncestorConfig:false
or
ttlConfig:*
.
Parameters | |
---|---|
Name | Description |
parent | CollectionGroupName Required. A parent name of the form
|
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListFieldsResponseField | A pageable sequence of Field resources. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
gcfav::CollectionGroupName parent = gcfav::CollectionGroupName.FromProjectDatabaseCollection("[PROJECT]", "[DATABASE]", "[COLLECTION]");
// Make the request
PagedEnumerable<gcfav::ListFieldsResponse, gcfav::Field> response = firestoreAdminClient.ListFields(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (gcfav::Field item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (gcfav::ListFieldsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gcfav::Field item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<gcfav::Field> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (gcfav::Field item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListFields(ListFieldsRequest, CallSettings)
public virtual PagedEnumerable<ListFieldsResponse, Field> ListFields(ListFieldsRequest request, CallSettings callSettings = null)
Lists the field configuration and metadata for this database.
Currently,
[FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields]
only supports listing fields that have been explicitly overridden. To issue
this query, call
[FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields]
with the filter set to indexConfig.usesAncestorConfig:false
or
ttlConfig:*
.
Parameters | |
---|---|
Name | Description |
request | ListFieldsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListFieldsResponseField | A pageable sequence of Field resources. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
gcfav::ListFieldsRequest request = new gcfav::ListFieldsRequest
{
ParentAsCollectionGroupName = gcfav::CollectionGroupName.FromProjectDatabaseCollection("[PROJECT]", "[DATABASE]", "[COLLECTION]"),
Filter = "",
};
// Make the request
PagedEnumerable<gcfav::ListFieldsResponse, gcfav::Field> response = firestoreAdminClient.ListFields(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (gcfav::Field item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (gcfav::ListFieldsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gcfav::Field item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<gcfav::Field> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (gcfav::Field item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListFields(string, string, int?, CallSettings)
public virtual PagedEnumerable<ListFieldsResponse, Field> ListFields(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists the field configuration and metadata for this database.
Currently,
[FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields]
only supports listing fields that have been explicitly overridden. To issue
this query, call
[FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields]
with the filter set to indexConfig.usesAncestorConfig:false
or
ttlConfig:*
.
Parameters | |
---|---|
Name | Description |
parent | string Required. A parent name of the form
|
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListFieldsResponseField | A pageable sequence of Field resources. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/databases/[DATABASE]/collectionGroups/[COLLECTION]";
// Make the request
PagedEnumerable<gcfav::ListFieldsResponse, gcfav::Field> response = firestoreAdminClient.ListFields(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (gcfav::Field item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (gcfav::ListFieldsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gcfav::Field item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<gcfav::Field> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (gcfav::Field item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListFieldsAsync(CollectionGroupName, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListFieldsResponse, Field> ListFieldsAsync(CollectionGroupName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists the field configuration and metadata for this database.
Currently,
[FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields]
only supports listing fields that have been explicitly overridden. To issue
this query, call
[FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields]
with the filter set to indexConfig.usesAncestorConfig:false
or
ttlConfig:*
.
Parameters | |
---|---|
Name | Description |
parent | CollectionGroupName Required. A parent name of the form
|
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListFieldsResponseField | A pageable asynchronous sequence of Field resources. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::CollectionGroupName parent = gcfav::CollectionGroupName.FromProjectDatabaseCollection("[PROJECT]", "[DATABASE]", "[COLLECTION]");
// Make the request
PagedAsyncEnumerable<gcfav::ListFieldsResponse, gcfav::Field> response = firestoreAdminClient.ListFieldsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((gcfav::Field item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((gcfav::ListFieldsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gcfav::Field item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<gcfav::Field> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (gcfav::Field item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListFieldsAsync(ListFieldsRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListFieldsResponse, Field> ListFieldsAsync(ListFieldsRequest request, CallSettings callSettings = null)
Lists the field configuration and metadata for this database.
Currently,
[FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields]
only supports listing fields that have been explicitly overridden. To issue
this query, call
[FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields]
with the filter set to indexConfig.usesAncestorConfig:false
or
ttlConfig:*
.
Parameters | |
---|---|
Name | Description |
request | ListFieldsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListFieldsResponseField | A pageable asynchronous sequence of Field resources. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::ListFieldsRequest request = new gcfav::ListFieldsRequest
{
ParentAsCollectionGroupName = gcfav::CollectionGroupName.FromProjectDatabaseCollection("[PROJECT]", "[DATABASE]", "[COLLECTION]"),
Filter = "",
};
// Make the request
PagedAsyncEnumerable<gcfav::ListFieldsResponse, gcfav::Field> response = firestoreAdminClient.ListFieldsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((gcfav::Field item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((gcfav::ListFieldsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gcfav::Field item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<gcfav::Field> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (gcfav::Field item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListFieldsAsync(string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListFieldsResponse, Field> ListFieldsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists the field configuration and metadata for this database.
Currently,
[FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields]
only supports listing fields that have been explicitly overridden. To issue
this query, call
[FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields]
with the filter set to indexConfig.usesAncestorConfig:false
or
ttlConfig:*
.
Parameters | |
---|---|
Name | Description |
parent | string Required. A parent name of the form
|
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListFieldsResponseField | A pageable asynchronous sequence of Field resources. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/databases/[DATABASE]/collectionGroups/[COLLECTION]";
// Make the request
PagedAsyncEnumerable<gcfav::ListFieldsResponse, gcfav::Field> response = firestoreAdminClient.ListFieldsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((gcfav::Field item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((gcfav::ListFieldsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gcfav::Field item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<gcfav::Field> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (gcfav::Field item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListIndexes(CollectionGroupName, string, int?, CallSettings)
public virtual PagedEnumerable<ListIndexesResponse, Index> ListIndexes(CollectionGroupName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists composite indexes.
Parameters | |
---|---|
Name | Description |
parent | CollectionGroupName Required. A parent name of the form
|
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListIndexesResponseIndex | A pageable sequence of Index resources. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
gcfav::CollectionGroupName parent = gcfav::CollectionGroupName.FromProjectDatabaseCollection("[PROJECT]", "[DATABASE]", "[COLLECTION]");
// Make the request
PagedEnumerable<gcfav::ListIndexesResponse, gcfav::Index> response = firestoreAdminClient.ListIndexes(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (gcfav::Index item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (gcfav::ListIndexesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gcfav::Index item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<gcfav::Index> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (gcfav::Index item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListIndexes(ListIndexesRequest, CallSettings)
public virtual PagedEnumerable<ListIndexesResponse, Index> ListIndexes(ListIndexesRequest request, CallSettings callSettings = null)
Lists composite indexes.
Parameters | |
---|---|
Name | Description |
request | ListIndexesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListIndexesResponseIndex | A pageable sequence of Index resources. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
gcfav::ListIndexesRequest request = new gcfav::ListIndexesRequest
{
ParentAsCollectionGroupName = gcfav::CollectionGroupName.FromProjectDatabaseCollection("[PROJECT]", "[DATABASE]", "[COLLECTION]"),
Filter = "",
};
// Make the request
PagedEnumerable<gcfav::ListIndexesResponse, gcfav::Index> response = firestoreAdminClient.ListIndexes(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (gcfav::Index item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (gcfav::ListIndexesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gcfav::Index item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<gcfav::Index> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (gcfav::Index item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListIndexes(string, string, int?, CallSettings)
public virtual PagedEnumerable<ListIndexesResponse, Index> ListIndexes(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists composite indexes.
Parameters | |
---|---|
Name | Description |
parent | string Required. A parent name of the form
|
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListIndexesResponseIndex | A pageable sequence of Index resources. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/databases/[DATABASE]/collectionGroups/[COLLECTION]";
// Make the request
PagedEnumerable<gcfav::ListIndexesResponse, gcfav::Index> response = firestoreAdminClient.ListIndexes(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (gcfav::Index item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (gcfav::ListIndexesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gcfav::Index item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<gcfav::Index> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (gcfav::Index item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListIndexesAsync(CollectionGroupName, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListIndexesResponse, Index> ListIndexesAsync(CollectionGroupName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists composite indexes.
Parameters | |
---|---|
Name | Description |
parent | CollectionGroupName Required. A parent name of the form
|
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListIndexesResponseIndex | A pageable asynchronous sequence of Index resources. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::CollectionGroupName parent = gcfav::CollectionGroupName.FromProjectDatabaseCollection("[PROJECT]", "[DATABASE]", "[COLLECTION]");
// Make the request
PagedAsyncEnumerable<gcfav::ListIndexesResponse, gcfav::Index> response = firestoreAdminClient.ListIndexesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((gcfav::Index item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((gcfav::ListIndexesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gcfav::Index item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<gcfav::Index> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (gcfav::Index item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListIndexesAsync(ListIndexesRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListIndexesResponse, Index> ListIndexesAsync(ListIndexesRequest request, CallSettings callSettings = null)
Lists composite indexes.
Parameters | |
---|---|
Name | Description |
request | ListIndexesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListIndexesResponseIndex | A pageable asynchronous sequence of Index resources. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::ListIndexesRequest request = new gcfav::ListIndexesRequest
{
ParentAsCollectionGroupName = gcfav::CollectionGroupName.FromProjectDatabaseCollection("[PROJECT]", "[DATABASE]", "[COLLECTION]"),
Filter = "",
};
// Make the request
PagedAsyncEnumerable<gcfav::ListIndexesResponse, gcfav::Index> response = firestoreAdminClient.ListIndexesAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((gcfav::Index item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((gcfav::ListIndexesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gcfav::Index item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<gcfav::Index> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (gcfav::Index item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListIndexesAsync(string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListIndexesResponse, Index> ListIndexesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists composite indexes.
Parameters | |
---|---|
Name | Description |
parent | string Required. A parent name of the form
|
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListIndexesResponseIndex | A pageable asynchronous sequence of Index resources. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/databases/[DATABASE]/collectionGroups/[COLLECTION]";
// Make the request
PagedAsyncEnumerable<gcfav::ListIndexesResponse, gcfav::Index> response = firestoreAdminClient.ListIndexesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((gcfav::Index item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((gcfav::ListIndexesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gcfav::Index item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<gcfav::Index> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (gcfav::Index item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
PollOnceCreateDatabase(string, CallSettings)
public virtual Operation<Database, CreateDatabaseMetadata> PollOnceCreateDatabase(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of CreateDatabase
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationDatabaseCreateDatabaseMetadata | The result of polling the operation. |
PollOnceCreateDatabaseAsync(string, CallSettings)
public virtual Task<Operation<Database, CreateDatabaseMetadata>> PollOnceCreateDatabaseAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
CreateDatabase
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationDatabaseCreateDatabaseMetadata | A task representing the result of polling the operation. |
PollOnceCreateIndex(string, CallSettings)
public virtual Operation<Index, IndexOperationMetadata> PollOnceCreateIndex(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of CreateIndex
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationIndexIndexOperationMetadata | The result of polling the operation. |
PollOnceCreateIndexAsync(string, CallSettings)
public virtual Task<Operation<Index, IndexOperationMetadata>> PollOnceCreateIndexAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
CreateIndex
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationIndexIndexOperationMetadata | A task representing the result of polling the operation. |
PollOnceDeleteDatabase(string, CallSettings)
public virtual Operation<Database, DeleteDatabaseMetadata> PollOnceDeleteDatabase(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of DeleteDatabase
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationDatabaseDeleteDatabaseMetadata | The result of polling the operation. |
PollOnceDeleteDatabaseAsync(string, CallSettings)
public virtual Task<Operation<Database, DeleteDatabaseMetadata>> PollOnceDeleteDatabaseAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
DeleteDatabase
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationDatabaseDeleteDatabaseMetadata | A task representing the result of polling the operation. |
PollOnceExportDocuments(string, CallSettings)
public virtual Operation<ExportDocumentsResponse, ExportDocumentsMetadata> PollOnceExportDocuments(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of ExportDocuments
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationExportDocumentsResponseExportDocumentsMetadata | The result of polling the operation. |
PollOnceExportDocumentsAsync(string, CallSettings)
public virtual Task<Operation<ExportDocumentsResponse, ExportDocumentsMetadata>> PollOnceExportDocumentsAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
ExportDocuments
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationExportDocumentsResponseExportDocumentsMetadata | A task representing the result of polling the operation. |
PollOnceImportDocuments(string, CallSettings)
public virtual Operation<Empty, ImportDocumentsMetadata> PollOnceImportDocuments(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of ImportDocuments
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyImportDocumentsMetadata | The result of polling the operation. |
PollOnceImportDocumentsAsync(string, CallSettings)
public virtual Task<Operation<Empty, ImportDocumentsMetadata>> PollOnceImportDocumentsAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
ImportDocuments
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyImportDocumentsMetadata | A task representing the result of polling the operation. |
PollOnceUpdateDatabase(string, CallSettings)
public virtual Operation<Database, UpdateDatabaseMetadata> PollOnceUpdateDatabase(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of UpdateDatabase
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationDatabaseUpdateDatabaseMetadata | The result of polling the operation. |
PollOnceUpdateDatabaseAsync(string, CallSettings)
public virtual Task<Operation<Database, UpdateDatabaseMetadata>> PollOnceUpdateDatabaseAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
UpdateDatabase
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationDatabaseUpdateDatabaseMetadata | A task representing the result of polling the operation. |
PollOnceUpdateField(string, CallSettings)
public virtual Operation<Field, FieldOperationMetadata> PollOnceUpdateField(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of UpdateField
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationFieldFieldOperationMetadata | The result of polling the operation. |
PollOnceUpdateFieldAsync(string, CallSettings)
public virtual Task<Operation<Field, FieldOperationMetadata>> PollOnceUpdateFieldAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
UpdateField
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationFieldFieldOperationMetadata | A task representing the result of polling the operation. |
ShutdownDefaultChannelsAsync()
public static Task ShutdownDefaultChannelsAsync()
Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Returns | |
---|---|
Type | Description |
Task | A task representing the asynchronous shutdown operation. |
After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.
UpdateDatabase(Database, FieldMask, CallSettings)
public virtual Operation<Database, UpdateDatabaseMetadata> UpdateDatabase(Database database, FieldMask updateMask, CallSettings callSettings = null)
Updates a database.
Parameters | |
---|---|
Name | Description |
database | Database Required. The database to update. |
updateMask | FieldMask The list of fields to be updated. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationDatabaseUpdateDatabaseMetadata | The RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
gcfav::Database database = new gcfav::Database();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<gcfav::Database, gcfav::UpdateDatabaseMetadata> response = firestoreAdminClient.UpdateDatabase(database, updateMask);
// Poll until the returned long-running operation is complete
Operation<gcfav::Database, gcfav::UpdateDatabaseMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcfav::Database 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<gcfav::Database, gcfav::UpdateDatabaseMetadata> retrievedResponse = firestoreAdminClient.PollOnceUpdateDatabase(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Database retrievedResult = retrievedResponse.Result;
}
UpdateDatabase(UpdateDatabaseRequest, CallSettings)
public virtual Operation<Database, UpdateDatabaseMetadata> UpdateDatabase(UpdateDatabaseRequest request, CallSettings callSettings = null)
Updates a database.
Parameters | |
---|---|
Name | Description |
request | UpdateDatabaseRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationDatabaseUpdateDatabaseMetadata | The RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
gcfav::UpdateDatabaseRequest request = new gcfav::UpdateDatabaseRequest
{
Database = new gcfav::Database(),
UpdateMask = new FieldMask(),
};
// Make the request
Operation<gcfav::Database, gcfav::UpdateDatabaseMetadata> response = firestoreAdminClient.UpdateDatabase(request);
// Poll until the returned long-running operation is complete
Operation<gcfav::Database, gcfav::UpdateDatabaseMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcfav::Database 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<gcfav::Database, gcfav::UpdateDatabaseMetadata> retrievedResponse = firestoreAdminClient.PollOnceUpdateDatabase(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Database retrievedResult = retrievedResponse.Result;
}
UpdateDatabaseAsync(Database, FieldMask, CallSettings)
public virtual Task<Operation<Database, UpdateDatabaseMetadata>> UpdateDatabaseAsync(Database database, FieldMask updateMask, CallSettings callSettings = null)
Updates a database.
Parameters | |
---|---|
Name | Description |
database | Database Required. The database to update. |
updateMask | FieldMask The list of fields to be updated. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationDatabaseUpdateDatabaseMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::Database database = new gcfav::Database();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<gcfav::Database, gcfav::UpdateDatabaseMetadata> response = await firestoreAdminClient.UpdateDatabaseAsync(database, updateMask);
// Poll until the returned long-running operation is complete
Operation<gcfav::Database, gcfav::UpdateDatabaseMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcfav::Database 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<gcfav::Database, gcfav::UpdateDatabaseMetadata> retrievedResponse = await firestoreAdminClient.PollOnceUpdateDatabaseAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Database retrievedResult = retrievedResponse.Result;
}
UpdateDatabaseAsync(Database, FieldMask, CancellationToken)
public virtual Task<Operation<Database, UpdateDatabaseMetadata>> UpdateDatabaseAsync(Database database, FieldMask updateMask, CancellationToken cancellationToken)
Updates a database.
Parameters | |
---|---|
Name | Description |
database | Database Required. The database to update. |
updateMask | FieldMask The list of fields to be updated. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationDatabaseUpdateDatabaseMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::Database database = new gcfav::Database();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<gcfav::Database, gcfav::UpdateDatabaseMetadata> response = await firestoreAdminClient.UpdateDatabaseAsync(database, updateMask);
// Poll until the returned long-running operation is complete
Operation<gcfav::Database, gcfav::UpdateDatabaseMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcfav::Database 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<gcfav::Database, gcfav::UpdateDatabaseMetadata> retrievedResponse = await firestoreAdminClient.PollOnceUpdateDatabaseAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Database retrievedResult = retrievedResponse.Result;
}
UpdateDatabaseAsync(UpdateDatabaseRequest, CallSettings)
public virtual Task<Operation<Database, UpdateDatabaseMetadata>> UpdateDatabaseAsync(UpdateDatabaseRequest request, CallSettings callSettings = null)
Updates a database.
Parameters | |
---|---|
Name | Description |
request | UpdateDatabaseRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationDatabaseUpdateDatabaseMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::UpdateDatabaseRequest request = new gcfav::UpdateDatabaseRequest
{
Database = new gcfav::Database(),
UpdateMask = new FieldMask(),
};
// Make the request
Operation<gcfav::Database, gcfav::UpdateDatabaseMetadata> response = await firestoreAdminClient.UpdateDatabaseAsync(request);
// Poll until the returned long-running operation is complete
Operation<gcfav::Database, gcfav::UpdateDatabaseMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcfav::Database 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<gcfav::Database, gcfav::UpdateDatabaseMetadata> retrievedResponse = await firestoreAdminClient.PollOnceUpdateDatabaseAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Database retrievedResult = retrievedResponse.Result;
}
UpdateDatabaseAsync(UpdateDatabaseRequest, CancellationToken)
public virtual Task<Operation<Database, UpdateDatabaseMetadata>> UpdateDatabaseAsync(UpdateDatabaseRequest request, CancellationToken cancellationToken)
Updates a database.
Parameters | |
---|---|
Name | Description |
request | UpdateDatabaseRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationDatabaseUpdateDatabaseMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::UpdateDatabaseRequest request = new gcfav::UpdateDatabaseRequest
{
Database = new gcfav::Database(),
UpdateMask = new FieldMask(),
};
// Make the request
Operation<gcfav::Database, gcfav::UpdateDatabaseMetadata> response = await firestoreAdminClient.UpdateDatabaseAsync(request);
// Poll until the returned long-running operation is complete
Operation<gcfav::Database, gcfav::UpdateDatabaseMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcfav::Database 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<gcfav::Database, gcfav::UpdateDatabaseMetadata> retrievedResponse = await firestoreAdminClient.PollOnceUpdateDatabaseAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Database retrievedResult = retrievedResponse.Result;
}
UpdateField(Field, CallSettings)
public virtual Operation<Field, FieldOperationMetadata> UpdateField(Field field, CallSettings callSettings = null)
Updates a field configuration. Currently, field updates apply only to
single field index configuration. However, calls to
[FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField]
should provide a field mask to avoid changing any configuration that the
caller isn't aware of. The field mask should be specified as: { paths:
"index_config" }
.
This call returns a [google.longrunning.Operation][google.longrunning.Operation] which may be used to track the status of the field update. The metadata for the operation will be the type [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata].
To configure the default field settings for the database, use
the special Field
with resource name:
projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*
.
Parameters | |
---|---|
Name | Description |
field | Field Required. The field to be updated. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationFieldFieldOperationMetadata | The RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
gcfav::Field field = new gcfav::Field();
// Make the request
Operation<gcfav::Field, gcfav::FieldOperationMetadata> response = firestoreAdminClient.UpdateField(field);
// Poll until the returned long-running operation is complete
Operation<gcfav::Field, gcfav::FieldOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcfav::Field 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<gcfav::Field, gcfav::FieldOperationMetadata> retrievedResponse = firestoreAdminClient.PollOnceUpdateField(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Field retrievedResult = retrievedResponse.Result;
}
UpdateField(UpdateFieldRequest, CallSettings)
public virtual Operation<Field, FieldOperationMetadata> UpdateField(UpdateFieldRequest request, CallSettings callSettings = null)
Updates a field configuration. Currently, field updates apply only to
single field index configuration. However, calls to
[FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField]
should provide a field mask to avoid changing any configuration that the
caller isn't aware of. The field mask should be specified as: { paths:
"index_config" }
.
This call returns a [google.longrunning.Operation][google.longrunning.Operation] which may be used to track the status of the field update. The metadata for the operation will be the type [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata].
To configure the default field settings for the database, use
the special Field
with resource name:
projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*
.
Parameters | |
---|---|
Name | Description |
request | UpdateFieldRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationFieldFieldOperationMetadata | The RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = gcfav::FirestoreAdminClient.Create();
// Initialize request argument(s)
gcfav::UpdateFieldRequest request = new gcfav::UpdateFieldRequest
{
Field = new gcfav::Field(),
UpdateMask = new FieldMask(),
};
// Make the request
Operation<gcfav::Field, gcfav::FieldOperationMetadata> response = firestoreAdminClient.UpdateField(request);
// Poll until the returned long-running operation is complete
Operation<gcfav::Field, gcfav::FieldOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcfav::Field 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<gcfav::Field, gcfav::FieldOperationMetadata> retrievedResponse = firestoreAdminClient.PollOnceUpdateField(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Field retrievedResult = retrievedResponse.Result;
}
UpdateFieldAsync(Field, CallSettings)
public virtual Task<Operation<Field, FieldOperationMetadata>> UpdateFieldAsync(Field field, CallSettings callSettings = null)
Updates a field configuration. Currently, field updates apply only to
single field index configuration. However, calls to
[FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField]
should provide a field mask to avoid changing any configuration that the
caller isn't aware of. The field mask should be specified as: { paths:
"index_config" }
.
This call returns a [google.longrunning.Operation][google.longrunning.Operation] which may be used to track the status of the field update. The metadata for the operation will be the type [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata].
To configure the default field settings for the database, use
the special Field
with resource name:
projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*
.
Parameters | |
---|---|
Name | Description |
field | Field Required. The field to be updated. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationFieldFieldOperationMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::Field field = new gcfav::Field();
// Make the request
Operation<gcfav::Field, gcfav::FieldOperationMetadata> response = await firestoreAdminClient.UpdateFieldAsync(field);
// Poll until the returned long-running operation is complete
Operation<gcfav::Field, gcfav::FieldOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcfav::Field 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<gcfav::Field, gcfav::FieldOperationMetadata> retrievedResponse = await firestoreAdminClient.PollOnceUpdateFieldAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Field retrievedResult = retrievedResponse.Result;
}
UpdateFieldAsync(Field, CancellationToken)
public virtual Task<Operation<Field, FieldOperationMetadata>> UpdateFieldAsync(Field field, CancellationToken cancellationToken)
Updates a field configuration. Currently, field updates apply only to
single field index configuration. However, calls to
[FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField]
should provide a field mask to avoid changing any configuration that the
caller isn't aware of. The field mask should be specified as: { paths:
"index_config" }
.
This call returns a [google.longrunning.Operation][google.longrunning.Operation] which may be used to track the status of the field update. The metadata for the operation will be the type [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata].
To configure the default field settings for the database, use
the special Field
with resource name:
projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*
.
Parameters | |
---|---|
Name | Description |
field | Field Required. The field to be updated. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationFieldFieldOperationMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::Field field = new gcfav::Field();
// Make the request
Operation<gcfav::Field, gcfav::FieldOperationMetadata> response = await firestoreAdminClient.UpdateFieldAsync(field);
// Poll until the returned long-running operation is complete
Operation<gcfav::Field, gcfav::FieldOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcfav::Field 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<gcfav::Field, gcfav::FieldOperationMetadata> retrievedResponse = await firestoreAdminClient.PollOnceUpdateFieldAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Field retrievedResult = retrievedResponse.Result;
}
UpdateFieldAsync(UpdateFieldRequest, CallSettings)
public virtual Task<Operation<Field, FieldOperationMetadata>> UpdateFieldAsync(UpdateFieldRequest request, CallSettings callSettings = null)
Updates a field configuration. Currently, field updates apply only to
single field index configuration. However, calls to
[FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField]
should provide a field mask to avoid changing any configuration that the
caller isn't aware of. The field mask should be specified as: { paths:
"index_config" }
.
This call returns a [google.longrunning.Operation][google.longrunning.Operation] which may be used to track the status of the field update. The metadata for the operation will be the type [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata].
To configure the default field settings for the database, use
the special Field
with resource name:
projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*
.
Parameters | |
---|---|
Name | Description |
request | UpdateFieldRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationFieldFieldOperationMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::UpdateFieldRequest request = new gcfav::UpdateFieldRequest
{
Field = new gcfav::Field(),
UpdateMask = new FieldMask(),
};
// Make the request
Operation<gcfav::Field, gcfav::FieldOperationMetadata> response = await firestoreAdminClient.UpdateFieldAsync(request);
// Poll until the returned long-running operation is complete
Operation<gcfav::Field, gcfav::FieldOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcfav::Field 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<gcfav::Field, gcfav::FieldOperationMetadata> retrievedResponse = await firestoreAdminClient.PollOnceUpdateFieldAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Field retrievedResult = retrievedResponse.Result;
}
UpdateFieldAsync(UpdateFieldRequest, CancellationToken)
public virtual Task<Operation<Field, FieldOperationMetadata>> UpdateFieldAsync(UpdateFieldRequest request, CancellationToken cancellationToken)
Updates a field configuration. Currently, field updates apply only to
single field index configuration. However, calls to
[FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField]
should provide a field mask to avoid changing any configuration that the
caller isn't aware of. The field mask should be specified as: { paths:
"index_config" }
.
This call returns a [google.longrunning.Operation][google.longrunning.Operation] which may be used to track the status of the field update. The metadata for the operation will be the type [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata].
To configure the default field settings for the database, use
the special Field
with resource name:
projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*
.
Parameters | |
---|---|
Name | Description |
request | UpdateFieldRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationFieldFieldOperationMetadata | A Task containing the RPC response. |
// Create client
gcfav::FirestoreAdminClient firestoreAdminClient = await gcfav::FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::UpdateFieldRequest request = new gcfav::UpdateFieldRequest
{
Field = new gcfav::Field(),
UpdateMask = new FieldMask(),
};
// Make the request
Operation<gcfav::Field, gcfav::FieldOperationMetadata> response = await firestoreAdminClient.UpdateFieldAsync(request);
// Poll until the returned long-running operation is complete
Operation<gcfav::Field, gcfav::FieldOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcfav::Field 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<gcfav::Field, gcfav::FieldOperationMetadata> retrievedResponse = await firestoreAdminClient.PollOnceUpdateFieldAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcfav::Field retrievedResult = retrievedResponse.Result;
}