public void BatchRunReportsRequestObject() { moq::Mock <AlphaAnalyticsData.AlphaAnalyticsDataClient> mockGrpcClient = new moq::Mock <AlphaAnalyticsData.AlphaAnalyticsDataClient>(moq::MockBehavior.Strict); BatchRunReportsRequest request = new BatchRunReportsRequest { Entity = new Entity(), Requests = { new RunReportRequest(), }, }; BatchRunReportsResponse expectedResponse = new BatchRunReportsResponse { Reports = { new RunReportResponse(), }, }; mockGrpcClient.Setup(x => x.BatchRunReports(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse); AlphaAnalyticsDataClient client = new AlphaAnalyticsDataClientImpl(mockGrpcClient.Object, null); BatchRunReportsResponse response = client.BatchRunReports(request); xunit::Assert.Same(expectedResponse, response); mockGrpcClient.VerifyAll(); }
public async stt::Task BatchRunReportsRequestObjectAsync() { moq::Mock <AlphaAnalyticsData.AlphaAnalyticsDataClient> mockGrpcClient = new moq::Mock <AlphaAnalyticsData.AlphaAnalyticsDataClient>(moq::MockBehavior.Strict); BatchRunReportsRequest request = new BatchRunReportsRequest { Entity = new Entity(), Requests = { new RunReportRequest(), }, }; BatchRunReportsResponse expectedResponse = new BatchRunReportsResponse { Reports = { new RunReportResponse(), }, }; mockGrpcClient.Setup(x => x.BatchRunReportsAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <BatchRunReportsResponse>(stt::Task.FromResult(expectedResponse), null, null, null, null)); AlphaAnalyticsDataClient client = new AlphaAnalyticsDataClientImpl(mockGrpcClient.Object, null); BatchRunReportsResponse responseCallSettings = await client.BatchRunReportsAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); xunit::Assert.Same(expectedResponse, responseCallSettings); BatchRunReportsResponse responseCancellationToken = await client.BatchRunReportsAsync(request, st::CancellationToken.None); xunit::Assert.Same(expectedResponse, responseCancellationToken); mockGrpcClient.VerifyAll(); }
public void BatchRunReportsRequestObject() { moq::Mock <BetaAnalyticsData.BetaAnalyticsDataClient> mockGrpcClient = new moq::Mock <BetaAnalyticsData.BetaAnalyticsDataClient>(moq::MockBehavior.Strict); BatchRunReportsRequest request = new BatchRunReportsRequest { Property = "propertyc9b48d1a", Requests = { new RunReportRequest(), }, }; BatchRunReportsResponse expectedResponse = new BatchRunReportsResponse { Reports = { new RunReportResponse(), }, Kind = "kindf7aa39d9", }; mockGrpcClient.Setup(x => x.BatchRunReports(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse); BetaAnalyticsDataClient client = new BetaAnalyticsDataClientImpl(mockGrpcClient.Object, null); BatchRunReportsResponse response = client.BatchRunReports(request); xunit::Assert.Same(expectedResponse, response); mockGrpcClient.VerifyAll(); }
/// <summary>Snippet for BatchRunReports</summary> public void BatchRunReports_RequestObject() { // Snippet: BatchRunReports(BatchRunReportsRequest,CallSettings) // Create client AlphaAnalyticsDataClient alphaAnalyticsDataClient = AlphaAnalyticsDataClient.Create(); // Initialize request argument(s) BatchRunReportsRequest request = new BatchRunReportsRequest(); // Make the request BatchRunReportsResponse response = alphaAnalyticsDataClient.BatchRunReports(request); // End snippet }
/// <summary>Snippet for BatchRunReportsAsync</summary> public async Task BatchRunReportsAsync_RequestObject() { // Snippet: BatchRunReportsAsync(BatchRunReportsRequest,CallSettings) // Additional: BatchRunReportsAsync(BatchRunReportsRequest,CancellationToken) // Create client AlphaAnalyticsDataClient alphaAnalyticsDataClient = await AlphaAnalyticsDataClient.CreateAsync(); // Initialize request argument(s) BatchRunReportsRequest request = new BatchRunReportsRequest(); // Make the request BatchRunReportsResponse response = await alphaAnalyticsDataClient.BatchRunReportsAsync(request); // End snippet }
public async Task BatchRunReportsAsync() { Mock <AlphaAnalyticsData.AlphaAnalyticsDataClient> mockGrpcClient = new Mock <AlphaAnalyticsData.AlphaAnalyticsDataClient>(MockBehavior.Strict); BatchRunReportsRequest request = new BatchRunReportsRequest(); BatchRunReportsResponse expectedResponse = new BatchRunReportsResponse(); mockGrpcClient.Setup(x => x.BatchRunReportsAsync(request, It.IsAny <CallOptions>())) .Returns(new Grpc.Core.AsyncUnaryCall <BatchRunReportsResponse>(Task.FromResult(expectedResponse), null, null, null, null)); AlphaAnalyticsDataClient client = new AlphaAnalyticsDataClientImpl(mockGrpcClient.Object, null); BatchRunReportsResponse response = await client.BatchRunReportsAsync(request); Assert.Same(expectedResponse, response); mockGrpcClient.VerifyAll(); }
public void BatchRunReports() { Mock <AlphaAnalyticsData.AlphaAnalyticsDataClient> mockGrpcClient = new Mock <AlphaAnalyticsData.AlphaAnalyticsDataClient>(MockBehavior.Strict); BatchRunReportsRequest request = new BatchRunReportsRequest(); BatchRunReportsResponse expectedResponse = new BatchRunReportsResponse(); mockGrpcClient.Setup(x => x.BatchRunReports(request, It.IsAny <CallOptions>())) .Returns(expectedResponse); AlphaAnalyticsDataClient client = new AlphaAnalyticsDataClientImpl(mockGrpcClient.Object, null); BatchRunReportsResponse response = client.BatchRunReports(request); Assert.Same(expectedResponse, response); mockGrpcClient.VerifyAll(); }
/// <summary>Snippet for BatchRunReports</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void BatchRunReportsRequestObject() { // Create client AlphaAnalyticsDataClient alphaAnalyticsDataClient = AlphaAnalyticsDataClient.Create(); // Initialize request argument(s) BatchRunReportsRequest request = new BatchRunReportsRequest { Entity = new Entity(), Requests = { new RunReportRequest(), }, }; // Make the request BatchRunReportsResponse response = alphaAnalyticsDataClient.BatchRunReports(request); }
/// <summary>Snippet for BatchRunReports</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void BatchRunReportsRequestObject() { // Create client BetaAnalyticsDataClient betaAnalyticsDataClient = BetaAnalyticsDataClient.Create(); // Initialize request argument(s) BatchRunReportsRequest request = new BatchRunReportsRequest { Property = "", Requests = { new RunReportRequest(), }, }; // Make the request BatchRunReportsResponse response = betaAnalyticsDataClient.BatchRunReports(request); }
/// <summary>Snippet for BatchRunReportsAsync</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public async Task BatchRunReportsRequestObjectAsync() { // Create client BetaAnalyticsDataClient betaAnalyticsDataClient = await BetaAnalyticsDataClient.CreateAsync(); // Initialize request argument(s) BatchRunReportsRequest request = new BatchRunReportsRequest { Property = "", Requests = { new RunReportRequest(), }, }; // Make the request BatchRunReportsResponse response = await betaAnalyticsDataClient.BatchRunReportsAsync(request); }
/// <summary>Snippet for BatchRunReportsAsync</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public async Task BatchRunReportsRequestObjectAsync() { // Create client AlphaAnalyticsDataClient alphaAnalyticsDataClient = await AlphaAnalyticsDataClient.CreateAsync(); // Initialize request argument(s) BatchRunReportsRequest request = new BatchRunReportsRequest { Entity = new Entity(), Requests = { new RunReportRequest(), }, }; // Make the request BatchRunReportsResponse response = await alphaAnalyticsDataClient.BatchRunReportsAsync(request); }
/// <summary>Snippet for BatchRunReportsAsync</summary> public async Task BatchRunReportsRequestObjectAsync() { // Snippet: BatchRunReportsAsync(BatchRunReportsRequest, CallSettings) // Additional: BatchRunReportsAsync(BatchRunReportsRequest, CancellationToken) // Create client BetaAnalyticsDataClient betaAnalyticsDataClient = await BetaAnalyticsDataClient.CreateAsync(); // Initialize request argument(s) BatchRunReportsRequest request = new BatchRunReportsRequest { Property = "", Requests = { new RunReportRequest(), }, }; // Make the request BatchRunReportsResponse response = await betaAnalyticsDataClient.BatchRunReportsAsync(request); // End snippet }
/// <summary> /// Returns multiple reports in a batch. All reports must be for the same /// Entity. /// </summary> /// <param name="request">The request object containing all of the parameters for the API call.</param> /// <param name="callSettings">If not null, applies overrides to this RPC call.</param> /// <returns>A Task containing the RPC response.</returns> public override stt::Task <BatchRunReportsResponse> BatchRunReportsAsync(BatchRunReportsRequest request, gaxgrpc::CallSettings callSettings = null) { Modify_BatchRunReportsRequest(ref request, ref callSettings); return(_callBatchRunReports.Async(request, callSettings)); }
partial void Modify_BatchRunReportsRequest(ref BatchRunReportsRequest request, ref gaxgrpc::CallSettings settings);
/// <summary> /// Returns multiple reports in a batch. All reports must be for the same /// Entity. /// </summary> /// <param name="request">The request object containing all of the parameters for the API call.</param> /// <param name="cancellationToken">A <see cref="st::CancellationToken"/> to use for this RPC.</param> /// <returns>A Task containing the RPC response.</returns> public virtual stt::Task <BatchRunReportsResponse> BatchRunReportsAsync(BatchRunReportsRequest request, st::CancellationToken cancellationToken) => BatchRunReportsAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
/// <summary> /// Returns multiple reports in a batch. All reports must be for the same /// Entity. /// </summary> /// <param name="request">The request object containing all of the parameters for the API call.</param> /// <param name="callSettings">If not null, applies overrides to this RPC call.</param> /// <returns>A Task containing the RPC response.</returns> public virtual stt::Task <BatchRunReportsResponse> BatchRunReportsAsync(BatchRunReportsRequest request, gaxgrpc::CallSettings callSettings = null) => throw new sys::NotImplementedException();