Skip to content

Commit

Permalink
feat: add total_billed_time response field
Browse files Browse the repository at this point in the history
Committer: @cherba
PiperOrigin-RevId: 389755489

Source-Author: Google APIs <noreply@google.com>
Source-Date: Mon Aug 9 16:48:51 2021 -0700
Source-Repo: googleapis/googleapis
Source-Sha: 10185d07a4db1d76a888a119aeab1f2287b35105
Source-Link: googleapis/googleapis@10185d0
  • Loading branch information
yoshi-automation authored and jskeet committed Aug 10, 2021
1 parent 9f51750 commit 73a4ba0
Show file tree
Hide file tree
Showing 4 changed files with 324 additions and 123 deletions.
Expand Up @@ -16,6 +16,7 @@

using gaxgrpc = Google.Api.Gax.Grpc;
using lro = Google.LongRunning;
using wkt = Google.Protobuf.WellKnownTypes;
using grpccore = Grpc.Core;
using moq = Moq;
using st = System.Threading;
Expand Down Expand Up @@ -43,6 +44,7 @@ public void RecognizeRequestObject()
{
new SpeechRecognitionResult(),
},
TotalBilledTime = new wkt::Duration(),
};
mockGrpcClient.Setup(x => x.Recognize(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SpeechClient client = new SpeechClientImpl(mockGrpcClient.Object, null);
Expand All @@ -67,6 +69,7 @@ public void RecognizeRequestObject()
{
new SpeechRecognitionResult(),
},
TotalBilledTime = new wkt::Duration(),
};
mockGrpcClient.Setup(x => x.RecognizeAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<RecognizeResponse>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SpeechClient client = new SpeechClientImpl(mockGrpcClient.Object, null);
Expand All @@ -93,6 +96,7 @@ public void Recognize()
{
new SpeechRecognitionResult(),
},
TotalBilledTime = new wkt::Duration(),
};
mockGrpcClient.Setup(x => x.Recognize(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SpeechClient client = new SpeechClientImpl(mockGrpcClient.Object, null);
Expand All @@ -117,6 +121,7 @@ public void Recognize()
{
new SpeechRecognitionResult(),
},
TotalBilledTime = new wkt::Duration(),
};
mockGrpcClient.Setup(x => x.RecognizeAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<RecognizeResponse>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SpeechClient client = new SpeechClientImpl(mockGrpcClient.Object, null);
Expand Down

0 comments on commit 73a4ba0

Please sign in to comment.