/// <summary>Snippet for RunPivotReportAsync</summary> public async Task RunPivotReportRequestObjectAsync() { // Snippet: RunPivotReportAsync(RunPivotReportRequest, CallSettings) // Additional: RunPivotReportAsync(RunPivotReportRequest, CancellationToken) // Create client BetaAnalyticsDataClient betaAnalyticsDataClient = await BetaAnalyticsDataClient.CreateAsync(); // Initialize request argument(s) RunPivotReportRequest request = new RunPivotReportRequest { Property = "", Dimensions = { new Dimension(), }, Metrics = { new Metric(), }, DateRanges = { new DateRange(), }, Pivots = { new Pivot(), }, DimensionFilter = new FilterExpression(), MetricFilter = new FilterExpression(), CurrencyCode = "", CohortSpec = new CohortSpec(), KeepEmptyRows = false, ReturnPropertyQuota = false, }; // Make the request RunPivotReportResponse response = await betaAnalyticsDataClient.RunPivotReportAsync(request); // End snippet }
public void RunPivotReportRequestObject() { moq::Mock <AlphaAnalyticsData.AlphaAnalyticsDataClient> mockGrpcClient = new moq::Mock <AlphaAnalyticsData.AlphaAnalyticsDataClient>(moq::MockBehavior.Strict); RunPivotReportRequest request = new RunPivotReportRequest { Entity = new Entity(), Dimensions = { new Dimension(), }, Metrics = { new Metric(), }, DimensionFilter = new FilterExpression(), MetricFilter = new FilterExpression(), Pivots = { new Pivot(), }, DateRanges = { new DateRange(), }, CurrencyCode = "currency_code7f81e352", CohortSpec = new CohortSpec(), KeepEmptyRows = true, ReturnPropertyQuota = true, }; RunPivotReportResponse expectedResponse = new RunPivotReportResponse { PivotHeaders = { new PivotHeader(), }, MetricHeaders = { new MetricHeader(), }, Rows = { new Row(), }, Aggregates = { new Row(), }, Metadata = new ResponseMetaData(), PropertyQuota = new PropertyQuota(), }; mockGrpcClient.Setup(x => x.RunPivotReport(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse); AlphaAnalyticsDataClient client = new AlphaAnalyticsDataClientImpl(mockGrpcClient.Object, null); RunPivotReportResponse response = client.RunPivotReport(request); xunit::Assert.Same(expectedResponse, response); mockGrpcClient.VerifyAll(); }
/// <summary>Snippet for RunPivotReport</summary> public void RunPivotReport_RequestObject() { // Snippet: RunPivotReport(RunPivotReportRequest,CallSettings) // Create client AlphaAnalyticsDataClient alphaAnalyticsDataClient = AlphaAnalyticsDataClient.Create(); // Initialize request argument(s) RunPivotReportRequest request = new RunPivotReportRequest(); // Make the request RunPivotReportResponse response = alphaAnalyticsDataClient.RunPivotReport(request); // End snippet }
/// <summary>Snippet for RunPivotReportAsync</summary> public async Task RunPivotReportAsync_RequestObject() { // Snippet: RunPivotReportAsync(RunPivotReportRequest,CallSettings) // Additional: RunPivotReportAsync(RunPivotReportRequest,CancellationToken) // Create client AlphaAnalyticsDataClient alphaAnalyticsDataClient = await AlphaAnalyticsDataClient.CreateAsync(); // Initialize request argument(s) RunPivotReportRequest request = new RunPivotReportRequest(); // Make the request RunPivotReportResponse response = await alphaAnalyticsDataClient.RunPivotReportAsync(request); // End snippet }
public async Task RunPivotReportAsync() { Mock <AlphaAnalyticsData.AlphaAnalyticsDataClient> mockGrpcClient = new Mock <AlphaAnalyticsData.AlphaAnalyticsDataClient>(MockBehavior.Strict); RunPivotReportRequest request = new RunPivotReportRequest(); RunPivotReportResponse expectedResponse = new RunPivotReportResponse(); mockGrpcClient.Setup(x => x.RunPivotReportAsync(request, It.IsAny <CallOptions>())) .Returns(new Grpc.Core.AsyncUnaryCall <RunPivotReportResponse>(Task.FromResult(expectedResponse), null, null, null, null)); AlphaAnalyticsDataClient client = new AlphaAnalyticsDataClientImpl(mockGrpcClient.Object, null); RunPivotReportResponse response = await client.RunPivotReportAsync(request); Assert.Same(expectedResponse, response); mockGrpcClient.VerifyAll(); }
public void RunPivotReport() { Mock <AlphaAnalyticsData.AlphaAnalyticsDataClient> mockGrpcClient = new Mock <AlphaAnalyticsData.AlphaAnalyticsDataClient>(MockBehavior.Strict); RunPivotReportRequest request = new RunPivotReportRequest(); RunPivotReportResponse expectedResponse = new RunPivotReportResponse(); mockGrpcClient.Setup(x => x.RunPivotReport(request, It.IsAny <CallOptions>())) .Returns(expectedResponse); AlphaAnalyticsDataClient client = new AlphaAnalyticsDataClientImpl(mockGrpcClient.Object, null); RunPivotReportResponse response = client.RunPivotReport(request); Assert.Same(expectedResponse, response); mockGrpcClient.VerifyAll(); }
public async stt::Task RunPivotReportRequestObjectAsync() { moq::Mock <BetaAnalyticsData.BetaAnalyticsDataClient> mockGrpcClient = new moq::Mock <BetaAnalyticsData.BetaAnalyticsDataClient>(moq::MockBehavior.Strict); RunPivotReportRequest request = new RunPivotReportRequest { Property = "propertyc9b48d1a", Dimensions = { new Dimension(), }, Metrics = { new Metric(), }, DateRanges = { new DateRange(), }, Pivots = { new Pivot(), }, DimensionFilter = new FilterExpression(), MetricFilter = new FilterExpression(), CurrencyCode = "currency_code7f81e352", CohortSpec = new CohortSpec(), KeepEmptyRows = true, ReturnPropertyQuota = true, }; RunPivotReportResponse expectedResponse = new RunPivotReportResponse { PivotHeaders = { new PivotHeader(), }, DimensionHeaders = { new DimensionHeader(), }, MetricHeaders = { new MetricHeader(), }, Rows = { new Row(), }, Aggregates = { new Row(), }, Metadata = new ResponseMetaData(), PropertyQuota = new PropertyQuota(), Kind = "kindf7aa39d9", }; mockGrpcClient.Setup(x => x.RunPivotReportAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <RunPivotReportResponse>(stt::Task.FromResult(expectedResponse), null, null, null, null)); BetaAnalyticsDataClient client = new BetaAnalyticsDataClientImpl(mockGrpcClient.Object, null); RunPivotReportResponse responseCallSettings = await client.RunPivotReportAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); xunit::Assert.Same(expectedResponse, responseCallSettings); RunPivotReportResponse responseCancellationToken = await client.RunPivotReportAsync(request, st::CancellationToken.None); xunit::Assert.Same(expectedResponse, responseCancellationToken); mockGrpcClient.VerifyAll(); }
/// <summary>Snippet for RunPivotReport</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void RunPivotReportRequestObject() { // Create client AlphaAnalyticsDataClient alphaAnalyticsDataClient = AlphaAnalyticsDataClient.Create(); // Initialize request argument(s) RunPivotReportRequest request = new RunPivotReportRequest { Entity = new Entity(), Dimensions = { new Dimension(), }, Metrics = { new Metric(), }, DimensionFilter = new FilterExpression(), MetricFilter = new FilterExpression(), Pivots = { new Pivot(), }, DateRanges = { new DateRange(), }, CurrencyCode = "", CohortSpec = new CohortSpec(), KeepEmptyRows = false, ReturnPropertyQuota = false, }; // Make the request RunPivotReportResponse response = alphaAnalyticsDataClient.RunPivotReport(request); }
/// <summary> /// Returns a customized pivot report of your Google Analytics event data. /// Pivot reports are more advanced and expressive formats than regular /// reports. In a pivot report, dimensions are only visible if they are /// included in a pivot. Multiple pivots can be specified to further dissect /// your data. /// </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 <RunPivotReportResponse> RunPivotReportAsync(RunPivotReportRequest request, gaxgrpc::CallSettings callSettings = null) { Modify_RunPivotReportRequest(ref request, ref callSettings); return(_callRunPivotReport.Async(request, callSettings)); }
/// <summary> /// Returns a customized pivot report of your Google Analytics event data. /// Pivot reports are more advanced and expressive formats than regular /// reports. In a pivot report, dimensions are only visible if they are /// included in a pivot. Multiple pivots can be specified to further dissect /// your data. /// </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>The RPC response.</returns> public override RunPivotReportResponse RunPivotReport(RunPivotReportRequest request, gaxgrpc::CallSettings callSettings = null) { Modify_RunPivotReportRequest(ref request, ref callSettings); return(_callRunPivotReport.Sync(request, callSettings)); }
partial void Modify_RunPivotReportRequest(ref RunPivotReportRequest request, ref gaxgrpc::CallSettings settings);
/// <summary> /// Returns a customized pivot report of your Google Analytics event data. /// Pivot reports are more advanced and expressive formats than regular /// reports. In a pivot report, dimensions are only visible if they are /// included in a pivot. Multiple pivots can be specified to further dissect /// your data. /// </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 <RunPivotReportResponse> RunPivotReportAsync(RunPivotReportRequest request, st::CancellationToken cancellationToken) => RunPivotReportAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
/// <summary> /// Returns a customized pivot report of your Google Analytics event data. /// Pivot reports are more advanced and expressive formats than regular /// reports. In a pivot report, dimensions are only visible if they are /// included in a pivot. Multiple pivots can be specified to further dissect /// your data. /// </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 <RunPivotReportResponse> RunPivotReportAsync(RunPivotReportRequest request, gaxgrpc::CallSettings callSettings = null) => throw new sys::NotImplementedException();
/// <summary> /// Returns a customized pivot report of your Google Analytics event data. /// Pivot reports are more advanced and expressive formats than regular /// reports. In a pivot report, dimensions are only visible if they are /// included in a pivot. Multiple pivots can be specified to further dissect /// your data. /// </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>The RPC response.</returns> public virtual RunPivotReportResponse RunPivotReport(RunPivotReportRequest request, gaxgrpc::CallSettings callSettings = null) => throw new sys::NotImplementedException();