ServiceClient constructor

ServiceClient({
  1. required Client client,
  2. String? gapicVersion,
  3. String? gcclVersion,
})

Creates a ServiceClient using client for transport.

The provided http.Client must be configured to provide whatever authentication is required by the API being accessed. You can do that using package:googleapis_auth.

If gapicVersion is set, gapic/<version> is included in the x-goog-api-client header.

If gcclVersion is set, gccl/<version> is included in the x-goog-api-client header.

Both gapicVersion and gcclVersion should be set if the library includes both automatically-generated and hand-written components. For example, package:google_cloud_firestore (hand-written) wraps package:google_cloud_firestore_v1 (generated).

Implementation

ServiceClient({required this.client, this.gapicVersion, this.gcclVersion});