コード例 #1
0
        /// <summary>Snippet for RunRealtimeReportAsync</summary>
        public async Task RunRealtimeReportRequestObjectAsync()
        {
            // Snippet: RunRealtimeReportAsync(RunRealtimeReportRequest, CallSettings)
            // Additional: RunRealtimeReportAsync(RunRealtimeReportRequest, CancellationToken)
            // Create client
            BetaAnalyticsDataClient betaAnalyticsDataClient = await BetaAnalyticsDataClient.CreateAsync();

            // Initialize request argument(s)
            RunRealtimeReportRequest request = new RunRealtimeReportRequest
            {
                Property           = "",
                Dimensions         = { new Dimension(), },
                Metrics            = { new Metric(), },
                DimensionFilter    = new FilterExpression(),
                MetricFilter       = new FilterExpression(),
                Limit              = 0L,
                MetricAggregations =
                {
                    MetricAggregation.Unspecified,
                },
                OrderBys            = { new OrderBy(), },
                ReturnPropertyQuota = false,
                MinuteRanges        = { new MinuteRange(), },
            };
            // Make the request
            RunRealtimeReportResponse response = await betaAnalyticsDataClient.RunRealtimeReportAsync(request);

            // End snippet
        }
コード例 #2
0
 /// <summary>Snippet for RunRealtimeReport</summary>
 public void RunRealtimeReportRequestObject()
 {
     // Snippet: RunRealtimeReport(RunRealtimeReportRequest, CallSettings)
     // Create client
     AlphaAnalyticsDataClient alphaAnalyticsDataClient = AlphaAnalyticsDataClient.Create();
     // Initialize request argument(s)
     RunRealtimeReportRequest request = new RunRealtimeReportRequest
     {
         Property           = "",
         Dimensions         = { new Dimension(), },
         Metrics            = { new Metric(), },
         Limit              = 0L,
         DimensionFilter    = new FilterExpression(),
         MetricFilter       = new FilterExpression(),
         MetricAggregations =
         {
             MetricAggregation.Unspecified,
         },
         OrderBys            = { new OrderBy(), },
         ReturnPropertyQuota = false,
     };
     // Make the request
     RunRealtimeReportResponse response = alphaAnalyticsDataClient.RunRealtimeReport(request);
     // End snippet
 }
コード例 #3
0
        public async stt::Task RunRealtimeReportRequestObjectAsync()
        {
            moq::Mock <BetaAnalyticsData.BetaAnalyticsDataClient> mockGrpcClient = new moq::Mock <BetaAnalyticsData.BetaAnalyticsDataClient>(moq::MockBehavior.Strict);
            RunRealtimeReportRequest request = new RunRealtimeReportRequest
            {
                Property           = "propertyc9b48d1a",
                Dimensions         = { new Dimension(), },
                Metrics            = { new Metric(), },
                DimensionFilter    = new FilterExpression(),
                MetricFilter       = new FilterExpression(),
                Limit              = 7494001492025909162L,
                MetricAggregations =
                {
                    MetricAggregation.Minimum,
                },
                OrderBys            = { new OrderBy(), },
                ReturnPropertyQuota = true,
                MinuteRanges        = { new MinuteRange(), },
            };
            RunRealtimeReportResponse expectedResponse = new RunRealtimeReportResponse
            {
                DimensionHeaders =
                {
                    new DimensionHeader(),
                },
                MetricHeaders = { new MetricHeader(), },
                Rows          = { new Row(), },
                Totals        = { new Row(), },
                Maximums      = { new Row(), },
                Minimums      = { new Row(), },
                RowCount      = 743251772,
                PropertyQuota = new PropertyQuota(),
                Kind          = "kindf7aa39d9",
            };

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

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

            xunit::Assert.Same(expectedResponse, responseCancellationToken);
            mockGrpcClient.VerifyAll();
        }
コード例 #4
0
        public void RunRealtimeReportRequestObject()
        {
            moq::Mock <BetaAnalyticsData.BetaAnalyticsDataClient> mockGrpcClient = new moq::Mock <BetaAnalyticsData.BetaAnalyticsDataClient>(moq::MockBehavior.Strict);
            RunRealtimeReportRequest request = new RunRealtimeReportRequest
            {
                Property           = "propertyc9b48d1a",
                Dimensions         = { new Dimension(), },
                Metrics            = { new Metric(), },
                DimensionFilter    = new FilterExpression(),
                MetricFilter       = new FilterExpression(),
                Limit              = 7494001492025909162L,
                MetricAggregations =
                {
                    MetricAggregation.Minimum,
                },
                OrderBys            = { new OrderBy(), },
                ReturnPropertyQuota = true,
                MinuteRanges        = { new MinuteRange(), },
            };
            RunRealtimeReportResponse expectedResponse = new RunRealtimeReportResponse
            {
                DimensionHeaders =
                {
                    new DimensionHeader(),
                },
                MetricHeaders = { new MetricHeader(), },
                Rows          = { new Row(), },
                Totals        = { new Row(), },
                Maximums      = { new Row(), },
                Minimums      = { new Row(), },
                RowCount      = 743251772,
                PropertyQuota = new PropertyQuota(),
                Kind          = "kindf7aa39d9",
            };

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

            xunit::Assert.Same(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }
コード例 #5
0
        public void RunRealtimeReportRequestObject()
        {
            moq::Mock <BetaAnalyticsData.BetaAnalyticsDataClient> mockGrpcClient = new moq::Mock <BetaAnalyticsData.BetaAnalyticsDataClient>(moq::MockBehavior.Strict);
            RunRealtimeReportRequest request = new RunRealtimeReportRequest
            {
                Property           = "propertyc9b48d1a",
                Dimensions         = { new Dimension(), },
                Metrics            = { new Metric(), },
                DimensionFilter    = new FilterExpression(),
                MetricFilter       = new FilterExpression(),
                PageSize           = -226905851,
                MetricAggregations =
                {
                    MetricAggregation.Minimum,
                },
                OrderBys            = { new OrderBy(), },
                ReturnPropertyQuota = true,
            };
            RunRealtimeReportResponse expectedResponse = new RunRealtimeReportResponse
            {
                DimensionHeaders =
                {
                    new DimensionHeader(),
                },
                MetricHeaders = { new MetricHeader(), },
                Rows          = { new Row(), },
                Totals        = { new Row(), },
                Maximums      = { new Row(), },
                Minimums      = { new Row(), },
                TotalSize     = 1202968108,
                PropertyQuota = new PropertyQuota(),
            };

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

            xunit::Assert.Same(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }
コード例 #6
0
        /// <summary>Snippet for RunRealtimeReportAsync</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 RunRealtimeReportRequestObjectAsync()
        {
            // Create client
            BetaAnalyticsDataClient betaAnalyticsDataClient = await BetaAnalyticsDataClient.CreateAsync();

            // Initialize request argument(s)
            RunRealtimeReportRequest request = new RunRealtimeReportRequest
            {
                Property           = "",
                Dimensions         = { new Dimension(), },
                Metrics            = { new Metric(), },
                DimensionFilter    = new FilterExpression(),
                MetricFilter       = new FilterExpression(),
                Limit              = 0L,
                MetricAggregations =
                {
                    MetricAggregation.Unspecified,
                },
                OrderBys            = { new OrderBy(), },
                ReturnPropertyQuota = false,
            };
            // Make the request
            RunRealtimeReportResponse response = await betaAnalyticsDataClient.RunRealtimeReportAsync(request);
        }