google-analytics-data-v1beta 0.2.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/analytics/data/v1beta/analytics_data/client.rb +296 -62
- data/lib/google/analytics/data/v1beta/analytics_data_api_pb.rb +16 -2
- data/lib/google/analytics/data/v1beta/analytics_data_api_services_pb.rb +12 -1
- data/lib/google/analytics/data/v1beta/data_pb.rb +44 -0
- data/lib/google/analytics/data/v1beta/version.rb +1 -1
- data/proto_docs/google/analytics/data/v1beta/analytics_data_api.rb +59 -4
- data/proto_docs/google/analytics/data/v1beta/data.rb +141 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c40efb926046dba710813a862995ecf1fa6977310260cf32c5764bed0e774e3f
|
4
|
+
data.tar.gz: 94af9ace5240c1e9118dfe8cfe78a47f4ac1bbecbd8105ad997567af466a3e13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0513853b524f0c4fec34d6d500dd9100bfb1da6484d963a88b9e2208687f6bd5a4b83a36720d08e4a2b79c613cc260716c1962f05d6f600f0ee2c5c738bcb358'
|
7
|
+
data.tar.gz: 29d50d4789fc694204d83f43843d478a0e83313c670836e0f884d682a7b2c95453d55825f2098d6d2d92f8bda3796d524788040990d44b81d51179f3dd6b016c
|
@@ -41,13 +41,12 @@ module Google
|
|
41
41
|
# See {::Google::Analytics::Data::V1beta::AnalyticsData::Client::Configuration}
|
42
42
|
# for a description of the configuration fields.
|
43
43
|
#
|
44
|
-
#
|
44
|
+
# @example
|
45
45
|
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
# end
|
46
|
+
# # Modify the configuration for all AnalyticsData clients
|
47
|
+
# ::Google::Analytics::Data::V1beta::AnalyticsData::Client.configure do |config|
|
48
|
+
# config.timeout = 10.0
|
49
|
+
# end
|
51
50
|
#
|
52
51
|
# @yield [config] Configure the Client client.
|
53
52
|
# @yieldparam config [Client::Configuration]
|
@@ -109,19 +108,15 @@ module Google
|
|
109
108
|
##
|
110
109
|
# Create a new AnalyticsData client object.
|
111
110
|
#
|
112
|
-
#
|
113
|
-
#
|
114
|
-
# To create a new AnalyticsData client with the default
|
115
|
-
# configuration:
|
111
|
+
# @example
|
116
112
|
#
|
117
|
-
#
|
113
|
+
# # Create a client using the default configuration
|
114
|
+
# client = ::Google::Analytics::Data::V1beta::AnalyticsData::Client.new
|
118
115
|
#
|
119
|
-
#
|
120
|
-
#
|
121
|
-
#
|
122
|
-
#
|
123
|
-
# config.timeout = 10.0
|
124
|
-
# end
|
116
|
+
# # Create a client using a custom configuration
|
117
|
+
# client = ::Google::Analytics::Data::V1beta::AnalyticsData::Client.new do |config|
|
118
|
+
# config.timeout = 10.0
|
119
|
+
# end
|
125
120
|
#
|
126
121
|
# @yield [config] Configure the AnalyticsData client.
|
127
122
|
# @yieldparam config [Client::Configuration]
|
@@ -141,10 +136,9 @@ module Google
|
|
141
136
|
|
142
137
|
# Create credentials
|
143
138
|
credentials = @config.credentials
|
144
|
-
# Use self-signed JWT if the
|
139
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
145
140
|
# but only if the default endpoint does not have a region prefix.
|
146
|
-
enable_self_signed_jwt = @config.
|
147
|
-
@config.endpoint == Client.configure.endpoint &&
|
141
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
148
142
|
!@config.endpoint.split(".").first.include?("-")
|
149
143
|
credentials ||= Credentials.default scope: @config.scope,
|
150
144
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -209,12 +203,13 @@ module Google
|
|
209
203
|
# response rows for both date ranges. In a cohort request, this `dateRanges`
|
210
204
|
# must be unspecified.
|
211
205
|
# @param dimension_filter [::Google::Analytics::Data::V1beta::FilterExpression, ::Hash]
|
212
|
-
#
|
213
|
-
#
|
206
|
+
# Dimension filters allow you to ask for only specific dimension values in
|
207
|
+
# the report. To learn more, see [Fundamentals of Dimension
|
208
|
+
# Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters)
|
209
|
+
# for examples. Metrics cannot be used in this filter.
|
214
210
|
# @param metric_filter [::Google::Analytics::Data::V1beta::FilterExpression, ::Hash]
|
215
211
|
# The filter clause of metrics. Applied at post aggregation phase, similar to
|
216
|
-
# SQL having-clause.
|
217
|
-
# Dimensions cannot be used in this filter.
|
212
|
+
# SQL having-clause. Dimensions cannot be used in this filter.
|
218
213
|
# @param offset [::Integer]
|
219
214
|
# The row count of the start row. The first row is counted as row 0.
|
220
215
|
#
|
@@ -265,6 +260,21 @@ module Google
|
|
265
260
|
#
|
266
261
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
267
262
|
#
|
263
|
+
# @example Basic example
|
264
|
+
# require "google/analytics/data/v1beta"
|
265
|
+
#
|
266
|
+
# # Create a client object. The client can be reused for multiple calls.
|
267
|
+
# client = Google::Analytics::Data::V1beta::AnalyticsData::Client.new
|
268
|
+
#
|
269
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
270
|
+
# request = Google::Analytics::Data::V1beta::RunReportRequest.new
|
271
|
+
#
|
272
|
+
# # Call the run_report method.
|
273
|
+
# result = client.run_report request
|
274
|
+
#
|
275
|
+
# # The returned object is of type Google::Analytics::Data::V1beta::RunReportResponse.
|
276
|
+
# p result
|
277
|
+
#
|
268
278
|
def run_report request, options = nil
|
269
279
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
270
280
|
|
@@ -282,16 +292,20 @@ module Google
|
|
282
292
|
gapic_version: ::Google::Analytics::Data::V1beta::VERSION
|
283
293
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
284
294
|
|
285
|
-
header_params = {
|
286
|
-
|
287
|
-
|
295
|
+
header_params = {}
|
296
|
+
if request.property
|
297
|
+
header_params["property"] = request.property
|
298
|
+
end
|
299
|
+
|
288
300
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
289
301
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
290
302
|
|
291
303
|
options.apply_defaults timeout: @config.rpcs.run_report.timeout,
|
292
304
|
metadata: metadata,
|
293
305
|
retry_policy: @config.rpcs.run_report.retry_policy
|
294
|
-
|
306
|
+
|
307
|
+
options.apply_defaults timeout: @config.timeout,
|
308
|
+
metadata: @config.metadata,
|
295
309
|
retry_policy: @config.retry_policy
|
296
310
|
|
297
311
|
@analytics_data_stub.call_rpc :run_report, request, options: options do |response, operation|
|
@@ -380,6 +394,21 @@ module Google
|
|
380
394
|
#
|
381
395
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
382
396
|
#
|
397
|
+
# @example Basic example
|
398
|
+
# require "google/analytics/data/v1beta"
|
399
|
+
#
|
400
|
+
# # Create a client object. The client can be reused for multiple calls.
|
401
|
+
# client = Google::Analytics::Data::V1beta::AnalyticsData::Client.new
|
402
|
+
#
|
403
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
404
|
+
# request = Google::Analytics::Data::V1beta::RunPivotReportRequest.new
|
405
|
+
#
|
406
|
+
# # Call the run_pivot_report method.
|
407
|
+
# result = client.run_pivot_report request
|
408
|
+
#
|
409
|
+
# # The returned object is of type Google::Analytics::Data::V1beta::RunPivotReportResponse.
|
410
|
+
# p result
|
411
|
+
#
|
383
412
|
def run_pivot_report request, options = nil
|
384
413
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
385
414
|
|
@@ -397,16 +426,20 @@ module Google
|
|
397
426
|
gapic_version: ::Google::Analytics::Data::V1beta::VERSION
|
398
427
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
399
428
|
|
400
|
-
header_params = {
|
401
|
-
|
402
|
-
|
429
|
+
header_params = {}
|
430
|
+
if request.property
|
431
|
+
header_params["property"] = request.property
|
432
|
+
end
|
433
|
+
|
403
434
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
404
435
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
405
436
|
|
406
437
|
options.apply_defaults timeout: @config.rpcs.run_pivot_report.timeout,
|
407
438
|
metadata: metadata,
|
408
439
|
retry_policy: @config.rpcs.run_pivot_report.retry_policy
|
409
|
-
|
440
|
+
|
441
|
+
options.apply_defaults timeout: @config.timeout,
|
442
|
+
metadata: @config.metadata,
|
410
443
|
retry_policy: @config.retry_policy
|
411
444
|
|
412
445
|
@analytics_data_stub.call_rpc :run_pivot_report, request, options: options do |response, operation|
|
@@ -458,6 +491,21 @@ module Google
|
|
458
491
|
#
|
459
492
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
460
493
|
#
|
494
|
+
# @example Basic example
|
495
|
+
# require "google/analytics/data/v1beta"
|
496
|
+
#
|
497
|
+
# # Create a client object. The client can be reused for multiple calls.
|
498
|
+
# client = Google::Analytics::Data::V1beta::AnalyticsData::Client.new
|
499
|
+
#
|
500
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
501
|
+
# request = Google::Analytics::Data::V1beta::BatchRunReportsRequest.new
|
502
|
+
#
|
503
|
+
# # Call the batch_run_reports method.
|
504
|
+
# result = client.batch_run_reports request
|
505
|
+
#
|
506
|
+
# # The returned object is of type Google::Analytics::Data::V1beta::BatchRunReportsResponse.
|
507
|
+
# p result
|
508
|
+
#
|
461
509
|
def batch_run_reports request, options = nil
|
462
510
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
463
511
|
|
@@ -475,16 +523,20 @@ module Google
|
|
475
523
|
gapic_version: ::Google::Analytics::Data::V1beta::VERSION
|
476
524
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
477
525
|
|
478
|
-
header_params = {
|
479
|
-
|
480
|
-
|
526
|
+
header_params = {}
|
527
|
+
if request.property
|
528
|
+
header_params["property"] = request.property
|
529
|
+
end
|
530
|
+
|
481
531
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
482
532
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
483
533
|
|
484
534
|
options.apply_defaults timeout: @config.rpcs.batch_run_reports.timeout,
|
485
535
|
metadata: metadata,
|
486
536
|
retry_policy: @config.rpcs.batch_run_reports.retry_policy
|
487
|
-
|
537
|
+
|
538
|
+
options.apply_defaults timeout: @config.timeout,
|
539
|
+
metadata: @config.metadata,
|
488
540
|
retry_policy: @config.retry_policy
|
489
541
|
|
490
542
|
@analytics_data_stub.call_rpc :batch_run_reports, request, options: options do |response, operation|
|
@@ -536,6 +588,21 @@ module Google
|
|
536
588
|
#
|
537
589
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
538
590
|
#
|
591
|
+
# @example Basic example
|
592
|
+
# require "google/analytics/data/v1beta"
|
593
|
+
#
|
594
|
+
# # Create a client object. The client can be reused for multiple calls.
|
595
|
+
# client = Google::Analytics::Data::V1beta::AnalyticsData::Client.new
|
596
|
+
#
|
597
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
598
|
+
# request = Google::Analytics::Data::V1beta::BatchRunPivotReportsRequest.new
|
599
|
+
#
|
600
|
+
# # Call the batch_run_pivot_reports method.
|
601
|
+
# result = client.batch_run_pivot_reports request
|
602
|
+
#
|
603
|
+
# # The returned object is of type Google::Analytics::Data::V1beta::BatchRunPivotReportsResponse.
|
604
|
+
# p result
|
605
|
+
#
|
539
606
|
def batch_run_pivot_reports request, options = nil
|
540
607
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
541
608
|
|
@@ -553,16 +620,20 @@ module Google
|
|
553
620
|
gapic_version: ::Google::Analytics::Data::V1beta::VERSION
|
554
621
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
555
622
|
|
556
|
-
header_params = {
|
557
|
-
|
558
|
-
|
623
|
+
header_params = {}
|
624
|
+
if request.property
|
625
|
+
header_params["property"] = request.property
|
626
|
+
end
|
627
|
+
|
559
628
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
560
629
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
561
630
|
|
562
631
|
options.apply_defaults timeout: @config.rpcs.batch_run_pivot_reports.timeout,
|
563
632
|
metadata: metadata,
|
564
633
|
retry_policy: @config.rpcs.batch_run_pivot_reports.retry_policy
|
565
|
-
|
634
|
+
|
635
|
+
options.apply_defaults timeout: @config.timeout,
|
636
|
+
metadata: @config.metadata,
|
566
637
|
retry_policy: @config.retry_policy
|
567
638
|
|
568
639
|
@analytics_data_stub.call_rpc :batch_run_pivot_reports, request, options: options do |response, operation|
|
@@ -621,6 +692,21 @@ module Google
|
|
621
692
|
#
|
622
693
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
623
694
|
#
|
695
|
+
# @example Basic example
|
696
|
+
# require "google/analytics/data/v1beta"
|
697
|
+
#
|
698
|
+
# # Create a client object. The client can be reused for multiple calls.
|
699
|
+
# client = Google::Analytics::Data::V1beta::AnalyticsData::Client.new
|
700
|
+
#
|
701
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
702
|
+
# request = Google::Analytics::Data::V1beta::GetMetadataRequest.new
|
703
|
+
#
|
704
|
+
# # Call the get_metadata method.
|
705
|
+
# result = client.get_metadata request
|
706
|
+
#
|
707
|
+
# # The returned object is of type Google::Analytics::Data::V1beta::Metadata.
|
708
|
+
# p result
|
709
|
+
#
|
624
710
|
def get_metadata request, options = nil
|
625
711
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
626
712
|
|
@@ -638,16 +724,20 @@ module Google
|
|
638
724
|
gapic_version: ::Google::Analytics::Data::V1beta::VERSION
|
639
725
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
640
726
|
|
641
|
-
header_params = {
|
642
|
-
|
643
|
-
|
727
|
+
header_params = {}
|
728
|
+
if request.name
|
729
|
+
header_params["name"] = request.name
|
730
|
+
end
|
731
|
+
|
644
732
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
645
733
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
646
734
|
|
647
735
|
options.apply_defaults timeout: @config.rpcs.get_metadata.timeout,
|
648
736
|
metadata: metadata,
|
649
737
|
retry_policy: @config.rpcs.get_metadata.retry_policy
|
650
|
-
|
738
|
+
|
739
|
+
options.apply_defaults timeout: @config.timeout,
|
740
|
+
metadata: @config.metadata,
|
651
741
|
retry_policy: @config.retry_policy
|
652
742
|
|
653
743
|
@analytics_data_stub.call_rpc :get_metadata, request, options: options do |response, operation|
|
@@ -729,6 +819,21 @@ module Google
|
|
729
819
|
#
|
730
820
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
731
821
|
#
|
822
|
+
# @example Basic example
|
823
|
+
# require "google/analytics/data/v1beta"
|
824
|
+
#
|
825
|
+
# # Create a client object. The client can be reused for multiple calls.
|
826
|
+
# client = Google::Analytics::Data::V1beta::AnalyticsData::Client.new
|
827
|
+
#
|
828
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
829
|
+
# request = Google::Analytics::Data::V1beta::RunRealtimeReportRequest.new
|
830
|
+
#
|
831
|
+
# # Call the run_realtime_report method.
|
832
|
+
# result = client.run_realtime_report request
|
833
|
+
#
|
834
|
+
# # The returned object is of type Google::Analytics::Data::V1beta::RunRealtimeReportResponse.
|
835
|
+
# p result
|
836
|
+
#
|
732
837
|
def run_realtime_report request, options = nil
|
733
838
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
734
839
|
|
@@ -746,16 +851,20 @@ module Google
|
|
746
851
|
gapic_version: ::Google::Analytics::Data::V1beta::VERSION
|
747
852
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
748
853
|
|
749
|
-
header_params = {
|
750
|
-
|
751
|
-
|
854
|
+
header_params = {}
|
855
|
+
if request.property
|
856
|
+
header_params["property"] = request.property
|
857
|
+
end
|
858
|
+
|
752
859
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
753
860
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
754
861
|
|
755
862
|
options.apply_defaults timeout: @config.rpcs.run_realtime_report.timeout,
|
756
863
|
metadata: metadata,
|
757
864
|
retry_policy: @config.rpcs.run_realtime_report.retry_policy
|
758
|
-
|
865
|
+
|
866
|
+
options.apply_defaults timeout: @config.timeout,
|
867
|
+
metadata: @config.metadata,
|
759
868
|
retry_policy: @config.retry_policy
|
760
869
|
|
761
870
|
@analytics_data_stub.call_rpc :run_realtime_report, request, options: options do |response, operation|
|
@@ -766,6 +875,125 @@ module Google
|
|
766
875
|
raise ::Google::Cloud::Error.from_error(e)
|
767
876
|
end
|
768
877
|
|
878
|
+
##
|
879
|
+
# This compatibility method lists dimensions and metrics that can be added to
|
880
|
+
# a report request and maintain compatibility. This method fails if the
|
881
|
+
# request's dimensions and metrics are incompatible.
|
882
|
+
#
|
883
|
+
# In Google Analytics, reports fail if they request incompatible dimensions
|
884
|
+
# and/or metrics; in that case, you will need to remove dimensions and/or
|
885
|
+
# metrics from the incompatible report until the report is compatible.
|
886
|
+
#
|
887
|
+
# The Realtime and Core reports have different compatibility rules. This
|
888
|
+
# method checks compatibility for Core reports.
|
889
|
+
#
|
890
|
+
# @overload check_compatibility(request, options = nil)
|
891
|
+
# Pass arguments to `check_compatibility` via a request object, either of type
|
892
|
+
# {::Google::Analytics::Data::V1beta::CheckCompatibilityRequest} or an equivalent Hash.
|
893
|
+
#
|
894
|
+
# @param request [::Google::Analytics::Data::V1beta::CheckCompatibilityRequest, ::Hash]
|
895
|
+
# A request object representing the call parameters. Required. To specify no
|
896
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
897
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
898
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
899
|
+
#
|
900
|
+
# @overload check_compatibility(property: nil, dimensions: nil, metrics: nil, dimension_filter: nil, metric_filter: nil, compatibility_filter: nil)
|
901
|
+
# Pass arguments to `check_compatibility` via keyword arguments. Note that at
|
902
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
903
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
904
|
+
#
|
905
|
+
# @param property [::String]
|
906
|
+
# A Google Analytics GA4 property identifier whose events are tracked. To
|
907
|
+
# learn more, see [where to find your Property
|
908
|
+
# ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
|
909
|
+
# `property` should be the same value as in your `runReport` request.
|
910
|
+
#
|
911
|
+
# Example: properties/1234
|
912
|
+
#
|
913
|
+
# Set the Property ID to 0 for compatibility checking on dimensions and
|
914
|
+
# metrics common to all properties. In this special mode, this method will
|
915
|
+
# not return custom dimensions and metrics.
|
916
|
+
# @param dimensions [::Array<::Google::Analytics::Data::V1beta::Dimension, ::Hash>]
|
917
|
+
# The dimensions in this report. `dimensions` should be the same value as in
|
918
|
+
# your `runReport` request.
|
919
|
+
# @param metrics [::Array<::Google::Analytics::Data::V1beta::Metric, ::Hash>]
|
920
|
+
# The metrics in this report. `metrics` should be the same value as in your
|
921
|
+
# `runReport` request.
|
922
|
+
# @param dimension_filter [::Google::Analytics::Data::V1beta::FilterExpression, ::Hash]
|
923
|
+
# The filter clause of dimensions. `dimensionFilter` should be the same value
|
924
|
+
# as in your `runReport` request.
|
925
|
+
# @param metric_filter [::Google::Analytics::Data::V1beta::FilterExpression, ::Hash]
|
926
|
+
# The filter clause of metrics. `metricFilter` should be the same value as in
|
927
|
+
# your `runReport` request
|
928
|
+
# @param compatibility_filter [::Google::Analytics::Data::V1beta::Compatibility]
|
929
|
+
# Filters the dimensions and metrics in the response to just this
|
930
|
+
# compatibility. Commonly used as `”compatibilityFilter”: “COMPATIBLE”`
|
931
|
+
# to only return compatible dimensions & metrics.
|
932
|
+
#
|
933
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
934
|
+
# @yieldparam response [::Google::Analytics::Data::V1beta::CheckCompatibilityResponse]
|
935
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
936
|
+
#
|
937
|
+
# @return [::Google::Analytics::Data::V1beta::CheckCompatibilityResponse]
|
938
|
+
#
|
939
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
940
|
+
#
|
941
|
+
# @example Basic example
|
942
|
+
# require "google/analytics/data/v1beta"
|
943
|
+
#
|
944
|
+
# # Create a client object. The client can be reused for multiple calls.
|
945
|
+
# client = Google::Analytics::Data::V1beta::AnalyticsData::Client.new
|
946
|
+
#
|
947
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
948
|
+
# request = Google::Analytics::Data::V1beta::CheckCompatibilityRequest.new
|
949
|
+
#
|
950
|
+
# # Call the check_compatibility method.
|
951
|
+
# result = client.check_compatibility request
|
952
|
+
#
|
953
|
+
# # The returned object is of type Google::Analytics::Data::V1beta::CheckCompatibilityResponse.
|
954
|
+
# p result
|
955
|
+
#
|
956
|
+
def check_compatibility request, options = nil
|
957
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
958
|
+
|
959
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Data::V1beta::CheckCompatibilityRequest
|
960
|
+
|
961
|
+
# Converts hash and nil to an options object
|
962
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
963
|
+
|
964
|
+
# Customize the options with defaults
|
965
|
+
metadata = @config.rpcs.check_compatibility.metadata.to_h
|
966
|
+
|
967
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
968
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
969
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
970
|
+
gapic_version: ::Google::Analytics::Data::V1beta::VERSION
|
971
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
972
|
+
|
973
|
+
header_params = {}
|
974
|
+
if request.property
|
975
|
+
header_params["property"] = request.property
|
976
|
+
end
|
977
|
+
|
978
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
979
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
980
|
+
|
981
|
+
options.apply_defaults timeout: @config.rpcs.check_compatibility.timeout,
|
982
|
+
metadata: metadata,
|
983
|
+
retry_policy: @config.rpcs.check_compatibility.retry_policy
|
984
|
+
|
985
|
+
options.apply_defaults timeout: @config.timeout,
|
986
|
+
metadata: @config.metadata,
|
987
|
+
retry_policy: @config.retry_policy
|
988
|
+
|
989
|
+
@analytics_data_stub.call_rpc :check_compatibility, request, options: options do |response, operation|
|
990
|
+
yield response, operation if block_given?
|
991
|
+
return response
|
992
|
+
end
|
993
|
+
rescue ::GRPC::BadStatus => e
|
994
|
+
raise ::Google::Cloud::Error.from_error(e)
|
995
|
+
end
|
996
|
+
|
769
997
|
##
|
770
998
|
# Configuration class for the AnalyticsData API.
|
771
999
|
#
|
@@ -779,22 +1007,21 @@ module Google
|
|
779
1007
|
# Configuration can be applied globally to all clients, or to a single client
|
780
1008
|
# on construction.
|
781
1009
|
#
|
782
|
-
#
|
783
|
-
#
|
784
|
-
# To modify the global config, setting the timeout for run_report
|
785
|
-
# to 20 seconds, and all remaining timeouts to 10 seconds:
|
786
|
-
#
|
787
|
-
# ::Google::Analytics::Data::V1beta::AnalyticsData::Client.configure do |config|
|
788
|
-
# config.timeout = 10.0
|
789
|
-
# config.rpcs.run_report.timeout = 20.0
|
790
|
-
# end
|
1010
|
+
# @example
|
791
1011
|
#
|
792
|
-
#
|
1012
|
+
# # Modify the global config, setting the timeout for
|
1013
|
+
# # run_report to 20 seconds,
|
1014
|
+
# # and all remaining timeouts to 10 seconds.
|
1015
|
+
# ::Google::Analytics::Data::V1beta::AnalyticsData::Client.configure do |config|
|
1016
|
+
# config.timeout = 10.0
|
1017
|
+
# config.rpcs.run_report.timeout = 20.0
|
1018
|
+
# end
|
793
1019
|
#
|
794
|
-
#
|
795
|
-
#
|
796
|
-
#
|
797
|
-
#
|
1020
|
+
# # Apply the above configuration only to a new client.
|
1021
|
+
# client = ::Google::Analytics::Data::V1beta::AnalyticsData::Client.new do |config|
|
1022
|
+
# config.timeout = 10.0
|
1023
|
+
# config.rpcs.run_report.timeout = 20.0
|
1024
|
+
# end
|
798
1025
|
#
|
799
1026
|
# @!attribute [rw] endpoint
|
800
1027
|
# The hostname or hostname:port of the service endpoint.
|
@@ -932,6 +1159,11 @@ module Google
|
|
932
1159
|
# @return [::Gapic::Config::Method]
|
933
1160
|
#
|
934
1161
|
attr_reader :run_realtime_report
|
1162
|
+
##
|
1163
|
+
# RPC-specific configuration for `check_compatibility`
|
1164
|
+
# @return [::Gapic::Config::Method]
|
1165
|
+
#
|
1166
|
+
attr_reader :check_compatibility
|
935
1167
|
|
936
1168
|
# @private
|
937
1169
|
def initialize parent_rpcs = nil
|
@@ -947,6 +1179,8 @@ module Google
|
|
947
1179
|
@get_metadata = ::Gapic::Config::Method.new get_metadata_config
|
948
1180
|
run_realtime_report_config = parent_rpcs.run_realtime_report if parent_rpcs.respond_to? :run_realtime_report
|
949
1181
|
@run_realtime_report = ::Gapic::Config::Method.new run_realtime_report_config
|
1182
|
+
check_compatibility_config = parent_rpcs.check_compatibility if parent_rpcs.respond_to? :check_compatibility
|
1183
|
+
@check_compatibility = ::Gapic::Config::Method.new check_compatibility_config
|
950
1184
|
|
951
1185
|
yield self if block_given?
|
952
1186
|
end
|
@@ -1,15 +1,27 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/analytics/data/v1beta/analytics_data_api.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/analytics/data/v1beta/data_pb'
|
7
5
|
require 'google/api/annotations_pb'
|
8
6
|
require 'google/api/client_pb'
|
9
7
|
require 'google/api/field_behavior_pb'
|
10
8
|
require 'google/api/resource_pb'
|
9
|
+
require 'google/protobuf'
|
10
|
+
|
11
11
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
12
12
|
add_file("google/analytics/data/v1beta/analytics_data_api.proto", :syntax => :proto3) do
|
13
|
+
add_message "google.analytics.data.v1beta.CheckCompatibilityRequest" do
|
14
|
+
optional :property, :string, 1
|
15
|
+
repeated :dimensions, :message, 2, "google.analytics.data.v1beta.Dimension"
|
16
|
+
repeated :metrics, :message, 3, "google.analytics.data.v1beta.Metric"
|
17
|
+
optional :dimension_filter, :message, 4, "google.analytics.data.v1beta.FilterExpression"
|
18
|
+
optional :metric_filter, :message, 5, "google.analytics.data.v1beta.FilterExpression"
|
19
|
+
optional :compatibility_filter, :enum, 6, "google.analytics.data.v1beta.Compatibility"
|
20
|
+
end
|
21
|
+
add_message "google.analytics.data.v1beta.CheckCompatibilityResponse" do
|
22
|
+
repeated :dimension_compatibilities, :message, 1, "google.analytics.data.v1beta.DimensionCompatibility"
|
23
|
+
repeated :metric_compatibilities, :message, 2, "google.analytics.data.v1beta.MetricCompatibility"
|
24
|
+
end
|
13
25
|
add_message "google.analytics.data.v1beta.Metadata" do
|
14
26
|
optional :name, :string, 3
|
15
27
|
repeated :dimensions, :message, 1, "google.analytics.data.v1beta.DimensionMetadata"
|
@@ -115,6 +127,8 @@ module Google
|
|
115
127
|
module Analytics
|
116
128
|
module Data
|
117
129
|
module V1beta
|
130
|
+
CheckCompatibilityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.CheckCompatibilityRequest").msgclass
|
131
|
+
CheckCompatibilityResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.CheckCompatibilityResponse").msgclass
|
118
132
|
Metadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.Metadata").msgclass
|
119
133
|
RunReportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.RunReportRequest").msgclass
|
120
134
|
RunReportResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.RunReportResponse").msgclass
|
@@ -27,7 +27,7 @@ module Google
|
|
27
27
|
# Google Analytics reporting data service.
|
28
28
|
class Service
|
29
29
|
|
30
|
-
include GRPC::GenericService
|
30
|
+
include ::GRPC::GenericService
|
31
31
|
|
32
32
|
self.marshal_class_method = :encode
|
33
33
|
self.unmarshal_class_method = :decode
|
@@ -68,6 +68,17 @@ module Google
|
|
68
68
|
# event data for your property. These reports show events and usage from the
|
69
69
|
# last 30 minutes.
|
70
70
|
rpc :RunRealtimeReport, ::Google::Analytics::Data::V1beta::RunRealtimeReportRequest, ::Google::Analytics::Data::V1beta::RunRealtimeReportResponse
|
71
|
+
# This compatibility method lists dimensions and metrics that can be added to
|
72
|
+
# a report request and maintain compatibility. This method fails if the
|
73
|
+
# request's dimensions and metrics are incompatible.
|
74
|
+
#
|
75
|
+
# In Google Analytics, reports fail if they request incompatible dimensions
|
76
|
+
# and/or metrics; in that case, you will need to remove dimensions and/or
|
77
|
+
# metrics from the incompatible report until the report is compatible.
|
78
|
+
#
|
79
|
+
# The Realtime and Core reports have different compatibility rules. This
|
80
|
+
# method checks compatibility for Core reports.
|
81
|
+
rpc :CheckCompatibility, ::Google::Analytics::Data::V1beta::CheckCompatibilityRequest, ::Google::Analytics::Data::V1beta::CheckCompatibilityResponse
|
71
82
|
end
|
72
83
|
|
73
84
|
Stub = Service.rpc_stub_class
|
@@ -154,6 +154,17 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
154
154
|
end
|
155
155
|
add_message "google.analytics.data.v1beta.ResponseMetaData" do
|
156
156
|
optional :data_loss_from_other_row, :bool, 3
|
157
|
+
proto3_optional :schema_restriction_response, :message, 4, "google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse"
|
158
|
+
proto3_optional :currency_code, :string, 5
|
159
|
+
proto3_optional :time_zone, :string, 6
|
160
|
+
proto3_optional :empty_reason, :string, 7
|
161
|
+
end
|
162
|
+
add_message "google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse" do
|
163
|
+
repeated :active_metric_restrictions, :message, 1, "google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction"
|
164
|
+
end
|
165
|
+
add_message "google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction" do
|
166
|
+
proto3_optional :metric_name, :string, 1
|
167
|
+
repeated :restricted_metric_types, :enum, 2, "google.analytics.data.v1beta.RestrictedMetricType"
|
157
168
|
end
|
158
169
|
add_message "google.analytics.data.v1beta.DimensionHeader" do
|
159
170
|
optional :name, :string, 1
|
@@ -206,6 +217,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
206
217
|
optional :description, :string, 3
|
207
218
|
repeated :deprecated_api_names, :string, 4
|
208
219
|
optional :custom_definition, :bool, 5
|
220
|
+
optional :category, :string, 7
|
209
221
|
end
|
210
222
|
add_message "google.analytics.data.v1beta.MetricMetadata" do
|
211
223
|
optional :api_name, :string, 1
|
@@ -215,6 +227,21 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
215
227
|
optional :type, :enum, 5, "google.analytics.data.v1beta.MetricType"
|
216
228
|
optional :expression, :string, 6
|
217
229
|
optional :custom_definition, :bool, 7
|
230
|
+
repeated :blocked_reasons, :enum, 8, "google.analytics.data.v1beta.MetricMetadata.BlockedReason"
|
231
|
+
optional :category, :string, 10
|
232
|
+
end
|
233
|
+
add_enum "google.analytics.data.v1beta.MetricMetadata.BlockedReason" do
|
234
|
+
value :BLOCKED_REASON_UNSPECIFIED, 0
|
235
|
+
value :NO_REVENUE_METRICS, 1
|
236
|
+
value :NO_COST_METRICS, 2
|
237
|
+
end
|
238
|
+
add_message "google.analytics.data.v1beta.DimensionCompatibility" do
|
239
|
+
proto3_optional :dimension_metadata, :message, 1, "google.analytics.data.v1beta.DimensionMetadata"
|
240
|
+
proto3_optional :compatibility, :enum, 2, "google.analytics.data.v1beta.Compatibility"
|
241
|
+
end
|
242
|
+
add_message "google.analytics.data.v1beta.MetricCompatibility" do
|
243
|
+
proto3_optional :metric_metadata, :message, 1, "google.analytics.data.v1beta.MetricMetadata"
|
244
|
+
proto3_optional :compatibility, :enum, 2, "google.analytics.data.v1beta.Compatibility"
|
218
245
|
end
|
219
246
|
add_enum "google.analytics.data.v1beta.MetricAggregation" do
|
220
247
|
value :METRIC_AGGREGATION_UNSPECIFIED, 0
|
@@ -238,6 +265,16 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
238
265
|
value :TYPE_METERS, 12
|
239
266
|
value :TYPE_KILOMETERS, 13
|
240
267
|
end
|
268
|
+
add_enum "google.analytics.data.v1beta.RestrictedMetricType" do
|
269
|
+
value :RESTRICTED_METRIC_TYPE_UNSPECIFIED, 0
|
270
|
+
value :COST_DATA, 1
|
271
|
+
value :REVENUE_DATA, 2
|
272
|
+
end
|
273
|
+
add_enum "google.analytics.data.v1beta.Compatibility" do
|
274
|
+
value :COMPATIBILITY_UNSPECIFIED, 0
|
275
|
+
value :COMPATIBLE, 1
|
276
|
+
value :INCOMPATIBLE, 2
|
277
|
+
end
|
241
278
|
end
|
242
279
|
end
|
243
280
|
|
@@ -274,6 +311,8 @@ module Google
|
|
274
311
|
CohortsRange::Granularity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.CohortsRange.Granularity").enummodule
|
275
312
|
CohortReportSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.CohortReportSettings").msgclass
|
276
313
|
ResponseMetaData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.ResponseMetaData").msgclass
|
314
|
+
ResponseMetaData::SchemaRestrictionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse").msgclass
|
315
|
+
ResponseMetaData::SchemaRestrictionResponse::ActiveMetricRestriction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction").msgclass
|
277
316
|
DimensionHeader = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.DimensionHeader").msgclass
|
278
317
|
MetricHeader = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.MetricHeader").msgclass
|
279
318
|
PivotHeader = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.PivotHeader").msgclass
|
@@ -286,8 +325,13 @@ module Google
|
|
286
325
|
QuotaStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.QuotaStatus").msgclass
|
287
326
|
DimensionMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.DimensionMetadata").msgclass
|
288
327
|
MetricMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.MetricMetadata").msgclass
|
328
|
+
MetricMetadata::BlockedReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.MetricMetadata.BlockedReason").enummodule
|
329
|
+
DimensionCompatibility = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.DimensionCompatibility").msgclass
|
330
|
+
MetricCompatibility = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.MetricCompatibility").msgclass
|
289
331
|
MetricAggregation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.MetricAggregation").enummodule
|
290
332
|
MetricType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.MetricType").enummodule
|
333
|
+
RestrictedMetricType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.RestrictedMetricType").enummodule
|
334
|
+
Compatibility = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.Compatibility").enummodule
|
291
335
|
end
|
292
336
|
end
|
293
337
|
end
|
@@ -21,6 +21,60 @@ module Google
|
|
21
21
|
module Analytics
|
22
22
|
module Data
|
23
23
|
module V1beta
|
24
|
+
# The request for compatibility information for a report's dimensions and
|
25
|
+
# metrics. Check compatibility provides a preview of the compatibility of a
|
26
|
+
# report; fields shared with the `runReport` request should be the same values
|
27
|
+
# as in your `runReport` request.
|
28
|
+
# @!attribute [rw] property
|
29
|
+
# @return [::String]
|
30
|
+
# A Google Analytics GA4 property identifier whose events are tracked. To
|
31
|
+
# learn more, see [where to find your Property
|
32
|
+
# ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
|
33
|
+
# `property` should be the same value as in your `runReport` request.
|
34
|
+
#
|
35
|
+
# Example: properties/1234
|
36
|
+
#
|
37
|
+
# Set the Property ID to 0 for compatibility checking on dimensions and
|
38
|
+
# metrics common to all properties. In this special mode, this method will
|
39
|
+
# not return custom dimensions and metrics.
|
40
|
+
# @!attribute [rw] dimensions
|
41
|
+
# @return [::Array<::Google::Analytics::Data::V1beta::Dimension>]
|
42
|
+
# The dimensions in this report. `dimensions` should be the same value as in
|
43
|
+
# your `runReport` request.
|
44
|
+
# @!attribute [rw] metrics
|
45
|
+
# @return [::Array<::Google::Analytics::Data::V1beta::Metric>]
|
46
|
+
# The metrics in this report. `metrics` should be the same value as in your
|
47
|
+
# `runReport` request.
|
48
|
+
# @!attribute [rw] dimension_filter
|
49
|
+
# @return [::Google::Analytics::Data::V1beta::FilterExpression]
|
50
|
+
# The filter clause of dimensions. `dimensionFilter` should be the same value
|
51
|
+
# as in your `runReport` request.
|
52
|
+
# @!attribute [rw] metric_filter
|
53
|
+
# @return [::Google::Analytics::Data::V1beta::FilterExpression]
|
54
|
+
# The filter clause of metrics. `metricFilter` should be the same value as in
|
55
|
+
# your `runReport` request
|
56
|
+
# @!attribute [rw] compatibility_filter
|
57
|
+
# @return [::Google::Analytics::Data::V1beta::Compatibility]
|
58
|
+
# Filters the dimensions and metrics in the response to just this
|
59
|
+
# compatibility. Commonly used as `”compatibilityFilter”: “COMPATIBLE”`
|
60
|
+
# to only return compatible dimensions & metrics.
|
61
|
+
class CheckCompatibilityRequest
|
62
|
+
include ::Google::Protobuf::MessageExts
|
63
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
64
|
+
end
|
65
|
+
|
66
|
+
# The compatibility response with the compatibility of each dimension & metric.
|
67
|
+
# @!attribute [rw] dimension_compatibilities
|
68
|
+
# @return [::Array<::Google::Analytics::Data::V1beta::DimensionCompatibility>]
|
69
|
+
# The compatibility of each dimension.
|
70
|
+
# @!attribute [rw] metric_compatibilities
|
71
|
+
# @return [::Array<::Google::Analytics::Data::V1beta::MetricCompatibility>]
|
72
|
+
# The compatibility of each metric.
|
73
|
+
class CheckCompatibilityResponse
|
74
|
+
include ::Google::Protobuf::MessageExts
|
75
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
76
|
+
end
|
77
|
+
|
24
78
|
# The dimensions and metrics currently accepted in reporting methods.
|
25
79
|
# @!attribute [rw] name
|
26
80
|
# @return [::String]
|
@@ -62,13 +116,14 @@ module Google
|
|
62
116
|
# must be unspecified.
|
63
117
|
# @!attribute [rw] dimension_filter
|
64
118
|
# @return [::Google::Analytics::Data::V1beta::FilterExpression]
|
65
|
-
#
|
66
|
-
#
|
119
|
+
# Dimension filters allow you to ask for only specific dimension values in
|
120
|
+
# the report. To learn more, see [Fundamentals of Dimension
|
121
|
+
# Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters)
|
122
|
+
# for examples. Metrics cannot be used in this filter.
|
67
123
|
# @!attribute [rw] metric_filter
|
68
124
|
# @return [::Google::Analytics::Data::V1beta::FilterExpression]
|
69
125
|
# The filter clause of metrics. Applied at post aggregation phase, similar to
|
70
|
-
# SQL having-clause.
|
71
|
-
# Dimensions cannot be used in this filter.
|
126
|
+
# SQL having-clause. Dimensions cannot be used in this filter.
|
72
127
|
# @!attribute [rw] offset
|
73
128
|
# @return [::Integer]
|
74
129
|
# The row count of the start row. The first row is counted as row 0.
|
@@ -618,9 +618,61 @@ module Google
|
|
618
618
|
# @return [::Boolean]
|
619
619
|
# If true, indicates some buckets of dimension combinations are rolled into
|
620
620
|
# "(other)" row. This can happen for high cardinality reports.
|
621
|
+
# @!attribute [rw] schema_restriction_response
|
622
|
+
# @return [::Google::Analytics::Data::V1beta::ResponseMetaData::SchemaRestrictionResponse]
|
623
|
+
# Describes the schema restrictions actively enforced in creating this
|
624
|
+
# report. To learn more, see [Access and data-restriction
|
625
|
+
# management](https://support.google.com/analytics/answer/10851388).
|
626
|
+
# @!attribute [rw] currency_code
|
627
|
+
# @return [::String]
|
628
|
+
# The currency code used in this report. Intended to be used in formatting
|
629
|
+
# currency metrics like `purchaseRevenue` for visualization. If currency_code
|
630
|
+
# was specified in the request, this response parameter will echo the request
|
631
|
+
# parameter; otherwise, this response parameter is the property's current
|
632
|
+
# currency_code.
|
633
|
+
#
|
634
|
+
# Currency codes are string encodings of currency types from the ISO 4217
|
635
|
+
# standard (https://en.wikipedia.org/wiki/ISO_4217); for example "USD",
|
636
|
+
# "EUR", "JPY". To learn more, see
|
637
|
+
# https://support.google.com/analytics/answer/9796179.
|
638
|
+
# @!attribute [rw] time_zone
|
639
|
+
# @return [::String]
|
640
|
+
# The property's current timezone. Intended to be used to interpret
|
641
|
+
# time-based dimensions like `hour` and `minute`. Formatted as strings from
|
642
|
+
# the IANA Time Zone database (https://www.iana.org/time-zones); for example
|
643
|
+
# "America/New_York" or "Asia/Tokyo".
|
644
|
+
# @!attribute [rw] empty_reason
|
645
|
+
# @return [::String]
|
646
|
+
# If empty reason is specified, the report is empty for this reason.
|
621
647
|
class ResponseMetaData
|
622
648
|
include ::Google::Protobuf::MessageExts
|
623
649
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
650
|
+
|
651
|
+
# The schema restrictions actively enforced in creating this report. To learn
|
652
|
+
# more, see [Access and data-restriction
|
653
|
+
# management](https://support.google.com/analytics/answer/10851388).
|
654
|
+
# @!attribute [rw] active_metric_restrictions
|
655
|
+
# @return [::Array<::Google::Analytics::Data::V1beta::ResponseMetaData::SchemaRestrictionResponse::ActiveMetricRestriction>]
|
656
|
+
# All restrictions actively enforced in creating the report. For example,
|
657
|
+
# `purchaseRevenue` always has the restriction type `REVENUE_DATA`.
|
658
|
+
# However, this active response restriction is only populated if the user's
|
659
|
+
# custom role disallows access to `REVENUE_DATA`.
|
660
|
+
class SchemaRestrictionResponse
|
661
|
+
include ::Google::Protobuf::MessageExts
|
662
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
663
|
+
|
664
|
+
# A metric actively restricted in creating the report.
|
665
|
+
# @!attribute [rw] metric_name
|
666
|
+
# @return [::String]
|
667
|
+
# The name of the restricted metric.
|
668
|
+
# @!attribute [rw] restricted_metric_types
|
669
|
+
# @return [::Array<::Google::Analytics::Data::V1beta::RestrictedMetricType>]
|
670
|
+
# The reason for this metric's restriction.
|
671
|
+
class ActiveMetricRestriction
|
672
|
+
include ::Google::Protobuf::MessageExts
|
673
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
674
|
+
end
|
675
|
+
end
|
624
676
|
end
|
625
677
|
|
626
678
|
# Describes a dimension column in the report. Dimensions requested in a report
|
@@ -820,6 +872,10 @@ module Google
|
|
820
872
|
# @!attribute [rw] custom_definition
|
821
873
|
# @return [::Boolean]
|
822
874
|
# True if the dimension is a custom dimension for this property.
|
875
|
+
# @!attribute [rw] category
|
876
|
+
# @return [::String]
|
877
|
+
# The display name of the category that this dimension belongs to. Similar
|
878
|
+
# dimensions and metrics are categorized together.
|
823
879
|
class DimensionMetadata
|
824
880
|
include ::Google::Protobuf::MessageExts
|
825
881
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -854,9 +910,67 @@ module Google
|
|
854
910
|
# @!attribute [rw] custom_definition
|
855
911
|
# @return [::Boolean]
|
856
912
|
# True if the metric is a custom metric for this property.
|
913
|
+
# @!attribute [rw] blocked_reasons
|
914
|
+
# @return [::Array<::Google::Analytics::Data::V1beta::MetricMetadata::BlockedReason>]
|
915
|
+
# If reasons are specified, your access is blocked to this metric for this
|
916
|
+
# property. API requests from you to this property for this metric will
|
917
|
+
# succeed; however, the report will contain only zeros for this metric. API
|
918
|
+
# requests with metric filters on blocked metrics will fail. If reasons are
|
919
|
+
# empty, you have access to this metric.
|
920
|
+
#
|
921
|
+
# To learn more, see [Access and data-restriction
|
922
|
+
# management](https://support.google.com/analytics/answer/10851388).
|
923
|
+
# @!attribute [rw] category
|
924
|
+
# @return [::String]
|
925
|
+
# The display name of the category that this metrics belongs to. Similar
|
926
|
+
# dimensions and metrics are categorized together.
|
857
927
|
class MetricMetadata
|
858
928
|
include ::Google::Protobuf::MessageExts
|
859
929
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
930
|
+
|
931
|
+
# Justifications for why this metric is blocked.
|
932
|
+
module BlockedReason
|
933
|
+
# Will never be specified in API response.
|
934
|
+
BLOCKED_REASON_UNSPECIFIED = 0
|
935
|
+
|
936
|
+
# If present, your access is blocked to revenue related metrics for this
|
937
|
+
# property, and this metric is revenue related.
|
938
|
+
NO_REVENUE_METRICS = 1
|
939
|
+
|
940
|
+
# If present, your access is blocked to cost related metrics for this
|
941
|
+
# property, and this metric is cost related.
|
942
|
+
NO_COST_METRICS = 2
|
943
|
+
end
|
944
|
+
end
|
945
|
+
|
946
|
+
# The compatibility for a single dimension.
|
947
|
+
# @!attribute [rw] dimension_metadata
|
948
|
+
# @return [::Google::Analytics::Data::V1beta::DimensionMetadata]
|
949
|
+
# The dimension metadata contains the API name for this compatibility
|
950
|
+
# information. The dimension metadata also contains other helpful information
|
951
|
+
# like the UI name and description.
|
952
|
+
# @!attribute [rw] compatibility
|
953
|
+
# @return [::Google::Analytics::Data::V1beta::Compatibility]
|
954
|
+
# The compatibility of this dimension. If the compatibility is COMPATIBLE,
|
955
|
+
# this dimension can be successfully added to the report.
|
956
|
+
class DimensionCompatibility
|
957
|
+
include ::Google::Protobuf::MessageExts
|
958
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
959
|
+
end
|
960
|
+
|
961
|
+
# The compatibility for a single metric.
|
962
|
+
# @!attribute [rw] metric_metadata
|
963
|
+
# @return [::Google::Analytics::Data::V1beta::MetricMetadata]
|
964
|
+
# The metric metadata contains the API name for this compatibility
|
965
|
+
# information. The metric metadata also contains other helpful information
|
966
|
+
# like the UI name and description.
|
967
|
+
# @!attribute [rw] compatibility
|
968
|
+
# @return [::Google::Analytics::Data::V1beta::Compatibility]
|
969
|
+
# The compatibility of this metric. If the compatibility is COMPATIBLE,
|
970
|
+
# this metric can be successfully added to the report.
|
971
|
+
class MetricCompatibility
|
972
|
+
include ::Google::Protobuf::MessageExts
|
973
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
860
974
|
end
|
861
975
|
|
862
976
|
# Represents aggregation of metrics.
|
@@ -918,6 +1032,33 @@ module Google
|
|
918
1032
|
# A length in kilometers; a special floating point type.
|
919
1033
|
TYPE_KILOMETERS = 13
|
920
1034
|
end
|
1035
|
+
|
1036
|
+
# Categories of data that you may be restricted from viewing on certain GA4
|
1037
|
+
# properties.
|
1038
|
+
module RestrictedMetricType
|
1039
|
+
# Unspecified type.
|
1040
|
+
RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0
|
1041
|
+
|
1042
|
+
# Cost metrics such as `adCost`.
|
1043
|
+
COST_DATA = 1
|
1044
|
+
|
1045
|
+
# Revenue metrics such as `purchaseRevenue`.
|
1046
|
+
REVENUE_DATA = 2
|
1047
|
+
end
|
1048
|
+
|
1049
|
+
# The compatibility types for a single dimension or metric.
|
1050
|
+
module Compatibility
|
1051
|
+
# Unspecified compatibility.
|
1052
|
+
COMPATIBILITY_UNSPECIFIED = 0
|
1053
|
+
|
1054
|
+
# The dimension or metric is compatible. This dimension or metric can be
|
1055
|
+
# successfully added to a report.
|
1056
|
+
COMPATIBLE = 1
|
1057
|
+
|
1058
|
+
# The dimension or metric is incompatible. This dimension or metric cannot be
|
1059
|
+
# successfully added to a report.
|
1060
|
+
INCOMPATIBLE = 2
|
1061
|
+
end
|
921
1062
|
end
|
922
1063
|
end
|
923
1064
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-analytics-data-v1beta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.7'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.7'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|