google-analytics-data-v1beta 0.3.0 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d361901325beca50c3db3d44d2110e75312b33708aa639c3a5c7a5581e28a87
4
- data.tar.gz: 5ac4d0717a3e89ff33ba31b52a9a8c5b910bdb26785b570fd938eaedeb084f70
3
+ metadata.gz: e1f7897ecf6be76a1671e10114f3879e4beb7e73cc6f1fad9194f125f5b502c9
4
+ data.tar.gz: 9e8a3d5a72ec8a500d678f3c492eb88d0c1fb5cb7e8f4a40639f24da56d83564
5
5
  SHA512:
6
- metadata.gz: 79546585bba50ca3798b5323ad471b95a1a3abfe1e024d8dd5b7f1c3d57cef4cc428b36857b4dbc0e3b8a811078a0eae5c4789e9b40e6f74fc149dec11183910
7
- data.tar.gz: 279a03e5fa854ab7f3a3bab921dc4e8dfbb1d6b9ba31bd064dc6dd524fafd8aab0f67bf435c9fa26639e78463cb6223cb6c34b5e7cc46ff69972acc779e0d41f
6
+ metadata.gz: e5a3096f03815db99beed6086bab0f7ef9b54612be12de4dbb434f851bd0886bbaa01ae7a8dd1500a8a320866e4f447a5666354894cdd3ca9a4f00e930c14779
7
+ data.tar.gz: d9c3e0d95e7848005273c6430811e41d99439b7684a7b513848dc12c653341a4588ce57245d59b7b9274acb3a82c55341e0497ac9db3059d6c4a0657d6d17d43
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --no-private
2
- --title=Google Analytics Data V1beta API
2
+ --title="Google Analytics Data V1beta API"
3
3
  --exclude _pb\.rb$
4
4
  --markup markdown
5
5
  --markup-provider redcarpet
data/AUTHENTICATION.md CHANGED
@@ -120,15 +120,6 @@ To configure your system for this, simply:
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
121
121
  *should* only be used during development.
122
122
 
123
- [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
124
- [dev-console]: https://console.cloud.google.com/project
125
-
126
- [enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
127
-
128
- [create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
129
- [create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
130
- [reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
131
-
132
123
  ## Creating a Service Account
133
124
 
134
125
  Google Cloud requires **Service Account Credentials** to
@@ -139,31 +130,22 @@ If you are not running this client within
139
130
  [Google Cloud Platform environments](#google-cloud-platform-environments), you
140
131
  need a Google Developers service account.
141
132
 
142
- 1. Visit the [Google Developers Console][dev-console].
133
+ 1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
143
134
  2. Create a new project or click on an existing project.
144
- 3. Activate the slide-out navigation tray and select **API Manager**. From
135
+ 3. Activate the menu in the upper left and select **APIs & Services**. From
145
136
  here, you will enable the APIs that your application requires.
146
137
 
147
- ![Enable the APIs that your application requires][enable-apis]
148
-
149
138
  *Note: You may need to enable billing in order to use these services.*
150
139
 
151
140
  4. Select **Credentials** from the side navigation.
152
141
 
153
- You should see a screen like one of the following.
154
-
155
- ![Create a new service account][create-new-service-account]
156
-
157
- ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
158
-
159
- Find the "Add credentials" drop down and select "Service account" to be
160
- guided through downloading a new JSON key file.
142
+ Find the "Create credentials" drop down near the top of the page, and select
143
+ "Service account" to be guided through downloading a new JSON key file.
161
144
 
162
145
  If you want to re-use an existing service account, you can easily generate a
163
- new key file. Just select the account you wish to re-use, and click "Generate
164
- new JSON key":
165
-
166
- ![Re-use an existing service account][reuse-service-account]
146
+ new key file. Just select the account you wish to re-use, click the pencil
147
+ tool on the right side to edit the service account, select the **Keys** tab,
148
+ and then select **Add Key**.
167
149
 
168
150
  The key file you download will be used by this library to authenticate API
169
151
  requests and should be stored in a secure location.
@@ -260,6 +260,21 @@ module Google
260
260
  #
261
261
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
262
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
+ #
263
278
  def run_report request, options = nil
264
279
  raise ::ArgumentError, "request must be provided" if request.nil?
265
280
 
@@ -277,9 +292,11 @@ module Google
277
292
  gapic_version: ::Google::Analytics::Data::V1beta::VERSION
278
293
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
279
294
 
280
- header_params = {
281
- "property" => request.property
282
- }
295
+ header_params = {}
296
+ if request.property
297
+ header_params["property"] = request.property
298
+ end
299
+
283
300
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
284
301
  metadata[:"x-goog-request-params"] ||= request_params_header
285
302
 
@@ -377,6 +394,21 @@ module Google
377
394
  #
378
395
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
379
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
+ #
380
412
  def run_pivot_report request, options = nil
381
413
  raise ::ArgumentError, "request must be provided" if request.nil?
382
414
 
@@ -394,9 +426,11 @@ module Google
394
426
  gapic_version: ::Google::Analytics::Data::V1beta::VERSION
395
427
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
396
428
 
397
- header_params = {
398
- "property" => request.property
399
- }
429
+ header_params = {}
430
+ if request.property
431
+ header_params["property"] = request.property
432
+ end
433
+
400
434
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
401
435
  metadata[:"x-goog-request-params"] ||= request_params_header
402
436
 
@@ -457,6 +491,21 @@ module Google
457
491
  #
458
492
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
459
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
+ #
460
509
  def batch_run_reports request, options = nil
461
510
  raise ::ArgumentError, "request must be provided" if request.nil?
462
511
 
@@ -474,9 +523,11 @@ module Google
474
523
  gapic_version: ::Google::Analytics::Data::V1beta::VERSION
475
524
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
476
525
 
477
- header_params = {
478
- "property" => request.property
479
- }
526
+ header_params = {}
527
+ if request.property
528
+ header_params["property"] = request.property
529
+ end
530
+
480
531
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
481
532
  metadata[:"x-goog-request-params"] ||= request_params_header
482
533
 
@@ -537,6 +588,21 @@ module Google
537
588
  #
538
589
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
539
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
+ #
540
606
  def batch_run_pivot_reports request, options = nil
541
607
  raise ::ArgumentError, "request must be provided" if request.nil?
542
608
 
@@ -554,9 +620,11 @@ module Google
554
620
  gapic_version: ::Google::Analytics::Data::V1beta::VERSION
555
621
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
556
622
 
557
- header_params = {
558
- "property" => request.property
559
- }
623
+ header_params = {}
624
+ if request.property
625
+ header_params["property"] = request.property
626
+ end
627
+
560
628
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
561
629
  metadata[:"x-goog-request-params"] ||= request_params_header
562
630
 
@@ -624,6 +692,21 @@ module Google
624
692
  #
625
693
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
626
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
+ #
627
710
  def get_metadata request, options = nil
628
711
  raise ::ArgumentError, "request must be provided" if request.nil?
629
712
 
@@ -641,9 +724,11 @@ module Google
641
724
  gapic_version: ::Google::Analytics::Data::V1beta::VERSION
642
725
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
643
726
 
644
- header_params = {
645
- "name" => request.name
646
- }
727
+ header_params = {}
728
+ if request.name
729
+ header_params["name"] = request.name
730
+ end
731
+
647
732
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
648
733
  metadata[:"x-goog-request-params"] ||= request_params_header
649
734
 
@@ -734,6 +819,21 @@ module Google
734
819
  #
735
820
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
736
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
+ #
737
837
  def run_realtime_report request, options = nil
738
838
  raise ::ArgumentError, "request must be provided" if request.nil?
739
839
 
@@ -751,9 +851,11 @@ module Google
751
851
  gapic_version: ::Google::Analytics::Data::V1beta::VERSION
752
852
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
753
853
 
754
- header_params = {
755
- "property" => request.property
756
- }
854
+ header_params = {}
855
+ if request.property
856
+ header_params["property"] = request.property
857
+ end
858
+
757
859
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
758
860
  metadata[:"x-goog-request-params"] ||= request_params_header
759
861
 
@@ -836,6 +938,21 @@ module Google
836
938
  #
837
939
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
838
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
+ #
839
956
  def check_compatibility request, options = nil
840
957
  raise ::ArgumentError, "request must be provided" if request.nil?
841
958
 
@@ -853,9 +970,11 @@ module Google
853
970
  gapic_version: ::Google::Analytics::Data::V1beta::VERSION
854
971
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
855
972
 
856
- header_params = {
857
- "property" => request.property
858
- }
973
+ header_params = {}
974
+ if request.property
975
+ header_params["property"] = request.property
976
+ end
977
+
859
978
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
860
979
  metadata[:"x-goog-request-params"] ||= request_params_header
861
980
 
@@ -1,13 +1,13 @@
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
13
  add_message "google.analytics.data.v1beta.CheckCompatibilityRequest" do
@@ -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
@@ -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
@@ -216,8 +227,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
216
227
  optional :type, :enum, 5, "google.analytics.data.v1beta.MetricType"
217
228
  optional :expression, :string, 6
218
229
  optional :custom_definition, :bool, 7
230
+ repeated :blocked_reasons, :enum, 8, "google.analytics.data.v1beta.MetricMetadata.BlockedReason"
219
231
  optional :category, :string, 10
220
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
221
238
  add_message "google.analytics.data.v1beta.DimensionCompatibility" do
222
239
  proto3_optional :dimension_metadata, :message, 1, "google.analytics.data.v1beta.DimensionMetadata"
223
240
  proto3_optional :compatibility, :enum, 2, "google.analytics.data.v1beta.Compatibility"
@@ -248,6 +265,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
248
265
  value :TYPE_METERS, 12
249
266
  value :TYPE_KILOMETERS, 13
250
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
251
273
  add_enum "google.analytics.data.v1beta.Compatibility" do
252
274
  value :COMPATIBILITY_UNSPECIFIED, 0
253
275
  value :COMPATIBLE, 1
@@ -289,6 +311,8 @@ module Google
289
311
  CohortsRange::Granularity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.CohortsRange.Granularity").enummodule
290
312
  CohortReportSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.CohortReportSettings").msgclass
291
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
292
316
  DimensionHeader = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.DimensionHeader").msgclass
293
317
  MetricHeader = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.MetricHeader").msgclass
294
318
  PivotHeader = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.PivotHeader").msgclass
@@ -301,10 +325,12 @@ module Google
301
325
  QuotaStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.QuotaStatus").msgclass
302
326
  DimensionMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.DimensionMetadata").msgclass
303
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
304
329
  DimensionCompatibility = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.DimensionCompatibility").msgclass
305
330
  MetricCompatibility = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.MetricCompatibility").msgclass
306
331
  MetricAggregation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.MetricAggregation").enummodule
307
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
308
334
  Compatibility = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1beta.Compatibility").enummodule
309
335
  end
310
336
  end
@@ -21,7 +21,7 @@ module Google
21
21
  module Analytics
22
22
  module Data
23
23
  module V1beta
24
- VERSION = "0.3.0"
24
+ VERSION = "0.4.3"
25
25
  end
26
26
  end
27
27
  end
@@ -94,7 +94,7 @@ module Google
94
94
  # would like within the allowed character set. For example if a
95
95
  # `dimensionExpression` concatenates `country` and `city`, you could call
96
96
  # that dimension `countryAndCity`. Dimension names that you choose must match
97
- # the regular expression "^[a-zA-Z0-9_]$".
97
+ # the regular expression `^[a-zA-Z0-9_]$`.
98
98
  #
99
99
  # Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`,
100
100
  # `dimensionExpression`, and `pivots`.
@@ -168,7 +168,7 @@ module Google
168
168
  # within the allowed character set. For example if `expression` is
169
169
  # `screenPageViews/sessions`, you could call that metric's name =
170
170
  # `viewsPerSession`. Metric names that you choose must match the regular
171
- # expression "^[a-zA-Z0-9_]$".
171
+ # expression `^[a-zA-Z0-9_]$`.
172
172
  #
173
173
  # Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric
174
174
  # `expression`.
@@ -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
@@ -858,6 +910,16 @@ module Google
858
910
  # @!attribute [rw] custom_definition
859
911
  # @return [::Boolean]
860
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).
861
923
  # @!attribute [rw] category
862
924
  # @return [::String]
863
925
  # The display name of the category that this metrics belongs to. Similar
@@ -865,6 +927,20 @@ module Google
865
927
  class MetricMetadata
866
928
  include ::Google::Protobuf::MessageExts
867
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
868
944
  end
869
945
 
870
946
  # The compatibility for a single dimension.
@@ -957,6 +1033,19 @@ module Google
957
1033
  TYPE_KILOMETERS = 13
958
1034
  end
959
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
+
960
1049
  # The compatibility types for a single dimension or metric.
961
1050
  module Compatibility
962
1051
  # Unspecified compatibility.
@@ -33,11 +33,7 @@ module Google
33
33
  # // For Kubernetes resources, the format is {api group}/{kind}.
34
34
  # option (google.api.resource) = {
35
35
  # type: "pubsub.googleapis.com/Topic"
36
- # name_descriptor: {
37
- # pattern: "projects/{project}/topics/{topic}"
38
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
39
- # parent_name_extractor: "projects/{project}"
40
- # }
36
+ # pattern: "projects/{project}/topics/{topic}"
41
37
  # };
42
38
  # }
43
39
  #
@@ -45,10 +41,7 @@ module Google
45
41
  #
46
42
  # resources:
47
43
  # - type: "pubsub.googleapis.com/Topic"
48
- # name_descriptor:
49
- # - pattern: "projects/{project}/topics/{topic}"
50
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
- # parent_name_extractor: "projects/{project}"
44
+ # pattern: "projects/{project}/topics/{topic}"
52
45
  #
53
46
  # Sometimes, resources have multiple patterns, typically because they can
54
47
  # live under multiple parents.
@@ -58,26 +51,10 @@ module Google
58
51
  # message LogEntry {
59
52
  # option (google.api.resource) = {
60
53
  # type: "logging.googleapis.com/LogEntry"
61
- # name_descriptor: {
62
- # pattern: "projects/{project}/logs/{log}"
63
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
64
- # parent_name_extractor: "projects/{project}"
65
- # }
66
- # name_descriptor: {
67
- # pattern: "folders/{folder}/logs/{log}"
68
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
69
- # parent_name_extractor: "folders/{folder}"
70
- # }
71
- # name_descriptor: {
72
- # pattern: "organizations/{organization}/logs/{log}"
73
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
74
- # parent_name_extractor: "organizations/{organization}"
75
- # }
76
- # name_descriptor: {
77
- # pattern: "billingAccounts/{billing_account}/logs/{log}"
78
- # parent_type: "billing.googleapis.com/BillingAccount"
79
- # parent_name_extractor: "billingAccounts/{billing_account}"
80
- # }
54
+ # pattern: "projects/{project}/logs/{log}"
55
+ # pattern: "folders/{folder}/logs/{log}"
56
+ # pattern: "organizations/{organization}/logs/{log}"
57
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
81
58
  # };
82
59
  # }
83
60
  #
@@ -85,48 +62,10 @@ module Google
85
62
  #
86
63
  # resources:
87
64
  # - type: 'logging.googleapis.com/LogEntry'
88
- # name_descriptor:
89
- # - pattern: "projects/{project}/logs/{log}"
90
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
91
- # parent_name_extractor: "projects/{project}"
92
- # - pattern: "folders/{folder}/logs/{log}"
93
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
94
- # parent_name_extractor: "folders/{folder}"
95
- # - pattern: "organizations/{organization}/logs/{log}"
96
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
97
- # parent_name_extractor: "organizations/{organization}"
98
- # - pattern: "billingAccounts/{billing_account}/logs/{log}"
99
- # parent_type: "billing.googleapis.com/BillingAccount"
100
- # parent_name_extractor: "billingAccounts/{billing_account}"
101
- #
102
- # For flexible resources, the resource name doesn't contain parent names, but
103
- # the resource itself has parents for policy evaluation.
104
- #
105
- # Example:
106
- #
107
- # message Shelf {
108
- # option (google.api.resource) = {
109
- # type: "library.googleapis.com/Shelf"
110
- # name_descriptor: {
111
- # pattern: "shelves/{shelf}"
112
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
113
- # }
114
- # name_descriptor: {
115
- # pattern: "shelves/{shelf}"
116
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
117
- # }
118
- # };
119
- # }
120
- #
121
- # The ResourceDescriptor Yaml config will look like:
122
- #
123
- # resources:
124
- # - type: 'library.googleapis.com/Shelf'
125
- # name_descriptor:
126
- # - pattern: "shelves/{shelf}"
127
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
128
- # - pattern: "shelves/{shelf}"
129
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
65
+ # pattern: "projects/{project}/logs/{log}"
66
+ # pattern: "folders/{folder}/logs/{log}"
67
+ # pattern: "organizations/{organization}/logs/{log}"
68
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
130
69
  # @!attribute [rw] type
131
70
  # @return [::String]
132
71
  # The resource type. It must be in the format of
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.3.0
4
+ version: 0.4.3
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-09-07 00:00:00.000000000 Z
11
+ date: 2022-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -204,7 +204,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
204
204
  - !ruby/object:Gem::Version
205
205
  version: '0'
206
206
  requirements: []
207
- rubygems_version: 3.2.17
207
+ rubygems_version: 3.3.4
208
208
  signing_key:
209
209
  specification_version: 4
210
210
  summary: API Client library for the Google Analytics Data V1beta API