google-analytics-data-v1alpha 0.2.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5e13b1aba1492a99bdbca9844b8ac1e2b199afb970711e06fcdc7ca70fe2def1
4
- data.tar.gz: fb9df83e9d524a47d1995bc22b7c0813713ac44f1adecb7169b045a489b8ac92
3
+ metadata.gz: 0df7ce139a07a0a04c8ab6eac58e9a9133854397c3341ffd7c4d92e72cc51a44
4
+ data.tar.gz: 1ae183bfc5af5c2860c392225a0730fc7b7e639b8c4e988f64ab149605b93c32
5
5
  SHA512:
6
- metadata.gz: cff0bfd6011cb6a3e8df55833e882f9d0653eb4ee61657b734ce3e90ede76169428f38c9af8ead57c6c42a87668c4c61deaa9bf87efe1989f98974000583db38
7
- data.tar.gz: 27beadc602765008f63f2bcd4b8d5f3abf49c4846d8c02d4b4f16c3820b087be276aed162dcd73ed5acb108196d8f5dee97cd2cd8d6e76f3f2c68d3bf7d5b194
6
+ metadata.gz: a4ddb36c9b77fa122d64ad7ee2f8dad8c417fded8388d3baf6fb53f442e136d4670d94483677acc070ba291bd16f3fbf0a1e0b137222be13c857d7d1208324f9
7
+ data.tar.gz: de5acb5b7ea89b169969ad9cbc0e49c0a6dfa8002ae25834bbe8a135a73ff976c8288d3b3765643df8408ce1c7478653fb2e6928389ee74c46a31343c75cd4d6
@@ -23,6 +23,7 @@ require "gapic/config/method"
23
23
  require "google/analytics/data/v1alpha/version"
24
24
 
25
25
  require "google/analytics/data/v1alpha/analytics_data/credentials"
26
+ require "google/analytics/data/v1alpha/analytics_data/paths"
26
27
  require "google/analytics/data/v1alpha/analytics_data/client"
27
28
 
28
29
  module Google
@@ -30,6 +30,8 @@ module Google
30
30
  # Google Analytics reporting data service.
31
31
  #
32
32
  class Client
33
+ include Paths
34
+
33
35
  # @private
34
36
  attr_reader :analytics_data_stub
35
37
 
@@ -197,9 +199,15 @@ module Google
197
199
  # must be unspecified.
198
200
  # @param offset [::Integer]
199
201
  # The row count of the start row. The first row is counted as row 0.
202
+ #
203
+ # To learn more about this pagination parameter, see
204
+ # [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
200
205
  # @param limit [::Integer]
201
206
  # The number of rows to return. If unspecified, 10 rows are returned. If
202
207
  # -1, all rows are returned.
208
+ #
209
+ # To learn more about this pagination parameter, see
210
+ # [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
203
211
  # @param metric_aggregations [::Array<::Google::Analytics::Data::V1alpha::MetricAggregation>]
204
212
  # Aggregation of metrics. Aggregated metric values will be shown in rows
205
213
  # where the dimension_values are set to "RESERVED_(MetricAggregation)".
@@ -502,40 +510,62 @@ module Google
502
510
 
503
511
  ##
504
512
  # Returns metadata for dimensions and metrics available in reporting methods.
505
- # Used to explore the dimensions and metrics. Dimensions and metrics will be
506
- # mostly added over time, but renames and deletions may occur.
513
+ # Used to explore the dimensions and metrics. In this method, a Google
514
+ # Analytics GA4 Property Identifier is specified in the request, and
515
+ # the metadata response includes Custom dimensions and metrics as well as
516
+ # Universal metadata.
507
517
  #
508
- # This method returns Universal Metadata. Universal Metadata are dimensions
509
- # and metrics applicable to any property such as `country` and `totalUsers`.
518
+ # For example if a custom metric with parameter name `levels_unlocked` is
519
+ # registered to a property, the Metadata response will contain
520
+ # `customEvent:levels_unlocked`. Universal metadata are dimensions and
521
+ # metrics applicable to any property such as `country` and `totalUsers`.
510
522
  #
511
- # @overload get_universal_metadata(request, options = nil)
512
- # Pass arguments to `get_universal_metadata` via a request object, either of type
513
- # {::Google::Analytics::Data::V1alpha::GetUniversalMetadataRequest} or an equivalent Hash.
523
+ # @overload get_metadata(request, options = nil)
524
+ # Pass arguments to `get_metadata` via a request object, either of type
525
+ # {::Google::Analytics::Data::V1alpha::GetMetadataRequest} or an equivalent Hash.
514
526
  #
515
- # @param request [::Google::Analytics::Data::V1alpha::GetUniversalMetadataRequest, ::Hash]
527
+ # @param request [::Google::Analytics::Data::V1alpha::GetMetadataRequest, ::Hash]
516
528
  # A request object representing the call parameters. Required. To specify no
517
529
  # parameters, or to keep all the default parameter values, pass an empty Hash.
518
530
  # @param options [::Gapic::CallOptions, ::Hash]
519
531
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
520
532
  #
533
+ # @overload get_metadata(name: nil)
534
+ # Pass arguments to `get_metadata` via keyword arguments. Note that at
535
+ # least one keyword argument is required. To specify no parameters, or to keep all
536
+ # the default parameter values, pass an empty Hash as a request object (see above).
537
+ #
538
+ # @param name [::String]
539
+ # Required. The resource name of the metadata to retrieve. This name field is
540
+ # specified in the URL path and not URL parameters. Property is a numeric
541
+ # Google Analytics GA4 Property identifier. To learn more, see [where to find
542
+ # your Property
543
+ # ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
544
+ #
545
+ # Example: properties/1234/metadata
546
+ #
547
+ # Set the Property ID to 0 for dimensions and metrics common to all
548
+ # properties. In this special mode, this method will not return custom
549
+ # dimensions and metrics.
550
+ #
521
551
  # @yield [response, operation] Access the result along with the RPC operation
522
- # @yieldparam response [::Google::Analytics::Data::V1alpha::UniversalMetadata]
552
+ # @yieldparam response [::Google::Analytics::Data::V1alpha::Metadata]
523
553
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
524
554
  #
525
- # @return [::Google::Analytics::Data::V1alpha::UniversalMetadata]
555
+ # @return [::Google::Analytics::Data::V1alpha::Metadata]
526
556
  #
527
557
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
528
558
  #
529
- def get_universal_metadata request, options = nil
559
+ def get_metadata request, options = nil
530
560
  raise ::ArgumentError, "request must be provided" if request.nil?
531
561
 
532
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Data::V1alpha::GetUniversalMetadataRequest
562
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Data::V1alpha::GetMetadataRequest
533
563
 
534
564
  # Converts hash and nil to an options object
535
565
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
536
566
 
537
567
  # Customize the options with defaults
538
- metadata = @config.rpcs.get_universal_metadata.metadata.to_h
568
+ metadata = @config.rpcs.get_metadata.metadata.to_h
539
569
 
540
570
  # Set x-goog-api-client and x-goog-user-project headers
541
571
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -543,13 +573,114 @@ module Google
543
573
  gapic_version: ::Google::Analytics::Data::V1alpha::VERSION
544
574
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
545
575
 
546
- options.apply_defaults timeout: @config.rpcs.get_universal_metadata.timeout,
576
+ header_params = {
577
+ "name" => request.name
578
+ }
579
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
580
+ metadata[:"x-goog-request-params"] ||= request_params_header
581
+
582
+ options.apply_defaults timeout: @config.rpcs.get_metadata.timeout,
547
583
  metadata: metadata,
548
- retry_policy: @config.rpcs.get_universal_metadata.retry_policy
584
+ retry_policy: @config.rpcs.get_metadata.retry_policy
549
585
  options.apply_defaults metadata: @config.metadata,
550
586
  retry_policy: @config.retry_policy
551
587
 
552
- @analytics_data_stub.call_rpc :get_universal_metadata, request, options: options do |response, operation|
588
+ @analytics_data_stub.call_rpc :get_metadata, request, options: options do |response, operation|
589
+ yield response, operation if block_given?
590
+ return response
591
+ end
592
+ rescue ::GRPC::BadStatus => e
593
+ raise ::Google::Cloud::Error.from_error(e)
594
+ end
595
+
596
+ ##
597
+ # The Google Analytics Realtime API returns a customized report of realtime
598
+ # event data for your property. These reports show events and usage from the
599
+ # last 30 minutes.
600
+ #
601
+ # @overload run_realtime_report(request, options = nil)
602
+ # Pass arguments to `run_realtime_report` via a request object, either of type
603
+ # {::Google::Analytics::Data::V1alpha::RunRealtimeReportRequest} or an equivalent Hash.
604
+ #
605
+ # @param request [::Google::Analytics::Data::V1alpha::RunRealtimeReportRequest, ::Hash]
606
+ # A request object representing the call parameters. Required. To specify no
607
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
608
+ # @param options [::Gapic::CallOptions, ::Hash]
609
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
610
+ #
611
+ # @overload run_realtime_report(property: nil, dimensions: nil, metrics: nil, limit: nil, dimension_filter: nil, metric_filter: nil, metric_aggregations: nil, order_bys: nil, return_property_quota: nil)
612
+ # Pass arguments to `run_realtime_report` via keyword arguments. Note that at
613
+ # least one keyword argument is required. To specify no parameters, or to keep all
614
+ # the default parameter values, pass an empty Hash as a request object (see above).
615
+ #
616
+ # @param property [::String]
617
+ # A Google Analytics GA4 property identifier whose events are tracked.
618
+ # Specified in the URL path and not the body. To learn more, see [where to
619
+ # find your Property
620
+ # ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
621
+ #
622
+ # Example: properties/1234
623
+ # @param dimensions [::Array<::Google::Analytics::Data::V1alpha::Dimension, ::Hash>]
624
+ # The dimensions requested and displayed.
625
+ # @param metrics [::Array<::Google::Analytics::Data::V1alpha::Metric, ::Hash>]
626
+ # The metrics requested and displayed.
627
+ # @param limit [::Integer]
628
+ # The number of rows to return. If unspecified, 10 rows are returned. If
629
+ # -1, all rows are returned.
630
+ # @param dimension_filter [::Google::Analytics::Data::V1alpha::FilterExpression, ::Hash]
631
+ # The filter clause of dimensions. Dimensions must be requested to be used in
632
+ # this filter. Metrics cannot be used in this filter.
633
+ # @param metric_filter [::Google::Analytics::Data::V1alpha::FilterExpression, ::Hash]
634
+ # The filter clause of metrics. Applied at post aggregation phase, similar to
635
+ # SQL having-clause. Metrics must be requested to be used in this filter.
636
+ # Dimensions cannot be used in this filter.
637
+ # @param metric_aggregations [::Array<::Google::Analytics::Data::V1alpha::MetricAggregation>]
638
+ # Aggregation of metrics. Aggregated metric values will be shown in rows
639
+ # where the dimension_values are set to "RESERVED_(MetricAggregation)".
640
+ # @param order_bys [::Array<::Google::Analytics::Data::V1alpha::OrderBy, ::Hash>]
641
+ # Specifies how rows are ordered in the response.
642
+ # @param return_property_quota [::Boolean]
643
+ # Toggles whether to return the current state of this Analytics Property's
644
+ # Realtime quota. Quota is returned in [PropertyQuota](#PropertyQuota).
645
+ #
646
+ # @yield [response, operation] Access the result along with the RPC operation
647
+ # @yieldparam response [::Google::Analytics::Data::V1alpha::RunRealtimeReportResponse]
648
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
649
+ #
650
+ # @return [::Google::Analytics::Data::V1alpha::RunRealtimeReportResponse]
651
+ #
652
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
653
+ #
654
+ def run_realtime_report request, options = nil
655
+ raise ::ArgumentError, "request must be provided" if request.nil?
656
+
657
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Data::V1alpha::RunRealtimeReportRequest
658
+
659
+ # Converts hash and nil to an options object
660
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
661
+
662
+ # Customize the options with defaults
663
+ metadata = @config.rpcs.run_realtime_report.metadata.to_h
664
+
665
+ # Set x-goog-api-client and x-goog-user-project headers
666
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
667
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
668
+ gapic_version: ::Google::Analytics::Data::V1alpha::VERSION
669
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
670
+
671
+ header_params = {
672
+ "property" => request.property
673
+ }
674
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
675
+ metadata[:"x-goog-request-params"] ||= request_params_header
676
+
677
+ options.apply_defaults timeout: @config.rpcs.run_realtime_report.timeout,
678
+ metadata: metadata,
679
+ retry_policy: @config.rpcs.run_realtime_report.retry_policy
680
+ options.apply_defaults metadata: @config.metadata,
681
+ retry_policy: @config.retry_policy
682
+
683
+ @analytics_data_stub.call_rpc :run_realtime_report, request, options: options do |response, operation|
553
684
  yield response, operation if block_given?
554
685
  return response
555
686
  end
@@ -714,10 +845,15 @@ module Google
714
845
  #
715
846
  attr_reader :batch_run_pivot_reports
716
847
  ##
717
- # RPC-specific configuration for `get_universal_metadata`
848
+ # RPC-specific configuration for `get_metadata`
849
+ # @return [::Gapic::Config::Method]
850
+ #
851
+ attr_reader :get_metadata
852
+ ##
853
+ # RPC-specific configuration for `run_realtime_report`
718
854
  # @return [::Gapic::Config::Method]
719
855
  #
720
- attr_reader :get_universal_metadata
856
+ attr_reader :run_realtime_report
721
857
 
722
858
  # @private
723
859
  def initialize parent_rpcs = nil
@@ -729,8 +865,10 @@ module Google
729
865
  @batch_run_reports = ::Gapic::Config::Method.new batch_run_reports_config
730
866
  batch_run_pivot_reports_config = parent_rpcs&.batch_run_pivot_reports if parent_rpcs&.respond_to? :batch_run_pivot_reports
731
867
  @batch_run_pivot_reports = ::Gapic::Config::Method.new batch_run_pivot_reports_config
732
- get_universal_metadata_config = parent_rpcs&.get_universal_metadata if parent_rpcs&.respond_to? :get_universal_metadata
733
- @get_universal_metadata = ::Gapic::Config::Method.new get_universal_metadata_config
868
+ get_metadata_config = parent_rpcs&.get_metadata if parent_rpcs&.respond_to? :get_metadata
869
+ @get_metadata = ::Gapic::Config::Method.new get_metadata_config
870
+ run_realtime_report_config = parent_rpcs&.run_realtime_report if parent_rpcs&.respond_to? :run_realtime_report
871
+ @run_realtime_report = ::Gapic::Config::Method.new run_realtime_report_config
734
872
 
735
873
  yield self if block_given?
736
874
  end
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Analytics
22
+ module Data
23
+ module V1alpha
24
+ module AnalyticsData
25
+ # Path helper methods for the AnalyticsData API.
26
+ module Paths
27
+ ##
28
+ # Create a fully-qualified Metadata resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `properties/{property}/metadata`
33
+ #
34
+ # @param property [String]
35
+ #
36
+ # @return [::String]
37
+ def metadata_path property:
38
+ "properties/#{property}/metadata"
39
+ end
40
+
41
+ extend self
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
@@ -7,8 +7,14 @@ require 'google/analytics/data/v1alpha/data_pb'
7
7
  require 'google/api/annotations_pb'
8
8
  require 'google/api/client_pb'
9
9
  require 'google/api/field_behavior_pb'
10
+ require 'google/api/resource_pb'
10
11
  Google::Protobuf::DescriptorPool.generated_pool.build do
11
12
  add_file("google/analytics/data/v1alpha/analytics_data_api.proto", :syntax => :proto3) do
13
+ add_message "google.analytics.data.v1alpha.Metadata" do
14
+ optional :name, :string, 3
15
+ repeated :dimensions, :message, 1, "google.analytics.data.v1alpha.DimensionMetadata"
16
+ repeated :metrics, :message, 2, "google.analytics.data.v1alpha.MetricMetadata"
17
+ end
12
18
  add_message "google.analytics.data.v1alpha.RunReportRequest" do
13
19
  optional :entity, :message, 1, "google.analytics.data.v1alpha.Entity"
14
20
  repeated :dimensions, :message, 2, "google.analytics.data.v1alpha.Dimension"
@@ -72,11 +78,29 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
72
78
  add_message "google.analytics.data.v1alpha.BatchRunPivotReportsResponse" do
73
79
  repeated :pivot_reports, :message, 1, "google.analytics.data.v1alpha.RunPivotReportResponse"
74
80
  end
75
- add_message "google.analytics.data.v1alpha.GetUniversalMetadataRequest" do
81
+ add_message "google.analytics.data.v1alpha.GetMetadataRequest" do
82
+ optional :name, :string, 1
76
83
  end
77
- add_message "google.analytics.data.v1alpha.UniversalMetadata" do
78
- repeated :dimensions, :message, 1, "google.analytics.data.v1alpha.DimensionMetadata"
79
- repeated :metrics, :message, 2, "google.analytics.data.v1alpha.MetricMetadata"
84
+ add_message "google.analytics.data.v1alpha.RunRealtimeReportRequest" do
85
+ optional :property, :string, 1
86
+ repeated :dimensions, :message, 2, "google.analytics.data.v1alpha.Dimension"
87
+ repeated :metrics, :message, 3, "google.analytics.data.v1alpha.Metric"
88
+ optional :limit, :int64, 4
89
+ optional :dimension_filter, :message, 5, "google.analytics.data.v1alpha.FilterExpression"
90
+ optional :metric_filter, :message, 6, "google.analytics.data.v1alpha.FilterExpression"
91
+ repeated :metric_aggregations, :enum, 7, "google.analytics.data.v1alpha.MetricAggregation"
92
+ repeated :order_bys, :message, 8, "google.analytics.data.v1alpha.OrderBy"
93
+ optional :return_property_quota, :bool, 9
94
+ end
95
+ add_message "google.analytics.data.v1alpha.RunRealtimeReportResponse" do
96
+ repeated :dimension_headers, :message, 1, "google.analytics.data.v1alpha.DimensionHeader"
97
+ repeated :metric_headers, :message, 2, "google.analytics.data.v1alpha.MetricHeader"
98
+ repeated :rows, :message, 3, "google.analytics.data.v1alpha.Row"
99
+ repeated :totals, :message, 4, "google.analytics.data.v1alpha.Row"
100
+ repeated :maximums, :message, 5, "google.analytics.data.v1alpha.Row"
101
+ repeated :minimums, :message, 6, "google.analytics.data.v1alpha.Row"
102
+ optional :row_count, :int32, 7
103
+ optional :property_quota, :message, 8, "google.analytics.data.v1alpha.PropertyQuota"
80
104
  end
81
105
  end
82
106
  end
@@ -85,6 +109,7 @@ module Google
85
109
  module Analytics
86
110
  module Data
87
111
  module V1alpha
112
+ Metadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.Metadata").msgclass
88
113
  RunReportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.RunReportRequest").msgclass
89
114
  RunReportResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.RunReportResponse").msgclass
90
115
  RunPivotReportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.RunPivotReportRequest").msgclass
@@ -93,8 +118,9 @@ module Google
93
118
  BatchRunReportsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.BatchRunReportsResponse").msgclass
94
119
  BatchRunPivotReportsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.BatchRunPivotReportsRequest").msgclass
95
120
  BatchRunPivotReportsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.BatchRunPivotReportsResponse").msgclass
96
- GetUniversalMetadataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.GetUniversalMetadataRequest").msgclass
97
- UniversalMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.UniversalMetadata").msgclass
121
+ GetMetadataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.GetMetadataRequest").msgclass
122
+ RunRealtimeReportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.RunRealtimeReportRequest").msgclass
123
+ RunRealtimeReportResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.RunRealtimeReportResponse").msgclass
98
124
  end
99
125
  end
100
126
  end
@@ -54,12 +54,20 @@ module Google
54
54
  # Entity.
55
55
  rpc :BatchRunPivotReports, ::Google::Analytics::Data::V1alpha::BatchRunPivotReportsRequest, ::Google::Analytics::Data::V1alpha::BatchRunPivotReportsResponse
56
56
  # Returns metadata for dimensions and metrics available in reporting methods.
57
- # Used to explore the dimensions and metrics. Dimensions and metrics will be
58
- # mostly added over time, but renames and deletions may occur.
57
+ # Used to explore the dimensions and metrics. In this method, a Google
58
+ # Analytics GA4 Property Identifier is specified in the request, and
59
+ # the metadata response includes Custom dimensions and metrics as well as
60
+ # Universal metadata.
59
61
  #
60
- # This method returns Universal Metadata. Universal Metadata are dimensions
61
- # and metrics applicable to any property such as `country` and `totalUsers`.
62
- rpc :GetUniversalMetadata, ::Google::Analytics::Data::V1alpha::GetUniversalMetadataRequest, ::Google::Analytics::Data::V1alpha::UniversalMetadata
62
+ # For example if a custom metric with parameter name `levels_unlocked` is
63
+ # registered to a property, the Metadata response will contain
64
+ # `customEvent:levels_unlocked`. Universal metadata are dimensions and
65
+ # metrics applicable to any property such as `country` and `totalUsers`.
66
+ rpc :GetMetadata, ::Google::Analytics::Data::V1alpha::GetMetadataRequest, ::Google::Analytics::Data::V1alpha::Metadata
67
+ # The Google Analytics Realtime API returns a customized report of realtime
68
+ # event data for your property. These reports show events and usage from the
69
+ # last 30 minutes.
70
+ rpc :RunRealtimeReport, ::Google::Analytics::Data::V1alpha::RunRealtimeReportRequest, ::Google::Analytics::Data::V1alpha::RunRealtimeReportResponse
63
71
  end
64
72
 
65
73
  Stub = Service.rpc_stub_class
@@ -137,9 +137,6 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
137
137
  optional :dimension, :string, 2
138
138
  optional :date_range, :message, 3, "google.analytics.data.v1alpha.DateRange"
139
139
  end
140
- add_message "google.analytics.data.v1alpha.CohortReportSettings" do
141
- optional :accumulate, :bool, 1
142
- end
143
140
  add_message "google.analytics.data.v1alpha.CohortsRange" do
144
141
  optional :granularity, :enum, 1, "google.analytics.data.v1alpha.CohortsRange.Granularity"
145
142
  optional :start_offset, :int32, 2
@@ -151,6 +148,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
151
148
  value :WEEKLY, 2
152
149
  value :MONTHLY, 3
153
150
  end
151
+ add_message "google.analytics.data.v1alpha.CohortReportSettings" do
152
+ optional :accumulate, :bool, 1
153
+ end
154
154
  add_message "google.analytics.data.v1alpha.ResponseMetaData" do
155
155
  optional :data_loss_from_other_row, :bool, 3
156
156
  end
@@ -203,6 +203,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
203
203
  optional :ui_name, :string, 2
204
204
  optional :description, :string, 3
205
205
  repeated :deprecated_api_names, :string, 4
206
+ optional :custom_definition, :bool, 5
206
207
  end
207
208
  add_message "google.analytics.data.v1alpha.MetricMetadata" do
208
209
  optional :api_name, :string, 1
@@ -211,6 +212,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
211
212
  repeated :deprecated_api_names, :string, 4
212
213
  optional :type, :enum, 5, "google.analytics.data.v1alpha.MetricType"
213
214
  optional :expression, :string, 6
215
+ optional :custom_definition, :bool, 7
214
216
  end
215
217
  add_enum "google.analytics.data.v1alpha.MetricAggregation" do
216
218
  value :METRIC_AGGREGATION_UNSPECIFIED, 0
@@ -224,7 +226,15 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
224
226
  value :TYPE_INTEGER, 1
225
227
  value :TYPE_FLOAT, 2
226
228
  value :TYPE_SECONDS, 4
229
+ value :TYPE_MILLISECONDS, 5
230
+ value :TYPE_MINUTES, 6
231
+ value :TYPE_HOURS, 7
232
+ value :TYPE_STANDARD, 8
227
233
  value :TYPE_CURRENCY, 9
234
+ value :TYPE_FEET, 10
235
+ value :TYPE_MILES, 11
236
+ value :TYPE_METERS, 12
237
+ value :TYPE_KILOMETERS, 13
228
238
  end
229
239
  end
230
240
  end
@@ -258,9 +268,9 @@ module Google
258
268
  Pivot = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.Pivot").msgclass
259
269
  CohortSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.CohortSpec").msgclass
260
270
  Cohort = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.Cohort").msgclass
261
- CohortReportSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.CohortReportSettings").msgclass
262
271
  CohortsRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.CohortsRange").msgclass
263
272
  CohortsRange::Granularity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.CohortsRange.Granularity").enummodule
273
+ CohortReportSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.CohortReportSettings").msgclass
264
274
  ResponseMetaData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.ResponseMetaData").msgclass
265
275
  DimensionHeader = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.DimensionHeader").msgclass
266
276
  MetricHeader = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.MetricHeader").msgclass