/// <summary> /// Constructs a client wrapper for the FirestoreAdmin service, with the specified gRPC client and settings. /// </summary> /// <param name="grpcClient">The underlying gRPC client.</param> /// <param name="settings">The base <see cref="FirestoreAdminSettings"/> used within this client </param> public FirestoreAdminClientImpl(FirestoreAdmin.FirestoreAdminClient grpcClient, FirestoreAdminSettings settings) { GrpcClient = grpcClient; FirestoreAdminSettings effectiveSettings = settings ?? FirestoreAdminSettings.GetDefault(); ClientHelper clientHelper = new ClientHelper(effectiveSettings); _callCreateIndex = clientHelper.BuildApiCall <CreateIndexRequest, Operation>( GrpcClient.CreateIndexAsync, GrpcClient.CreateIndex, effectiveSettings.CreateIndexSettings); _callListIndexes = clientHelper.BuildApiCall <ListIndexesRequest, ListIndexesResponse>( GrpcClient.ListIndexesAsync, GrpcClient.ListIndexes, effectiveSettings.ListIndexesSettings); _callGetIndex = clientHelper.BuildApiCall <GetIndexRequest, Index>( GrpcClient.GetIndexAsync, GrpcClient.GetIndex, effectiveSettings.GetIndexSettings); _callDeleteIndex = clientHelper.BuildApiCall <DeleteIndexRequest, Empty>( GrpcClient.DeleteIndexAsync, GrpcClient.DeleteIndex, effectiveSettings.DeleteIndexSettings); OnConstruction(grpcClient, effectiveSettings, clientHelper); }