public void BatchRunPivotReportsRequestObject()
        {
            moq::Mock <AlphaAnalyticsData.AlphaAnalyticsDataClient> mockGrpcClient = new moq::Mock <AlphaAnalyticsData.AlphaAnalyticsDataClient>(moq::MockBehavior.Strict);
            BatchRunPivotReportsRequest request = new BatchRunPivotReportsRequest
            {
                Entity   = new Entity(),
                Requests =
                {
                    new RunPivotReportRequest(),
                },
            };
            BatchRunPivotReportsResponse expectedResponse = new BatchRunPivotReportsResponse
            {
                PivotReports =
                {
                    new RunPivotReportResponse(),
                },
            };

            mockGrpcClient.Setup(x => x.BatchRunPivotReports(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse);
            AlphaAnalyticsDataClient     client   = new AlphaAnalyticsDataClientImpl(mockGrpcClient.Object, null);
            BatchRunPivotReportsResponse response = client.BatchRunPivotReports(request);

            xunit::Assert.Same(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }
        public async stt::Task BatchRunPivotReportsRequestObjectAsync()
        {
            moq::Mock <AlphaAnalyticsData.AlphaAnalyticsDataClient> mockGrpcClient = new moq::Mock <AlphaAnalyticsData.AlphaAnalyticsDataClient>(moq::MockBehavior.Strict);
            BatchRunPivotReportsRequest request = new BatchRunPivotReportsRequest
            {
                Entity   = new Entity(),
                Requests =
                {
                    new RunPivotReportRequest(),
                },
            };
            BatchRunPivotReportsResponse expectedResponse = new BatchRunPivotReportsResponse
            {
                PivotReports =
                {
                    new RunPivotReportResponse(),
                },
            };

            mockGrpcClient.Setup(x => x.BatchRunPivotReportsAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <BatchRunPivotReportsResponse>(stt::Task.FromResult(expectedResponse), null, null, null, null));
            AlphaAnalyticsDataClient     client = new AlphaAnalyticsDataClientImpl(mockGrpcClient.Object, null);
            BatchRunPivotReportsResponse responseCallSettings = await client.BatchRunPivotReportsAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));

            xunit::Assert.Same(expectedResponse, responseCallSettings);
            BatchRunPivotReportsResponse responseCancellationToken = await client.BatchRunPivotReportsAsync(request, st::CancellationToken.None);

            xunit::Assert.Same(expectedResponse, responseCancellationToken);
            mockGrpcClient.VerifyAll();
        }
        public void BatchRunPivotReportsRequestObject()
        {
            moq::Mock <BetaAnalyticsData.BetaAnalyticsDataClient> mockGrpcClient = new moq::Mock <BetaAnalyticsData.BetaAnalyticsDataClient>(moq::MockBehavior.Strict);
            BatchRunPivotReportsRequest request = new BatchRunPivotReportsRequest
            {
                Property = "propertyc9b48d1a",
                Requests =
                {
                    new RunPivotReportRequest(),
                },
            };
            BatchRunPivotReportsResponse expectedResponse = new BatchRunPivotReportsResponse
            {
                PivotReports =
                {
                    new RunPivotReportResponse(),
                },
                Kind = "kindf7aa39d9",
            };

            mockGrpcClient.Setup(x => x.BatchRunPivotReports(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse);
            BetaAnalyticsDataClient      client   = new BetaAnalyticsDataClientImpl(mockGrpcClient.Object, null);
            BatchRunPivotReportsResponse response = client.BatchRunPivotReports(request);

            xunit::Assert.Same(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }
 /// <summary>Snippet for BatchRunPivotReports</summary>
 public void BatchRunPivotReports_RequestObject()
 {
     // Snippet: BatchRunPivotReports(BatchRunPivotReportsRequest,CallSettings)
     // Create client
     AlphaAnalyticsDataClient alphaAnalyticsDataClient = AlphaAnalyticsDataClient.Create();
     // Initialize request argument(s)
     BatchRunPivotReportsRequest request = new BatchRunPivotReportsRequest();
     // Make the request
     BatchRunPivotReportsResponse response = alphaAnalyticsDataClient.BatchRunPivotReports(request);
     // End snippet
 }
        /// <summary>Snippet for BatchRunPivotReportsAsync</summary>
        public async Task BatchRunPivotReportsAsync_RequestObject()
        {
            // Snippet: BatchRunPivotReportsAsync(BatchRunPivotReportsRequest,CallSettings)
            // Additional: BatchRunPivotReportsAsync(BatchRunPivotReportsRequest,CancellationToken)
            // Create client
            AlphaAnalyticsDataClient alphaAnalyticsDataClient = await AlphaAnalyticsDataClient.CreateAsync();

            // Initialize request argument(s)
            BatchRunPivotReportsRequest request = new BatchRunPivotReportsRequest();
            // Make the request
            BatchRunPivotReportsResponse response = await alphaAnalyticsDataClient.BatchRunPivotReportsAsync(request);

            // End snippet
        }
        public async Task BatchRunPivotReportsAsync()
        {
            Mock <AlphaAnalyticsData.AlphaAnalyticsDataClient> mockGrpcClient = new Mock <AlphaAnalyticsData.AlphaAnalyticsDataClient>(MockBehavior.Strict);
            BatchRunPivotReportsRequest  request          = new BatchRunPivotReportsRequest();
            BatchRunPivotReportsResponse expectedResponse = new BatchRunPivotReportsResponse();

            mockGrpcClient.Setup(x => x.BatchRunPivotReportsAsync(request, It.IsAny <CallOptions>()))
            .Returns(new Grpc.Core.AsyncUnaryCall <BatchRunPivotReportsResponse>(Task.FromResult(expectedResponse), null, null, null, null));
            AlphaAnalyticsDataClient     client   = new AlphaAnalyticsDataClientImpl(mockGrpcClient.Object, null);
            BatchRunPivotReportsResponse response = await client.BatchRunPivotReportsAsync(request);

            Assert.Same(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }
        public void BatchRunPivotReports()
        {
            Mock <AlphaAnalyticsData.AlphaAnalyticsDataClient> mockGrpcClient = new Mock <AlphaAnalyticsData.AlphaAnalyticsDataClient>(MockBehavior.Strict);
            BatchRunPivotReportsRequest  request          = new BatchRunPivotReportsRequest();
            BatchRunPivotReportsResponse expectedResponse = new BatchRunPivotReportsResponse();

            mockGrpcClient.Setup(x => x.BatchRunPivotReports(request, It.IsAny <CallOptions>()))
            .Returns(expectedResponse);
            AlphaAnalyticsDataClient     client   = new AlphaAnalyticsDataClientImpl(mockGrpcClient.Object, null);
            BatchRunPivotReportsResponse response = client.BatchRunPivotReports(request);

            Assert.Same(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }
Exemplo n.º 8
0
 /// <summary>Snippet for BatchRunPivotReports</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void BatchRunPivotReportsRequestObject()
 {
     // Create client
     BetaAnalyticsDataClient betaAnalyticsDataClient = BetaAnalyticsDataClient.Create();
     // Initialize request argument(s)
     BatchRunPivotReportsRequest request = new BatchRunPivotReportsRequest
     {
         Property = "",
         Requests =
         {
             new RunPivotReportRequest(),
         },
     };
     // Make the request
     BatchRunPivotReportsResponse response = betaAnalyticsDataClient.BatchRunPivotReports(request);
 }
Exemplo n.º 9
0
 /// <summary>Snippet for BatchRunPivotReports</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void BatchRunPivotReportsRequestObject()
 {
     // Create client
     AlphaAnalyticsDataClient alphaAnalyticsDataClient = AlphaAnalyticsDataClient.Create();
     // Initialize request argument(s)
     BatchRunPivotReportsRequest request = new BatchRunPivotReportsRequest
     {
         Entity   = new Entity(),
         Requests =
         {
             new RunPivotReportRequest(),
         },
     };
     // Make the request
     BatchRunPivotReportsResponse response = alphaAnalyticsDataClient.BatchRunPivotReports(request);
 }
        /// <summary>Snippet for BatchRunPivotReportsAsync</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 BatchRunPivotReportsRequestObjectAsync()
        {
            // Create client
            BetaAnalyticsDataClient betaAnalyticsDataClient = await BetaAnalyticsDataClient.CreateAsync();

            // Initialize request argument(s)
            BatchRunPivotReportsRequest request = new BatchRunPivotReportsRequest
            {
                Property = "",
                Requests =
                {
                    new RunPivotReportRequest(),
                },
            };
            // Make the request
            BatchRunPivotReportsResponse response = await betaAnalyticsDataClient.BatchRunPivotReportsAsync(request);
        }
Exemplo n.º 11
0
        /// <summary>Snippet for BatchRunPivotReportsAsync</summary>
        public async Task BatchRunPivotReportsRequestObjectAsync()
        {
            // Snippet: BatchRunPivotReportsAsync(BatchRunPivotReportsRequest, CallSettings)
            // Additional: BatchRunPivotReportsAsync(BatchRunPivotReportsRequest, CancellationToken)
            // Create client
            BetaAnalyticsDataClient betaAnalyticsDataClient = await BetaAnalyticsDataClient.CreateAsync();

            // Initialize request argument(s)
            BatchRunPivotReportsRequest request = new BatchRunPivotReportsRequest
            {
                Property = "",
                Requests =
                {
                    new RunPivotReportRequest(),
                },
            };
            // Make the request
            BatchRunPivotReportsResponse response = await betaAnalyticsDataClient.BatchRunPivotReportsAsync(request);

            // End snippet
        }
 /// <summary>
 /// Returns multiple pivot 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 <BatchRunPivotReportsResponse> BatchRunPivotReportsAsync(BatchRunPivotReportsRequest request, gaxgrpc::CallSettings callSettings = null)
 {
     Modify_BatchRunPivotReportsRequest(ref request, ref callSettings);
     return(_callBatchRunPivotReports.Async(request, callSettings));
 }
 partial void Modify_BatchRunPivotReportsRequest(ref BatchRunPivotReportsRequest request, ref gaxgrpc::CallSettings settings);
 /// <summary>
 /// Returns multiple pivot 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 <BatchRunPivotReportsResponse> BatchRunPivotReportsAsync(BatchRunPivotReportsRequest request, st::CancellationToken cancellationToken) =>
 BatchRunPivotReportsAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
 /// <summary>
 /// Returns multiple pivot 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 <BatchRunPivotReportsResponse> BatchRunPivotReportsAsync(BatchRunPivotReportsRequest request, gaxgrpc::CallSettings callSettings = null) =>
 throw new sys::NotImplementedException();