/// <summary> /// Constructs a client wrapper for the SnapshotService service, with the specified gRPC client and settings. /// </summary> /// <param name="grpcClient">The underlying gRPC client.</param> /// <param name="settings">The base <see cref="SnapshotServiceSettings"/> used within this client </param> public SnapshotServiceClientImpl(SnapshotService.SnapshotServiceClient grpcClient, SnapshotServiceSettings settings) { GrpcClient = grpcClient; SnapshotServiceSettings effectiveSettings = settings ?? SnapshotServiceSettings.GetDefault(); gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(effectiveSettings); TakeSnapshotOperationsClient = new lro::OperationsClientImpl( grpcClient.CreateOperationsClient(), effectiveSettings.TakeSnapshotOperationsSettings); _callListSnapshots = clientHelper.BuildApiCall <ListSnapshotsRequest, ListSnapshotsResponse>( GrpcClient.ListSnapshotsAsync, GrpcClient.ListSnapshots, effectiveSettings.ListSnapshotsSettings); _callGetSnapshot = clientHelper.BuildApiCall <GetSnapshotRequest, GetSnapshotResponse>( GrpcClient.GetSnapshotAsync, GrpcClient.GetSnapshot, effectiveSettings.GetSnapshotSettings); _callTakeSnapshot = clientHelper.BuildApiCall <TakeSnapshotRequest, lro::Operation>( GrpcClient.TakeSnapshotAsync, GrpcClient.TakeSnapshot, effectiveSettings.TakeSnapshotSettings); _callUploadSnapshot = clientHelper.BuildApiCall <UploadSnapshotRequest, UploadSnapshotResponse>( GrpcClient.UploadSnapshotAsync, GrpcClient.UploadSnapshot, effectiveSettings.UploadSnapshotSettings); _callConfirmUpload = clientHelper.BuildApiCall <ConfirmUploadRequest, ConfirmUploadResponse>( GrpcClient.ConfirmUploadAsync, GrpcClient.ConfirmUpload, effectiveSettings.ConfirmUploadSettings); Modify_ApiCall(ref _callListSnapshots); Modify_ListSnapshotsApiCall(ref _callListSnapshots); Modify_ApiCall(ref _callGetSnapshot); Modify_GetSnapshotApiCall(ref _callGetSnapshot); Modify_ApiCall(ref _callTakeSnapshot); Modify_TakeSnapshotApiCall(ref _callTakeSnapshot); Modify_ApiCall(ref _callUploadSnapshot); Modify_UploadSnapshotApiCall(ref _callUploadSnapshot); Modify_ApiCall(ref _callConfirmUpload); Modify_ConfirmUploadApiCall(ref _callConfirmUpload); OnConstruction(grpcClient, effectiveSettings, clientHelper); }