Class FirestoreAdminClient (2.2.0)

public abstract class FirestoreAdminClient

FirestoreAdmin client wrapper, for convenient use.

Inheritance

Object > FirestoreAdminClient

Derived Types

Namespace

Google.Cloud.Firestore.Admin.V1

Assembly

Google.Cloud.Firestore.Admin.V1.dll

Remarks

Operations are created by service FirestoreAdmin, but are accessed via service google.longrunning.Operations.

Properties

CreateIndexOperationsClient

public virtual OperationsClient CreateIndexOperationsClient { get; }

The long-running operations client for CreateIndex.

Property Value
TypeDescription
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
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default FirestoreAdmin scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

ExportDocumentsOperationsClient

public virtual OperationsClient ExportDocumentsOperationsClient { get; }

The long-running operations client for ExportDocuments.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual FirestoreAdmin.FirestoreAdminClient GrpcClient { get; }

The underlying gRPC FirestoreAdmin client

Property Value
TypeDescription
FirestoreAdmin.FirestoreAdminClient

ImportDocumentsOperationsClient

public virtual OperationsClient ImportDocumentsOperationsClient { get; }

The long-running operations client for ImportDocuments.

Property Value
TypeDescription
OperationsClient

UpdateFieldOperationsClient

public virtual OperationsClient UpdateFieldOperationsClient { get; }

The long-running operations client for UpdateField.

Property Value
TypeDescription
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
TypeDescription
FirestoreAdminClient

The created FirestoreAdminClient.

CreateAsync(CancellationToken)

public static Task<FirestoreAdminClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))

Asynchronously creates a FirestoreAdminClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use FirestoreAdminClientBuilder.

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
Task<FirestoreAdminClient>

The task representing the created FirestoreAdminClient.

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
NameDescription
parentCollectionGroupName

Required. A parent name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}

indexIndex

Required. The composite index to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Index, IndexOperationMetadata>

The RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.Create();
// Initialize request argument(s)
CollectionGroupName parent = CollectionGroupName.FromProjectDatabaseCollection("[PROJECT]", "[DATABASE]", "[COLLECTION]");
gcfav::Index index = new gcfav::Index();
// Make the request
Operation<gcfav::Index, IndexOperationMetadata> response = firestoreAdminClient.CreateIndex(parent, index);

// Poll until the returned long-running operation is complete
Operation<gcfav::Index, 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, 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
NameDescription
requestCreateIndexRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Index, IndexOperationMetadata>

The RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.Create();
// Initialize request argument(s)
CreateIndexRequest request = new CreateIndexRequest
{
    ParentAsCollectionGroupName = CollectionGroupName.FromProjectDatabaseCollection("[PROJECT]", "[DATABASE]", "[COLLECTION]"),
    Index = new gcfav::Index(),
};
// Make the request
Operation<gcfav::Index, IndexOperationMetadata> response = firestoreAdminClient.CreateIndex(request);

// Poll until the returned long-running operation is complete
Operation<gcfav::Index, 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, 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
NameDescription
parentString

Required. A parent name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}

indexIndex

Required. The composite index to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Index, IndexOperationMetadata>

The RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = 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, IndexOperationMetadata> response = firestoreAdminClient.CreateIndex(parent, index);

// Poll until the returned long-running operation is complete
Operation<gcfav::Index, 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, 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
NameDescription
parentCollectionGroupName

Required. A parent name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}

indexIndex

Required. The composite index to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Index, IndexOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
CollectionGroupName parent = CollectionGroupName.FromProjectDatabaseCollection("[PROJECT]", "[DATABASE]", "[COLLECTION]");
gcfav::Index index = new gcfav::Index();
// Make the request
Operation<gcfav::Index, IndexOperationMetadata> response = await firestoreAdminClient.CreateIndexAsync(parent, index);

// Poll until the returned long-running operation is complete
Operation<gcfav::Index, 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, 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
NameDescription
parentCollectionGroupName

Required. A parent name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}

indexIndex

Required. The composite index to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Index, IndexOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
CollectionGroupName parent = CollectionGroupName.FromProjectDatabaseCollection("[PROJECT]", "[DATABASE]", "[COLLECTION]");
gcfav::Index index = new gcfav::Index();
// Make the request
Operation<gcfav::Index, IndexOperationMetadata> response = await firestoreAdminClient.CreateIndexAsync(parent, index);

// Poll until the returned long-running operation is complete
Operation<gcfav::Index, 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, 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
NameDescription
requestCreateIndexRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Index, IndexOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
CreateIndexRequest request = new CreateIndexRequest
{
    ParentAsCollectionGroupName = CollectionGroupName.FromProjectDatabaseCollection("[PROJECT]", "[DATABASE]", "[COLLECTION]"),
    Index = new gcfav::Index(),
};
// Make the request
Operation<gcfav::Index, IndexOperationMetadata> response = await firestoreAdminClient.CreateIndexAsync(request);

// Poll until the returned long-running operation is complete
Operation<gcfav::Index, 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, 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
NameDescription
requestCreateIndexRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Index, IndexOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
CreateIndexRequest request = new CreateIndexRequest
{
    ParentAsCollectionGroupName = CollectionGroupName.FromProjectDatabaseCollection("[PROJECT]", "[DATABASE]", "[COLLECTION]"),
    Index = new gcfav::Index(),
};
// Make the request
Operation<gcfav::Index, IndexOperationMetadata> response = await firestoreAdminClient.CreateIndexAsync(request);

// Poll until the returned long-running operation is complete
Operation<gcfav::Index, 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, 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
NameDescription
parentString

Required. A parent name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}

indexIndex

Required. The composite index to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Index, IndexOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await 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, IndexOperationMetadata> response = await firestoreAdminClient.CreateIndexAsync(parent, index);

// Poll until the returned long-running operation is complete
Operation<gcfav::Index, 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, 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
NameDescription
parentString

Required. A parent name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}

indexIndex

Required. The composite index to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Index, IndexOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await 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, IndexOperationMetadata> response = await firestoreAdminClient.CreateIndexAsync(parent, index);

// Poll until the returned long-running operation is complete
Operation<gcfav::Index, 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, 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;
}

DeleteIndex(DeleteIndexRequest, CallSettings)

public virtual void DeleteIndex(DeleteIndexRequest request, CallSettings callSettings = null)

Deletes a composite index.

Parameters
NameDescription
requestDeleteIndexRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.Create();
// Initialize request argument(s)
DeleteIndexRequest request = new DeleteIndexRequest
{
    IndexName = 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
NameDescription
nameIndexName

Required. A name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.Create();
// Initialize request argument(s)
IndexName name = 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
NameDescription
nameString

Required. A name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = 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
NameDescription
requestDeleteIndexRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
DeleteIndexRequest request = new DeleteIndexRequest
{
    IndexName = 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
NameDescription
requestDeleteIndexRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
DeleteIndexRequest request = new DeleteIndexRequest
{
    IndexName = 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
NameDescription
nameIndexName

Required. A name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
IndexName name = 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
NameDescription
nameIndexName

Required. A name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
IndexName name = 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
NameDescription
nameString

Required. A name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await 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
NameDescription
nameString

Required. A name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await 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.

Parameters
NameDescription
nameDatabaseName

Required. Database to export. Should be of the form: projects/{project_id}/databases/{database_id}.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<ExportDocumentsResponse, ExportDocumentsMetadata>

The RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.Create();
// Initialize request argument(s)
DatabaseName name = DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]");
// Make the request
Operation<ExportDocumentsResponse, ExportDocumentsMetadata> response = firestoreAdminClient.ExportDocuments(name);

// Poll until the returned long-running operation is complete
Operation<ExportDocumentsResponse, ExportDocumentsMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
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<ExportDocumentsResponse, 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
    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.

Parameters
NameDescription
requestExportDocumentsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<ExportDocumentsResponse, ExportDocumentsMetadata>

The RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.Create();
// Initialize request argument(s)
ExportDocumentsRequest request = new ExportDocumentsRequest
{
    DatabaseName = DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]"),
    CollectionIds = { "", },
    OutputUriPrefix = "",
};
// Make the request
Operation<ExportDocumentsResponse, ExportDocumentsMetadata> response = firestoreAdminClient.ExportDocuments(request);

// Poll until the returned long-running operation is complete
Operation<ExportDocumentsResponse, ExportDocumentsMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
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<ExportDocumentsResponse, 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
    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.

Parameters
NameDescription
nameString

Required. Database to export. Should be of the form: projects/{project_id}/databases/{database_id}.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<ExportDocumentsResponse, ExportDocumentsMetadata>

The RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/databases/[DATABASE]";
// Make the request
Operation<ExportDocumentsResponse, ExportDocumentsMetadata> response = firestoreAdminClient.ExportDocuments(name);

// Poll until the returned long-running operation is complete
Operation<ExportDocumentsResponse, ExportDocumentsMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
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<ExportDocumentsResponse, 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
    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.

Parameters
NameDescription
nameDatabaseName

Required. Database to export. Should be of the form: projects/{project_id}/databases/{database_id}.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<ExportDocumentsResponse, ExportDocumentsMetadata>>

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
DatabaseName name = DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]");
// Make the request
Operation<ExportDocumentsResponse, ExportDocumentsMetadata> response = await firestoreAdminClient.ExportDocumentsAsync(name);

// Poll until the returned long-running operation is complete
Operation<ExportDocumentsResponse, ExportDocumentsMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
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<ExportDocumentsResponse, 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
    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.

Parameters
NameDescription
nameDatabaseName

Required. Database to export. Should be of the form: projects/{project_id}/databases/{database_id}.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<ExportDocumentsResponse, ExportDocumentsMetadata>>

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
DatabaseName name = DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]");
// Make the request
Operation<ExportDocumentsResponse, ExportDocumentsMetadata> response = await firestoreAdminClient.ExportDocumentsAsync(name);

// Poll until the returned long-running operation is complete
Operation<ExportDocumentsResponse, ExportDocumentsMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
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<ExportDocumentsResponse, 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
    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.

Parameters
NameDescription
requestExportDocumentsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<ExportDocumentsResponse, ExportDocumentsMetadata>>

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
ExportDocumentsRequest request = new ExportDocumentsRequest
{
    DatabaseName = DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]"),
    CollectionIds = { "", },
    OutputUriPrefix = "",
};
// Make the request
Operation<ExportDocumentsResponse, ExportDocumentsMetadata> response = await firestoreAdminClient.ExportDocumentsAsync(request);

// Poll until the returned long-running operation is complete
Operation<ExportDocumentsResponse, ExportDocumentsMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
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<ExportDocumentsResponse, 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
    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.

Parameters
NameDescription
requestExportDocumentsRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<ExportDocumentsResponse, ExportDocumentsMetadata>>

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
ExportDocumentsRequest request = new ExportDocumentsRequest
{
    DatabaseName = DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]"),
    CollectionIds = { "", },
    OutputUriPrefix = "",
};
// Make the request
Operation<ExportDocumentsResponse, ExportDocumentsMetadata> response = await firestoreAdminClient.ExportDocumentsAsync(request);

// Poll until the returned long-running operation is complete
Operation<ExportDocumentsResponse, ExportDocumentsMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
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<ExportDocumentsResponse, 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
    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.

Parameters
NameDescription
nameString

Required. Database to export. Should be of the form: projects/{project_id}/databases/{database_id}.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<ExportDocumentsResponse, ExportDocumentsMetadata>>

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/databases/[DATABASE]";
// Make the request
Operation<ExportDocumentsResponse, ExportDocumentsMetadata> response = await firestoreAdminClient.ExportDocumentsAsync(name);

// Poll until the returned long-running operation is complete
Operation<ExportDocumentsResponse, ExportDocumentsMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
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<ExportDocumentsResponse, 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
    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.

Parameters
NameDescription
nameString

Required. Database to export. Should be of the form: projects/{project_id}/databases/{database_id}.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<ExportDocumentsResponse, ExportDocumentsMetadata>>

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/databases/[DATABASE]";
// Make the request
Operation<ExportDocumentsResponse, ExportDocumentsMetadata> response = await firestoreAdminClient.ExportDocumentsAsync(name);

// Poll until the returned long-running operation is complete
Operation<ExportDocumentsResponse, ExportDocumentsMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
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<ExportDocumentsResponse, 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
    ExportDocumentsResponse retrievedResult = retrievedResponse.Result;
}

GetField(FieldName, CallSettings)

public virtual Field GetField(FieldName name, CallSettings callSettings = null)

Gets the metadata and configuration for a Field.

Parameters
NameDescription
nameFieldName

Required. A name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Field

The RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.Create();
// Initialize request argument(s)
FieldName name = 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
NameDescription
requestGetFieldRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Field

The RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.Create();
// Initialize request argument(s)
GetFieldRequest request = new GetFieldRequest
{
    FieldName = 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
NameDescription
nameString

Required. A name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Field

The RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = 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
NameDescription
nameFieldName

Required. A name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Field>

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
FieldName name = 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
NameDescription
nameFieldName

Required. A name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Field>

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
FieldName name = 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
NameDescription
requestGetFieldRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Field>

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
GetFieldRequest request = new GetFieldRequest
{
    FieldName = 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
NameDescription
requestGetFieldRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Field>

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
GetFieldRequest request = new GetFieldRequest
{
    FieldName = 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
NameDescription
nameString

Required. A name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Field>

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await 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
NameDescription
nameString

Required. A name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Field>

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await 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
NameDescription
requestGetIndexRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Index

The RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.Create();
// Initialize request argument(s)
GetIndexRequest request = new GetIndexRequest
{
    IndexName = 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
NameDescription
nameIndexName

Required. A name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Index

The RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.Create();
// Initialize request argument(s)
IndexName name = 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
NameDescription
nameString

Required. A name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Index

The RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = 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
NameDescription
requestGetIndexRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Index>

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
GetIndexRequest request = new GetIndexRequest
{
    IndexName = 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
NameDescription
requestGetIndexRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Index>

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
GetIndexRequest request = new GetIndexRequest
{
    IndexName = 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
NameDescription
nameIndexName

Required. A name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Index>

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
IndexName name = 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
NameDescription
nameIndexName

Required. A name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Index>

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
IndexName name = 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
NameDescription
nameString

Required. A name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Index>

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await 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
NameDescription
nameString

Required. A name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Index>

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await 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
NameDescription
nameDatabaseName

Required. Database to import into. Should be of the form: projects/{project_id}/databases/{database_id}.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, ImportDocumentsMetadata>

The RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.Create();
// Initialize request argument(s)
DatabaseName name = DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]");
// Make the request
Operation<Empty, ImportDocumentsMetadata> response = firestoreAdminClient.ImportDocuments(name);

// Poll until the returned long-running operation is complete
Operation<Empty, 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, 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
NameDescription
requestImportDocumentsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, ImportDocumentsMetadata>

The RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.Create();
// Initialize request argument(s)
ImportDocumentsRequest request = new ImportDocumentsRequest
{
    DatabaseName = DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]"),
    CollectionIds = { "", },
    InputUriPrefix = "",
};
// Make the request
Operation<Empty, ImportDocumentsMetadata> response = firestoreAdminClient.ImportDocuments(request);

// Poll until the returned long-running operation is complete
Operation<Empty, 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, 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
NameDescription
nameString

Required. Database to import into. Should be of the form: projects/{project_id}/databases/{database_id}.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, ImportDocumentsMetadata>

The RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/databases/[DATABASE]";
// Make the request
Operation<Empty, ImportDocumentsMetadata> response = firestoreAdminClient.ImportDocuments(name);

// Poll until the returned long-running operation is complete
Operation<Empty, 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, 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
NameDescription
nameDatabaseName

Required. Database to import into. Should be of the form: projects/{project_id}/databases/{database_id}.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, ImportDocumentsMetadata>>

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
DatabaseName name = DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]");
// Make the request
Operation<Empty, ImportDocumentsMetadata> response = await firestoreAdminClient.ImportDocumentsAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, 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, 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
NameDescription
nameDatabaseName

Required. Database to import into. Should be of the form: projects/{project_id}/databases/{database_id}.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, ImportDocumentsMetadata>>

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
DatabaseName name = DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]");
// Make the request
Operation<Empty, ImportDocumentsMetadata> response = await firestoreAdminClient.ImportDocumentsAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, 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, 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
NameDescription
requestImportDocumentsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, ImportDocumentsMetadata>>

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
ImportDocumentsRequest request = new ImportDocumentsRequest
{
    DatabaseName = DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]"),
    CollectionIds = { "", },
    InputUriPrefix = "",
};
// Make the request
Operation<Empty, ImportDocumentsMetadata> response = await firestoreAdminClient.ImportDocumentsAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, 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, 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
NameDescription
requestImportDocumentsRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, ImportDocumentsMetadata>>

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
ImportDocumentsRequest request = new ImportDocumentsRequest
{
    DatabaseName = DatabaseName.FromProjectDatabase("[PROJECT]", "[DATABASE]"),
    CollectionIds = { "", },
    InputUriPrefix = "",
};
// Make the request
Operation<Empty, ImportDocumentsMetadata> response = await firestoreAdminClient.ImportDocumentsAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, 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, 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
NameDescription
nameString

Required. Database to import into. Should be of the form: projects/{project_id}/databases/{database_id}.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, ImportDocumentsMetadata>>

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/databases/[DATABASE]";
// Make the request
Operation<Empty, ImportDocumentsMetadata> response = await firestoreAdminClient.ImportDocumentsAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, 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, 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
NameDescription
nameString

Required. Database to import into. Should be of the form: projects/{project_id}/databases/{database_id}.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, ImportDocumentsMetadata>>

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/databases/[DATABASE]";
// Make the request
Operation<Empty, ImportDocumentsMetadata> response = await firestoreAdminClient.ImportDocumentsAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, 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, 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;
}

ListFields(CollectionGroupName, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListFieldsResponse, Field> ListFields(CollectionGroupName parent, string pageToken = null, int? pageSize = default(int? ), 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.

Parameters
NameDescription
parentCollectionGroupName

Required. A parent name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListFieldsResponse, Field>

A pageable sequence of Field resources.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.Create();
// Initialize request argument(s)
CollectionGroupName parent = CollectionGroupName.FromProjectDatabaseCollection("[PROJECT]", "[DATABASE]", "[COLLECTION]");
// Make the request
PagedEnumerable<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 (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.

Parameters
NameDescription
requestListFieldsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListFieldsResponse, Field>

A pageable sequence of Field resources.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.Create();
// Initialize request argument(s)
ListFieldsRequest request = new ListFieldsRequest
{
    ParentAsCollectionGroupName = CollectionGroupName.FromProjectDatabaseCollection("[PROJECT]", "[DATABASE]", "[COLLECTION]"),
    Filter = "",
};
// Make the request
PagedEnumerable<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 (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, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListFieldsResponse, Field> ListFields(string parent, string pageToken = null, int? pageSize = default(int? ), 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.

Parameters
NameDescription
parentString

Required. A parent name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListFieldsResponse, Field>

A pageable sequence of Field resources.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/databases/[DATABASE]/collectionGroups/[COLLECTION]";
// Make the request
PagedEnumerable<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 (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, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListFieldsResponse, Field> ListFieldsAsync(CollectionGroupName parent, string pageToken = null, int? pageSize = default(int? ), 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.

Parameters
NameDescription
parentCollectionGroupName

Required. A parent name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListFieldsResponse, Field>

A pageable asynchronous sequence of Field resources.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
CollectionGroupName parent = CollectionGroupName.FromProjectDatabaseCollection("[PROJECT]", "[DATABASE]", "[COLLECTION]");
// Make the request
PagedAsyncEnumerable<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((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.

Parameters
NameDescription
requestListFieldsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListFieldsResponse, Field>

A pageable asynchronous sequence of Field resources.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
ListFieldsRequest request = new ListFieldsRequest
{
    ParentAsCollectionGroupName = CollectionGroupName.FromProjectDatabaseCollection("[PROJECT]", "[DATABASE]", "[COLLECTION]"),
    Filter = "",
};
// Make the request
PagedAsyncEnumerable<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((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, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListFieldsResponse, Field> ListFieldsAsync(string parent, string pageToken = null, int? pageSize = default(int? ), 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.

Parameters
NameDescription
parentString

Required. A parent name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListFieldsResponse, Field>

A pageable asynchronous sequence of Field resources.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/databases/[DATABASE]/collectionGroups/[COLLECTION]";
// Make the request
PagedAsyncEnumerable<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((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, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListIndexesResponse, Index> ListIndexes(CollectionGroupName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists composite indexes.

Parameters
NameDescription
parentCollectionGroupName

Required. A parent name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListIndexesResponse, Index>

A pageable sequence of Index resources.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.Create();
// Initialize request argument(s)
CollectionGroupName parent = CollectionGroupName.FromProjectDatabaseCollection("[PROJECT]", "[DATABASE]", "[COLLECTION]");
// Make the request
PagedEnumerable<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 (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
NameDescription
requestListIndexesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListIndexesResponse, Index>

A pageable sequence of Index resources.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.Create();
// Initialize request argument(s)
ListIndexesRequest request = new ListIndexesRequest
{
    ParentAsCollectionGroupName = CollectionGroupName.FromProjectDatabaseCollection("[PROJECT]", "[DATABASE]", "[COLLECTION]"),
    Filter = "",
};
// Make the request
PagedEnumerable<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 (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, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListIndexesResponse, Index> ListIndexes(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists composite indexes.

Parameters
NameDescription
parentString

Required. A parent name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListIndexesResponse, Index>

A pageable sequence of Index resources.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/databases/[DATABASE]/collectionGroups/[COLLECTION]";
// Make the request
PagedEnumerable<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 (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, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListIndexesResponse, Index> ListIndexesAsync(CollectionGroupName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists composite indexes.

Parameters
NameDescription
parentCollectionGroupName

Required. A parent name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListIndexesResponse, Index>

A pageable asynchronous sequence of Index resources.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
CollectionGroupName parent = CollectionGroupName.FromProjectDatabaseCollection("[PROJECT]", "[DATABASE]", "[COLLECTION]");
// Make the request
PagedAsyncEnumerable<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((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
NameDescription
requestListIndexesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListIndexesResponse, Index>

A pageable asynchronous sequence of Index resources.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
ListIndexesRequest request = new ListIndexesRequest
{
    ParentAsCollectionGroupName = CollectionGroupName.FromProjectDatabaseCollection("[PROJECT]", "[DATABASE]", "[COLLECTION]"),
    Filter = "",
};
// Make the request
PagedAsyncEnumerable<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((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, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListIndexesResponse, Index> ListIndexesAsync(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists composite indexes.

Parameters
NameDescription
parentString

Required. A parent name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListIndexesResponse, Index>

A pageable asynchronous sequence of Index resources.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/databases/[DATABASE]/collectionGroups/[COLLECTION]";
// Make the request
PagedAsyncEnumerable<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((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;

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Index, IndexOperationMetadata>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Index, IndexOperationMetadata>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<ExportDocumentsResponse, ExportDocumentsMetadata>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<ExportDocumentsResponse, ExportDocumentsMetadata>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, ImportDocumentsMetadata>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, ImportDocumentsMetadata>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Field, FieldOperationMetadata>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Field, FieldOperationMetadata>>

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
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

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.

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: &quot;index_config&quot; }.

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
NameDescription
fieldField

Required. The field to be updated.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Field, FieldOperationMetadata>

The RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.Create();
// Initialize request argument(s)
gcfav::Field field = new gcfav::Field();
// Make the request
Operation<gcfav::Field, FieldOperationMetadata> response = firestoreAdminClient.UpdateField(field);

// Poll until the returned long-running operation is complete
Operation<gcfav::Field, 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, 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: &quot;index_config&quot; }.

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
NameDescription
requestUpdateFieldRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Field, FieldOperationMetadata>

The RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.Create();
// Initialize request argument(s)
UpdateFieldRequest request = new UpdateFieldRequest
{
    Field = new gcfav::Field(),
    UpdateMask = new FieldMask(),
};
// Make the request
Operation<gcfav::Field, FieldOperationMetadata> response = firestoreAdminClient.UpdateField(request);

// Poll until the returned long-running operation is complete
Operation<gcfav::Field, 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, 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: &quot;index_config&quot; }.

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
NameDescription
fieldField

Required. The field to be updated.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Field, FieldOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::Field field = new gcfav::Field();
// Make the request
Operation<gcfav::Field, FieldOperationMetadata> response = await firestoreAdminClient.UpdateFieldAsync(field);

// Poll until the returned long-running operation is complete
Operation<gcfav::Field, 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, 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: &quot;index_config&quot; }.

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
NameDescription
fieldField

Required. The field to be updated.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Field, FieldOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
gcfav::Field field = new gcfav::Field();
// Make the request
Operation<gcfav::Field, FieldOperationMetadata> response = await firestoreAdminClient.UpdateFieldAsync(field);

// Poll until the returned long-running operation is complete
Operation<gcfav::Field, 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, 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: &quot;index_config&quot; }.

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
NameDescription
requestUpdateFieldRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Field, FieldOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
UpdateFieldRequest request = new UpdateFieldRequest
{
    Field = new gcfav::Field(),
    UpdateMask = new FieldMask(),
};
// Make the request
Operation<gcfav::Field, FieldOperationMetadata> response = await firestoreAdminClient.UpdateFieldAsync(request);

// Poll until the returned long-running operation is complete
Operation<gcfav::Field, 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, 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: &quot;index_config&quot; }.

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
NameDescription
requestUpdateFieldRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Field, FieldOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
FirestoreAdminClient firestoreAdminClient = await FirestoreAdminClient.CreateAsync();
// Initialize request argument(s)
UpdateFieldRequest request = new UpdateFieldRequest
{
    Field = new gcfav::Field(),
    UpdateMask = new FieldMask(),
};
// Make the request
Operation<gcfav::Field, FieldOperationMetadata> response = await firestoreAdminClient.UpdateFieldAsync(request);

// Poll until the returned long-running operation is complete
Operation<gcfav::Field, 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, 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;
}