/// <summary> /// Synchronously creates a <see cref="BigtableClient"/>, applying defaults for all unspecified settings, /// using the specified <see cref="CallInvoker"/> for API requests. /// </summary> /// <param name="callInvoker">The <see cref="CallInvoker"/> which performs API requests. Must not be null.</param> /// <param name="settings">Optional <see cref="BigtableServiceApiSettings"/> to control API requests.</param> /// <returns>The created <see cref="BigtableClient"/>.</returns> public static BigtableClient Create(CallInvoker callInvoker, BigtableServiceApiSettings settings = null) => Create(BigtableServiceApiClient.Create(GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker)), settings));
/// <summary> /// Synchronously creates a <see cref="BigtableClient"/> from a pre-existing API client. /// </summary> /// <param name="client"> /// The <see cref="BigtableServiceApiClient"/> to use in the <see cref="BigtableClient"/>. Must not be null. /// </param> /// <returns>The created <see cref="BigtableClient"/>.</returns> public static BigtableClient Create(BigtableServiceApiClient client) => new BigtableClientImpl(GaxPreconditions.CheckNotNull(client, nameof(client)));
// TODO: Auto-generate these if possible/easy after multi-channel support is added. /// <summary> /// Asynchronously creates a <see cref="BigtableClient"/>, applying defaults for all unspecified settings, /// and creating channels connecting to the given endpoint with application default credentials where /// necessary. /// </summary> /// <param name="endpoint">Optional <see cref="ServiceEndpoint"/> to use when connecting to Bigtable.</param> /// <param name="settings">Optional <see cref="BigtableServiceApiSettings"/> to control API requests.</param> /// <returns>The task representing the created <see cref="BigtableClient"/>.</returns> public static async Task <BigtableClient> CreateAsync(ServiceEndpoint endpoint = null, BigtableServiceApiSettings settings = null) { var client = await BigtableServiceApiClient.CreateAsync(endpoint, settings).ConfigureAwait(false); return(new BigtableClientImpl(client)); }